@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #f5f7fa;
  --panel: #ffffff;
  --line: #e1e8ed;
  --text: #1a202c;
  --muted: #718096;
  --nav-bg-1: #2d3748;
  --nav-bg-2: #1a202c;
  --accent: #EA5230;
  --accent-light: #F26D4E;
  --ok: #38a169;
  --warn: #d69e2e;
  --danger: #e53e3e;
  --info: #EA5230;
  --purple: #805ad5;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 0;
  color: var(--text);
  font-family: Roboto, sans-serif;
  background: var(--bg);
  line-height: 1.5;
  overflow-x: hidden;
}

.app {
  display: block;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  color: #e2e8f0;
  background: linear-gradient(180deg, var(--nav-bg-1), var(--nav-bg-2));
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 16px;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
  z-index: 50;
}

.brand {
  margin-bottom: 24px;
  padding: 14px 16px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}

.brand img {
  height: 40px;
  display: block;
  margin: 0 auto;
}

.nav-label {
  margin: 20px 10px 8px;
  color: #a0aec0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.nav-item {
  display: block;
  text-decoration: none;
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 4px;
  margin-bottom: 4px;
  transition: all 0.2s ease;
}

.nav-item:hover { 
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-item.active {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.content {
  --sticky-header-height: 73px;
  position: relative;
  width: calc(100% - 260px);
  max-width: calc(100vw - 260px);
  margin-left: 260px;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  overflow-x: hidden;
  box-sizing: border-box;
}

.topbar {
  position: fixed !important;
  top: 0 !important;
  left: 260px;
  width: calc(100% - 260px);
  max-width: calc(100vw - 260px);
  right: 0;
  z-index: 90;
  flex: 0 0 var(--sticky-header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: var(--sticky-header-height);
  padding: 12px 24px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(203, 213, 225, 0.65);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.07);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  backdrop-filter: blur(18px) saturate(145%);
  overflow: visible;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: visible;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  flex: 0 1 auto;
  overflow: visible;
}

.custom-portfolio-selector {
  flex: 1 1 220px;
  min-width: 0 !important;
  max-width: 280px !important;
  width: min(280px, 100%) !important;
}

.portfolio-trigger {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

.data-delay-indicator {
  flex: 0 1 auto;
  min-width: 0 !important;
  white-space: nowrap;
  overflow: hidden;
}

.search-box {
  position: relative;
  flex: 0 1 220px;
  min-width: 0;
  max-width: 100%;
}

.search-input {
  width: 100% !important;
  max-width: 100% !important;
}

.topbar-left > .data-delay-indicator,
.topbar-left .custom-portfolio-selector {
  max-width: 100%;
}

.dashboard-alert-rail {
  position: sticky;
  top: var(--sticky-header-height);
  z-index: 80;
  flex: 0 0 auto;
  align-self: stretch;
  width: 100%;
  min-height: 100px;
  max-height: 110px;
  padding: 8px 24px 16px;
  overflow: hidden;
  box-sizing: border-box;
  background: rgba(248, 250, 252, 0.68);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  opacity: 1;
  transition: max-height 280ms ease, padding 280ms ease, opacity 180ms ease;
}

.dashboard-alert-stack {
  position: relative;
  min-height: 76px;
}

.dashboard-alert-stack:empty {
  display: none;
}

.dashboard-alert-rail.is-empty,
.dashboard-alert-rail:has(.dashboard-alert-stack:empty) {
  min-height: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  pointer-events: none;
}

.dashboard-alert-card {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 12px 16px;
  border: 1px solid;
  border-left-width: 4px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
  backdrop-filter: blur(14px) saturate(135%);
  transition: transform 180ms ease, opacity 180ms ease;
}

.dashboard-alert-card:nth-child(1) {
  z-index: 3;
}

.dashboard-alert-card:nth-child(2) {
  z-index: 2;
  transform: translateY(6px) scaleX(0.992);
  pointer-events: none;
}

.dashboard-alert-card:nth-child(3) {
  z-index: 1;
  transform: translateY(12px) scaleX(0.984);
  pointer-events: none;
}

.dashboard-alert-card:nth-child(n + 4) {
  display: none;
}

.dashboard-alert-card.critical {
  color: #7f1d1d;
  background: rgba(254, 242, 242, 0.82);
  border-color: #dc2626;
}

.dashboard-alert-card.warning {
  color: #78350f;
  background: rgba(255, 251, 235, 0.82);
  border-color: #f59e0b;
}

.dashboard-alert-card.info {
  color: #1e3a8a;
  background: rgba(239, 246, 255, 0.82);
  border-color: #3b82f6;
}

.dashboard-alert-card:not(:first-child) > * {
  opacity: 0;
}

.dashboard-alert-icon {
  display: flex;
  flex: 0 0 32px;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: #fff;
  border-radius: 50%;
}

.dashboard-alert-card.critical .dashboard-alert-icon,
.dashboard-alert-card.critical .dashboard-alert-primary {
  background: #dc2626;
}

.dashboard-alert-card.warning .dashboard-alert-icon,
.dashboard-alert-card.warning .dashboard-alert-primary {
  background: #d97706;
}

.dashboard-alert-card.info .dashboard-alert-icon,
.dashboard-alert-card.info .dashboard-alert-primary {
  background: #2563eb;
}

.dashboard-alert-icon svg {
  color: #fff;
}

.dashboard-alert-copy {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
  line-height: 1.4;
}

.dashboard-alert-copy strong {
  font-size: 14px;
}

.dashboard-alert-actions {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
}

.dashboard-alert-actions button {
  padding: 7px 12px;
  color: inherit;
  font-size: 11px;
  font-weight: 600;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 4px;
  cursor: pointer;
}

.dashboard-alert-actions .dashboard-alert-primary {
  color: #fff;
}

@media (max-width: 760px) {
  .content {
    --sticky-header-height: 65px;
  }

  .dashboard-alert-rail {
    top: var(--sticky-header-height);
    min-height: 150px;
    max-height: 170px;
    padding-inline: 12px;
  }

  .dashboard-alert-rail.is-empty,
  .dashboard-alert-rail:has(.dashboard-alert-stack:empty) {
    min-height: 0;
    max-height: 0;
  }

  .dashboard-alert-card {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .dashboard-alert-stack {
    min-height: 126px;
  }

  .dashboard-alert-copy {
    flex-basis: calc(100% - 44px);
  }

  .dashboard-alert-actions {
    width: 100%;
    padding-left: 44px;
  }
}

.module-kpi-section {
  width: 100%;
  max-width: 100%;
  margin-bottom: 28px;
}

.module-kpi-heading {
  padding: 20px 24px;
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  margin-bottom: 14px;
}

.module-kpi-heading h3 {
  margin: 0 0 4px;
  color: #1f2937;
  font-size: 16px;
  font-weight: 600;
  line-height: normal;
  letter-spacing: 0;
  text-transform: uppercase;
}

.module-kpi-heading p {
  margin: 0;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.5;
}

.module-kpi-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.module-kpi-group {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: visible;
  background: #ffffff;
  border: 1px solid var(--line);
  border-top: 1px solid var(--line);
  border-radius: 6px;
}

.dashboard-kpi-heading-plain {
  margin-bottom: 14px;
}

.dashboard-kpi-heading-plain h3 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
}

.dashboard-kpi-heading-plain p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.module-kpi-group.ota {
  border-top-color: var(--line);
}

.module-kpi-group.clc {
  border-top-color: var(--line);
}

.module-kpi-group.vcc {
  border-top-color: var(--line);
}

.module-kpi-group.vcc {
  display: flex;
  flex-direction: column;
}

.module-kpi-group.vcc .module-kpi-group-header {
  align-items: center;
}

.module-kpi-group.vcc .module-kpi-group-header > div:first-child {
  min-width: 0;
  flex: 1;
}

.module-kpi-group.vcc .module-kpi-group-header h4 {
  max-width: 84px;
  line-height: 1.15;
}

.module-kpi-group.vcc .module-kpi-metrics {
  flex: 1;
  align-items: stretch;
}

.module-kpi-group.vcc .module-kpi-metric {
  min-height: 112px;
  height: 100%;
}

.module-kpi-group.ota .module-kpi-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  flex: 1;
  align-items: stretch;
}

.module-kpi-group.ota {
  display: flex;
  flex-direction: column;
}

.module-kpi-group.ota .module-kpi-metric {
  min-height: 112px;
  height: 100%;
}

.module-kpi-group.clc .module-kpi-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.module-kpi-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.module-kpi-label {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.module-kpi-group-header h4 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
}

.module-kpi-group-header a {
  flex-shrink: 0;
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}

.module-kpi-group.ota .module-kpi-group-header {
  align-items: center;
}

.module-kpi-group.clc .module-kpi-group-header {
  align-items: center;
}

.module-kpi-group.clc .module-kpi-group-header > div:first-child {
  min-width: 0;
  flex: 1;
}

.module-kpi-group.clc .module-kpi-group-header h4 {
  max-width: 100px;
  line-height: 1.15;
}

.module-kpi-group.ota .module-kpi-group-header > div:first-child {
  min-width: 0;
  flex: 1;
}

.module-kpi-group.ota .module-kpi-group-header h4 {
  max-width: 100px;
  margin-bottom: 8px;
  line-height: 1.15;
}

.module-kpi-trend {
  position: relative;
  flex: 0 1 140px;
  width: 140px;
  min-width: 0;
  color: #64748b;
  font-size: 10px;
  text-align: left;
}

.module-kpi-lifetime {
  flex: 0 0 auto;
  min-width: 104px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.module-kpi-lifetime span,
.module-kpi-lifetime small {
  display: block;
}

.clc-current-score strong {
  color: #047857;
}

.vcc-lifetime-charged strong {
  color: #047857;
}

.module-kpi-lifetime span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
}

.module-kpi-lifetime strong {
  display: block;
  margin: 6px 0 4px;
  color: #047857;
  font-size: 21px;
  line-height: 1;
}

.module-kpi-lifetime small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.3;
}

.module-kpi-trend > span {
  display: block;
  margin-bottom: 2px;
}

.module-kpi-trend-controls {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  margin-bottom: 5px;
}

.module-kpi-trend-controls button {
  padding: 3px 6px;
  color: #64748b;
  font-size: 9px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
}

.module-kpi-trend-controls button:hover,
.module-kpi-trend-controls button.active {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.module-kpi-trend-meta {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  align-items: baseline;
  margin-bottom: 1px;
}

.module-kpi-trend-meta span:first-child {
  color: #1f2937;
  font-size: 12px;
  font-weight: 700;
}

.module-kpi-trend-meta span:last-child {
  color: #059669;
  font-size: 9px;
  font-weight: 600;
}

.module-kpi-trend svg {
  display: block;
  width: 140px;
  max-width: 100%;
  height: 48px;
}

.module-kpi-trend-grid {
  fill: none;
  stroke: #e5e7eb;
  stroke-width: 1;
}

.module-kpi-trend-line {
  fill: none;
  stroke: #374151;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}

.module-kpi-trend-data {
  fill: #fff;
  stroke: #374151;
  stroke-width: 1.5;
  cursor: pointer;
}

.module-kpi-trend-data:hover,
.module-kpi-trend-data:focus {
  stroke-width: 2.5;
}

.module-kpi-trend-tooltip {
  position: absolute;
  z-index: 50;
  top: calc(100% + 8px);
  left: 50%;
  width: min(500px, calc(100vw - 24px));
  height: 300px;
  box-sizing: border-box;
  padding: 12px;
  color: #1f2937;
  font-size: 11px;
  line-height: 1.35;
  pointer-events: none;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .18);
  opacity: 0;
  transform: translateX(-50%) translateY(-4px);
  transition: opacity .12s ease;
}

.module-kpi-trend-tooltip.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.module-kpi-trend-tooltip strong,
.module-kpi-trend-tooltip span { display: block; }

.module-kpi-trend-tooltip strong { font-size: 13px; }

.module-kpi-trend-tooltip span {
  color: #64748b;
}

.module-kpi-trend-tooltip-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.module-kpi-trend-tooltip-header span {
  font-size: 10px;
  white-space: nowrap;
}

.module-kpi-trend .module-kpi-trend-tooltip-chart {
  display: block;
  width: 100%;
  height: 242px;
  overflow: visible;
}

.module-kpi-trend-tooltip-grid {
  stroke: #e2e8f0;
  stroke-width: 1;
}

.module-kpi-trend-tooltip-line {
  fill: none;
  stroke: var(--trend-color, #374151);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.module-kpi-trend-tooltip-point {
  fill: #ffffff;
  stroke: var(--trend-color, #374151);
  stroke-width: 1.5;
}

.module-kpi-trend-tooltip-point.is-selected {
  fill: var(--trend-color, #374151);
  stroke: #ffffff;
  stroke-width: 2;
}

.module-kpi-trend-tooltip-axis {
  fill: #94a3b8;
  font-size: 8px;
}

.module-kpi-trend-tooltip-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  color: #475569;
  font-size: 10px;
  font-weight: 600;
}

.module-kpi-trend-tooltip-legend::before {
  width: 16px;
  height: 3px;
  content: '';
  background: var(--trend-color, #374151);
  border-radius: 2px;
}

.module-kpi-trend-point {
  fill: #fff;
  stroke: #3b82f6;
  stroke-width: 2;
}

.module-kpi-trend-months {
  display: flex;
  justify-content: space-between;
  color: #94a3b8;
  font-size: 9px;
}

.month-recovery-heading {
  padding: 20px 24px;
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
}

.month-recovery-heading h3 {
  margin: 0 0 4px;
  color: #1f2937;
  font-size: 16px;
  font-weight: 600;
  line-height: normal;
  letter-spacing: 0;
}

.card-section-title,
.card .card-section-title {
  margin: 0 0 4px !important;
  color: #718096 !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: normal !important;
  letter-spacing: 1px !important;
  text-transform: uppercase;
}

.card-section-subtitle,
.card .card-section-subtitle {
  color: #6b7280 !important;
  font-size: 12px !important;
  line-height: 1.5;
}

.month-recovery-heading div {
  color: #6b7280;
  font-size: 12px;
  line-height: 1.5;
}

.month-recovery-heading + .month-recovery-table-container {
  border-radius: 0 0 6px 6px;
}

.month-recovery-heading + .table-container {
  margin-top: 0;
  border-radius: 0 0 6px 6px;
}

.vcc-activity-table-container {
  margin-top: 0;
  border-radius: 0 0 6px 6px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.clc-activity-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.clc-activity-heading + .table-container {
  margin-top: 0;
  border-radius: 0 0 6px 6px;
}

.clc-section-heading + .table-container {
  margin-top: 0;
  border-radius: 0 0 6px 6px;
}

.reversal-log-table-container {
  margin: 0;
  padding: 0;
  border-radius: 0 0 6px 6px;
}

@media (max-width: 760px) {
  .clc-activity-heading {
    flex-direction: column;
  }

  .clc-activity-heading > div:last-child {
    width: 100%;
    margin-left: 0 !important;
    flex-wrap: wrap;
  }
}

.month-recovery-heading + .ota-connected-table,
.ota-queue-heading + .ota-queue-table {
  margin-top: 0;
  border-top: 0;
  border-radius: 0 0 6px 6px;
}

.ota-queue-heading {
  border-radius: 6px 6px 0 0;
}

.ota-queue-heading + .ota-queue-table {
  border-radius: 0 0 6px 6px;
}

.month-recovery-heading + .ota-connected-table table,
.ota-queue-heading + .ota-queue-table table {
  border-radius: 0;
}

.ota-queue-pagination {
  margin-top: 8px;
  padding: 10px 20px;
}

.module-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 6px 6px 0 0;
}

.module-section-heading h3 {
  margin: 0 0 4px;
  color: #1f2937;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
}

.module-section-heading > div:first-child > div {
  color: #6b7280;
  font-size: 12px;
  line-height: 1.5;
}

.module-section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  margin-left: 20px;
}

@media (max-width: 760px) {
  .module-section-heading {
    flex-direction: column;
  }

  .module-section-actions {
    justify-content: flex-start;
    margin-left: 0;
  }
}

@media (max-width: 560px) {
  .module-kpi-group.ota .module-kpi-group-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .module-kpi-trend,
  .module-kpi-trend svg {
    width: 100%;
  }
}

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

.module-kpi-metric {
  display: flex;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 16px;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: none;
  background: #fff;
  border: 0;
  cursor: pointer;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;
}

.module-kpi-metric + .module-kpi-metric {
  border-left: 1px solid var(--line);
}

.module-kpi-metric:first-child { border-bottom-left-radius: 5px; }

.module-kpi-metric:last-child { border-bottom-right-radius: 5px; }

.module-kpi-metric:hover {
  background: #f8fafc;
}

.module-kpi-metric > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.module-kpi-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.module-kpi-title-row > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-kpi-title-row > span:first-child,
.module-kpi-title-row > .kpi-info {
  max-width: 100%;
}

.kpi-info {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  cursor: help;
}

.kpi-info::after {
  content: '';
  position: absolute;
  top: 18px;
  left: -12px;
  z-index: 119;
  width: 42px;
  height: 16px;
}

.kpi-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  background: #fff;
  border: 1px solid #94a3b8;
  border-radius: 50%;
}

.kpi-info:hover .kpi-info-icon,
.kpi-info:focus .kpi-info-icon,
.kpi-info.is-open .kpi-info-icon {
  color: #fff;
  background: #2563eb;
  border-color: #2563eb;
}

.kpi-info-popover {
  position: absolute;
  top: 26px;
  left: 50%;
  z-index: 120;
  display: flex;
  width: min(360px, calc(100vw - 48px));
  padding: 16px;
  color: #334155;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.45;
  text-align: left;
  text-transform: none;
  white-space: normal;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -4px);
  transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
  pointer-events: none;
  flex-direction: column;
  gap: 10px;
}

.kpi-info-popover * {
  letter-spacing: 0;
  text-transform: none;
}

.kpi-info-popover::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  width: 10px;
  height: 10px;
  background: #fff;
  border-top: 1px solid #cbd5e1;
  border-left: 1px solid #cbd5e1;
  transform: translateX(-50%) rotate(45deg);
}

.kpi-info:hover .kpi-info-popover,
.kpi-info:focus .kpi-info-popover,
.kpi-info:focus-within .kpi-info-popover,
.kpi-info.is-open .kpi-info-popover {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.module-kpi-group.vcc .kpi-info-popover {
  right: -8px;
  left: auto;
  transform: translateY(-4px);
}

.module-kpi-group.vcc .kpi-info-popover::before {
  right: 12px;
  left: auto;
  transform: rotate(45deg);
}

.module-kpi-group.vcc .kpi-info:hover .kpi-info-popover,
.module-kpi-group.vcc .kpi-info:focus .kpi-info-popover,
.module-kpi-group.vcc .kpi-info:focus-within .kpi-info-popover,
.module-kpi-group.vcc .kpi-info.is-open .kpi-info-popover {
  transform: translateY(0);
}

.modal-title-with-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.modal-title-with-info h3 {
  margin: 0;
}

.modal-content:has(.modal-title-with-info) {
  overflow: visible;
}

.modal-content:has(.modal-title-with-info) .modal-header {
  position: relative;
  z-index: 200;
  border-radius: 6px 6px 0 0;
}

.modal-content:has(.modal-title-with-info) .modal-body {
  position: relative;
  z-index: 1;
  overflow-y: auto;
  border-radius: 0 0 6px 6px;
}

.modal-title-with-info .kpi-info-popover {
  top: 28px;
  left: 0;
  z-index: 210;
  transform: translateY(-4px);
}

.modal-title-with-info .kpi-info-popover::before {
  left: 10px;
  transform: rotate(45deg);
}

.modal-title-with-info .kpi-info:hover .kpi-info-popover,
.modal-title-with-info .kpi-info:focus .kpi-info-popover,
.modal-title-with-info .kpi-info:focus-within .kpi-info-popover,
.modal-title-with-info .kpi-info.is-open .kpi-info-popover {
  transform: translateY(0);
}

.kpi-info-popover > strong {
  display: block;
  color: #0f172a;
  font-size: 25px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: none;
}

.kpi-info-description {
  color: #475569;
}

.kpi-info-section {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 8px;
  border-top: 1px solid #e2e8f0;
}

.kpi-info-section b {
  color: #0f172a;
  font-size: 11px;
}

.kpi-info-section code {
  width: fit-content;
  padding: 3px 6px;
  color: #1e3a8a;
  font-size: 11px;
  background: #eff6ff;
  border-radius: 3px;
}

.kpi-info-source {
  color: #64748b;
  font-size: 10px;
}

.kpi-card:has(.kpi-info) {
  overflow: visible;
}

.kpi-card[data-kpi-info] > .module-kpi-title-row {
  justify-content: flex-start;
  width: fit-content;
}

.kpi-card:has(.kpi-info:hover),
.kpi-card:has(.kpi-info:focus),
.kpi-card:has(.kpi-info.is-open) {
  z-index: 110;
}

.module-kpi-metric strong {
  margin: 6px 0;
  color: var(--text);
  font-size: 25px;
  line-height: 1;
}

.module-kpi-metric.lifetime-recovered strong {
  color: #1d4ed8;
  font-size: 27px;
}

.module-kpi-metric small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.module-kpi-metric small.positive {
  color: #047857;
}

.clc-attendance-values {
  display: flex;
  gap: 14px;
  margin: 8px 0 4px;
}

.clc-attendance-values > span {
  display: block;
}

.clc-attendance-values strong {
  display: block;
  margin: 0 0 4px;
  font-size: 24px;
}

.clc-attendance-values small {
  display: block;
  font-size: 9px;
}

.clc-checkin { color: #047857 !important; }
.clc-checkout { color: #dc2626 !important; }
.clc-attendance-separator { color: #718096; }

.module-kpi-group.clc .module-kpi-metric:nth-child(2) .module-kpi-title-row > span:first-child {
  line-height: 1.2;
}

.module-kpi-group.clc .module-kpi-title-row {
  min-height: 30px;
  align-items: flex-start;
}

.module-kpi-group.clc .module-kpi-title-row > span:first-child {
  line-height: 1.2;
}

.vcc-focused-kpis > .kpi-card:nth-child(n + 6) {
  display: none;
}

.property-kpi-total {
  color: #0f172a;
  background: #e8f1f5;
  border-top: 2px solid #94a3b8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.property-kpi-total td {
  padding-top: 14px;
  padding-bottom: 14px;
  border-bottom-color: #94a3b8;
}

.property-kpi-total strong {
  color: #0f172a;
  font-weight: 700;
}

.property-kpi-total:hover {
  background: #e8f1f5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.property-kpi-total:hover td:first-child {
  border-left-color: transparent;
}

.staff-attention-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  color: #92400e;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 4px;
}

.staff-attention-count.urgent {
  color: #991b1b;
  background: #fee2e2;
  border-color: #ef4444;
}

.staff-attention-count.clear {
  color: #047857;
  background: #ecfdf5;
  border-color: #10b981;
}

.email-template-item {
  padding: 12px 14px;
  color: #374151;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 1px solid #e5e7eb;
}

.email-template-item:last-child {
  border-bottom: 0;
}

.email-template-item:hover,
.email-template-item.active {
  color: #1e40af;
  background: #eff6ff;
}

.email-config-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 2px solid #e5e7eb;
}

.email-config-tab {
  padding: 12px 24px;
  color: #6b7280;
  font-size: 14px;
  font-weight: 600;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  margin-bottom: -2px;
}

.email-config-tab.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
}

.email-config-pane {
  display: none;
}

.email-config-pane.active {
  display: block;
}

.field-code {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  color: #1e40af;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
}

.lite-editor-toolbar {
  display: flex;
  gap: 6px;
  padding: 8px;
  background: #f8fafc;
  border: 1px solid #d1d5db;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
}

.lite-editor-toolbar button {
  padding: 5px 9px;
  color: #374151;
  font-size: 12px;
  font-weight: 600;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  cursor: pointer;
}

.email-template-quill {
  min-height: 220px;
  border-radius: 0 0 6px 6px;
}

.ql-toolbar.ql-snow {
  background: #f8fafc;
  border-color: #d1d5db;
  border-radius: 6px 6px 0 0;
}

.ql-container.ql-snow {
  min-height: 220px;
  color: #1f2937;
  font-size: 13px;
  border-color: #d1d5db;
  border-radius: 0 0 6px 6px;
}

.ql-editor {
  min-height: 220px;
  line-height: 1.5;
}

.property-edit-tabs {
  display: flex;
  gap: 0;
  margin: 24px 0;
  border-bottom: 2px solid #e5e7eb;
}

.property-edit-tab {
  padding: 12px 24px;
  color: #6b7280;
  font-size: 14px;
  font-weight: 600;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  margin-bottom: -2px;
}

.property-edit-tab.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
}

.property-edit-pane {
  display: none;
}

.property-edit-pane.active {
  display: block;
}

.property-edit-pane > .card,
.property-edit-pane > div:first-child + .card,
.property-edit-pane > div:first-child + .card ~ .card {
  margin-bottom: 24px;
}

.property-edit-pane > .card:last-child,
.property-edit-pane > div:first-child + .card:last-child,
.property-edit-pane > div:first-child + .card ~ .card:last-child {
  margin-bottom: 0;
}

.property-edit-pane > div:first-child:not(.card) {
  margin-bottom: 24px;
}

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

.settings-field label {
  display: block;
  margin-bottom: 6px;
  color: #374151;
  font-size: 13px;
  font-weight: 600;
}

.settings-field input,
.settings-field select,
.settings-field textarea {
  width: 100%;
  padding: 9px 12px;
  color: #1f2937;
  font-size: 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
}

.connector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.connector-card {
  padding: 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.connector-card.configured {
  border-width: 2px;
  border-color: #3b82f6;
}

.module-settings-card {
  padding: 0;
  overflow: visible;
}

.property-edit-section {
  margin-bottom: 24px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
}

.property-edit-section-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

.property-edit-section-row > .property-edit-section {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin-bottom: 24px;
}

.property-edit-section-row > .property-edit-section > .settings-form-grid {
  flex: 1;
  align-content: start;
}

.property-edit-section:last-child {
  margin-bottom: 0;
}

.property-edit-section-title {
  padding: 20px 24px;
  background: #fafafa;
  border-bottom: 1px solid #e5e7eb;
}

.property-edit-section-title h3 {
  margin: 0 0 4px;
  color: #1f2937;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
}

.property-edit-section-title div {
  color: #6b7280;
  font-size: 12px;
  line-height: 1.5;
}

.property-edit-section > .card {
  padding: 24px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.property-edit-section > .card:hover {
  background: transparent;
  border-color: transparent !important;
  box-shadow: none !important;
}

.property-users-table-wrap {
  padding: 0 !important;
  overflow-x: auto;
}

.property-users-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.property-users-table th {
  padding: 12px 24px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .5px;
  text-align: left;
  text-transform: uppercase;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.property-users-table td {
  padding: 14px 24px;
  color: #4b5563;
  font-size: 13px;
  border-bottom: 1px solid #e5e7eb;
}

.property-users-table tbody tr:last-child td {
  border-bottom: 0;
}

.property-users-table select {
  width: 180px;
  padding: 8px 10px;
  color: #1f2937;
  font-size: 13px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
}

.property-user {
  display: flex;
  gap: 10px;
  align-items: center;
}

.property-user strong,
.property-user small {
  display: block;
}

.property-user strong {
  color: #1f2937;
  font-size: 14px;
}

.property-user small {
  margin-top: 2px;
  color: #6b7280;
  font-size: 12px;
}

.property-user-avatar {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  background: #3b82f6;
  border-radius: 50%;
}

.property-user-avatar-green { background: #10b981; }
.property-user-avatar-violet { background: #8b5cf6; }

@media (max-width: 900px) {
  .property-edit-section-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.module-settings-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 20px 24px;
  background: #fafafa;
  border-bottom: 1px solid #e5e7eb;
}

.module-settings-header h3 {
  margin: 0 0 4px;
  color: #1f2937;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.module-settings-header p {
  margin: 0;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.5;
}

#property-tab-integrations > .card {
  padding: 0;
  overflow: hidden;
}

#property-tab-integrations > .card > h3:first-child {
  margin: 0 0 0 !important;
  padding: 20px 24px 4px;
  color: #1f2937 !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  background: #fafafa;
}

#property-tab-integrations > .card > h3:first-child + div {
  margin: 0 !important;
  padding: 0 24px 20px;
  color: #6b7280 !important;
  font-size: 12px !important;
  line-height: 1.5;
  background: #fafafa;
  border-bottom: 1px solid #e5e7eb;
}

#property-tab-integrations > .card > h3:first-child + div + div {
  padding: 24px 24px 0;
}

#property-tab-integrations > .card > h3:first-child + div + div + div {
  padding: 0 24px 24px;
}

.module-dot {
  width: 12px;
  height: 12px;
  margin-top: 5px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.data-heartbeat-time {
  padding: 4px 10px;
  color: #065f46;
  font-size: 12px;
  font-weight: 600;
  background: #d1fae5;
  border-radius: 4px;
}

.data-heartbeat-dot {
  width: 9px;
  height: 9px;
  margin-left: 4px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, .55);
  animation: data-heartbeat 1.8s infinite;
}

.data-delay-indicator > svg {
  display: none;
}

.data-delay-indicator:not(:has(.data-heartbeat-dot))::after {
  content: '';
  width: 9px;
  height: 9px;
  margin-left: 4px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, .55);
  animation: data-heartbeat 1.8s infinite;
}

