:root {
  --bg: #071015;
  --bg-2: #0b151c;
  --panel: #101c25;
  --panel-2: #132431;
  --line: rgba(255, 255, 255, 0.09);
  --text: #edf5f7;
  --muted: #8ea0aa;
  --soft: #b8c5cb;
  --primary: #23b59f;
  --primary-2: #51d6c3;
  --gold: #d8a441;
  --danger: #ed5d5d;
  --warning: #f1c84c;
  --success: #45cf82;
  --vacant: #66727c;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

.page-section {
  display: none;
}

.page-section.active {
  display: block;
}

.main-brand-page,
.login-page {
  min-height: 100vh;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    linear-gradient(130deg, rgba(35, 181, 159, 0.16), transparent 38%),
    linear-gradient(45deg, transparent 54%, rgba(216, 164, 65, 0.13)),
    linear-gradient(180deg, #071015, #0b151c);
}

.main-brand-page.active,
.login-page.active {
  display: flex;
}

.brand-panel {
  width: min(880px, 100%);
  padding: clamp(36px, 8vw, 84px);
  border: 1px solid var(--line);
  background: rgba(10, 22, 30, 0.82);
  box-shadow: var(--shadow);
  border-radius: 8px;
}

.brand-kicker,
.section-kicker {
  margin: 0 0 8px;
  color: var(--primary-2);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.brand-panel h1 {
  margin: 0;
  font-size: clamp(2.45rem, 8vw, 6rem);
  line-height: 0.98;
  font-weight: 900;
}

.brand-subtitle {
  max-width: 660px;
  margin: 24px 0 0;
  color: var(--soft);
  font-size: clamp(1rem, 2.4vw, 1.25rem);
}

.login-card {
  width: min(430px, 100%);
  padding: 32px;
  border: 1px solid var(--line);
  background: rgba(16, 28, 37, 0.94);
  box-shadow: var(--shadow);
  border-radius: 8px;
}

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

.form-message {
  padding: 10px 12px;
  border-radius: 6px;
  color: #ffd7d7;
  background: rgba(237, 93, 93, 0.12);
  border: 1px solid rgba(237, 93, 93, 0.22);
  font-size: 0.9rem;
}

.app-shell {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(35, 181, 159, 0.08), transparent 34%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1040;
  width: 270px;
  display: flex;
  flex-direction: column;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: rgba(7, 16, 21, 0.96);
  transform: translateX(0);
  transition: transform 0.2s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px 22px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: #06100e;
  background: linear-gradient(135deg, var(--primary-2), var(--gold));
  font-weight: 900;
}

.sidebar-brand strong,
.sidebar-brand small {
  display: block;
}

.sidebar-brand small {
  color: var(--muted);
}

.sidebar-nav {
  display: grid;
  gap: 8px;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--soft);
  background: transparent;
  text-align: left;
  font-weight: 700;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
  color: var(--text);
  border-color: rgba(81, 214, 195, 0.25);
  background: rgba(35, 181, 159, 0.12);
}

.sidebar-nav .nav-link i {
  color: var(--primary-2);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 18px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.04);
}

.content-wrap {
  min-height: 100vh;
  padding: 20px 24px 42px 294px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 78px;
  padding: 12px 0 18px;
  background: linear-gradient(180deg, rgba(7, 16, 21, 0.96), rgba(7, 16, 21, 0.72), transparent);
}

.page-title {
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  font-weight: 900;
}

.btn {
  border-radius: 6px;
  font-weight: 800;
}

.btn-primary {
  --bs-btn-bg: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: #1a9f8c;
  --bs-btn-hover-border-color: #1a9f8c;
  --bs-btn-color: #06100e;
  --bs-btn-hover-color: #06100e;
}

.btn-outline-light {
  --bs-btn-border-color: rgba(255, 255, 255, 0.18);
  --bs-btn-color: var(--soft);
  --bs-btn-hover-color: #071015;
}

.btn-ghost {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
}

.icon-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}

.panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 28, 37, 0.88);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.2);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.panel-header h3,
.preview-panel h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 900;
}

.panel-icon {
  color: var(--primary-2);
  font-size: 1.45rem;
}

