:root {
  --green: #153f33;
  --green2: #1d5848;
  --mint: #eaf2ee;
  --gold: #c99b4c;
  --ink: #17211e;
  --muted: #68736f;
  --line: #dfe6e2;
  --white: #fff;
  --danger: #b64040;
  --danger-bg: #fff0f0;
  --shadow: 0 20px 55px rgba(17, 48, 39, .13);
  --radius: 22px
}

* {
  box-sizing: border-box
}

html {
  scroll-behavior: smooth
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f7faf8
}

button,
input,
textarea,
select {
  font: inherit
}

button {
  cursor: pointer
}

a {
  color: inherit;
  text-decoration: none
}

.hidden {
  display: none !important
}

.topbar {
  height: 78px;
  padding: 0 max(24px, 5vw);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(223, 230, 226, .8)
}

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

.brand>span:last-child {
  display: flex;
  flex-direction: column
}

.brand strong {
  font-size: 14px;
  letter-spacing: .02em
}

.brand small {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--green);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: -.04em;
  box-shadow: 0 10px 25px rgba(21, 63, 51, .2)
}

.brand-mark.large {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  font-size: 21px;
  margin-bottom: 10px
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px
}

.nav a {
  color: #43514c
}

.btn {
  border: 0;
  border-radius: 13px;
  padding: 12px 18px;
  font-weight: 700;
  transition: .2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px
}

.btn:hover {
  transform: translateY(-1px)
}

.btn-primary {
  background: var(--green);
  color: white;
  box-shadow: 0 10px 22px rgba(21, 63, 51, .18)
}

.btn-outline {
  background: white;
  border: 1px solid var(--green);
  color: var(--green)
}

.btn-ghost {
  background: rgba(255, 255, 255, .13);
  color: white;
  border: 1px solid rgba(255, 255, 255, .35)
}

.btn-danger {
  background: var(--danger);
  color: #fff
}

.btn-soft {
  background: var(--mint);
  color: var(--green)
}

.full {
  width: 100%
}

.hero {
  min-height: 620px;
  margin: 24px max(24px, 5vw) 0;
  border-radius: 32px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, rgba(13, 49, 39, .93), rgba(13, 49, 39, .45)), url('https://entrecredito.com/img/fachada.jpg') center/cover;
  box-shadow: var(--shadow)
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 75% 30%, rgba(255, 255, 255, .09), transparent 33%)
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 690px;
  padding: 110px 8vw;
  color: white
}

.eyebrow,
.kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold)
}

.hero h1 {
  font-size: clamp(50px, 7vw, 88px);
  line-height: .94;
  letter-spacing: -.055em;
  margin: 14px 0 22px
}

.hero p {
  font-size: 19px;
  color: rgba(255, 255, 255, .82);
  max-width: 510px
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 30px
}

.hero-card {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 3;
  background: rgba(255, 255, 255, .93);
  backdrop-filter: blur(12px);
  padding: 16px 20px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  box-shadow: 0 16px 35px rgba(0, 0, 0, .12)
}

.hero-card .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 6px rgba(201, 155, 76, .14)
}

.hero-card div {
  display: flex;
  flex-direction: column
}

.hero-card small {
  color: var(--muted);
  font-size: 11px
}

.hero-card strong {
  font-size: 14px;
  margin-top: 3px
}

.section {
  padding: 90px max(24px, 8vw)
}

.section.alt {
  background: #eff5f2
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 30px;
  margin-bottom: 32px
}

.section-head h2,
.assembly-panel h2 {
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -.04em;
  margin: 8px 0 0
}

.section-head p {
  color: var(--muted);
  max-width: 360px;
  text-align: right
}

.kicker.danger {
  color: var(--danger)
}

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

.news-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  min-height: 190px;
  box-shadow: 0 8px 30px rgba(31, 64, 54, .05)
}

.news-card.alert {
  border-left: 4px solid var(--danger)
}

.news-card small {
  color: var(--muted);
  font-size: 11px
}

.news-card h3 {
  font-size: 19px;
  margin: 12px 0 10px
}

.news-card p {
  color: #596560;
  line-height: 1.6;
  margin: 0;
  white-space: pre-wrap
}

.empty-card {
  grid-column: 1/-1;
  border: 1px dashed #cfd8d3;
  border-radius: var(--radius);
  padding: 35px;
  text-align: center;
  color: var(--muted)
}

.assembly-panel {
  border-radius: 28px;
  background: var(--green);
  color: white;
  padding: 36px 42px;
  display: flex;
  align-items: center;
  gap: 24px;
  box-shadow: var(--shadow)
}

.assembly-panel p {
  color: rgba(255, 255, 255, .72);
  margin-bottom: 0
}

.assembly-icon {
  width: 70px;
  height: 70px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .11);
  display: grid;
  place-items: center;
  font-size: 30px
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(7, 23, 18, .62);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px
}

.modal-card {
  width: min(480px, 100%);
  background: white;
  border-radius: 26px;
  padding: 34px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .28);
  position: relative
}

.login-card {
  text-align: center
}

.modal-card>p {
  color: var(--muted)
}

.modal-close {
  position: absolute;
  right: 18px;
  top: 15px;
  border: 0;
  background: transparent;
  font-size: 28px;
  color: #7c8783
}

.form-stack {
  display: grid;
  gap: 14px;
  text-align: left;
  margin-top: 24px
}

.form-stack label,
.field {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  color: #485650
}

.form-stack input,
.field input,
.field textarea,
.field select,
input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 13px;
  background: white;
  color: var(--ink);
  outline: 0
}

.form-stack input:focus,
.field input:focus,
.field textarea:focus,
.field select:focus,
input:focus,
textarea:focus,
select:focus {
  border-color: #79a493;
  box-shadow: 0 0 0 3px rgba(73, 133, 110, .1)
}

.form-error {
  color: var(--danger);
  font-size: 12px;
  min-height: 16px
}

