.content.views {
  height: 100%;
}

.view[data-view="overview"].active {
  display: flex;
  min-height: 0;
  height: 100%;
}

.overview-shell {
  position: relative;
  flex: 1;
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.overview-shell .knowledge-head {
  margin-bottom: 0;
}

.overview-shell .status-grid,
.overview-shell .stats-row,
.overview-shell .plan-row {
  gap: 10px;
}

.overview-shell .status-grid {
  margin-top: 0;
}

.overview-shell .stats-row,
.overview-shell .plan-row {
  margin-top: 0;
}

.overview-shell .plan-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 0;
  overflow: hidden;
}

.overview-shell .status-item,
.overview-shell .stat,
.overview-shell .plan-card {
  padding: 10px 12px;
}

.overview-shell .stat-label,
.overview-shell .meta {
  margin-bottom: 4px;
}

.overview-shell .plan-title {
  margin-bottom: 4px;
}

.overview-shell .status-value,
.overview-shell .stat-value {
  line-height: 1.2;
}

.overview-snapshot-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 18px;
  row-gap: 8px;
}

.overview-snapshot-card .plan-title {
  margin-bottom: 0;
  white-space: nowrap;
}

.overview-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.overview-snapshot-grid > div {
  min-width: 0;
}

.overview-snapshot-hint {
  grid-column: 2;
  margin-top: -2px;
}

.overview-shell [data-overview-top-services] .list-item + .list-item,
.overview-shell [data-overview-recent-bookings] .list-item + .list-item {
  margin-top: 8px;
}

.overview-shell .is-unavailable {
  opacity: 0.58;
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(255, 255, 255, 0.08);
}

.overview-shell .is-unavailable .stat-value,
.overview-shell .is-unavailable .plan-title,
.overview-shell .is-unavailable .meta,
.overview-shell .is-unavailable .list-empty,
.overview-shell .is-unavailable .pill {
  color: rgba(255, 255, 255, 0.5);
}

.overview-helper {
  display: block;
  min-width: 0;
  min-height: 0;
  position: relative;
  z-index: 1;
  overflow: visible;
}

.overview-helper:not(.is-overlay-open) .overview-helper__head,
.overview-helper:not(.is-overlay-open) .overview-helper__tools,
.overview-helper:not(.is-overlay-open) .overview-helper__messages,
.overview-helper:not(.is-overlay-open) .overview-helper__backdrop {
  display: none;
}

.overview-helper__backdrop {
  position: absolute;
  inset: 0;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(104, 154, 255, 0.12), transparent 34%),
    rgba(4, 6, 10, 0.82);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.overview-helper__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.overview-helper__close {
  display: none;
  flex-shrink: 0;
}

.overview-helper__chat {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  transition:
    box-shadow 220ms ease,
    border-color 220ms ease,
    background 220ms ease,
    transform 220ms ease,
    height 220ms ease,
    opacity 220ms ease;
}

.overview-helper:not(.is-overlay-open) .overview-helper__chat {
  height: auto;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.overview-helper:not(.is-overlay-open) .overview-helper__composer {
  min-height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.02)),
    rgba(13, 13, 13, 0.94);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.overview-helper:not(.is-overlay-open) .overview-helper__composer textarea {
  min-height: 20px;
  height: 20px;
  margin: 0;
}

.overview-helper__messages {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  pointer-events: auto;
}

@media (max-width: 768px) {
  .overview-helper__messages {
    overscroll-behavior-x: contain;
    overscroll-behavior-y: auto;
  }
}

.overview-helper__meta {
  margin-top: 6px;
}

.overview-helper__tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

.overview-helper.is-overlay-open {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 18px;
  gap: 12px;
}

.overview-helper.is-overlay-open .overview-helper__backdrop {
  opacity: 1;
  pointer-events: auto;
}

.overview-helper.is-overlay-open .overview-helper__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.overview-helper__chat.is-expanded {
  height: 100%;
  position: relative;
  z-index: 1;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
  background: rgba(18, 18, 18, 0.96);
  transform: none;
}

.overview-helper.is-overlay-open .overview-helper__messages {
  padding-bottom: 18px;
}

@media (max-width: 980px) {
  .overview-helper__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .overview-helper__tools {
    justify-content: flex-start;
  }

  .overview-helper.is-overlay-open {
    padding: 12px;
  }
}

@media (max-width: 900px) {
  .overview-helper.is-overlay-open {
    position: fixed;
    inset: 0;
    z-index: 120;
    padding:
      max(12px, env(safe-area-inset-top, 0px))
      12px
      max(12px, env(safe-area-inset-bottom, 0px));
  }

  .overview-helper.is-overlay-open .overview-helper__chat.is-expanded {
    min-height: 0;
  }

  .overview-shell {
    gap: 10px;
  }

  .overview-shell .status-item,
  .overview-shell .stat,
  .overview-shell .plan-card {
    padding: 10px;
  }

  .overview-snapshot-card {
    grid-template-columns: 1fr;
    gap: 8px;
  }

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

  .overview-snapshot-hint {
    grid-column: 1;
    margin-top: 0;
  }
}
