:root {
  --bg: #f4f1ea;
  --surface: #fffdf8;
  --ink: #232323;
  --muted: #706b62;
  --line: #d8d1c4;
  --line-strong: #9d9689;
  --accent: #2f6f63;
  --accent-dark: #1f5148;
  --accent-soft: #dcebe6;
  --warn: #a45b28;
  --shadow: 0 14px 30px rgba(36, 32, 26, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at top, #fffdf8 0, var(--bg) 54%);
}

.login-card {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  padding: 26px;
}

.login-card img {
  width: 86px;
  height: 86px;
  object-fit: cover;
}

.login-card h1 {
  font-size: 24px;
  margin-bottom: 8px;
}

.login-card small {
  color: var(--warn);
  min-height: 18px;
}

button,
input,
select,
textarea {
  font: inherit;
  min-width: 0;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px 1fr;
}

.sidebar {
  background: #262522;
  color: #fffaf0;
  padding: 24px 18px;
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  min-height: 100vh;
  overflow-y: auto;
  z-index: 10;
  scrollbar-color: rgba(255, 250, 240, 0.28) transparent;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.brand-mark {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  display: grid;
  place-items: center;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand strong {
  display: block;
  font-size: 20px;
}

.brand span,
.eyebrow,
.screen-header p,
.panel-title span {
  color: var(--muted);
  font-size: 13px;
}

.sidebar .brand span {
  color: rgba(255, 250, 240, 0.72);
}

.nav-tabs {
  display: grid;
  gap: 8px;
  padding-top: 22px;
}

.nav-button {
  border: 0;
  background: transparent;
  color: rgba(255, 250, 240, 0.78);
  padding: 12px 14px;
  text-align: left;
  border-radius: 6px;
}

.nav-button.active,
.nav-button:hover {
  background: rgba(255, 250, 240, 0.12);
  color: #fffaf0;
}

.workspace {
  grid-column: 2;
  padding: 26px;
  min-width: 0;
}

.topbar,
.screen-header,
.panel-title {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.topbar {
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 28px;
}

h2 {
  margin-bottom: 4px;
  font-size: 26px;
}

h3 {
  margin-bottom: 14px;
  font-size: 18px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.user-badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfaf6;
  color: var(--ink);
  padding: 5px 10px;
  font-weight: 700;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.import-grid,
.reports-layout,
.catalog-grid {
  display: grid;
  gap: 18px;
  align-items: start;
}

.import-grid {
  grid-template-columns: minmax(360px, 0.92fr) minmax(520px, 1.3fr);
}

.reports-layout {
  grid-template-columns: minmax(270px, 310px) minmax(0, 1fr);
}

.catalog-grid {
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
}

.important-dates-grid {
  margin-top: 18px;
}

.owner-column {
  display: grid;
  gap: 14px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(15, 18, 17, 0.45);
  padding: 20px;
}

.confirm-card {
  width: min(440px, 100%);
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  display: grid;
  gap: 12px;
  padding: 20px;
}

.confirm-card strong {
  font-size: 18px;
}

.confirm-card p {
  margin: 0;
  color: var(--ink);
  line-height: 1.45;
}

.confirm-card small {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

.info-message {
  display: grid;
  gap: 10px;
}

.info-date-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf6;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.info-date-item strong,
.info-date-item span,
.info-date-item small {
  display: block;
}

.info-date-item span,
.muted-text {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.form-panel,
.import-panel {
  display: grid;
  gap: 14px;
}

.form-mode {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf6;
  display: grid;
  gap: 3px;
  padding: 10px 12px;
}

.form-mode strong {
  color: var(--accent-dark);
}

.form-mode span,
.form-mode-inline {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.form-mode-inline {
  display: block;
  margin-top: 4px;
}

label {
  display: grid;
  gap: 7px;
  color: #3a3833;
  font-size: 13px;
  font-weight: 700;
  min-width: 0;
}

input,
select,
textarea {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 10px 11px;
  min-height: 40px;
  min-width: 0;
}

select {
  text-overflow: ellipsis;
}

input[readonly] {
  background: #f4f1ea;
  color: var(--muted);
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

input.lookup-valid {
  border-color: var(--accent);
  background: #f4fbf7;
}

input.lookup-invalid {
  border-color: #b85b43;
  background: #fff7f2;
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
}

.field-row.compact {
  grid-template-columns: minmax(0, 1fr) minmax(150px, 170px);
}

.field-row.single-field {
  grid-template-columns: minmax(0, 1fr);
}

.import-period-row {
  grid-template-columns: minmax(0, 1fr) minmax(150px, 170px);
  align-items: start;
}

#importMonth {
  max-width: 170px;
}

.textarea-field textarea {
  min-height: 345px;
  line-height: 1.42;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
}

.commission-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
  background: #fbf8f1;
}

.commission-box > span {
  font-weight: 800;
  grid-column: 1 / -1;
}

.manual-reservation-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf6;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.manual-reservation-box h3 {
  margin-bottom: 4px;
}

.radio-line {
  display: flex;
  grid-auto-flow: column;
  align-items: center;
  gap: 7px;
  font-weight: 600;
}

.radio-line input {
  width: 16px;
  min-height: 16px;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-line input {
  width: 16px;
  min-height: 16px;
}

.permission-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf6;
  display: grid;
  gap: 10px;
  padding: 12px;
}

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

.permission-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 9px;
  font-size: 12px;
}

.permission-item input {
  width: 16px;
  min-height: 16px;
  margin-top: 1px;
}

.permission-item span {
  display: block;
  color: var(--muted);
  font-weight: 600;
  margin-top: 2px;
}

.percent-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  max-width: 130px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  border: 1px solid transparent;
  border-radius: 6px;
  min-height: 40px;
  padding: 9px 14px;
  font-weight: 800;
  line-height: 1.2;
  max-width: 100%;
  white-space: normal;
}

.primary-button {
  background: var(--accent);
  color: #fff;
}

.primary-button:hover {
  background: var(--accent-dark);
}

.secondary-button {
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-color: #bed8d0;
}

.active-mode-button {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.ghost-button {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.danger-button {
  background: #fff3ee;
  color: #8c3c1d;
  border-color: #e4b9a5;
}

.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  min-height: 180px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 18px;
  background: #fbfaf6;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 960px;
  background: #fff;
}

.checkbox-line {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  flex-direction: row;
  gap: 9px;
  justify-content: flex-start;
  min-height: 40px;
  padding: 9px 10px;
}

.checkbox-line input {
  width: auto;
}

.reservation-table {
  min-width: 1300px;
}

.reservation-table-report {
  min-width: 1380px;
}

.expense-table {
  min-width: 940px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 8px;
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
  overflow-wrap: anywhere;
}

th {
  position: sticky;
  top: 0;
  background: #eee8db;
  z-index: 1;
  font-weight: 800;
}

td input,
td select {
  min-height: 34px;
  padding: 7px 8px;
  font-size: 13px;
}

.money-cell,
.number-cell {
  max-width: 105px;
}

.date-cell {
  max-width: 142px;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-button {
  min-height: 32px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 5px 9px;
  font-weight: 700;
  line-height: 1.2;
  white-space: normal;
}

.danger-mini-button {
  background: #fff3ee;
  border-color: #e4b9a5;
  color: #8c3c1d;
}

.report-list {
  display: grid;
  gap: 10px;
}

.report-filters {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.report-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  display: grid;
  gap: 7px;
}

.report-card strong {
  font-size: 15px;
}

.report-card small {
  color: var(--muted);
}

.record-meta {
  color: var(--muted);
  display: block;
  font-size: 12px;
  line-height: 1.35;
}

.record-meta.compact {
  min-width: 170px;
}

.report-card button {
  justify-self: start;
}

.report-editor-panel,
.report-list-panel {
  min-width: 0;
}

.editor-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: stretch;
  margin-bottom: 16px;
}

.editor-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 190px);
  gap: 12px;
  align-items: start;
}

.editor-fields label:first-child {
  grid-column: 1 / -1;
}

.editor-fields label:last-child {
  max-width: 190px;
}

#editorMonth {
  min-width: 168px;
}

.editor-head .button-row {
  justify-content: flex-start;
}

.totals-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 14px 0;
}

.total-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfaf6;
}

.total-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.total-box strong {
  font-size: 18px;
}

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

.payment-inline {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px;
  margin-bottom: 14px;
}

.payment-inline span,
.payment-inline small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.payment-inline strong {
  display: block;
  margin: 3px 0;
}

.closing-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  margin-bottom: 14px;
}