.popup-icon {
  font-size: 36px
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px 1fr;
  background: #f4f7f5
}

.sidebar {
  background: #102f27;
  color: white;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh
}

.sidebar-brand {
  padding: 0 8px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, .1)
}

.sidebar .brand-mark {
  background: white;
  color: var(--green)
}

.sidebar .brand small {
  color: rgba(255, 255, 255, .55)
}

.side-nav {
  display: grid;
  gap: 6px;
  margin-top: 24px
}

.side-nav button {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, .72);
  text-align: left;
  padding: 12px 13px;
  border-radius: 11px;
  font-weight: 650;
  display: flex;
  gap: 10px;
  align-items: center
}

.side-nav button:hover,
.side-nav button.active {
  background: rgba(255, 255, 255, .11);
  color: white
}

.side-logout {
  margin-top: auto;
  border: 0;
  background: transparent;
  color: #f4c7c7;
  text-align: left;
  padding: 12px
}

.app-main {
  min-width: 0
}

.app-header {
  height: 76px;
  background: white;
  border-bottom: 1px solid var(--line);
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 15
}

.app-header>div:nth-child(2) {
  display: flex;
  flex-direction: column
}

.app-header small {
  color: var(--muted);
  font-size: 11px
}

.app-header-right {
  margin-left: auto
}

.pill {
  background: var(--mint);
  color: var(--green);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800
}

.icon-btn {
  display: none;
  border: 0;
  background: #eef4f1;
  border-radius: 10px;
  padding: 9px
}

.app-content {
  padding: 30px;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto
}

.page-title {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 24px
}

.page-title h1 {
  font-size: 32px;
  letter-spacing: -.04em;
  margin: 0
}

.page-title p {
  color: var(--muted);
  margin: 6px 0 0
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px
}

.stat {
  background: white;
  border: 1px solid var(--line);
  padding: 20px;
  border-radius: 17px
}

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

.stat strong {
  display: block;
  font-size: 26px;
  margin-top: 7px;
  letter-spacing: -.03em
}

.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: 0 8px 28px rgba(26, 58, 48, .04)
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  margin-bottom: 18px
}

.panel h2,
.panel h3 {
  margin: 0
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px
}

.data-table th {
  color: var(--muted);
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 10px;
  border-bottom: 1px solid var(--line)
}

.data-table td {
  padding: 11px 10px;
  border-bottom: 1px solid #edf1ef;
  vertical-align: middle
}

.data-table tr:last-child td {
  border-bottom: 0
}

.money {
  font-variant-numeric: tabular-nums;
  font-weight: 700
}

.total {
  font-weight: 850;
  color: var(--green)
}

.tag {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  background: #edf5f1;
  color: var(--green);
  font-size: 10px;
  font-weight: 800
}

.tag.warn {
  background: #fff3df;
  color: #925f12
}

.tag.red {
  background: #ffeded;
  color: #a53333
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px
}

.field.span-2 {
  grid-column: span 2
}

.field.span-4 {
  grid-column: 1/-1
}

.switch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px
}

.apt-toggle {
  border: 1px solid var(--line);
  background: white;
  padding: 9px 12px;
  border-radius: 11px;
  font-weight: 700
}

.apt-toggle.on {
  background: var(--green);
  color: white;
  border-color: var(--green)
}

.calc-result {
  background: #f5f9f7;
  border-radius: 16px;
  padding: 16px
}

.charge-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #e2e9e5
}

.charge-line:last-child {
  border-bottom: 0
}

.charge-line small {
  color: var(--muted)
}

.message-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden
}

.thread-list {
  border-right: 1px solid var(--line);
  background: #f7faf8;
  padding: 10px
}

.thread-list button {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 11px
}

.thread-list button.active,
.thread-list button:hover {
  background: white;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .05)
}

.chat {
  display: flex;
  flex-direction: column;
  min-width: 0
}

.chat-messages {
  padding: 18px;
  flex: 1;
  overflow: auto;
  max-height: 430px
}

.bubble {
  max-width: 76%;
  padding: 11px 13px;
  border-radius: 14px;
  background: #eef3f1;
  margin: 7px 0;
  font-size: 13px;
  line-height: 1.45
}

.bubble.mine {
  margin-left: auto;
  background: var(--green);
  color: white
}

.bubble small {
  display: block;
  opacity: .65;
  font-size: 9px;
  margin-top: 4px
}

.chat-form {
  display: flex;
  gap: 8px;
  padding: 14px;
  border-top: 1px solid var(--line)
}

.chat-form textarea {
  min-height: 48px;
  max-height: 100px;
  resize: vertical
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: #122f27;
  color: white;
  padding: 13px 18px;
  border-radius: 12px;
  z-index: 150;
  box-shadow: var(--shadow);
  font-size: 13px
}

.toast.error {
  background: #8d2f2f
}

.muted {
  color: var(--muted)
}

.right {
  text-align: right
}

.nowrap {
  white-space: nowrap
}

.section-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5
}

.upload-label {
  display: inline-flex;
  align-items: center;
  gap: 7px
}

.upload-label input {
  display: none
}

.alert-box {
  background: var(--danger-bg);
  border: 1px solid #f2cccc;
  color: #8f3030;
  padding: 13px 15px;
  border-radius: 13px
}

.success-box {
  background: #edf7f1;
  border: 1px solid #cce5d5;
  color: #245e42;
  padding: 13px 15px;
  border-radius: 13px
}

@media(max-width:980px) {
  .nav a {
    display: none
  }

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

  .sidebar {
    position: fixed;
    left: -270px;
    z-index: 50;
    width: 250px;
    transition: .2s
  }

  .sidebar.open {
    left: 0
  }

  .app-shell {
    grid-template-columns: 1fr
  }

  .icon-btn {
    display: block
  }

  .stats {
    grid-template-columns: 1fr 1fr
  }

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

  .field.span-4 {
    grid-column: 1/-1
  }
}

