/* RendimentoBB Dashboard 2026
   Visual override only: existing IDs and JavaScript behavior are preserved. */

:root {
  --db26-bg: #f3f7fb;
  --db26-surface: #ffffff;
  --db26-surface-soft: #f8fbfd;
  --db26-navy: #07152b;
  --db26-navy-soft: #0b3154;
  --db26-green: #08b67a;
  --db26-green-dark: #079765;
  --db26-mint: #eafaf4;
  --db26-text: #0b1830;
  --db26-muted: #607089;
  --db26-border: #e2eaf1;
  --db26-warning: #f59e0b;
  --db26-radius-lg: 22px;
  --db26-radius-md: 16px;
  --db26-shadow: 0 16px 42px rgba(15, 35, 58, 0.07);
}

body.dashboard-bg {
  background:
    radial-gradient(circle at 8% 0%, rgba(8, 182, 122, 0.07), transparent 26rem),
    linear-gradient(180deg, #f8fbfd 0%, var(--db26-bg) 44%, #f7fafc 100%);
  color: var(--db26-text);
}

.dashboard-container {
  width: min(100% - 40px, 1380px);
  max-width: 1380px;
  padding: 40px 0 72px;
}

.dashboard-main {
  gap: 20px;
}

.dashboard-main > .rb-dashboard {
  order: 1;
}

#dashboard-workspace-nav {
  order: 2;
}

#pms-dashboard-section,
#pms-properties-section,
#pms-roi-section {
  order: 3;
}

#pms-properties-section,
#pms-roi-section,
#investment-workspace-section {
  display: none;
}

#investment-workspace-section {
  order: 4;
}

[hidden] {
  display: none !important;
}

/* Executive control bar */
.rb-dashboard {
  border-radius: var(--db26-radius-lg);
}

.rb-hero {
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(540px, 1.55fr);
  gap: 28px;
  align-items: stretch;
  min-height: 190px;
  padding: 30px 34px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 88% 10%, rgba(8, 182, 122, 0.20), transparent 19rem),
    linear-gradient(120deg, var(--db26-navy) 0%, #0a213d 58%, var(--db26-navy-soft) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--db26-radius-lg);
  box-shadow: 0 22px 54px rgba(7, 21, 43, 0.18);
}

.rb-hero-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.rb-hero-left h1 {
  margin: 0;
  font-size: clamp(25px, 2.2vw, 34px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.rb-hero-left > p {
  max-width: 520px;
  margin: 10px 0 0;
  color: #c9d6e5;
  font-size: 14px;
  line-height: 1.55;
}

.rb-hero-live {
  width: fit-content;
  margin-top: 18px;
  padding: 7px 11px;
  color: #8df0c8;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
}

.rb-hero-badges {
  display: none;
}

.rb-hero-right {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 0;
  min-width: 0;
}

.rb-hero-card,
.rb-hero-card.status {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 18px 20px;
  color: #fff;
  background: transparent;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  box-shadow: none;
}

.rb-hero-card span {
  color: #c8d4e1;
  font-size: 12px;
  font-weight: 650;
}

.rb-hero-card h2,
.rb-hero-card.status h2 {
  margin: 9px 0 0;
  color: #19d293;
  font-size: clamp(23px, 2vw, 32px);
  line-height: 1;
  letter-spacing: -0.035em;
}

.rb-hero-card #roi-message {
  color: #8df0c8 !important;
  font-size: 11px !important;
}

/* Primary dashboard KPIs */
.rb-dashboard > .rb-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 0;
}

.rb-dashboard > .rb-kpi-grid .rb-kpi {
  min-height: 92px;
  padding: 17px 19px;
  background: var(--db26-surface);
  border: 1px solid var(--db26-border);
  border-radius: var(--db26-radius-md);
  box-shadow: 0 8px 24px rgba(15, 35, 58, 0.045);
}

.rb-dashboard > .rb-kpi-grid .rb-kpi::after {
  display: none;
}

.rb-dashboard > .rb-kpi-grid .rb-kpi span {
  color: var(--db26-muted);
  font-size: 12px;
  font-weight: 650;
}

.rb-dashboard > .rb-kpi-grid .rb-kpi h3 {
  margin-top: 8px;
  color: var(--db26-text);
  font-size: 23px;
  letter-spacing: -0.03em;
}

/* Quick operations */
#pms-quick-actions {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

#pms-quick-actions::after,
#pms-quick-actions > h3,
#pms-quick-actions > p {
  display: none;
}