.warning-icon {
  color: var(--warning);
}

.panel-amount {
  color: var(--gold);
  white-space: nowrap;
}

.report-panel {
  margin-top: 2px;
}

.report-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.report-filter-form {
  margin-top: 12px;
}

.report-status {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 6px;
  font-weight: 800;
}

.report-status-info {
  color: #d8f8ff;
  border: 1px solid rgba(77, 190, 255, 0.25);
  background: rgba(77, 190, 255, 0.1);
}

.report-status-success {
  color: #c8fff4;
  border: 1px solid rgba(81, 214, 195, 0.3);
  background: rgba(81, 214, 195, 0.1);
}

.report-status-danger {
  color: #ffd2d2;
  border: 1px solid rgba(255, 91, 91, 0.3);
  background: rgba(255, 91, 91, 0.1);
}

.dashboard-section-heading {
  margin: 2px 0 14px;
}

.dashboard-section-heading h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 900;
}

.kpi-grid.period-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

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

.kpi-card {
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
}

.kpi-card span {
  display: block;
  min-height: 38px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.kpi-card strong {
  display: block;
  margin-top: 14px;
  color: var(--text);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.kpi-card small {
  display: block;
  margin-top: 8px;
  color: var(--primary-2);
  font-weight: 700;
}

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

.summary-list div,
.readonly-grid div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.summary-list span,
.readonly-grid span {
  color: var(--muted);
  font-weight: 700;
}

.summary-list strong,
.readonly-grid strong {
  color: var(--text);
  text-align: right;
}

.summary-list .net-row strong {
  color: var(--success);
}

.formula-note {
  margin-top: 16px;
  padding: 11px 12px;
  border-radius: 6px;
  color: var(--soft);
  background: rgba(81, 214, 195, 0.08);
  border: 1px solid rgba(81, 214, 195, 0.18);
  font-size: 0.9rem;
}

.block-chart {
  display: grid;
  gap: 13px;
}

.chart-row {
  display: grid;
  grid-template-columns: 86px 1fr 60px;
  align-items: center;
  gap: 12px;
}

.chart-track {
  height: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.chart-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--gold));
}

.chart-row span,
.chart-row strong {
  color: var(--soft);
  font-size: 0.86rem;
}

.dashboard-table {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(255, 255, 255, 0.03);
  --bs-table-hover-bg: rgba(35, 181, 159, 0.08);
  margin-bottom: 0;
  min-width: 980px;
}

.dashboard-table th {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
  border-bottom-color: var(--line);
}

.dashboard-table td {
  color: var(--soft);
  border-color: var(--line);
  font-size: 0.9rem;
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.75rem;
}

.badge-paid {
  color: #062015;
  background: var(--success);
}

.badge-partial {
  color: #231900;
  background: var(--warning);
}

.badge-unpaid {
  color: #260707;
  background: var(--danger);
}

.expense-breakdown {
  display: grid;
  gap: 12px;
}

.expense-item {
  display: grid;
  gap: 7px;
}

.expense-line {
  display: flex;
  justify-content: space-between;
  color: var(--soft);
  font-weight: 800;
}

.progress {
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-bar {
  background: linear-gradient(90deg, var(--primary), var(--gold));
}

.trend-placeholder {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
}

.trend-placeholder i {
  color: var(--gold);
  font-size: 1.55rem;
}

.trend-placeholder strong,
.trend-placeholder span {
  display: block;
}

.trend-placeholder strong {
  color: var(--soft);
}

.legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 50%;
}

.status-dot.paid,
.patti-cell.paid {
  background: var(--success);
}

.status-dot.partial,
.patti-cell.partial {
  background: var(--warning);
}

.status-dot.unpaid,
.patti-cell.unpaid {
  background: var(--danger);
}

.status-dot.vacant,
.patti-cell.vacant {
  background: var(--vacant);
}

.occupancy-grid {
  display: grid;
  gap: 18px;
}

.occupancy-block h4 {
  margin: 0 0 9px;
  color: var(--soft);
  font-size: 0.95rem;
  font-weight: 900;
}

.patti-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
  gap: 8px;
}