@media(max-width:680px) {
  .topbar {
    padding: 0 16px
  }

  .nav {
    gap: 8px
  }

  .nav .btn {
    padding: 10px 12px
  }

  .hero {
    margin: 12px;
    border-radius: 22px;
    min-height: 600px
  }

  .hero-content {
    padding: 90px 26px
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start
  }

  .hero-card {
    left: 18px;
    right: 18px;
    bottom: 18px;
    min-width: 0
  }

  .section {
    padding: 62px 18px
  }

  .section-head {
    display: block
  }

  .section-head p {
    text-align: left
  }

  .cards-grid,
  .grid-2,
  .grid-3,
  .stats,
  .form-grid {
    grid-template-columns: 1fr
  }

  .field.span-2,
  .field.span-4 {
    grid-column: auto
  }

  .assembly-panel {
    padding: 26px;
    align-items: flex-start
  }

  .app-content {
    padding: 18px 12px
  }

  .app-header {
    padding: 0 14px
  }

  .page-title {
    display: block
  }

  .message-layout {
    grid-template-columns: 1fr
  }

  .thread-list {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    display: flex;
    overflow: auto
  }

  .thread-list button {
    min-width: 90px
  }

  .data-table {
    font-size: 11px
  }

  .data-table th,
  .data-table td {
    padding: 8px 5px
  }

  .modal-card {
    padding: 28px 22px
  }
}

.admin-post {
  padding: 14px 0;
  border-bottom: 1px solid var(--line, #e6ebe8)
}

.admin-post:last-child {
  border-bottom: 0
}

.admin-post small {
  display: block;
  color: var(--muted, #6b7772);
  margin-bottom: 4px
}

.admin-post strong {
  display: block;
  margin-bottom: 5px
}

.admin-post p {
  margin: 0;
  white-space: pre-wrap
}

.field input[readonly] {
  background: #f2f5f3;
  color: #44524c;
  cursor: not-allowed
}


/* v1.2 - revisão completa de responsividade mobile */
html,
body {
  max-width: 100%;
  overflow-x: hidden
}

body.menu-open {
  overflow: hidden
}

.sidebar-close,
.sidebar-backdrop {
  display: none
}

.table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px
}

.table-scroll .data-table {
  margin: 0
}

.app-header,
.topbar {
  padding-left: max(14px, env(safe-area-inset-left));
  padding-right: max(14px, env(safe-area-inset-right))
}

.sidebar {
  padding-bottom: max(20px, env(safe-area-inset-bottom))
}

.modal {
  padding-bottom: max(18px, env(safe-area-inset-bottom))
}

@media(max-width:980px) {
  .sidebar {
    left: 0;
    transform: translateX(-105%);
    width: min(300px, 86vw);
    max-width: 86vw;
    z-index: 60;
    transition: transform .22s ease;
    box-shadow: 18px 0 45px rgba(4, 20, 15, .2);
    overflow-y: auto;
    overscroll-behavior: contain
  }

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

  .sidebar-close {
    display: grid;
    place-items: center;
    position: absolute;
    right: 12px;
    top: 12px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, .10);
    color: #fff;
    font-size: 27px;
    line-height: 1;
    z-index: 2
  }

  .sidebar-brand {
    padding-right: 48px
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    border: 0;
    padding: 0;
    background: rgba(7, 23, 18, .48);
    backdrop-filter: blur(2px);
    z-index: 55;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease
  }

  .sidebar-backdrop.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto
  }

  .icon-btn {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    font-size: 21px;
    flex: 0 0 44px
  }

  .app-main {
    width: 100%;
    min-width: 0
  }

  .data-table {
    min-width: 680px
  }

  .message-layout {
    min-width: 0
  }
}