#pms-quick-actions .quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

#pms-quick-actions .btn-dashboard {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 66px;
  padding: 17px 42px 17px 18px;
  color: var(--db26-text);
  text-align: left;
  background: var(--db26-surface);
  border: 1px solid var(--db26-border);
  border-radius: var(--db26-radius-md);
  box-shadow: 0 8px 24px rgba(15, 35, 58, 0.045);
}

#pms-quick-actions .btn-dashboard::after {
  content: "›";
  position: absolute;
  right: 18px;
  color: var(--db26-green-dark);
  font-size: 25px;
  line-height: 1;
}

#pms-quick-actions .btn-dashboard:hover {
  color: var(--db26-green-dark);
  border-color: rgba(8, 182, 122, 0.40);
  transform: translateY(-2px);
}

/* App navigation */
.pms-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 0 8px;
  background: var(--db26-surface);
  border: 1px solid var(--db26-border);
  border-radius: var(--db26-radius-md);
  box-shadow: var(--db26-shadow);
}

#dashboard-workspace-nav {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

#dashboard-workspace-nav::after {
  display: none;
}

.pms-nav .pms-tab,
.pms-nav #pms-tab-bookings {
  position: relative;
  min-height: 62px;
  padding: 14px 12px;
  color: #40506a;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}

.pms-nav .pms-tab::after,
.pms-nav #pms-tab-bookings::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 0;
  left: 18px;
  height: 3px;
  background: transparent;
  border-radius: 999px 999px 0 0;
}

.pms-nav .pms-tab:hover,
.pms-nav #pms-tab-bookings:hover,
.pms-nav .pms-tab.active {
  color: var(--db26-green-dark);
}

.pms-nav .pms-tab.active::after {
  background: var(--db26-green);
}

.pms-nav span {
  white-space: nowrap;
}

/* PMS overview */
#pms-dashboard-section {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.75fr);
  gap: 18px;
  align-items: start;
}

#pms-dashboard-section > .analysis-card {
  margin: 0;
  padding: 24px;
  height: auto !important;
  align-self: start;
  border: 1px solid var(--db26-border);
  border-radius: var(--db26-radius-lg);
  box-shadow: var(--db26-shadow);
}

#pms-dashboard-section > .analysis-card::after {
  display: none;
}

#pms-dashboard-section > .analysis-card:first-child {
  grid-column: 1 / -1;
}

#pms-dashboard-section > .analysis-card:first-child .rb-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

#pms-dashboard-section > .analysis-card:first-child .rb-kpi {
  min-height: 88px;
  padding: 15px;
  background: var(--db26-surface-soft);
  border: 1px solid var(--db26-border);
  border-radius: 14px;
  box-shadow: none;
}

#pms-dashboard-section > .analysis-card:first-child .rb-kpi:nth-child(n+7) {
  display: none;
}

#pms-dashboard-section > .analysis-card:first-child .rb-kpi::after {
  display: none;
}

#pms-dashboard-section > .analysis-card:first-child .rb-kpi span {
  color: var(--db26-muted);
  font-size: 11px;
}

#pms-dashboard-section > .analysis-card:first-child .rb-kpi h3 {
  margin-top: 8px;
  color: var(--db26-green-dark);
  font-size: 21px;
}

#executive-summary {
  grid-column: 2;
  padding: 25px !important;
  height: 460px !important;
  max-height: 460px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(8, 182, 122, 0.35) transparent;
  color: var(--db26-text);
  background:
    radial-gradient(circle at 100% 0%, rgba(8, 182, 122, 0.12), transparent 18rem),
    var(--db26-mint) !important;
  border-color: rgba(8, 182, 122, 0.22) !important;
}

#executive-summary::-webkit-scrollbar {
  width: 7px;
}

#executive-summary::-webkit-scrollbar-thumb {
  background: rgba(8, 182, 122, 0.30);
  border-radius: 999px;
}

#executive-summary h2 {
  margin: 0 0 7px;
  font-size: 20px;
}

#executive-summary > p {
  color: var(--db26-muted);
  font-size: 13px;
}

#executive-summary .portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#executive-summary .portfolio-stat {
  min-height: 84px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(8, 182, 122, 0.14);
  border-radius: 13px;
}

#executive-summary .portfolio-stat span {
  color: var(--db26-text);
  font-size: 19px;
}

#executive-summary .portfolio-stat p {
  margin-top: 4px;
  color: var(--db26-muted);
  font-size: 10px;
}