.closing-panel.closed {
  background: #f3faf7;
  border-color: #b8d3ca;
}

.closing-panel span,
.closing-panel small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.closing-panel strong {
  display: block;
  margin: 3px 0;
}

.editor-section {
  margin-top: 18px;
}

.catalog-list {
  display: grid;
  gap: 10px;
}

.catalog-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  display: grid;
  gap: 7px;
}

.catalog-item.selected-item {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(47, 111, 99, 0.12);
}

.catalog-item small {
  color: var(--muted);
}

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

.audit-item {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfaf6;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.audit-item strong {
  font-size: 14px;
}

.audit-item small {
  color: var(--muted);
}

.unit-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.unit-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfaf6;
  color: #3a3833;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
}

.muted-chip {
  color: var(--muted);
  font-weight: 600;
}

.status-chip {
  border-radius: 999px;
  display: inline-block;
  font-size: 11px !important;
  font-weight: 800;
  margin-left: 6px;
  padding: 3px 7px;
}

.active-chip {
  background: #e9f6ef;
  color: var(--accent-dark) !important;
}

.inactive-chip {
  background: #f1ebe2;
  color: #7a6552 !important;
}

.inactive-item {
  opacity: 0.76;
}

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

.linked-unit-item,
.inline-empty {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfaf6;
  padding: 9px 10px;
}