@media(max-width:680px) {
  :root {
    --radius: 18px
  }

  body {
    font-size: 15px
  }

  button,
  .btn,
  .icon-btn,
  .side-nav button,
  .apt-toggle {
    min-height: 44px
  }

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

  .topbar {
    height: 68px;
    padding-inline: 12px;
    gap: 8px
  }

  .topbar .brand {
    gap: 8px;
    min-width: 0
  }

  .topbar .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    flex: 0 0 38px
  }

  .topbar .brand>span:last-child {
    min-width: 0
  }

  .topbar .brand strong {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 45vw
  }

  .topbar .brand small {
    display: none
  }

  .nav {
    gap: 6px;
    flex: 0 0 auto
  }

  .nav .btn {
    padding: 9px 11px;
    font-size: 12px;
    white-space: nowrap
  }

  .hero {
    margin: 10px;
    min-height: 570px;
    border-radius: 22px;
    background-position: 60% center
  }

  .hero-content {
    padding: 72px 20px 178px;
    max-width: none
  }

  .hero h1 {
    font-size: clamp(40px, 13vw, 54px);
    line-height: .98;
    margin: 12px 0 18px
  }

  .hero p {
    font-size: 16px;
    line-height: 1.55;
    margin: 0
  }

  .hero-actions {
    width: 100%;
    margin-top: 24px;
    gap: 10px;
    align-items: stretch
  }

  .hero-actions .btn {
    width: 100%
  }

  .hero-card {
    left: 14px;
    right: 14px;
    bottom: 14px;
    padding: 14px 16px;
    min-width: 0;
    max-width: none
  }

  .hero-card strong {
    overflow-wrap: anywhere
  }

  .section {
    padding: 50px 16px
  }

  .section-head {
    margin-bottom: 22px
  }

  .section-head h2,
  .assembly-panel h2 {
    font-size: 28px;
    line-height: 1.08
  }

  .section-head p {
    margin: 10px 0 0;
    line-height: 1.5
  }

  .news-card {
    padding: 19px;
    min-height: 0
  }

  .assembly-panel {
    padding: 22px;
    gap: 16px;
    flex-direction: column
  }

  .assembly-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    font-size: 25px;
    flex: 0 0 56px
  }

  .app-header {
    height: 68px;
    padding-inline: 10px;
    gap: 9px
  }

  .app-header>div:nth-child(2) {
    min-width: 0
  }

  .app-header #welcomeName {
    display: block;
    max-width: 34vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px
  }

  .app-header-right {
    min-width: 0;
    display: flex;
    justify-content: flex-end
  }

  .pill {
    padding: 7px 9px;
    font-size: 10px;
    max-width: 36vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
  }

  .app-content {
    padding: 16px 10px 28px;
    min-width: 0
  }

  .page-title {
    margin-bottom: 18px
  }

  .page-title h1 {
    font-size: 27px;
    line-height: 1.1
  }

  .page-title p {
    font-size: 13px;
    line-height: 1.5
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-bottom: 16px
  }

  .stat {
    padding: 14px 12px;
    border-radius: 15px;
    min-width: 0
  }

  .stat small {
    font-size: 9px;
    line-height: 1.3;
    display: block;
    min-height: 24px
  }

  .stat strong {
    font-size: 20px;
    margin-top: 4px;
    overflow-wrap: anywhere
  }

  .panel {
    padding: 16px 13px;
    border-radius: 17px;
    margin-bottom: 14px;
    min-width: 0
  }

  .panel-head {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px
  }

  .panel-head>div {
    min-width: 0;
    flex: 1 1 180px
  }

  .panel-head h3 {
    line-height: 1.25
  }

  .panel-head .section-note {
    margin: 5px 0 0
  }

  .grid-2,
  .grid-3,
  .form-grid {
    gap: 12px
  }

  .form-stack {
    gap: 12px;
    margin-top: 18px
  }

  .field,
  .form-stack label {
    font-size: 12px
  }

  .field input,
  .field textarea,
  .field select,
  .form-stack input,
  .form-stack textarea,
  .form-stack select,
  input,
  textarea,
  select {
    min-height: 46px;
    padding: 11px 12px;
    border-radius: 11px
  }

  textarea {
    line-height: 1.45
  }

  .switch-row {
    gap: 7px
  }

  .apt-toggle {
    padding: 8px 11px;
    flex: 1 1 70px
  }

  .table-scroll {
    margin-inline: 0;
    padding-bottom: 4px;
    border: 1px solid #edf1ef;
    background: #fff
  }

  .table-scroll .data-table {
    min-width: 720px;
    font-size: 12px
  }

  .data-table th,
  .data-table td {
    padding: 10px 9px
  }

  .data-table input {
    min-width: 110px
  }

  .data-table .adj-desc {
    min-width: 190px
  }

  .data-table .btn {
    min-height: 40px;
    padding: 9px 12px;
    font-size: 12px
  }

  .nowrap {
    white-space: nowrap
  }

  .charge-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px;
    padding: 12px 0
  }

  .charge-line small {
    display: block;
    line-height: 1.45;
    margin-top: 3px
  }

  .charge-line .total {
    white-space: nowrap
  }

  .calc-result {
    padding: 13px
  }

  .message-layout {
    min-height: calc(100dvh - 175px);
    border-radius: 16px;
    display: flex;
    flex-direction: column
  }

  .thread-list {
    display: flex;
    flex: 0 0 auto;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 6px;
    padding: 8px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch
  }

  .thread-list button {
    min-width: 82px;
    min-height: 42px;
    padding: 9px 11px;
    white-space: nowrap
  }

  .chat {
    min-height: 0;
    flex: 1
  }

  .chat-messages {
    padding: 12px;
    max-height: none;
    min-height: 280px;
    overflow-y: auto
  }

  .bubble {
    max-width: 88%;
    font-size: 13px;
    padding: 10px 12px;
    overflow-wrap: anywhere
  }

  .bubble small {
    font-size: 9px;
    line-height: 1.3
  }

  .chat-form {
    display: grid;
    grid-template-columns: 1fr;
    padding: 10px;
    gap: 8px;
    background: #fff
  }

  .chat-form textarea {
    min-height: 70px;
    max-height: 130px;
    resize: vertical
  }

  .chat-form .btn {
    width: 100%
  }

  .modal {
    padding: 10px;
    align-items: center
  }

  .modal-card {
    width: 100%;
    max-height: 92dvh;
    overflow-y: auto;
    border-radius: 22px 22px 16px 16px;
    padding: 28px 18px calc(22px + env(safe-area-inset-bottom))
  }

  .modal-close {
    width: 44px;
    height: 44px;
    right: 8px;
    top: 7px;
    display: grid;
    place-items: center
  }

  .toast {
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    text-align: center;
    padding: 12px 14px
  }

  .alert-box,
  .success-box {
    font-size: 13px;
    line-height: 1.5
  }
}

@media(max-width:390px) {
  .topbar .brand strong {
    max-width: 38vw
  }

  .nav .btn {
    padding: 8px 9px;
    font-size: 11px
  }

  .hero {
    min-height: 550px
  }

  .hero-content {
    padding-inline: 18px
  }

  .hero h1 {
    font-size: 39px
  }

  .stats {
    grid-template-columns: 1fr 1fr
  }

  .stat strong {
    font-size: 18px
  }

  .app-header #welcomeName {
    max-width: 28vw
  }

  .pill {
    max-width: 34vw
  }
}

@media(hover:none) {
  .btn:hover {
    transform: none
  }

  .side-nav button:hover,
  .thread-list button:hover {
    box-shadow: none
  }
}

body.modal-open {
  overflow: hidden
}

@media(max-width:360px) {
  #loginTop {
    font-size: 0;
    padding-inline: 11px
  }

  #loginTop::after {
    content: "Entrar";
    font-size: 12px
  }

  .topbar .brand strong {
    max-width: 43vw
  }
}

/* v1.3 — edição e exclusão administrativa */
.form-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap
}