#pms-dashboard-section > .analysis-card:last-child {
  grid-column: 1;
  grid-row: 2;
  min-height: 0;
  height: 360px !important;
}

#pms-dashboard-section > .analysis-card:last-child h3 {
  margin: 0 0 18px;
  font-size: 20px;
}

#pms-performance-chart {
  width: 100% !important;
  height: 230px !important;
  max-height: 230px;
}

/* Real portfolio manager */
.portfolio-manager {
  margin: 48px 0 36px;
  padding: 32px !important;
  border: 1px solid #dbeafe !important;
  border-radius: 24px !important;
  background: linear-gradient(180deg, #fff, #f8fbff) !important;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .08) !important;
}

.portfolio-manager__header,
.portfolio-manager__item-head,
.portfolio-manager__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.portfolio-manager__eyebrow,
.portfolio-manager__origin,
.portfolio-manager__status,
.portfolio-manager__locked {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.portfolio-manager__eyebrow {
  padding: 6px 10px;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  letter-spacing: .04em;
}

.portfolio-manager h2 {
  margin: 12px 0 6px;
  color: #0f172a;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.1;
  letter-spacing: -.035em;
}

.portfolio-manager__header p,
.portfolio-manager__footer > span:first-child {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
}

.portfolio-manager__summary {
  flex: 0 0 auto;
  padding: 10px 14px;
  color: #0f172a;
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  font-size: 13px;
}

.portfolio-manager__item {
  margin-top: 18px;
  padding: 20px;
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 18px;
}

.portfolio-manager__origin {
  padding: 5px 9px;
}

.portfolio-manager__origin--linked {
  color: #047857;
  background: #ecfdf5;
}

.portfolio-manager__origin--manual {
  color: #1d4ed8;
  background: #eff6ff;
}

.portfolio-manager__item h3 {
  margin: 9px 0 0;
  color: #0f172a;
  font-size: 19px;
}

.portfolio-manager__status,
.portfolio-manager__locked {
  padding: 7px 10px;
}

.portfolio-manager__status--complete {
  color: #047857;
  background: #ecfdf5;
}

.portfolio-manager__status--incomplete {
  color: #b45309;
  background: #fffbeb;
}

.portfolio-manager__metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.portfolio-manager__metrics > div {
  min-width: 0;
  padding: 13px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.portfolio-manager__metrics span {
  display: block;
  margin-bottom: 5px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.portfolio-manager__metrics strong {
  color: #0f172a;
  font-size: 16px;
  white-space: nowrap;
}

.portfolio-manager__footer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.portfolio-manager__locked {
  flex: 0 0 auto;
  color: #475569;
  background: #f1f5f9;
}

.portfolio-manager__remove {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 9px 13px;
  color: #b91c1c;
  background: #fff;
  border: 1px solid #fecaca;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.portfolio-manager__remove:hover {
  background: #fef2f2;
}

.portfolio-manager__empty {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  padding: 24px;
  color: #64748b;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
}

.portfolio-manager__empty strong {
  color: #0f172a;
  font-size: 17px;
}

@media (max-width: 900px) {
  .portfolio-manager__metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .portfolio-manager {
    padding: 20px !important;
  }

  .portfolio-manager__header,
  .portfolio-manager__item-head,
  .portfolio-manager__footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .portfolio-manager__summary,
  .portfolio-manager__remove,
  .portfolio-manager__locked {
    width: 100%;
  }

  .portfolio-manager__remove,
  .portfolio-manager__locked {
    justify-content: center;
    text-align: center;
  }
}

/* Properties view */
#pms-properties-section {
  margin-top: 0 !important;
}

#investment-workspace-section {
  min-width: 0;
}

#investment-workspace-section > *:last-child {
  margin-bottom: 0;
}

/* Property modal */
#property-modal.property-modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(9, 20, 38, 0.72);
  backdrop-filter: blur(8px);
  z-index: 999999;
}

.property-modal-panel {
  width: min(100%, 520px);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 30px;
  color: var(--db26-text);
  background: #fff;
  border: 1px solid rgba(8, 182, 122, 0.18);
  border-radius: 22px;
  box-shadow: 0 28px 80px rgba(9, 20, 38, 0.28);
}

#property-tourist-tax-fields {
  margin-top: 4px;
  padding: 14px;
  background: #f0fdf4;
  border: 1px solid rgba(8, 182, 122, 0.2);
  border-radius: 14px;
}

#property-tourist-tax-fields label {
  display: block;
  margin: 0 0 6px;
}