.linked-unit-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.linked-unit-item span {
  font-size: 13px;
  font-weight: 700;
}

.inline-empty {
  color: var(--muted);
  font-size: 13px;
}

.settings-form {
  max-width: 760px;
}

.condominium-units-panel {
  margin-top: 18px;
}

.condominium-unit-list {
  display: grid;
  gap: 12px;
}

.condominium-unit-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.condominium-unit-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.condominium-unit-head strong,
.condominium-unit-head small {
  display: block;
}

.condominium-unit-head small {
  color: var(--muted);
  margin-top: 3px;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(110px, 1fr));
  gap: 10px;
}

.inventory-grid label {
  font-size: 12px;
}

.inventory-grid input {
  min-height: 36px;
  padding: 7px 8px;
}

.amenities-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 8px;
}

.inventory-check {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfaf6;
  padding: 8px 10px;
}

.dashboard-header {
  align-items: flex-start;
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
}

.dashboard-actions label {
  width: 180px;
}

.dashboard-content {
  display: grid;
  gap: 16px;
}

.pending-grid {
  display: grid;
  gap: 16px;
}

.pending-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 12px;
}

.pending-section {
  display: grid;
  gap: 10px;
}

.workflow-panel {
  display: grid;
  gap: 12px;
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 10px;
}

.workflow-steps button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfaf6;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  min-height: 42px;
  padding: 10px;
  text-align: left;
}

.workflow-steps button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.workflow-panel small {
  color: var(--muted);
  font-weight: 700;
}