.btn-small {
  padding: 8px 11px;
  border-radius: 10px;
  font-size: 12px
}

.admin-post-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px
}

.admin-post-actions .delete-post,
.delete-boleto,
#deleteAssemblyBtn {
  border-color: #e7bebe;
  color: var(--danger);
  background: #fff7f7
}

.admin-post-actions .delete-post:hover,
.delete-boleto:hover,
#deleteAssemblyBtn:hover {
  background: #ffeded
}

.assembly-admin-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px
}

.assembly-admin-current h3 {
  margin: 9px 0 4px
}

.assembly-admin-current p {
  margin: 0
}

.boleto-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap
}

.boleto-name {
  display: block;
  max-width: 220px;
  margin-top: 5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

@media(max-width:680px) {
  .form-actions>.btn {
    flex: 1 1 auto
  }

  .admin-post-actions .btn {
    flex: 1
  }

  .assembly-admin-current {
    align-items: stretch;
    flex-direction: column
  }

  .assembly-admin-current #deleteAssemblyBtn {
    width: 100%
  }

  .boleto-actions {
    min-width: 270px
  }

  .boleto-actions .btn,
  .boleto-actions .upload-label {
    flex: 1 1 auto
  }

  .boleto-name {
    max-width: 180px
  }
}

/* v1.5 — chat em tempo quase real e mensagens não lidas */
.side-nav button {
  position: relative
}

.nav-unread,
.thread-unread,
#messageNoticeCount {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #d94747;
  color: #fff;
  font-size: 10px;
  font-weight: 850;
  line-height: 1
}

.nav-unread {
  margin-left: auto;
  box-shadow: 0 0 0 2px rgba(16, 47, 39, .9)
}

.message-notice {
  position: relative;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--green);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  font-size: 17px;
  flex: 0 0 auto
}

.message-notice.has-unread {
  background: #fff7f7;
  border-color: #efc9c9;
  color: #a53333
}

.message-notice #messageNoticeCount {
  position: absolute;
  right: -6px;
  top: -7px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  box-shadow: 0 0 0 2px #fff
}

.app-header-right {
  display: flex;
  align-items: center;
  gap: 10px
}

.thread-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px
}

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

.thread-unread {
  flex: 0 0 auto
}

.live-chat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #edf7f1;
  color: #245e42;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap
}

.live-chat i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #35a66f;
  box-shadow: 0 0 0 4px rgba(53, 166, 111, .12)
}

.chat-messages {
  scroll-behavior: smooth
}

@media(max-width:680px) {
  .message-notice {
    width: 38px;
    height: 38px;
    border-radius: 11px
  }

  .app-header-right {
    gap: 7px
  }

  .thread-list button {
    min-width: 96px
  }

  .page-title .live-chat {
    margin-top: 10px
  }
}

@media(max-width:390px) {
  .message-notice {
    width: 36px;
    height: 36px
  }

  .app-header #welcomeName {
    max-width: 22vw
  }

  .pill {
    max-width: 29vw
  }
}

/* v1.6 — shell fixo, chat do condômino e PWA */
body.app-active {
  height: 100vh;
  height: 100dvh;
  overflow: hidden
}

body.app-active .app-shell {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden
}

body.app-active .sidebar {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  position: relative;
  top: auto;
  overflow: hidden;
  flex-shrink: 0
}

body.app-active .app-main {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable
}

body.app-active .app-header {
  top: 0
}

.side-install,
.side-logout {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 12px 13px;
  border-radius: 11px;
  font-weight: 700
}

.side-install {
  margin-top: auto;
  color: #d9ede5;
  background: rgba(255, 255, 255, .07)
}

.side-install:hover {
  background: rgba(255, 255, 255, .12);
  color: #fff
}

.side-logout {
  margin-top: 6px;
  color: #f4c7c7
}

/* Mantém no chat do morador a mesma arquitetura visual do chat do síndico. */
.resident-contact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  background: linear-gradient(180deg, #f7faf8, #f1f6f3)
}

.resident-contact-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 8px 22px rgba(26, 58, 48, .06)
}

.contact-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: -.03em;
  box-shadow: 0 8px 18px rgba(21, 63, 51, .16)
}

.resident-contact-card .thread-name strong {
  font-size: 13px;
  line-height: 1.2
}

.resident-contact-card .thread-name small {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.3
}

.contact-status {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #edf7f1;
  display: grid;
  place-items: center
}

.contact-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #35a66f;
  box-shadow: 0 0 0 4px rgba(53, 166, 111, .12)
}

.resident-contact-meta {
  margin-top: 2px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .66);
  border: 1px dashed #cfddd6;
  display: grid;
  gap: 4px
}

.resident-contact-meta>span {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 800;
  color: var(--muted)
}

.resident-contact-meta>strong {
  font-size: 19px;
  color: var(--green)
}

.resident-contact-meta>small {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.45;
  margin-top: 5px
}

.chat {
  background: #fff
}

.chat-header {
  min-height: 68px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #fff
}

.chat-header>div {
  display: grid;
  gap: 3px;
  min-width: 0
}

.chat-header strong {
  font-size: 14px
}

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

.chat-secure {
  font-size: 10px;
  font-weight: 750;
  color: #456159;
  background: #f2f7f4;
  border-radius: 999px;
  padding: 6px 9px;
  white-space: nowrap
}

.chat-empty {
  height: 100%;
  min-height: 230px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  text-align: center;
  color: var(--muted);
  padding: 24px
}

.chat-empty>span {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--mint);
  color: var(--green);
  display: grid;
  place-items: center;
  font-size: 20px;
  margin-bottom: 4px
}

.chat-empty strong {
  color: #41504b;
  font-size: 13px
}

.chat-empty small {
  font-size: 10px
}

.chat-error {
  padding: 0 14px 8px
}