#property-tourist-tax-fields > label {
  margin-top: 12px;
}

#property-tourist-tax-fields small {
  margin: 8px 0 0;
}

.property-modal-panel h2 {
  margin: 0;
  font-size: 28px;
}

.property-modal-fields {
  display: grid;
  gap: 7px;
  margin-top: 24px;
}

.property-modal-fields label {
  margin-top: 7px;
  color: var(--db26-text);
  font-size: 12px;
  font-weight: 800;
}

.property-modal-fields input,
.property-modal-fields select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: var(--db26-text);
  background: var(--db26-surface-soft);
  border: 1px solid var(--db26-border);
  border-radius: 12px;
  font: inherit;
  box-sizing: border-box;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.property-modal-fields input:focus,
.property-modal-fields select:focus {
  background: #fff;
  border-color: var(--db26-green);
  box-shadow: 0 0 0 4px rgba(8, 182, 122, 0.12);
}

.property-modal-fields small {
  display:block;
  margin-top:-4px;
  color:#64748b;
  font-size:12px;
  line-height:1.45;
}

.property-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 26px;
}

.property-modal-actions .btn-dashboard {
  width: auto;
  min-width: 104px;
  justify-content: center;
}

.property-modal-secondary {
  color: var(--db26-text) !important;
  background: #fff !important;
  border: 1px solid var(--db26-border) !important;
  box-shadow: none !important;
}

.property-modal-primary {
  color: #fff !important;
  background: linear-gradient(135deg, var(--db26-green), var(--db26-green-dark)) !important;
}

@media (max-width: 560px) {
  #property-modal.property-modal-overlay {
    padding: 14px;
  }

  .property-modal-panel {
    padding: 22px 18px;
    border-radius: 18px;
  }

  .property-modal-panel h2 {
    font-size: 23px;
  }

  .property-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .property-modal-actions .btn-dashboard {
    width: 100%;
    min-width: 0;
  }
}

#pms-properties-section > .analysis-card {
  padding: 24px;
  border: 1px solid var(--db26-border);
  border-radius: var(--db26-radius-lg);
  box-shadow: var(--db26-shadow);
}

#pms-properties-section > .analysis-card::after {
  display: none;
}

/* Shared cards below the first dashboard viewport */
.analysis-card,
.kpi-card,
.portfolio-stat {
  border-color: var(--db26-border);
}

.analysis-card:hover,
.rb-kpi:hover,
.kpi-card:hover {
  transform: none;
}

.btn-dashboard,
.btn-primary {
  border-radius: 12px;
}

/* Tablet */
@media (max-width: 1100px) {
  .dashboard-container {
    width: min(100% - 28px, 980px);
  }

  .rb-hero {
    grid-template-columns: 1fr;
  }

  .rb-hero-right {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .rb-hero-card:first-child {
    border-left: 0;
  }

  #pms-dashboard-section {
    grid-template-columns: 1fr;
  }

  #executive-summary,
  #pms-dashboard-section > .analysis-card:last-child {
    grid-column: 1;
    grid-row: auto;
  }

  #executive-summary {
    height: auto !important;
    max-height: none;
    overflow: visible;
  }

  #pms-dashboard-section > .analysis-card:last-child {
    height: auto !important;
  }

  #pms-dashboard-section > .analysis-card:first-child .rb-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Mobile / Android */