.history-filters {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(160px, 1fr) minmax(130px, 0.8fr) minmax(130px, 0.8fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.audit-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 8px;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 16px;
}

.help-card {
  display: grid;
  align-content: start;
  gap: 8px;
}

.help-card h3 {
  color: var(--accent-dark);
  margin-bottom: 4px;
}

.help-card ol {
  margin: 0;
  padding-left: 20px;
  color: #3a3833;
  line-height: 1.55;
}

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

.pending-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.pending-item {
  border: 1px solid var(--line);
  border-left: 5px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
}

.pending-item span,
.pending-item small {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-top: 3px;
}

.pending-actions {
  align-items: end;
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: 100px;
}

.severity-alta {
  border-left-color: #9b4c2d;
}

.severity-media {
  border-left-color: #b88b2d;
}

.severity-baixa {
  border-left-color: var(--accent);
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 16px;
  display: grid;
  gap: 8px;
}

.metric-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric-card strong {
  font-size: 24px;
}

.metric-card-strong {
  border-color: #b8d3ca;
  background: #eef7f3;
}

.dashboard-section {
  display: grid;
  gap: 12px;
}

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

.dashboard-table {
  min-width: 980px;
}

.dashboard-table.compact-table {
  min-width: 560px;
}

.dashboard-table td strong {
  font-size: 13px;
}

.closing-checklist {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.closing-check {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
  display: grid;
  gap: 4px;
}

.closing-check.ok {
  border-color: #b8d3ca;
  background: #f5faf7;
}

.closing-check.pending {
  border-color: #e6b8aa;
  background: #fff8f5;
}

.closing-check strong,
.closing-check small {
  font-size: 12px;
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 16px;
  align-items: start;
}

.calendar-layout.matrix-only {
  grid-template-columns: minmax(0, 1fr);
}

.calendar-panel {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-weekdays span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.calendar-day {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  min-height: 104px;
  padding: 8px;
  text-align: left;
  display: grid;
  align-content: start;
  gap: 6px;
}

.calendar-day-head {
  align-items: center;
  display: flex;
  gap: 6px;
  justify-content: space-between;
}

.calendar-day-head > span:first-child {
  font-weight: 800;
}

.calendar-day.has-important-date {
  border-color: #d4b647;
}

.holiday-dots {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 3px;
}

.holiday-dot {
  background: #c79a1b;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 999px;
  display: inline-block;
  height: 8px;
  width: 8px;
}

.holiday-alta_demanda {
  background: #2f6f63;
}

.holiday-evento {
  background: #8b5cf6;
}

.holiday-outro {
  background: #6b6257;
}

.calendar-day.outside-month {
  background: #f4f1ea;
  color: var(--muted);
}

.calendar-day.today {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(47, 111, 99, 0.14);
}

.calendar-chips {
  display: grid;
  gap: 4px;
}

.general-calendar-grid .calendar-day {
  min-height: 150px;
}

.general-calendar-grid .calendar-chips {
  max-height: 118px;
  overflow-y: auto;
  padding-right: 2px;
}

.calendar-grid.matrix-grid {
  display: block;
}

.calendar-matrix-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: 720px;
  overflow: auto;
  background: #fff;
}

.matrix-only .calendar-matrix-wrap {
  max-height: calc(100vh - 220px);
}

.calendar-matrix-table {
  border-collapse: collapse;
  min-width: 1200px;
  width: max-content;
}

.calendar-matrix-table caption {
  background: #f5df42;
  border-bottom: 1px solid #8a7d26;
  color: #111;
  font-size: 13px;
  font-weight: 900;
  padding: 7px;
  text-transform: uppercase;
}

.calendar-matrix-table th,
.calendar-matrix-table td {
  border: 1px solid #918d80;
  min-width: 112px;
  padding: 4px 5px;
  vertical-align: top;
}

.calendar-matrix-table thead th {
  background: #f5df42;
  color: #111;
  font-size: 11px;
  position: sticky;
  text-align: center;
  top: 0;
  z-index: 3;
}

.calendar-matrix-table .matrix-date-cell {
  background: #fffef2;
  color: #222;
  font-size: 11px;
  left: 0;
  min-width: 88px;
  position: sticky;
  z-index: 2;
}

.calendar-matrix-table .matrix-date-cell.has-important-date {
  background: #fff6c7;
  cursor: pointer;
}

.calendar-matrix-table .matrix-date-cell > span {
  display: inline-block;
  margin-right: 5px;
}

.calendar-matrix-table thead th:first-child {
  left: 0;
  min-width: 88px;
  z-index: 4;
}

.matrix-occupied-cell {
  background: #eef7ec;
}

.matrix-event {
  border-radius: 3px;
  color: #10231f;
  display: block;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.25;
  margin: 1px 0;
  overflow: hidden;
  padding: 2px 3px;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: uppercase;
}

.matrix-event.event-bloqueio {
  background: #f5df42;
  color: #111;
}

.matrix-event.event-bloqueio_automatico {
  background: #f2c94c;
  color: #111;
}

.matrix-event.event-manutencao,
.matrix-event.event-cancelada {
  background: #f8d0c2;
  color: #8c3c1d;
}

.calendar-day-count {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.event-chip {
  border-radius: 5px;
  color: #fff;
  display: block;
  font-size: 11px;
  font-weight: 800;
  overflow: hidden;
  padding: 3px 5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-confirmada,
.event-pendente,
.event-aguardando_pagamento,
.event-paga,
.event-checkin_feito,
.event-checkout_feito,
.event-limpeza_programada,
.event-finalizada,
.event-cortesia {
  background: var(--accent);
}

.event-bloqueio {
  background: #6b6257;
}

.event-bloqueio_automatico {
  background: #b18218;
  color: #111;
}

.event-cancelada,
.event-manutencao {
  background: #9b4c2d;
}

.calendar-empty {
  grid-column: 1 / -1;
}

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

.calendar-block-controls {
  display: grid;
  gap: 10px;
}

.calendar-general-summary {
  border: 1px solid #b8d3ca;
  border-radius: 8px;
  background: #f4faf7;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.calendar-general-summary h3 {
  margin: 0 0 4px;
}

.calendar-general-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.calendar-general-units {
  display: grid;
  gap: 5px;
}

.calendar-general-units span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.calendar-event-item,
.search-result,
.payment-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: grid;
  gap: 7px;
  padding: 12px;
}

.backup-status {
  border: 1px solid #b8d3ca;
  border-radius: 8px;
  background: #f4faf7;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px;
}

.backup-status strong,
.backup-status small,
.backup-status span {
  display: block;
}

.backup-status small,
.backup-status span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.calendar-event-item span,
.calendar-event-item small,
.payment-card span,
.payment-card small {
  color: var(--muted);
  font-size: 13px;
}

.calendar-event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.payment-sections {
  display: grid;
  gap: 18px;
}

.payment-section {
  display: grid;
  gap: 12px;
}

.section-title-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.section-title-row h3 {
  margin: 0 0 4px;
}

.section-title-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.payment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 14px;
}

.payment-grid > .inline-empty {
  grid-column: 1 / -1;
}

.payment-note {
  border: 1px solid #d8cbb8;
  border-radius: 8px;
  background: #fffaf0;
  color: #6d5632;
  font-size: 13px;
  font-weight: 800;
  padding: 10px 12px;
}

.payment-history-unit {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf6;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.payment-history-unit + .payment-history-unit {
  margin-top: 12px;
}

.payment-history-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.payment-history-head span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 700;
}

.history-grid {
  grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.payment-warning {
  color: #8c3c1d !important;
  font-weight: 800;
}

.message-layout {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.payment-card.paid {
  border-color: #b8d3ca;
  background: #f3faf7;
}

.payment-card.payment-janela {
  border-color: #b8d3ca;
  background: #f6fbf8;
}

.payment-card.payment-atrasado {
  border-color: #e6b8aa;
  background: #fff7f4;
}

.payment-values span,
.payment-values strong {
  display: block;
}

.payment-values strong {
  font-size: 22px;
}

.mini-upload {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 11px;
}

.mini-upload input {
  display: none;
}

.relocation-note {
  display: block;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  margin-top: 4px;
}

.mini-upload.disabled {
  opacity: 0.55;
  pointer-events: none;
}

.search-row {
  grid-template-columns: minmax(240px, 1fr) auto;
  align-items: end;
}

.search-results {
  display: grid;
  gap: 8px;
}

.search-result {
  cursor: pointer;
  text-align: left;
}

.search-result:hover {
  border-color: var(--accent);
  background: #fbfaf6;
}

.rank-cell {
  width: 48px;
  color: var(--accent-dark);
  font-weight: 800;
}

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

.hidden {
  display: none !important;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    width: auto;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .workspace {
    grid-column: auto;
  }

  .nav-tabs {
    grid-template-columns: repeat(16, minmax(120px, 1fr));
    overflow-x: auto;
  }

  .import-grid,
  .reports-layout,
  .catalog-grid,
  .calendar-layout,
  .message-layout,
  .dashboard-columns,
  .inventory-grid,
  .amenities-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .pending-summary {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .workflow-steps {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .history-filters {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

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

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

@media (max-width: 720px) {
  .workspace {
    padding: 18px;
  }

  .topbar,
  .screen-header,
  .panel-title,
  .editor-head {
    align-items: stretch;
    flex-direction: column;
    display: flex;
  }

  .field-row,
  .field-row.compact,
  .search-row,
  .commission-box,
  .editor-fields,
  .totals-strip,
  .notes-grid,
  .calendar-weekdays,
  .calendar-grid,
  .dashboard-metrics {
    grid-template-columns: 1fr;
  }

  .workflow-steps {
    grid-template-columns: 1fr;
  }

  .history-filters {
    grid-template-columns: 1fr;
  }

  .calendar-weekdays {
    display: none;
  }

  .calendar-day {
    min-height: 80px;
  }

  .payment-inline {
    align-items: stretch;
    flex-direction: column;
  }

  .closing-panel,
  .pending-item {
    align-items: stretch;
    flex-direction: column;
  }

  .pending-actions {
    justify-items: stretch;
  }

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

  .dashboard-actions label,
  .dashboard-actions button {
    width: 100%;
  }

  .condominium-unit-head {
    align-items: stretch;
    flex-direction: column;
  }

  .nav-tabs {
    grid-template-columns: 1fr 1fr;
  }
}