@keyframes data-heartbeat {
  0%, 55%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .45); }
  25% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

.ota-dot { background: #3b82f6; }
.clc-dot { background: #ea5230; }
.vcc-dot { background: #0f766e; }

.module-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding: 24px;
}

.module-control-block > label {
  display: block;
  margin-bottom: 10px;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
}

.option-card-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.option-card,
.toggle-card {
  min-height: 74px;
  padding: 12px;
  color: #475569;
  text-align: left;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
}

.option-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
}

.toggle-card {
  min-height: 42px;
  text-align: center;
  font-weight: 700;
}

.option-card:hover,
.toggle-card:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.option-card.selected,
.toggle-card.selected {
  color: #1e40af;
  background: #eff6ff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, .12);
}

.option-card span {
  display: flex;
  grid-column: 2;
  grid-row: 1 / -1;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin: 0;
  color: #1e40af;
  font-size: 16px;
  font-weight: 800;
  background: #dbeafe;
  border-radius: 4px;
}

.option-card strong {
  display: block;
  grid-column: 1;
  grid-row: 1;
  color: #1f2937;
  font-size: 12px;
  line-height: 1.25;
}

.option-card small {
  display: block;
  grid-column: 1;
  grid-row: 2;
  margin-top: 4px;
  color: #64748b;
  font-size: 10px;
  line-height: 1.35;
}

.toggle-card-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.slider-control {
  display: grid;
  grid-template-columns: 1fr 76px;
  gap: 12px;
  align-items: center;
  padding: 13px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.slider-control input[type="range"] {
  width: 100%;
  accent-color: #3b82f6;
}

.slider-control output {
  color: #1e40af;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.slider-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: #94a3b8;
  font-size: 10px;
}

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

  .module-control-grid,
  .option-card-row {
    grid-template-columns: 1fr;
  }
}

.month-recovery-table-container {
  margin-top: 0;
}

.properties-table-container.clc-month-table-container {
  margin: 0;
  padding: 0;
  border-radius: 0 0 6px 6px;
}

.properties-table-container.month-recovery-table-container {
  margin: 0;
  padding: 0;
  border-radius: 0 0 6px 6px;
}

.month-recovery-table {
  min-width: 1120px;
}

.ota-auto-filed-heading {
  white-space: nowrap;
}

.nested-expand {
  display: inline-flex;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  align-items: center;
  justify-content: center;
  color: #475569;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  cursor: pointer;
  vertical-align: middle;
}

.nested-expand:hover {
  color: #1d4ed8;
  border-color: #93c5fd;
  background: #eff6ff;
}

.month-detail-row > td {
  padding: 0 !important;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.clc-queue {
  overflow-x: auto;
  border: 0;
  border-radius: 0;
  background: #f8fafc;
}

.clc-queue-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  color: #334155;
  font-size: 12px;
  border-bottom: 1px solid #dbe4ea;
}

.clc-queue-heading span {
  color: #64748b;
  font-size: 11px;
}

.clc-queue table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: #fff;
  table-layout: auto;
}