@media(max-width:980px) {
  body.app-active .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden
  }

  body.app-active .app-main {
    height: 100vh;
    height: 100dvh
  }
}

@media(max-width:680px) {
  .resident-contact-list {
    display: block;
    overflow: visible;
    padding: 8px;
    background: #f7faf8
  }

  .resident-contact-card {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    padding: 9px 10px;
    border-radius: 12px
  }

  .contact-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px
  }

  .resident-contact-meta {
    display: none
  }

  .resident-chat .chat {
    min-height: 0
  }

  .chat-header {
    min-height: 60px;
    padding: 10px 12px
  }

  .chat-header small {
    max-width: 62vw
  }

  .chat-secure {
    font-size: 9px;
    padding: 5px 7px
  }
}

body.app-active.menu-open .app-main,
body.app-active.modal-open .app-main {
  overflow: hidden
}

/* v1.7 — boleto em destaque, perfil e identidade visual */
.brand-mark i {
  font-size: 18px;
  line-height: 1
}

.brand-mark.large i {
  font-size: 25px
}

body.app-active>.topbar {
  display: none !important
}

body.app-active #loginTop {
  display: none !important
}

.current-boleto-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  margin-bottom: 22px;
  padding: 24px;
  border-radius: 22px;
  background: linear-gradient(135deg, #153f33, #1d5848);
  color: #fff;
  box-shadow: 0 16px 38px rgba(21, 63, 51, .19);
  position: relative;
  overflow: hidden
}

.current-boleto-card:after {
  content: "";
  position: absolute;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  right: -90px;
  top: -115px;
  background: rgba(255, 255, 255, .055);
  pointer-events: none
}

.current-boleto-icon {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .14);
  font-size: 25px;
  position: relative;
  z-index: 1
}

.current-boleto-copy {
  position: relative;
  z-index: 1
}

.current-boleto-copy .kicker {
  color: #ebc77f
}

.current-boleto-copy h2 {
  margin: 4px 0 2px;
  font-size: 26px;
  letter-spacing: -.035em;
  text-transform: capitalize
}

.current-boleto-copy p {
  margin: 0;
  color: rgba(255, 255, 255, .72);
  font-size: 13px
}

.current-boleto-total {
  margin-top: 14px;
  display: flex;
  flex-direction: column
}

.current-boleto-total small {
  font-size: 9px;
  letter-spacing: .12em;
  color: rgba(255, 255, 255, .58);
  font-weight: 800
}

.current-boleto-total strong {
  font-size: 28px;
  line-height: 1.1;
  margin-top: 3px
}

.current-boleto-actions {
  display: grid;
  gap: 9px;
  min-width: 210px;
  position: relative;
  z-index: 1
}

.current-boleto-actions .btn-primary {
  background: #fff;
  color: var(--green);
  box-shadow: none
}

.current-boleto-actions .btn-soft {
  background: rgba(255, 255, 255, .1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .13)
}

.current-month-row {
  background: #f5faf7
}

.current-month-row td:first-child {
  box-shadow: inset 3px 0 0 var(--green)
}

.profile-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 18px;
  align-items: start
}

.profile-summary {
  background: linear-gradient(180deg, var(--green), #1b4f41);
  color: #fff;
  border-radius: 20px;
  padding: 26px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 12px 32px rgba(21, 63, 51, .12)
}

.profile-avatar {
  width: 74px;
  height: 74px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .14);
  font-size: 27px;
  margin-bottom: 14px
}

.profile-summary>strong {
  font-size: 18px
}

.profile-summary>span {
  margin-top: 4px;
  color: #d6e7e0;
  font-size: 12px
}

.profile-summary>small {
  margin-top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: #fff
}

.profile-form {
  margin: 0
}

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

.profile-readonly {
  background: #f5f8f6;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  justify-content: center
}

.profile-readonly>span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700
}

.profile-readonly>strong {
  margin-top: 4px
}

.profile-readonly>small {
  color: var(--muted);
  margin-top: 2px
}

.profile-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px
}

@media(max-width:900px) {
  .current-boleto-card {
    grid-template-columns: auto 1fr
  }

  .current-boleto-actions {
    grid-column: 1/-1;
    grid-template-columns: 1fr 1fr
  }

  .profile-layout {
    grid-template-columns: 1fr
  }

  .profile-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 15px;
    text-align: left;
    justify-items: start
  }

  .profile-avatar {
    grid-row: 1/4;
    margin: 0
  }

  .profile-summary>small {
    margin-top: 5px
  }
}

@media(max-width:680px) {
  .current-boleto-card {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 14px
  }

  .current-boleto-icon {
    width: 52px;
    height: 52px;
    border-radius: 15px
  }

  .current-boleto-copy h2 {
    font-size: 22px
  }

  .current-boleto-total strong {
    font-size: 25px
  }

  .current-boleto-actions {
    grid-column: auto;
    grid-template-columns: 1fr;
    min-width: 0
  }

  .current-boleto-actions .btn {
    width: 100%
  }

  .profile-grid {
    grid-template-columns: 1fr
  }

  .profile-grid .span-2 {
    grid-column: auto
  }

  .profile-summary {
    padding: 18px
  }

  .profile-avatar {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    font-size: 21px
  }

  .profile-actions .btn {
    width: 100%
  }
}