@media (max-width: 720px) {
  .dashboard-container {
    width: min(100% - 24px, 680px);
    padding: 22px 0 54px;
  }

  .dashboard-main {
    gap: 14px;
  }

  .rb-hero {
    min-height: 0;
    padding: 24px 20px;
    border-radius: 18px;
  }

  .rb-hero-left h1 {
    font-size: 26px;
  }

  .rb-hero-right {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rb-hero-card,
  .rb-hero-card.status {
    grid-column: auto !important;
    min-height: 92px;
    padding: 15px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    border-left: 0;
  }

  .rb-hero-card:nth-child(even) {
    border-left: 1px solid rgba(255, 255, 255, 0.10);
  }

  .rb-hero-card h2,
  .rb-hero-card.status h2 {
    font-size: 23px;
  }

  .rb-dashboard > .rb-kpi-grid,
  #pms-quick-actions .quick-actions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #pms-quick-actions .btn-dashboard {
    min-height: 62px;
    padding: 14px 34px 14px 14px;
    font-size: 12px;
  }

  #dashboard-workspace-nav .pms-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0;
    width: 100%;
    max-width: 100%;
    overflow: visible;
    padding: 0 6px;
    flex-wrap: initial;
  }

  #dashboard-workspace-nav {
    width: 100%;
    max-width: 100%;
    height: auto !important;
    min-height: 0;
    overflow: visible !important;
  }

  #dashboard-workspace-nav .pms-tab,
  #dashboard-workspace-nav #pms-tab-bookings {
    width: 100%;
    min-width: 0;
    min-height: 56px;
    padding-right: 8px;
    padding-left: 8px;
    white-space: normal;
    font-size: 12px;
  }

  #dashboard-workspace-nav .pms-tab span {
    white-space: normal !important;
    overflow-wrap: normal;
  }

  #pms-dashboard-section > .analysis-card {
    padding: 18px;
    border-radius: 18px;
  }

  #pms-dashboard-section > .analysis-card:first-child .rb-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #pms-dashboard-section > .analysis-card:first-child .rb-kpi {
    min-width: 0;
  }

  #executive-summary .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #executive-summary {
    height: auto !important;
    max-height: none;
    overflow: visible;
    overscroll-behavior: auto;
  }

  #executive-summary,
  #executive-summary * {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  #executive-summary div,
  #executive-summary p,
  #executive-summary span,
  #executive-summary strong {
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  #executive-summary [style*="grid-template-columns"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .property-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .property-kpi-card,
  .property-kpi-label,
  .property-kpi-value {
    min-width: 0;
  }

  .property-kpi-label {
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
  }

  #booking-calendar {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  #booking-calendar > div:first-child {
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 8px !important;
  }

  #booking-calendar > div:first-child > div {
    min-width: 0;
    gap: 6px !important;
  }

  #booking-calendar > div:first-child > button {
    width: 42px !important;
    min-width: 42px;
  }

  #booking-calendar > div:first-child [style*="min-width:150px"] {
    min-width: 0 !important;
    font-size: 14px !important;
  }

  #pms-dashboard-section > .analysis-card:last-child {
    height: 300px !important;
    min-height: 300px;
  }

  #pms-performance-chart {
    height: 220px !important;
    max-height: 220px;
  }
}

@media (max-width: 420px) {
  .rb-dashboard > .rb-kpi-grid,
  #pms-quick-actions .quick-actions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rb-dashboard > .rb-kpi-grid .rb-kpi,
  #pms-quick-actions .btn-dashboard {
    min-width: 0;
  }

  .rb-dashboard > .rb-kpi-grid .rb-kpi {
    min-height: 82px;
    padding: 14px;
  }

  .rb-dashboard > .rb-kpi-grid .rb-kpi h3 {
    overflow-wrap: anywhere;
    font-size: 19px;
  }

  #pms-dashboard-section > .analysis-card:first-child .rb-kpi-grid {
    grid-template-columns: 1fr 1fr;
  }

  #pms-properties-section .property-kpi-label {
    font-size: 9px !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: keep-all !important;
  }

  #pms-properties-section .property-revenue-card {
    padding: 20px 16px !important;
  }

  #pms-properties-section .property-revenue-icon {
    top: 16px !important;
    right: 16px !important;
    width: 58px !important;
    height: 58px !important;
    transform: none !important;
  }

  #pms-properties-section .property-revenue-meta {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    font-size: 9px !important;
  }

  #pms-properties-section .property-revenue-meta > div {
    min-width: 0;
    text-align: center;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  #pms-properties-section .property-revenue-card {
    padding: 20px 16px !important;
  }

  #pms-properties-section .property-revenue-icon {
    display: none !important;
  }

  #pms-properties-section .property-revenue-meta {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    align-items: stretch !important;
    font-size: 10px !important;
  }

  #pms-properties-section .property-revenue-meta > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 9px 4px;
    text-align: center;
    white-space: normal !important;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
  }

  #pms-properties-section .property-revenue-meta strong,
  #pms-properties-section .property-revenue-meta span {
    display: block;
    white-space: nowrap !important;
    word-break: keep-all !important;
  }

  #pms-properties-section .property-revenue-meta strong {
    font-size: 14px;
  }

  #pms-properties-section .property-revenue-meta span {
    font-size: 9px;
  }
}

@media (max-width: 400px) {
  #pms-properties-section .property-revenue-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #pms-properties-section .property-revenue-meta > div:nth-child(3) {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .analysis-card,
  .rb-kpi,
  .kpi-card,
  .btn-dashboard {
    transition: none !important;
  }
}