.clc-queue th,
.clc-queue td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid #edf2f7;
  white-space: nowrap;
  font-size: 11px;
}

.clc-queue th {
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: #f8fafc;
}

.clc-queue tr:last-child td { border-bottom: 0; }

.clc-queue tbody td:first-child,
.clc-queue tbody tr:hover td:first-child {
  border-left: 0 !important;
}

.clc-reservation-link {
  padding: 0;
  color: #2563eb;
  font: inherit;
  font-weight: 700;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.clc-reservation-link:hover,
.clc-reservation-link:focus-visible {
  color: #1d4ed8;
  text-decoration: underline;
}

.vcc-connected-table .reservation-detail-row td:first-child strong {
  color: #2563eb;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.vcc-connected-table .reservation-detail-row td:first-child strong:hover,
.vcc-connected-table .reservation-detail-row td:first-child strong:focus-visible {
  color: #1d4ed8;
  text-decoration: underline;
}

.clc-queue-status {
  display: inline-block;
  padding: 3px 7px;
  color: #047857;
  font-size: 10px;
  font-weight: 700;
  background: #ecfdf5;
  border-radius: 999px;
}

.clc-queue-status.is-queued {
  color: #b45309;
  background: #fffbeb;
}

.clc-type-chip {
  display: inline-block;
  padding: 3px 7px;
  color: #475569;
  font-size: 10px;
  font-weight: 700;
  background: #f1f5f9;
  border-radius: 999px;
}

.clc-type-chip.is-checkin {
  color: #047857;
  background: #ecfdf5;
}

.clc-type-chip.is-checkout {
  color: #b91c1c;
  background: #fef2f2;
}

.clc-type-chip.is-payment {
  color: #1d4ed8;
  background: #eff6ff;
}

.clc-type-chip.is-ar {
  color: #c2410c;
  background: #fff7ed;
}

.clc-reservation-modal-content {
  width: 680px;
  max-width: 95vw;
}

.clc-reservation-modal-id {
  margin-bottom: 18px;
  color: #1d4ed8;
  font-size: 20px;
  font-weight: 700;
  font-family: monospace;
}

.clc-reservation-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: #e2e8f0;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

.clc-reservation-detail-grid div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: #fff;
}

.clc-reservation-detail-grid strong {
  color: #64748b;
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.clc-reservation-detail-grid span {
  color: #1f2937;
  font-size: 13px;
}

.clc-reservation-modal-note {
  margin-top: 16px;
  padding: 10px 12px;
  color: #475569;
  font-size: 12px;
  background: #f8fafc;
  border-left: 3px solid #10b981;
}

.ota-breakdown {
  width: 100%;
  padding: 0;
}

.month-recovery-table,
.ota-breakdown > table {
  table-layout: fixed;
}

.month-col-name { width: 22%; }
.month-col-recovered { width: 15%; }
.month-col-lifetime { width: 15%; }
.month-col-pending { width: 14%; }
.month-col-disputes { width: 16%; }
.month-col-count { width: 18%; }

.month-recovery-table th:nth-child(1),
.month-recovery-table td:nth-child(1),
.ota-breakdown table th:nth-child(1),
.ota-breakdown table td:nth-child(1) { width: 22%; }

.month-recovery-table th:nth-child(2),
.month-recovery-table td:nth-child(2),
.ota-breakdown table th:nth-child(2),
.ota-breakdown table td:nth-child(2) { width: 15%; }

.month-recovery-table th:nth-child(3),
.month-recovery-table td:nth-child(3),
.ota-breakdown table th:nth-child(3),
.ota-breakdown table td:nth-child(3) { width: 15%; }

.month-recovery-table th:nth-child(4),
.month-recovery-table td:nth-child(4),
.ota-breakdown table th:nth-child(4),
.ota-breakdown table td:nth-child(4) { width: 14%; }

.month-recovery-table th:nth-child(5),
.month-recovery-table td:nth-child(5),
.ota-breakdown table th:nth-child(5),
.ota-breakdown table td:nth-child(5) { width: 16%; }

.month-recovery-table th:nth-child(6),
.month-recovery-table td:nth-child(6),
.ota-breakdown table th:nth-child(6),
.ota-breakdown table td:nth-child(6) { width: 18%; }

.ota-breakdown table {
  width: 100%;
  min-width: 1120px;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.ota-breakdown th,
.ota-breakdown td {
  color: var(--text);
  background: transparent;
  vertical-align: middle;
  border-right: 1px solid #edf2f7;
}

.ota-breakdown .text-right {
  text-align: right;
}

.ota-breakdown th {
  color: var(--text) !important;
  background: #fef3c7 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: .5px !important;
  text-transform: uppercase !important;
  border-bottom: 2px solid #2d3748 !important;
  position: static;
}

.ota-breakdown > table > thead > tr > th,
.reservation-detail-container table > thead > tr > th {
  color: #64748b !important;
  background: #f8fafc !important;
  border-bottom: 1px solid #edf2f7 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: .04em !important;
  text-transform: uppercase !important;
}

.ota-breakdown th:last-child,
.ota-breakdown td:last-child {
  border-right: 0;
}

.ota-breakdown tbody tr {
  background: #ffffff;
}

.ota-breakdown tbody tr:nth-child(odd) td {
  background: #ffffff;
}

.ota-breakdown tbody tr:nth-child(even) {
  background: #fafbfc;
}

.ota-breakdown tbody tr:nth-child(even) td {
  background: #fafbfc;
}

.ota-breakdown > table > tbody > tr.ota-row-odd td {
  background: #ffffff;
}

.ota-breakdown > table > tbody > tr.ota-row-even td {
  background: #f8fafc;
}

.ota-breakdown > table > tbody > tr.ota-row-odd:hover td {
  background: #f1f5f9 !important;
}

.ota-breakdown > table > tbody > tr.ota-row-even:hover td {
  background: #eef2f7 !important;
}

.ota-breakdown tbody tr:hover {
  background: #f1f5f9 !important;
  box-shadow: none;
}

.reservation-detail-container > td {
  padding: 0 !important;
  background: #ffffff;
}

.reservation-detail-container table {
  width: 100%;
  min-width: 1120px;
  table-layout: fixed;
  border: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.reservation-detail-row td {
  color: var(--text);
  line-height: 1.6;
}

.reservation-detail-container tbody tr.reservation-detail-row:nth-child(odd) td {
  background: #ffffff;
}

.reservation-detail-container tbody tr.reservation-detail-row:nth-child(even) td {
  background: #fafbfc;
}

.reservation-detail-container tbody tr.reservation-detail-row:hover td {
  background: #f1f5f9 !important;
}


.auto-filed-chip {
  display: inline-flex;
  margin-left: 7px;
  padding: 2px 6px;
  color: #047857;
  font-size: 9px;
  font-weight: 700;
  background: #d1fae5;
  border: 1px solid #a7f3d0;
  border-radius: 4px;
  white-space: nowrap;
}

.manual-filed-chip {
  display: inline-flex;
  padding: 2px 6px;
  color: #64748b;
  font-size: 9px;
  font-weight: 700;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  white-space: nowrap;
}

.recovered-chip,
.not-recovered-chip {
  display: inline-flex;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 700;
  border-radius: 4px;
  white-space: nowrap;
}

.recovered-chip {
  color: #047857;
  background: #d1fae5;
  border: 1px solid #a7f3d0;
}

.not-recovered-chip {
  color: #b91c1c;
  background: #fee2e2;
  border: 1px solid #fecaca;
}

.pending-recovery-chip {
  display: inline-flex;
  padding: 2px 6px;
  color: #92400e;
  font-size: 9px;
  font-weight: 700;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 4px;
  white-space: nowrap;
}

.blocked-chip {
  display: inline-flex;
  padding: 2px 6px;
  color: #b91c1c;
  font-size: 9px;
  font-weight: 700;
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 4px;
  white-space: nowrap;
}

.vcc-pending-chip {
  display: inline-flex;
  padding: 2px 6px;
  color: #92400e;
  font-size: 9px;
  font-weight: 700;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 4px;
  white-space: nowrap;
}

.vcc-amount {
  margin-left: 5px;
  color: #047857;
  font-size: 11px;
}

.reservation-id-link {
  color: #2563eb;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: #bfdbfe;
  text-underline-offset: 2px;
}

.reservation-id-link:hover,
.reservation-id-link:focus {
  color: #1d4ed8;
  text-decoration-color: #2563eb;
}

.reservation-review-hint {
  display: block;
  margin-top: 2px;
  color: #94a3b8;
  font-size: 9px;
}

.reservation-detail-row td:first-child strong,
.reservation-detail-row td:first-child small,
.reservation-detail-row td:last-child small {
  display: block;
}

.reservation-detail-row td:first-child small,
.reservation-detail-row td:last-child small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.no-dispute-chip,
.valid-reservation-chip {
  display: inline-flex;
  padding: 2px 6px;
  color: #1e40af;
  font-size: 9px;
  font-weight: 700;
  background: #dbeafe;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  white-space: nowrap;
}

.valid-reservation-chip {
  color: #fff;
  background: #047857;
  border-color: #047857;
}

.month-row-disabled,
.month-row-disabled:nth-child(even),
.month-row-disabled:hover {
  color: #94a3b8;
  background: #f1f5f9;
  box-shadow: none;
  cursor: not-allowed;
}

.month-row-disabled td {
  color: #94a3b8;
}

.month-row-disabled:hover td:first-child {
  border-left-color: transparent;
}

.month-row-disabled td:first-child small {
  display: block;
  margin-top: 2px;
  color: #94a3b8;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

.month-row-active td:first-child {
  border-left-color: #10b981;
}

.month-recovery-total,
.month-recovery-total:hover {
  background: #e8f1f5;
}

@media (max-width: 1100px) {
  .module-kpi-groups {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .module-kpi-group.ota .module-kpi-group-header {
    flex-direction: column;
  }

  .module-kpi-group.clc .module-kpi-group-header {
    align-items: stretch;
    flex-direction: column;
  }

  .module-kpi-group.vcc .module-kpi-group-header {
    align-items: stretch;
    flex-direction: column;
  }

  .module-kpi-group.vcc .module-kpi-lifetime {
    width: 100%;
    padding: 10px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .module-kpi-group.clc .module-kpi-lifetime {
    width: 100%;
    padding: 10px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .module-kpi-group.clc .module-kpi-metrics {
    grid-template-columns: 1fr;
  }

  .module-kpi-lifetime {
    width: 100%;
    padding: 10px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .module-kpi-group.ota .module-kpi-metrics {
    grid-template-columns: 1fr;
  }

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

  .module-kpi-metric + .module-kpi-metric {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .module-kpi-metric:first-child { border-bottom-left-radius: 0; }

  .module-kpi-metric:last-child {
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
  }
}

.portfolio-selector {
  position: relative;
}

.portfolio-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}

.portfolio-btn:hover {
  border-color: var(--accent);
  background: #fafafa;
}

.portfolio-btn svg {
  width: 20px;
  height: 20px;
  transition: transform 0.2s;
}

.portfolio-btn.active svg {
  transform: rotate(180deg);
}

.portfolio-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 720px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
  display: none;
  max-height: 400px;
  overflow-y: auto;
}

.portfolio-dropdown.active {
  display: block;
}

.dropdown-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.5px;
}

.dropdown-item {
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 14px;
  color: var(--text);
  border-left: 3px solid transparent;
}

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

.dropdown-item.selected {
  background: #fef5f3;
  border-left-color: var(--accent);
  font-weight: 500;
}

.dropdown-item .property-name {
  font-weight: 500;
  display: block;
}

.dropdown-item .property-location {
  font-size: 12px;
  color: var(--muted);
}

.search-box {
  position: relative;
}

.search-input {
  width: 320px;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 14px;
  transition: all 0.2s;
  background: var(--bg);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(234, 82, 48, 0.1);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.notification-btn {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
}

.notification-btn:hover {
  border-color: var(--accent);
  background: #fafafa;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  background: var(--danger);
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-menu {
  position: relative;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
}

.user-btn:hover {
  border-color: var(--accent);
  background: #fafafa;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #c8401f 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
}

.user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.user-role {
  font-size: 11px;
  color: var(--muted);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
  display: none;
}

.user-dropdown.active {
  display: block;
}

.user-dropdown-item {
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-dropdown-item:first-child {
  border-radius: 6px 6px 0 0;
}

.user-dropdown-item:last-child {
  border-radius: 0 0 6px 6px;
}

.user-dropdown-item:hover {
  background: var(--bg);
}

.user-dropdown-divider {
  height: 1px;
  background: var(--line);
  margin: 4px 0;
}

.main-content {
  flex: 1;
  width: 100%;
  max-width: 1556px;
  margin: 0 auto;
  padding: 92px 28px 32px;
  overflow-y: auto;
  box-sizing: border-box;
}

.chip,
.field {
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 12px;
  padding: 8px 12px;
  background: #fff;
  font-weight: 500;
}

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

.field {
  min-width: 220px;
  color: var(--muted);
  background: var(--bg);
}

.screen {
  border-radius: 6px;
  background: var(--panel);
  padding: 24px;
  position: relative;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}

.properties-table-container,
.table-container {
  background: var(--panel);
  border-radius: 6px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow: auto;
  margin-top: 16px;
}

.properties-table-container table,
.table-container table {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.main-content h2 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
}

.main-content .subtitle {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.page-header-left h2 {
  margin: 0 0 8px;
}

.page-header-left .subtitle {
  margin: 0;
}

.time-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
}

.time-control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.time-control-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.5px;
}

.time-window-chips {
  display: flex;
  gap: 6px;
  position: relative;
}

.time-chip {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  cursor: pointer;
  transition: all 0.2s;
  font-family: Roboto, sans-serif;
  white-space: nowrap;
}

.time-chip:hover {
  border-color: var(--accent);
  background: #fff;
}

.time-chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 4px rgba(234, 82, 48, 0.2);
}

.custom-date-range-picker {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
  padding: 16px;
  display: none;
  z-index: 100;
  min-width: 320px;
}

.custom-date-range-picker.active {
  display: block;
}

.anchor-selector {
  position: relative;
}

.anchor-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  font-family: Roboto, sans-serif;
  min-width: 180px;
  justify-content: space-between;
}

.anchor-btn:hover {
  border-color: var(--accent);
  background: #fff;
}

.anchor-btn.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(234, 82, 48, 0.1);
}

.anchor-btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.anchor-btn.active svg {
  transform: rotate(180deg);
}

.anchor-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 100;
}

.anchor-dropdown.active {
  display: block;
}

.anchor-dropdown-item {
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 13px;
  color: var(--text);
  border-left: 3px solid transparent;
}

.anchor-dropdown-item:hover {
  background: var(--bg);
}

.anchor-dropdown-item.selected {
  background: #fef5f3;
  border-left-color: var(--accent);
  font-weight: 500;
}

.decision-selector {
  position: relative;
}

.decision-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
  font-weight: 400;
  color: var(--text);
  font-family: Roboto, sans-serif;
  justify-content: space-between;
}

.decision-btn:hover {
  border-color: var(--accent);
  background: #fff;
}

.decision-btn.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(234, 82, 48, 0.1);
}

.decision-btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.decision-btn.active svg {
  transform: rotate(180deg);
}

.decision-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 100;
  max-height: 280px;
  overflow-y: auto;
}

.decision-dropdown.active {
  display: block;
}

.decision-dropdown-item {
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 13px;
  color: var(--text);
  border-left: 3px solid transparent;
}

.decision-dropdown-item:hover {
  background: var(--bg);
}

.decision-dropdown-item.selected {
  background: #fef5f3;
  border-left-color: var(--accent);
  font-weight: 500;
}

.date-range-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.date-range-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.date-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.date-input-group label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.5px;
}

.date-input-group input[type="date"] {
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 12px;
  color: var(--text);
  font-family: Roboto, sans-serif;
  background: var(--bg);
}

.date-input-group input[type="date"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(234, 82, 48, 0.1);
  background: #fff;
}

.date-range-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.date-range-btn {
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-family: Roboto, sans-serif;
}

.date-range-btn.cancel {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
}

.date-range-btn.cancel:hover {
  background: #e2e8f0;
}

.date-range-btn.apply {
  background: var(--accent);
  color: #fff;
}

.date-range-btn.apply:hover {
  background: #d94722;
}

.time-controls-divider {
  width: 1px;
  height: 40px;
  background: var(--line);
}

.anchor-warning {
  display: none;
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  padding: 10px 14px;
  border-radius: 4px;
  margin: 12px 0;
  font-size: 12px;
  color: #78350f;
}

.anchor-warning.active {
  display: flex;
  align-items: start;
  gap: 8px;
}

.anchor-warning svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.main-content .section-title {
  margin: 24px 0 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.main-content .grid-4,
.main-content .grid-3 {
  margin-bottom: 8px;
}

h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
}

.subtitle {
  margin: 8px 0 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

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

.main-content .vcc-focused-kpis {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
}

.vcc-focused-kpis .kpi {
  white-space: nowrap;
}

.vcc-focused-kpis .trend {
  display: inline-flex;
  margin-left: 6px;
  padding: 3px 7px;
  font-size: 10px;
  line-height: 1.2;
  vertical-align: middle;
}

@media (max-width: 1200px) {
  .main-content .vcc-focused-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .main-content .vcc-focused-kpis {
    grid-template-columns: 1fr;
  }
}

.card {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  border-radius: 6px;
  background: #fff;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-light);
  transform: translateY(-2px);
}

.card:hover::before {
  opacity: 1;
}

.card.no-hover-border:hover {
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
  transform: none;
}

.card.no-hover-border::before,
.card.no-hover-border:hover::before {
  display: none;
  opacity: 0;
}

.alerts-kpi-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.alerts-kpi-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--line);
  transform: translateY(-2px);
}