/* v1.8 — revisão do perfil */
.profile-layout {
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.profile-form {
  padding: 26px;
  min-width: 0
}

.profile-form .panel-head {
  margin-bottom: 20px
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
  align-items: start;
}

.profile-grid>.field,
.profile-grid>.profile-readonly {
  grid-column: auto !important;
  min-width: 0;
  margin: 0;
  align-self: start;
}

.profile-grid>.field:not(.profile-readonly) {
  display: grid;
  grid-template-rows: auto 46px minmax(18px, auto);
  gap: 7px;
  align-content: start;
}

.profile-grid>.field:not(.profile-readonly)>input {
  height: 46px;
  min-height: 46px;
  margin: 0;
}

.profile-grid>.field:not(.profile-readonly)>small {
  display: block;
  margin: 0;
  min-height: 18px;
}

.profile-readonly {
  min-height: 78px;
  align-self: start;
}

.profile-actions {
  padding-top: 2px
}

@media(max-width:900px) {
  .profile-layout {
    grid-template-columns: 1fr;
    gap: 18px
  }
}

@media(max-width:680px) {
  .profile-form {
    padding: 20px 16px
  }

  .profile-grid {
    grid-template-columns: 1fr;
    gap: 15px
  }

  .profile-grid>.field:not(.profile-readonly) {
    grid-template-rows: auto 48px auto
  }

  .profile-grid>.field:not(.profile-readonly)>input {
    height: 48px;
    min-height: 48px
  }

  .profile-readonly {
    min-height: 0
  }
}

/* v1.9 — máscara monetária e Livro Caixa */
.money-input {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #173f34;
  letter-spacing: .01em
}

.cash-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px
}

.cash-stat {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 7px 22px rgba(20, 56, 45, .055)
}

.cash-stat>span {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 18px
}

.cash-stat>div {
  min-width: 0;
  display: grid;
  gap: 4px
}

.cash-stat small {
  font-size: 9px;
  letter-spacing: .09em;
  color: var(--muted);
  font-weight: 850
}

.cash-stat strong {
  font-size: 23px;
  line-height: 1.1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums
}

.cash-stat.receita>span {
  background: #e9f7ef;
  color: #24734c
}

.cash-stat.receita strong {
  color: #24734c
}

.cash-stat.despesa>span {
  background: #fff0f0;
  color: #ae3d3d
}

.cash-stat.despesa strong {
  color: #ae3d3d
}

.cash-stat.saldo>span {
  background: var(--mint);
  color: var(--green)
}

.cash-stat.saldo strong {
  color: var(--green)
}

.cash-stat.saldo.negative strong {
  color: var(--danger)
}

.cash-filter {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 14px;
  align-items: end;
  padding: 18px
}

.cash-filter .btn {
  height: 46px;
  white-space: nowrap
}

.cash-entry-form {
  scroll-margin-top: 84px
}

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

.cash-entry-grid .span-2 {
  grid-column: span 2
}

.cash-type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap
}

.cash-type.receita {
  background: #e9f7ef;
  color: #24734c
}

.cash-type.despesa {
  background: #fff0f0;
  color: #ae3d3d
}

.cash-table td.money.receita {
  color: #24734c
}

.cash-table td.money.despesa {
  color: #ae3d3d
}

.cash-note {
  display: block;
  color: var(--muted);
  margin-top: 4px;
  max-width: 360px;
  white-space: normal;
  line-height: 1.4
}

.cash-row-actions {
  display: flex;
  gap: 7px;
  white-space: nowrap
}

.cash-row-actions .cash-delete {
  border-color: #e7bebe;
  color: var(--danger);
  background: #fff7f7
}

.cash-empty {
  padding: 42px 20px;
  text-align: center;
  color: var(--muted);
  display: grid;
  justify-items: center;
  gap: 7px
}

.cash-empty>i {
  width: 54px;
  height: 54px;
  border-radius: 17px;
  background: var(--mint);
  color: var(--green);
  display: grid;
  place-items: center;
  font-size: 20px;
  margin-bottom: 4px
}

.cash-empty strong {
  color: #41504b
}

.cash-empty p {
  margin: 0;
  font-size: 12px
}

.accountability-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border-radius: 999px;
  background: #edf5f1;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap
}

.accountability-intro {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 18px;
  padding: 17px 19px;
  border: 1px solid #d7e7df;
  border-radius: 18px;
  background: linear-gradient(135deg, #f5faf7, #fff)
}

.accountability-intro>span {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 14px;
  background: var(--green);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 18px
}

.accountability-intro>div {
  min-width: 0
}

.accountability-intro strong {
  color: var(--green)
}

.accountability-intro p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5
}

.statement-table td.money.receita {
  color: #24734c
}

.statement-table td.money.despesa {
  color: #ae3d3d
}

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

  .cash-stat.saldo {
    grid-column: 1/-1
  }

  .cash-entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }
}

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

  .cash-filter .field:nth-child(3) {
    grid-column: 1/-1
  }

  .cash-filter .btn {
    grid-column: 1/-1;
    width: 100%
  }
}

@media(max-width:680px) {
  .cash-stats {
    grid-template-columns: 1fr;
    gap: 9px
  }

  .cash-stat.saldo {
    grid-column: auto
  }

  .cash-stat {
    padding: 14px;
    border-radius: 15px
  }

  .cash-stat>span {
    width: 42px;
    height: 42px;
    flex-basis: 42px
  }

  .cash-stat strong {
    font-size: 20px
  }

  .cash-filter {
    grid-template-columns: 1fr;
    padding: 16px 13px;
    gap: 12px
  }

  .cash-filter .field:nth-child(3),
  .cash-filter .btn {
    grid-column: auto
  }

  .cash-entry-grid {
    grid-template-columns: 1fr;
    gap: 13px
  }

  .cash-entry-grid .span-2 {
    grid-column: auto
  }

  .cash-entry-form .form-actions .btn {
    width: 100%
  }

  .cash-row-actions {
    min-width: 150px
  }

  .cash-table {
    min-width: 820px !important
  }

  .accountability-badge {
    margin-top: 9px
  }

  .accountability-intro {
    align-items: flex-start;
    padding: 15px
  }

  .statement-table {
    min-width: 690px !important
  }
}

/* v1.11 — baixa de pagamentos e escala de limpeza */
.cleaning-section {
  background: linear-gradient(180deg, #f7faf8, #eef5f1)
}

.cleaning-public {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, .8fr);
  gap: 16px
}