.patti-cell {
  display: grid;
  place-items: center;
  min-height: 42px;
  border-radius: 6px;
  color: #071015;
  font-size: 0.78rem;
  font-weight: 900;
}

.warning-list {
  display: grid;
  gap: 11px;
}

.warning-card {
  display: flex;
  gap: 11px;
  padding: 12px;
  border: 1px solid rgba(241, 200, 76, 0.24);
  border-radius: 8px;
  background: rgba(241, 200, 76, 0.08);
}

.warning-card i {
  color: var(--warning);
}

.warning-card strong,
.warning-card span {
  display: block;
}

.warning-card span {
  color: var(--muted);
  font-size: 0.88rem;
}

.form-label {
  color: var(--soft);
  font-size: 0.86rem;
  font-weight: 800;
}

.form-control,
.form-select {
  min-height: 46px;
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.12);
  background-color: rgba(255, 255, 255, 0.055);
  border-radius: 6px;
}

.form-control:focus,
.form-select:focus {
  color: var(--text);
  border-color: rgba(81, 214, 195, 0.65);
  background-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 0.22rem rgba(35, 181, 159, 0.14);
}

.form-control::placeholder {
  color: var(--muted);
}

.form-select option {
  color: #071015;
}

.system-calculated-field,
.system-calculated-field:read-only {
  color: var(--primary-2);
  border-color: rgba(81, 214, 195, 0.35);
  background-color: rgba(81, 214, 195, 0.09);
  font-weight: 900;
}

.entry-form textarea {
  min-height: 120px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.readonly-grid {
  display: grid;
  gap: 4px;
}

.preview-panel .section-kicker {
  margin-bottom: 8px;
}

.preview-box {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.preview-box span {
  color: var(--muted);
}

.search-filters {
  padding-bottom: 2px;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1030;
  display: none;
  background: rgba(0, 0, 0, 0.55);
}

.sidebar-backdrop.show {
  display: block;
}

.w-full {
  width: 100%;
}

.fw-900,
.fw-black {
  font-weight: 900;
}

.tracking-widest,
.tracking-tight,
.tracking-tighter {
  letter-spacing: 0;
}

.uppercase {
  text-transform: uppercase;
}

.max-w-700 {
  max-width: 700px;
}

.text-rose {
  color: #fb7185;
}

.text-zinc-400 {
  color: #a1a1aa;
}

.text-zinc-500 {
  color: #71717a;
}

.font-bold {
  font-weight: 700;
}

.hover-opacity-100:hover {
  opacity: 1;
}

.animate-pulse {
  animation: pulse 1.8s ease-in-out infinite;
}

.text-\[10px\] {
  font-size: 10px;
}

.w-pct-0 {
  width: 0%;
}

.w-pct-5 {
  width: 5%;
}

.w-pct-10 {
  width: 10%;
}

.w-pct-15 {
  width: 15%;
}

.w-pct-20 {
  width: 20%;
}

.w-pct-25 {
  width: 25%;
}

.w-pct-30 {
  width: 30%;
}

.w-pct-35 {
  width: 35%;
}

.w-pct-40 {
  width: 40%;
}

.w-pct-45 {
  width: 45%;
}

.w-pct-50 {
  width: 50%;
}

.w-pct-55 {
  width: 55%;
}

.w-pct-60 {
  width: 60%;
}

.w-pct-65 {
  width: 65%;
}

.w-pct-70 {
  width: 70%;
}

.w-pct-75 {
  width: 75%;
}

.w-pct-80 {
  width: 80%;
}

.w-pct-85 {
  width: 85%;
}

.w-pct-90 {
  width: 90%;
}

.w-pct-95 {
  width: 95%;
}

.w-pct-100 {
  width: 100%;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.55;
  }
}

@media (max-width: 1199.98px) {
  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
  }

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

  .content-wrap {
    padding: 14px 16px 34px;
  }

  .topbar {
    align-items: center;
  }

}

@media (max-width: 767.98px) {
  .brand-panel,
  .login-card,
  .panel {
    padding: 18px;
  }

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

  .chart-row {
    grid-template-columns: 72px 1fr 48px;
  }
}

@media (max-width: 479.98px) {
  .main-brand-page,
  .login-page {
    padding: 14px;
  }

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

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