.alerts-kpi-card::before,
.alerts-kpi-card:hover::before {
  display: none !important;
  opacity: 0;
}

.card h3 {
  margin: 0;
  color: #718096 !important;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px !important;
}

.kpi-icon {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 20px;
  right: 20px;
  transition: transform 0.3s ease;
}

.card:hover .kpi-icon {
  transform: scale(1.15) rotate(5deg);
}

.kpi {
  width: 100%;
  max-width: 100%;
  margin-top: 16px;
  font-size: 36px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1.2;
  transition: all 0.3s ease;
  user-select: none;
  padding-right: 70px;
  box-sizing: border-box;
}

.kpi[onclick] {
  position: relative;
  cursor: pointer;
}

.kpi[onclick]:hover {
  color: var(--accent);
  transform: scale(1.02);
}

.kpi[onclick]:active {
  transform: scale(0.98);
}

.meta {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.section-title {
  margin: 24px 0 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

th,
td {
  text-align: left;
  vertical-align: middle;
  padding: 14px 16px;
  border-right: 1px solid #edf2f7;
}

th:last-child,
td:last-child {
  border-right: 0;
}

th {
  color: var(--text) !important;
  background: #e8eaed !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  border-bottom: 2px solid var(--line) !important;
  position: sticky;
  top: 0;
  z-index: 10;
}

thead tr,
thead tr:hover,
th:hover {
  background: #e8eaed !important;
  box-shadow: none !important;
}

td {
  color: var(--text);
  line-height: 1.6;
}

tbody tr {
  background: white;
  border-bottom: 1px solid #edf2f7;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

tbody tr:nth-child(even) {
  background: #fafbfc;
}

tbody tr:hover {
  background: #f1f5f9 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  z-index: 1;
}

.table-summary-row,
.table-summary-row:nth-child(even),
.table-summary-row:hover,
tbody tr[style*="font-weight: 700"],
tbody tr[style*="font-weight: 700"]:nth-child(even),
tbody tr[style*="font-weight: 700"]:hover,
tfoot tr,
tfoot tr:hover {
  color: #0f172a;
  font-weight: 700;
  background: #e8f1f5 !important;
  border-top: 2px solid #94a3b8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

.table-summary-row td,
tbody tr[style*="font-weight: 700"] td,
tfoot td {
  padding-top: 14px;
  padding-bottom: 14px;
  border-bottom-color: #94a3b8;
}

.table-summary-row:hover td:first-child,
tbody tr[style*="font-weight: 700"]:hover td:first-child,
tfoot tr:hover td:first-child {
  border-left-color: transparent;
}

tbody td:first-child {
  border-left: 3px solid transparent;
  transition: border-color 0.15s ease;
}

tbody tr:hover td:first-child {
  border-left-color: var(--accent);
}

tbody tr[data-priority="critical"] td:first-child {
  border-left-color: #fc8181;
}

tbody tr[data-priority="warning"] td:first-child {
  border-left-color: #f6ad55;
}

tbody tr[data-priority="success"] td:first-child {
  border-left-color: #68d391;
}

tbody tr[data-priority="info"] td:first-child {
  border-left-color: #63b3ed;
}

tbody tr[data-priority="fraud"] {
  opacity: 0.6;
}

tbody tr[data-priority="fraud"] td:first-child {
  border-left-color: #cbd5e1;
}

tbody tr[data-priority="fraud"]:hover {
  opacity: 0.75;
  background: #f8fafc !important;
}

.month-recovery-table tbody tr:hover td:first-child,
.ota-breakdown table tbody tr:hover td:first-child,
.reservation-detail-container table tbody tr:hover td:first-child {
  border-left: 0 !important;
}

.month-recovery-table tbody td:first-child,
.ota-breakdown table tbody td:first-child,
.reservation-detail-container table tbody td:first-child {
  border-left: 0 !important;
}

tr:last-child td { 
  border-bottom: 0; 
}

.text-right {
  text-align: right;
}

/* Table enhancements */
.ota-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.ota-logo::before {
  content: '';
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: inline-block;
  flex-shrink: 0;
}

.ota-logo[data-ota="expedia"]::before {
  background: linear-gradient(135deg, #003b95 0%, #0057d9 100%);
}

.ota-logo[data-ota="booking"]::before {
  background: linear-gradient(135deg, #003580 0%, #0071c2 100%);
}

.ota-logo[data-ota="agoda"]::before {
  background: linear-gradient(135deg, #d62d5d 0%, #e94d76 100%);
}

.reservation-id {
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.3px;
}

.reservation-detail-container .clc-reservation-link.reservation-id {
  padding: 0;
  color: #2563eb;
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  letter-spacing: normal;
  background: transparent;
  border: 0;
}

.reservation-detail-container .clc-reservation-link.reservation-id:hover,
.reservation-detail-container .clc-reservation-link.reservation-id:focus-visible {
  color: #1d4ed8;
  text-decoration: underline;
}

.status-comparison {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.status-pill {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.status-pill.ota-status {
  background: #e6f7ff;
  color: #0050b3;
  border: 1px solid #91d5ff;
}

.status-pill.pms-status {
  background: #fff7e6;
  color: #d46b08;
  border: 1px solid #ffd591;
}

.status-pill.asserted {
  background: #f6ffed;
  color: #389e0d;
  border: 1px solid #b7eb8f;
  font-weight: 700;
}

.mismatch-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #d32f2f;
  font-size: 11px;
  font-weight: 600;
}

.mismatch-indicator::before {
  content: '⚠';
  font-size: 13px;
}

.commission-amount {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.commission-amount.high-value {
  color: #c53030;
  font-weight: 700;
}

.commission-amount.zero {
  color: var(--muted);
  font-weight: 500;
}

.timestamp {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.timestamp strong {
  color: var(--text);
  font-weight: 600;
}

/* Property table enhancements */
.property-name {
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.property-name::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.property-status-critical .property-name::before {
  background: #e53e3e;
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.2);
}

.property-status-warning .property-name::before {
  background: #dd6b20;
  box-shadow: 0 0 0 3px rgba(221, 107, 32, 0.2);
}

.property-status-healthy .property-name::before {
  background: #38a169;
  box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.2);
}

.property-status-info .property-name::before {
  background: #3182ce;
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.2);
}

.score-indicator {
  font-weight: 700;
  font-size: 15px;
  padding: 4px 10px;
  border-radius: 4px;
  display: inline-block;
}

.score-indicator.high {
  background: #f0fff4;
  color: #22543d;
}

.score-indicator.medium {
  background: #fffaf0;
  color: #dd6b20;
}

.score-indicator.low {
  background: #fff5f5;
  color: #c53030;
}

.metric-value {
  font-weight: 600;
  font-size: 14px;
}

.metric-value.has-issues {
  color: #c53030;
}

.metric-value.high-risk {
  color: #c53030;
  font-weight: 700;
}

.metric-value.normal {
  color: var(--text);
}

.badge {
  display: inline-block;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: help;
}

.badge-ok { color: #22543d; background: #c6f6d5; }
.badge-warn { color: #744210; background: #feebc8; }
.badge-danger { color: #742a2a; background: #fed7d7; }
.badge-info { color: #2c5282; background: #bee3f8; }
.badge-success { color: #22543d; background: #c6f6d5; }
.badge-warning { color: #744210; background: #feebc8; }

#dataDelayModal tbody td:last-child .badge {
  color: #fff !important;
}
.badge-muted { color: #4a5568; background: #e2e8f0; }

.action {
  border: 1px solid var(--accent);
  color: var(--accent);
  background: #fff;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action:hover {
  background: var(--accent);
  color: #fff;
}

.note {
  margin-top: 16px;
  border: 1px solid #bee3f8;
  border-radius: 6px;
  padding: 14px;
  color: var(--text);
  font-size: 13px;
  background: #ebf8ff;
  line-height: 1.6;
}

.login-frame {
  min-height: 680px;
  display: grid;
  grid-template-columns: 40% 60%;
  border-radius: 6px;
  border: 1px solid var(--line);
  overflow: hidden;
}

.login-left {
  color: #eef4fb;
  background: linear-gradient(160deg, #1a2f46, #274869);
  padding: 28px;
}

.login-left h3 {
  margin-top: 0;
  font-size: 28px;
}

.login-right {
  display: grid;
  place-items: center;
  background: #fff;
  padding: 28px;
}

.login-card {
  width: 420px;
  padding: 24px;
}

.form-row { margin-bottom: 16px; }

.form-row label {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}

.input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.btn-primary {
  width: 100%;
  border: 0;
  border-radius: 4px;
  padding: 12px;
  color: #fff;
  background: var(--accent);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: var(--accent-light);
  box-shadow: var(--shadow-md);
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 540px;
  height: 100vh;
  padding: 24px;
  border-left: 1px solid var(--line);
  background: #fff;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
  display: none;
  overflow-y: auto;
  z-index: 1001;
}

.drawer.open { display: block; }

.drawer-blur-control {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--line);
  z-index: 10000;
  display: none;
}

.drawer-blur-control.show {
  display: block;
}

.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: none;
  z-index: 1000;
  transition: backdrop-filter 0.3s ease;
}

.drawer-backdrop.open { display: block; }

.drawer-backdrop.blur-low {
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  background: rgba(0, 0, 0, 0.1);
}

.drawer-backdrop.blur-medium {
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  background: rgba(0, 0, 0, 0.15);
}

.drawer-backdrop.blur-high {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(0, 0, 0, 0.2);
}

.blur-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

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

.timeline {
  border-left: 3px solid var(--accent-light);
  margin-left: 6px;
  padding-left: 14px;
  color: var(--muted);
  font-size: 13px;
}

.timeline p { margin: 0 0 12px; }

.timeline-item {
  position: relative;
  padding-bottom: 20px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -22px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
}

.timeline-content {
  background: var(--bg);
  padding: 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.footer-note {
  margin-top: 20px;
  text-align: right;
  color: var(--muted);
  font-size: 13px;
}

/* Trend indicators */
.trend {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  margin-left: 16px;
  padding: 6px 14px;
  border-radius: 6px;
  letter-spacing: 0.3px;
  line-height: 1.4;
  transition: all 0.2s ease;
}

.trend.up { 
  color: #22543d;
  background: #c6f6d5;
}

.trend.down { 
  color: #742a2a;
  background: #fed7d7;
}

/* KPI Card Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.kpi-card {
  animation: fadeInUp 0.5s ease-out backwards;
}

.grid-4 .kpi-card:nth-child(1) { animation-delay: 0.1s; }
.grid-4 .kpi-card:nth-child(2) { animation-delay: 0.2s; }
.grid-4 .kpi-card:nth-child(3) { animation-delay: 0.3s; }
.grid-4 .kpi-card:nth-child(4) { animation-delay: 0.4s; }

.grid-3 .kpi-card:nth-child(1) { animation-delay: 0.5s; }
.grid-3 .kpi-card:nth-child(2) { animation-delay: 0.6s; }
.grid-3 .kpi-card:nth-child(3) { animation-delay: 0.7s; }

/* Linked cards */
a .card {
  cursor: pointer;
}

a .kpi {
  padding-right: 70px;
}

a:hover .kpi {
  color: var(--accent);
}

/* Utility classes */
.text-muted { color: var(--muted); }
.text-accent { color: var(--accent); }
.font-bold { font-weight: 700; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }

/* Pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding: 16px 20px;
  background: var(--bg);
  border-radius: 6px;
}

.pagination-info {
  font-size: 14px;
  color: var(--muted);
}

.pagination-info span {
  font-weight: 600;
  color: var(--text);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: #fff9f7;
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-btn svg {
  width: 16px;
  height: 16px;
}

.pagination-pages {
  display: flex;
  gap: 4px;
  margin: 0 8px;
}

.page-number {
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.page-number:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: #fff9f7;
}

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

.page-number.active:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
}

/* ============================================
   Modal Styles
   ============================================ */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(2px);
}

.modal.open {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  background: #f9fafb;
  border-radius: 8px 8px 0 0;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.modal-body {
  padding: 24px;
}

.modal-close {
  padding: 8px 16px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(234, 82, 48, 0.2);
}

/* ============================================
   Notification Dropdown
   ============================================ */
.notification-menu {
  position: relative;
}

.notification-btn {
  position: relative;
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  width: 380px;
  max-height: 480px;
  overflow: hidden;
  display: none;
  flex-direction: column;
  z-index: 1000;
  animation: dropdownSlideIn 0.2s ease-out;
}

.notification-dropdown.open {
  display: flex;
}

@keyframes dropdownSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.notification-dropdown-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: #f9fafb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notification-dropdown-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.notification-mark-all {
  font-size: 13px;
  color: var(--accent);
  cursor: pointer;
  font-weight: 500;
  transition: color 0.2s;
}

.notification-mark-all:hover {
  color: var(--accent-light);
}

.notification-dropdown-list {
  overflow-y: auto;
  flex: 1;
}

.notification-item {
  padding: 14px 20px;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.notification-item:hover {
  background: #f9fafb;
}

.notification-item.unread {
  background: #eff6ff;
  border-left: 3px solid var(--accent);
}

.notification-item.unread:hover {
  background: #dbeafe;
}

.notification-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

.notification-icon.info {
  background: #dbeafe;
  color: #1e40af;
}

.notification-icon.warning {
  background: #fef3c7;
  color: #92400e;
}

.notification-icon.error {
  background: #fee2e2;
  color: #991b1b;
}

.notification-icon.success {
  background: #d1fae5;
  color: #065f46;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 4px 0;
  line-height: 1.4;
}

.notification-message {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 6px 0;
  line-height: 1.4;
}

.notification-time {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 500;
}

.notification-dropdown-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  text-align: center;
  background: #f9fafb;
}

.notification-view-all {
  font-size: 14px;
  color: var(--accent);
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
}

.notification-view-all:hover {
  color: var(--accent-light);
}

.notification-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}

.notification-empty svg {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  opacity: 0.3;
}