.cleaning-current-card {
  min-height: 170px;
  border-radius: 24px;
  padding: 26px;
  background: linear-gradient(135deg, var(--green), #236451);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 16px 38px rgba(21, 63, 51, .16)
}

.cleaning-broom {
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .12);
  display: grid;
  place-items: center;
  font-size: 26px
}

.cleaning-current-card h3 {
  font-size: 30px;
  margin: 7px 0 4px
}

.cleaning-current-card p {
  margin: 0;
  color: rgba(255, 255, 255, .73)
}

.cleaning-next-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 26px;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center
}

.cleaning-next-card small {
  font-size: 9px;
  letter-spacing: .12em;
  color: var(--muted);
  font-weight: 850
}

.cleaning-next-card strong {
  font-size: 23px;
  color: var(--green);
  margin: 8px 0 5px
}

.cleaning-next-card span {
  font-size: 12px;
  color: var(--muted)
}

.cleaning-rule {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border-radius: 999px;
  background: #edf5f1;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap
}

.cleaning-admin-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, .7fr);
  gap: 14px;
  margin-bottom: 18px
}

.cleaning-admin-current,
.cleaning-admin-next {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 19px;
  display: flex;
  align-items: center;
  gap: 14px
}

.cleaning-admin-current>span {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  border-radius: 15px;
  background: var(--green);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 19px
}

.cleaning-admin-current>div {
  display: grid;
  gap: 3px
}

.cleaning-admin-current small,
.cleaning-admin-next small {
  font-size: 9px;
  letter-spacing: .1em;
  color: var(--muted);
  font-weight: 850
}

.cleaning-admin-current strong {
  font-size: 20px;
  color: var(--green)
}

.cleaning-admin-current p {
  margin: 0;
  color: var(--muted);
  font-size: 12px
}

.cleaning-admin-next {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center
}

.cleaning-admin-next strong {
  font-size: 18px;
  color: var(--green)
}

.cleaning-admin-next span {
  font-size: 11px;
  color: var(--muted)
}

.cleaning-config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px
}

.cleaning-active-block {
  margin-top: 19px;
  padding-top: 18px;
  border-top: 1px solid var(--line)
}

.cleaning-active-block>div:first-child p {
  margin: 5px 0 12px
}

.cleaning-apartments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px
}

.cleaning-apt-check {
  position: relative
}

.cleaning-apt-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none
}

.cleaning-apt-check span {
  min-width: 66px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 12px;
  background: #fff;
  color: #56635e;
  font-size: 12px;
  font-weight: 800;
  display: grid;
  place-items: center;
  cursor: pointer
}

.cleaning-apt-check input:checked+span {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  box-shadow: 0 7px 17px rgba(21, 63, 51, .14)
}

.cleaning-form .form-actions {
  margin-top: 18px
}

.cleaning-current-row {
  background: #f2f8f5
}

.cleaning-table td {
  font-variant-numeric: tabular-nums
}

.payment-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap
}

.payment-status.paid {
  background: #e5f7ec;
  color: #1f7048
}

.payment-status.pending {
  background: #fff4df;
  color: #8c601d
}

.payment-date {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
  max-width: 145px
}

.toggle-paid[data-paid="1"] {
  border-color: #d0ddd7
}

.current-boleto-card.paid {
  background: linear-gradient(135deg, #11613d, #19845a)
}

.resident-cleaning-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  margin-bottom: 18px;
  padding: 17px 19px;
  border-radius: 18px;
  border: 1px solid #d8e7df;
  background: #fff
}

.resident-cleaning-card.is-mine {
  border-color: #9ac9b0;
  background: #eef9f3;
  box-shadow: inset 4px 0 0 #2e8b5d
}

.resident-cleaning-icon {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: var(--mint);
  color: var(--green);
  display: grid;
  place-items: center;
  font-size: 19px
}

.resident-cleaning-card>div:nth-child(2) {
  display: grid;
  gap: 3px
}

.resident-cleaning-card small {
  font-size: 9px;
  letter-spacing: .1em;
  color: var(--muted);
  font-weight: 850
}

.resident-cleaning-card strong {
  color: var(--green)
}

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

.resident-cleaning-next {
  min-width: 80px;
  border-left: 1px solid var(--line);
  padding-left: 15px;
  display: grid;
  gap: 3px
}

.resident-cleaning-next strong {
  font-size: 17px
}

.payment-table {
  min-width: 980px
}

.resident-payment-table {
  min-width: 920px
}

@media(max-width:800px) {

  .cleaning-public,
  .cleaning-admin-summary {
    grid-template-columns: 1fr
  }

  .cleaning-config-grid {
    grid-template-columns: 1fr
  }
}

@media(max-width:680px) {
  .cleaning-current-card {
    min-height: 0;
    padding: 20px;
    align-items: flex-start
  }

  .cleaning-broom {
    width: 54px;
    height: 54px;
    flex-basis: 54px;
    border-radius: 16px;
    font-size: 21px
  }

  .cleaning-current-card h3 {
    font-size: 23px
  }

  .cleaning-next-card {
    padding: 20px
  }

  .cleaning-rule {
    margin-top: 9px
  }

  .cleaning-admin-current,
  .cleaning-admin-next {
    padding: 15px
  }

  .cleaning-admin-current strong {
    font-size: 17px
  }

  .cleaning-apartments {
    display: grid;
    grid-template-columns: repeat(4, 1fr)
  }

  .cleaning-apt-check span {
    min-width: 0;
    padding: 10px 6px
  }

  .resident-cleaning-card {
    grid-template-columns: auto 1fr;
    padding: 15px
  }

  .resident-cleaning-next {
    grid-column: 1/-1;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 10px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between
  }

  .resident-cleaning-icon {
    width: 44px;
    height: 44px
  }

  .payment-table {
    min-width: 980px !important
  }

  .resident-payment-table {
    min-width: 920px !important
  }
}