:root {
  --hestix-green-900: #124534;
  --hestix-green-800: #1a5b43;
  --hestix-green-700: #227852;
  --hestix-green-500: #33a96f;
  --hestix-green-100: #eaf7ef;
  --hestix-bg: #f7f8f3;
  --hestix-surface: #ffffff;
  --hestix-border: #dbe3dc;
  --hestix-text: #1f2f28;
  --hestix-muted: #617068;
  --hestix-radius-card: 18px;
  --hestix-radius-control: 11px;
  --hestix-shadow-soft: 0 14px 36px rgb(22 68 49 / 9%);
  --hestix-primary: var(--hestix-green-700);
  --hestix-primary-dark: var(--hestix-green-900);
  --hestix-red: #b93b2d;
  --hestix-red-soft: #fdecea;
  --hestix-green-soft: var(--hestix-green-100);
  --hestix-white: var(--hestix-surface);
  --hestix-sidebar-width: 268px;
  --hestix-topbar-height: 66px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
  background: var(--hestix-bg);
}

body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgb(37 160 101 / 10%), transparent 34rem),
    linear-gradient(180deg, #fbfcf7 0%, var(--hestix-bg) 44%, #f2f5ee 100%);
  color: var(--hestix-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body.hestix-drawer-open {
  overflow: hidden;
}

a {
  color: var(--hestix-green-800);
  font-weight: 650;
}

code {
  color: #33443b;
  overflow-wrap: anywhere;
}

.hestix-app-shell {
  min-height: 100vh;
}

.hestix-header,
.hestix-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: var(--hestix-topbar-height);
  background: color-mix(in srgb, var(--hestix-green-900) 94%, #000 6%);
  color: var(--hestix-white);
  border-bottom: 1px solid rgb(255 255 255 / 14%);
  backdrop-filter: blur(12px);
}

.hestix-header__inner {
  width: min(1320px, calc(100% - 32px));
  min-height: var(--hestix-topbar-height);
  margin: 0 auto;
  padding: 10px 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
}

body.hestix-authenticated .hestix-header__inner {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-inline: 18px;
}

.hestix-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  min-width: 0;
}

.hestix-brand-lockup {
  line-height: 1;
}

.hestix-brand-icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
}

.hestix-brand-wordmark {
  color: #f4f8f5;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, serif;
  font-size: 1.48rem;
  font-weight: 750;
  letter-spacing: 0.025em;
  line-height: 1;
  text-rendering: optimizeLegibility;
}

.hestix-header__actions {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
  min-width: 0;
  flex: 0 0 auto;
}

.hestix-header__notifications-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hestix-header__notifications-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f4f8f5;
  color: var(--hestix-green-900);
  font-size: 0.75rem;
  font-weight: 800;
}

.hestix-header__tenant-badge {
  display: inline-flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 0.35em;
  min-width: 0;
  max-width: none;
  overflow: hidden;
  white-space: nowrap;
}

.hestix-header__tenant-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hestix-nav {
  display: grid;
  gap: 7px;
}

.hestix-nav__group-label {
  margin: 8px 8px 2px;
  color: rgb(255 255 255 / 58%);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hestix-nav__link {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 12px;
  color: #e5f4ec;
  font-size: 0.91rem;
  font-weight: 700;
  text-decoration: none;
}

.hestix-nav__link small,
.hestix-nav__status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgb(255 255 255 / 10%);
  color: rgb(255 255 255 / 76%);
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.hestix-nav__link:hover,
.hestix-nav__link:focus,
.hestix-nav__link--active {
  background: rgb(255 255 255 / 96%);
  color: var(--hestix-green-900);
  outline: none;
}

.hestix-nav__link:hover small,
.hestix-nav__link:focus small,
.hestix-nav__link--active small,
.hestix-nav__link:hover .hestix-nav__status,
.hestix-nav__link:focus .hestix-nav__status,
.hestix-nav__link--active .hestix-nav__status {
  background: var(--hestix-green-100);
  color: var(--hestix-green-800);
}

.hestix-nav__link--muted {
  border-color: rgb(255 255 255 / 15%);
}

.hestix-nav__link--disabled {
  color: rgb(255 255 255 / 58%);
  cursor: not-allowed;
}

/* ── Nav section accordion (macro-categories) ── */
.hestix-nav__section {
  margin-top: 2px;
}

.hestix-nav__section + .hestix-nav__section {
  margin-top: 6px;
}

.hestix-nav__section-toggle {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 11px 14px;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 8px;
  background: rgb(255 255 255 / 8%);
  color: #e5f4ec;
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0;
  text-align: left;
  cursor: pointer;
}

.hestix-nav__section-toggle::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 2px solid rgb(255 255 255 / 58%);
  border-bottom: 2px solid rgb(255 255 255 / 58%);
  transform: rotate(-45deg);
  flex-shrink: 0;
  margin-left: 8px;
  transition: transform 0.2s ease;
}

.hestix-nav__section-toggle[aria-expanded="true"]::after {
  transform: rotate(45deg);
}

.hestix-nav__section-toggle:hover,
.hestix-nav__section-toggle:focus {
  background: rgb(255 255 255 / 14%);
  outline: none;
}

.hestix-nav__section-toggle:focus-visible {
  outline: 2px solid rgb(255 255 255 / 42%);
  outline-offset: 2px;
}

.hestix-nav__section--active .hestix-nav__section-toggle {
  background: rgb(255 255 255 / 16%);
  border-color: rgb(255 255 255 / 22%);
}

.hestix-nav__section-items {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.hestix-nav__section-items[hidden] {
  display: none;
}

.hestix-nav__section-items .hestix-nav__link {
  margin-left: 6px;
  min-height: 36px;
  padding: 6px 10px 6px 16px;
  font-size: 0.86rem;
}

.hestix-nav__subsection {
  margin-left: 6px;
}

.hestix-nav__subsection-toggle {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  display: flex;
  width: calc(100% - 6px);
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  padding: 6px 10px 6px 14px;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 7px;
  background: rgb(255 255 255 / 5%);
  color: rgb(229 244 236 / 86%);
  font-family: inherit;
  font-size: 0.81rem;
  font-weight: 700;
  letter-spacing: 0;
  text-align: left;
  cursor: pointer;
}

.hestix-nav__subsection-toggle::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  margin-left: 8px;
  border-right: 2px solid rgb(255 255 255 / 48%);
  border-bottom: 2px solid rgb(255 255 255 / 48%);
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
}

.hestix-nav__subsection-toggle[aria-expanded="true"]::after {
  transform: rotate(45deg);
}

.hestix-nav__subsection-toggle:hover,
.hestix-nav__subsection-toggle:focus {
  background: rgb(255 255 255 / 10%);
  outline: none;
}

.hestix-nav__subsection-toggle:focus-visible {
  outline: 2px solid rgb(255 255 255 / 34%);
  outline-offset: 2px;
}

.hestix-nav__subsection--active .hestix-nav__subsection-toggle {
  background: rgb(255 255 255 / 9%);
  border-color: rgb(255 255 255 / 18%);
}

.hestix-nav__subsection-items {
  display: grid;
  gap: 3px;
  margin-top: 4px;
  margin-bottom: 3px;
}

.hestix-nav__subsection-items[hidden] {
  display: none;
}

.hestix-nav__section-items .hestix-nav__link--child {
  margin-left: 16px;
  min-height: 31px;
  padding: 5px 9px 5px 18px;
  border-color: rgb(255 255 255 / 8%);
  font-size: 0.8rem;
}

.hestix-inline-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.hestix-inline-form {
  display: inline;
}

.hestix-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  border: 1px solid rgb(255 255 255 / 24%);
  border-radius: 12px;
  background: rgb(255 255 255 / 9%);
  color: var(--hestix-white);
  font: inherit;
  font-size: 1.12rem;
  cursor: pointer;
}

.hestix-icon-button:hover,
.hestix-icon-button:focus {
  background: rgb(255 255 255 / 16%);
  outline: none;
}

.hestix-sidebar,
.hestix-sidebar-drawer {
  position: fixed;
  top: var(--hestix-topbar-height);
  left: 0;
  bottom: 0;
  width: var(--hestix-sidebar-width);
  padding: 14px 10px 18px;
  background:
    linear-gradient(180deg, var(--hestix-green-900), var(--hestix-green-800));
  border-right: 1px solid rgb(255 255 255 / 10%);
  overflow-y: auto;
  z-index: 35;
  transform: translateX(0);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hestix-sidebar-backdrop {
  position: fixed;
  inset: var(--hestix-topbar-height) 0 0;
  z-index: 30;
  border: 0;
  background: rgb(9 28 20 / 54%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.hestix-shell,
.hestix-page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

body.hestix-authenticated .hestix-shell,
body.hestix-authenticated .hestix-page {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 28px 26px 46px calc(var(--hestix-sidebar-width) + 26px);
}

.hestix-page--settings {
  max-width: 1180px;
}

body.hestix-authenticated .hestix-page--settings {
  max-width: none;
}

body.hestix-authenticated .hestix-footer__inner {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 16px 20px 16px calc(var(--hestix-sidebar-width) + 26px);
}

body.hestix-sidebar-collapsed .hestix-sidebar {
  transform: translateX(-100%);
}

body.hestix-sidebar-collapsed .hestix-shell,
body.hestix-sidebar-collapsed .hestix-page {
  padding-left: 26px;
}

body.hestix-sidebar-collapsed .hestix-footer__inner {
  padding-left: 26px;
}

.hestix-auth-shell {
  width: min(520px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.hestix-login-logo {
  display: block;
  width: min(100%, 300px);
  max-width: 300px;
  height: auto;
  margin: 0 0 14px;
}

.hestix-title-row,
.hestix-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.hestix-page-header {
  padding: 2px 2px 0;
}

.hestix-page-title,
h1,
h2,
h3 {
  margin: 0;
  color: var(--hestix-text);
}

.hestix-page-title,
h1 {
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

h2,
.hestix-card-title {
  font-size: 1.08rem;
  line-height: 1.3;
}

h3 {
  font-size: 0.96rem;
  line-height: 1.3;
}

h4 {
  margin: 0;
  color: var(--hestix-text);
  font-size: 0.95rem;
  line-height: 1.3;
}

.hestix-page-subtitle,
.hestix-card-description,
.hestix-form-help,
.hestix-muted {
  color: var(--hestix-muted);
}

.hestix-page-subtitle {
  max-width: 760px;
  margin: 8px 0 0;
  font-size: 1rem;
}

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

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

.hestix-card {
  background: var(--hestix-surface);
  border: 1px solid var(--hestix-border);
  border-radius: var(--hestix-radius-card);
  padding: 20px 22px 22px;
  box-shadow: var(--hestix-shadow-soft);
  overflow: hidden;
}

.hestix-card > :first-child {
  margin-top: 0;
}

.hestix-card > :last-child {
  margin-bottom: 0;
}

.hestix-card--wide {
  grid-column: 1 / -1;
}

.hestix-card + .hestix-card {
  margin-top: 18px;
}

.hestix-card--overflow-visible {
  overflow: visible;
}

.hestix-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--hestix-border);
  background: linear-gradient(180deg, #ffffff 0%, #fbfdf9 100%);
}

.hestix-card > .hestix-card-header:first-child {
  margin: -20px -22px 0;
}

.hestix-card-title {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.hestix-card-description {
  margin: 5px 0 0;
  font-size: 0.94rem;
}

.hestix-card-body {
  padding: 20px 22px 22px;
}

.hestix-card > .hestix-card-body:last-child {
  margin: 0 -22px -22px;
}

.hestix-module-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.hestix-module-hub-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 250px;
}

.hestix-module-hub-grid .hestix-card + .hestix-card,
.hestix-module-hub-grid .hestix-module-hub-card {
  margin-top: 0;
}

.hestix-module-hub-card .hestix-button-row {
  margin-top: auto;
}

.hestix-module-hub-card--full {
  grid-column: 1 / -1;
}

.hestix-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgb(23 99 63 / 13%);
  border-radius: 999px;
  background: var(--hestix-green-100);
  color: var(--hestix-green-800);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.hestix-badge--success {
  background: #e8f6ee;
  color: #17633f;
}

.hestix-badge--muted,
.hestix-badge--neutral {
  background: #eef2ed;
  color: #4f5e56;
  border-color: #dde5dd;
}

.hestix-badge--warning {
  background: #fff6df;
  color: #835a06;
  border-color: #f4dfaa;
}

.hestix-badge-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.hestix-alert {
  margin: 16px 0;
  padding: 12px 14px;
  border-radius: var(--hestix-radius-control);
  border: 1px solid var(--hestix-border);
  background: var(--hestix-green-100);
}

.hestix-alert--error {
  border-color: #f0b8b0;
  background: var(--hestix-red-soft);
  color: var(--hestix-red);
}

.hestix-alert--warning {
  border-color: #e0c67e;
  background: #fef8e7;
  color: #7a5c1f;
}

.hestix-alert--legal-required {
  border-color: #d4a84b;
  background: #fef9ee;
  color: #7a5c1f;
}

.hestix-alert--legal-required strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.05rem;
}

.hestix-alert--legal-required p {
  margin: 2px 0;
}

.hestix-notification-list {
  display: grid;
  gap: 14px;
}

.hestix-notification-item {
  padding: 16px 18px;
  border: 1px solid var(--hestix-border);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdf9 100%);
}

.hestix-notification-item--unread {
  border-color: #bdd7c7;
  box-shadow: 0 0 0 1px rgb(34 120 82 / 8%);
}

.hestix-notification-item__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.hestix-notification-item__meta .hestix-muted {
  margin: 0;
  white-space: nowrap;
}

.hestix-notification-item__content h3 {
  margin-bottom: 8px;
}

.hestix-notification-item__content p {
  margin: 0 0 14px;
}

.hestix-notification-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.hestix-notification-details {
  margin: -6px 0 14px;
}

.hestix-notification-details summary {
  color: var(--hestix-green-800);
  font-weight: 800;
  cursor: pointer;
  width: fit-content;
}

.hestix-notification-details[open] summary {
  margin-bottom: 10px;
}

.hestix-legal-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  background: #fef2d9;
  color: #8a6620;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  width: fit-content;
}

.hestix-data-list {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 16px;
  margin: 16px 0 0;
}

.hestix-data-list dt {
  font-weight: 700;
}

.hestix-data-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.hestix-check-list,
.hestix-module-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.hestix-check-list li,
.hestix-module-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--hestix-border);
  border-radius: var(--hestix-radius-control);
  background: #fbfcfa;
}

.hestix-status {
  color: var(--hestix-green-800);
  font-weight: 700;
}

.hestix-status--disabled {
  color: #6d7679;
}

.hestix-tenant-list,
.hestix-structure-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.hestix-tenant-card,
.hestix-structure-item {
  border: 1px solid var(--hestix-border);
  border-radius: var(--hestix-radius-control);
  background: #fbfcfa;
}

.hestix-tenant-card {
  padding: 16px;
}

.hestix-tenant-card__header,
.hestix-structure-item__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.hestix-tenant-card__header p,
.hestix-structure-item__header p {
  margin: 4px 0 0;
}

.hestix-structure-item {
  padding: 14px;
  background: var(--hestix-surface);
}

.hestix-unit-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.hestix-unit-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--hestix-border);
  border-radius: var(--hestix-radius-control);
  background: #f7f9f6;
}

.hestix-unit-list strong,
.hestix-unit-list small {
  display: block;
}

.hestix-unit-list small {
  color: var(--hestix-muted);
  font-weight: 700;
}

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

.hestix-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.hestix-metric {
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--hestix-border);
  border-radius: var(--hestix-radius-control);
  background: #fbfcfa;
  display: grid;
  align-content: space-between;
  gap: 12px;
}

.hestix-metric span {
  color: var(--hestix-muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.hestix-metric strong {
  font-size: 1.7rem;
  line-height: 1;
}

.hestix-diagnostics-block {
  margin-top: 20px;
}

.hestix-placeholder {
  max-width: 760px;
}

.hestix-placeholder .hestix-button {
  margin-top: 12px;
}

.hestix-empty-state {
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--hestix-border);
  border-radius: var(--hestix-radius-control);
  background: #fbfcfa;
  color: var(--hestix-muted);
  font-weight: 700;
}

.hestix-table-wrap {
  width: 100%;
  margin-top: 0;
  overflow-x: auto;
  border: 1px solid var(--hestix-border);
  border-radius: var(--hestix-radius-control);
  background: var(--hestix-surface);
}

.hestix-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.hestix-table th,
.hestix-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--hestix-border);
  text-align: left;
  vertical-align: top;
}

.hestix-table th {
  background: #f3f7f2;
  color: #37443d;
  font-weight: 800;
  white-space: nowrap;
}

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

.hestix-table--compact th,
.hestix-table--compact td {
  padding: 7px 10px;
}

.hestix-table-action {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 8px;
  border: 1px solid var(--hestix-border);
  border-radius: 999px;
  background: #f4f7f3;
  color: var(--hestix-green-800);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

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

.hestix-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid var(--hestix-border);
  border-radius: 999px;
  background: #fbfcfa;
}

.hestix-tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hestix-tab-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--hestix-border);
  border-radius: 999px;
  background: #f5f8f4;
  color: var(--hestix-green-800);
  font-weight: 700;
  text-decoration: none;
}

.hestix-tab-link:hover,
.hestix-tab-link:focus {
  border-color: var(--hestix-green-700);
  background: #eef6f0;
  color: var(--hestix-green-900);
}

.hestix-tab-link[aria-current="page"] {
  border-color: var(--hestix-green-700);
  background: var(--hestix-green-700);
  color: var(--hestix-white);
}

.hestix-actions,
.hestix-button-row,
.hestix-form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.hestix-form-actions--tight {
  margin-top: 10px;
}

.hestix-selection-counter {
  margin-left: auto;
}

.hestix-pagination-row {
  margin-top: 10px;
}

.hestix-header .hestix-actions {
  margin-top: 0;
}

.hestix-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 40px;
  border: 1px solid var(--hestix-green-700);
  border-radius: var(--hestix-radius-control);
  padding: 8px 14px;
  background: var(--hestix-green-700);
  color: var(--hestix-white);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 7px 18px rgb(23 99 63 / 12%);
}

.hestix-button:hover,
.hestix-button:focus,
.hestix-button--primary:hover,
.hestix-button--primary:focus {
  background: var(--hestix-green-800);
  border-color: var(--hestix-green-800);
  color: var(--hestix-white);
  outline: none;
}

.hestix-button:disabled,
.hestix-button[aria-disabled="true"] {
  pointer-events: none;
  cursor: not-allowed;
  opacity: 0.58;
  box-shadow: none;
}

.hestix-button:disabled:hover,
.hestix-button:disabled:focus,
.hestix-button[aria-disabled="true"]:hover,
.hestix-button[aria-disabled="true"]:focus {
  background: inherit;
  border-color: inherit;
  color: inherit;
}

.hestix-button--primary {
  background: var(--hestix-green-500);
  border-color: var(--hestix-green-500);
  color: #072718;
}

.hestix-button--secondary {
  background: var(--hestix-surface);
  color: var(--hestix-green-800);
  border-color: var(--hestix-border);
  box-shadow: none;
}

.hestix-button--small {
  min-height: 32px;
  padding: 5px 11px;
  font-size: 0.83rem;
  font-weight: 700;
}

.hestix-dashboard-top-cards {
  display: grid;
  gap: 14px;
}

.hestix-button--danger-soft {
  color: #7a1f1f;
  border-color: #dfb7b7;
  background: #fff5f5;
}

.hestix-button--danger-soft:hover,
.hestix-button--danger-soft:focus {
  color: #5b1616;
  border-color: #cf9d9d;
  background: #ffe9e9;
}

.hestix-header .hestix-button--secondary {
  background: rgb(255 255 255 / 9%);
  color: #eff8f2;
  border-color: rgb(255 255 255 / 18%);
}

.hestix-header .hestix-button--secondary:hover,
.hestix-header .hestix-button--secondary:focus {
  background: rgb(255 255 255 / 18%);
  color: #ffffff;
  border-color: rgb(255 255 255 / 30%);
}

.hestix-form {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

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

.hestix-form-field {
  display: grid;
  gap: 6px;
  align-content: start;
}

.hestix-form-field--full {
  grid-column: 1 / -1;
}

.hestix-form-field--actions {
  align-self: end;
}

.hestix-form input[type="checkbox"],
.hestix-form input[type="radio"],
.hestix-filter-form input[type="checkbox"],
.hestix-filter-form input[type="radio"],
.hestix-table input[type="checkbox"],
.hestix-table input[type="radio"],
.hestix-legal-required-check input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  min-height: 1.1rem;
  margin: 0;
  accent-color: var(--hestix-green-700);
}

.hestix-form-field--checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.hestix-form-field--checkbox-row label {
  margin: 0;
}

.hestix-smart-access-codes-layout {
  display: grid;
  gap: 16px;
}

.hestix-smart-access-codes-layout--unit {
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.95fr);
  align-items: start;
}

.hestix-smart-access-codes-form {
  margin-top: 0;
}

.hestix-smart-access-codes-main-card .hestix-card-body,
.hestix-smart-access-codes-side-card .hestix-card-body {
  display: grid;
  gap: 16px;
}

.hestix-smart-access-codes-preview-note {
  margin: 0;
  color: var(--hestix-muted);
}

.hestix-smart-access-codes-device-list {
  display: grid;
  gap: 10px;
}

.hestix-smart-access-codes-device-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 12px;
  padding: 12px 14px;
  border: 1px solid var(--hestix-border);
  border-radius: var(--hestix-radius-control);
  background: #fbfcfa;
}

.hestix-smart-access-codes-device-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 4px;
}

.hestix-smart-access-codes-device-meta .hestix-muted,
.hestix-smart-access-codes-device-option .hestix-muted {
  font-size: 0.88rem;
}

.hestix-smart-access-codes-row--highlight td {
  background: rgb(14 165 233 / 6%);
}

.hestix-smart-access-codes-action-note {
  margin: 8px 0 0;
}

.hestix-smart-access-codes-device-outcome + .hestix-smart-access-codes-device-outcome {
  margin-top: 8px;
}

.hestix-input--compact {
  min-height: 36px !important;
  width: 100%;
  max-width: 150px;
}

@media (max-width: 720px) {
  .hestix-input--compact {
    max-width: 100%;
  }

  .hestix-smart-access-codes-layout--unit {
    grid-template-columns: 1fr;
  }
}

.hestix-form label,
.hestix-form-field label,
.hestix-filter-form label {
  font-weight: 700;
}

.hestix-form-help {
  margin: 0;
  font-size: 0.86rem;
}

.hestix-form input,
.hestix-form select,
.hestix-form textarea,
.hestix-filter-form input,
.hestix-filter-form select {
  width: 100%;
  min-height: 43px;
  border: 1px solid var(--hestix-border);
  border-radius: var(--hestix-radius-control);
  padding: 9px 11px;
  color: var(--hestix-text);
  font: inherit;
  background: var(--hestix-surface);
}

.hestix-form input:disabled,
.hestix-form select:disabled,
.hestix-form textarea:disabled,
.hestix-filter-form input:disabled,
.hestix-filter-form select:disabled,
.hestix-filter-form textarea:disabled {
  cursor: not-allowed;
  opacity: 0.68;
  background: #f3f6f1;
  color: #5f686c;
}

.hestix-form textarea {
  resize: vertical;
}

.hestix-form input:focus,
.hestix-form select:focus,
.hestix-form textarea:focus,
.hestix-filter-form input:focus,
.hestix-filter-form select:focus {
  border-color: var(--hestix-green-500);
  box-shadow: 0 0 0 3px rgb(37 160 101 / 14%);
  outline: none;
}

.hestix-form-field[hidden] {
  display: none !important;
}

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

.hestix-form-section {
  padding: 14px;
  border: 1px solid var(--hestix-border);
  border-radius: var(--hestix-radius-control);
  background: #fbfcfa;
}

.hestix-form-section h3 {
  margin: 0 0 10px;
}

.hestix-filter-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.hestix-filter-form label {
  display: grid;
  gap: 6px;
}

.hestix-filter-form__actions {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
}

.hestix-audit-table {
  min-width: 1120px;
}

.hestix-audit-details summary {
  color: var(--hestix-green-800);
  font-weight: 800;
  cursor: pointer;
}

.hestix-audit-details h3 {
  margin-top: 12px;
}

.hestix-audit-details pre {
  max-width: 420px;
  max-height: 260px;
  overflow: auto;
  margin: 8px 0 0;
  padding: 10px;
  border: 1px solid var(--hestix-border);
  border-radius: var(--hestix-radius-control);
  background: #f7f9f6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.hestix-auth-stack {
  display: grid;
  gap: 16px;
}

.hestix-registration-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.hestix-registration-kpi-card {
  padding: 18px 20px;
}

.hestix-registration-kpi-label {
  display: block;
  color: var(--hestix-muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.hestix-registration-kpi-value {
  display: block;
  margin-top: 8px;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.hestix-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.hestix-filter-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid var(--hestix-border);
  border-radius: 999px;
  background: #fbfcfa;
  color: var(--hestix-green-800);
  text-decoration: none;
  font-weight: 700;
}

.hestix-filter-pill:hover,
.hestix-filter-pill:focus {
  border-color: var(--hestix-green-500);
  background: var(--hestix-green-100);
  outline: none;
}

.hestix-filter-pill--active {
  border-color: var(--hestix-green-500);
  background: var(--hestix-green-100);
}

.hestix-registration-request-list {
  display: grid;
  gap: 16px;
}

.hestix-registration-request-card {
  border: 1px solid var(--hestix-border);
  border-radius: var(--hestix-radius-control);
  background: #fbfcfa;
  padding: 18px;
}

.hestix-registration-request-card--pending {
  border-color: #c9dfd0;
  background: linear-gradient(180deg, #fdfefc 0%, #f4fbf6 100%);
}

.hestix-registration-request-card__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.hestix-registration-request-card__header h3 {
  margin-top: 8px;
}

.hestix-registration-request-card__dates {
  min-width: 220px;
}

.hestix-registration-request-card__dates p {
  margin: 0 0 6px;
}

.hestix-registration-request-card__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.hestix-registration-request-card__section {
  padding: 14px;
  border: 1px solid var(--hestix-border);
  border-radius: var(--hestix-radius-control);
  background: #ffffff;
}

.hestix-registration-request-card__section p {
  margin: 0 0 6px;
}

.hestix-registration-request-card__section--full {
  grid-column: 1 / -1;
}

.hestix-registration-request-card__details {
  display: grid;
  gap: 10px;
}

.hestix-registration-request-card__actions {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--hestix-border);
}

.hestix-registration-request-card__action-forms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.hestix-registration-review-form {
  margin-top: 10px;
  padding: 14px;
  border: 1px solid var(--hestix-border);
  border-radius: var(--hestix-radius-control);
  background: #ffffff;
}

.hestix-registration-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}

.hestix-registration-status-badge--pending {
  background: #eef8f0;
  color: #145a38;
}

.hestix-registration-status-badge--approved {
  background: #edf5ff;
  color: #1d4f91;
}

.hestix-registration-status-badge--rejected {
  background: #fff1f1;
  color: #8e2c2c;
}

.hestix-error-card {
  max-width: 520px;
  margin: 64px auto;
  text-align: center;
  background: var(--hestix-surface);
  border: 1px solid var(--hestix-border);
  border-radius: var(--hestix-radius-card);
  padding: 40px 24px;
  box-shadow: var(--hestix-shadow-soft);
}

.hestix-error-code {
  font-size: 4rem;
  font-weight: 800;
  color: var(--hestix-red);
  line-height: 1;
  margin-bottom: 8px;
}

.hestix-error-card h1 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.hestix-error-card p {
  margin: 0 0 24px;
}

.hestix-error-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

/* ── Footer ── */
.hestix-footer {
  border-top: 1px solid var(--hestix-border);
  background: #f2f6ef;
}

.hestix-footer__inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 16px;
}

.hestix-footer__grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.25fr) minmax(190px, 0.8fr) minmax(260px, 1fr);
  gap: clamp(32px, 5vw, 88px);
  align-items: flex-start;
}

.hestix-footer__col p {
  margin: 0;
}

.hestix-footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  line-height: 1;
}

.hestix-footer__logo {
  width: 220px;
  max-width: 100%;
  max-height: 125px;
  height: auto;
  object-fit: contain;
  display: block;
}


.hestix-footer__tagline {
  color: var(--hestix-muted);
  font-size: 0.92rem;
  line-height: 1.45;
  max-width: 360px;
}

.hestix-footer__heading {
  color: var(--hestix-text);
  font-size: 0.85rem;
  font-weight: 800;
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hestix-footer__company-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.hestix-footer__company-head .hestix-footer__heading {
  margin-bottom: 0;
}

.hestix-footer__company-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--hestix-border);
  padding: 4px;
}

.hestix-footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.hestix-footer__link {
  color: var(--hestix-green-700);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.hestix-footer__link:hover {
  text-decoration: underline;
}

.hestix-footer__address {
  font-style: normal;
  font-size: 0.9rem;
  color: var(--hestix-muted);
  line-height: 1.6;
}

.hestix-footer__bottom {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--hestix-border);
  text-align: center;
}

.hestix-footer__bottom p {
  margin: 0;
  color: var(--hestix-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.hestix-login-email-pill {
  margin-top: 12px;
  font-size: 0.95rem;
  color: var(--hestix-text);
}

@media (max-width: 991px) {
  :root {
    --hestix-topbar-height: 62px;
  }

  body.hestix-authenticated .hestix-shell,
  body.hestix-authenticated .hestix-page,
  body.hestix-sidebar-collapsed .hestix-shell,
  body.hestix-sidebar-collapsed .hestix-page {
    padding: 22px 18px 36px;
  }

  body.hestix-authenticated .hestix-footer__inner,
  body.hestix-sidebar-collapsed .hestix-footer__inner {
    padding: 14px 18px;
  }

  .hestix-sidebar,
  body.hestix-sidebar-collapsed .hestix-sidebar {
    width: min(320px, 84vw);
    box-shadow: 18px 0 40px rgb(8 30 20 / 22%);
    transform: translateX(-105%);
  }

  body.hestix-drawer-open .hestix-sidebar {
    transform: translateX(0);
  }

  body.hestix-drawer-open .hestix-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .hestix-header__tenant-prefix {
    display: none;
  }
}

@media (max-width: 720px) {
  .hestix-footer__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .hestix-footer__logo {
    width: 185px;
    max-height: 105px;
  }

  .hestix-title-row,
  .hestix-page-header,
  .hestix-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .hestix-page-actions,
  .hestix-button-row,
  .hestix-form-actions {
    width: 100%;
    justify-content: flex-start;
  }

  body.hestix-authenticated .hestix-header__inner {
    padding-inline: 12px;
    gap: 10px;
  }

  .hestix-brand-icon {
    width: 30px;
    height: 30px;
  }

  .hestix-brand-wordmark {
    font-size: 1.26rem;
  }

  .hestix-header__actions {
    gap: 6px;
  }

  .hestix-header__actions .hestix-button {
    min-height: 36px;
    padding: 6px 9px;
    font-size: 0.85rem;
  }

  body.hestix-authenticated .hestix-shell,
  body.hestix-authenticated .hestix-page,
  body.hestix-sidebar-collapsed .hestix-shell,
  body.hestix-sidebar-collapsed .hestix-page {
    padding: 18px 12px 30px;
  }

  .hestix-card-header,
  .hestix-card-body {
    padding: 16px;
  }

  .hestix-card {
    padding: 16px;
  }

  .hestix-card > .hestix-card-header:first-child {
    margin: -16px -16px 0;
  }

  .hestix-card > .hestix-card-body:last-child {
    margin: 0 -16px -16px;
  }

  .hestix-grid,
  .hestix-module-hub-grid,
  .hestix-registration-kpi-grid,
  .hestix-registration-request-card__grid,
  .hestix-registration-request-card__action-forms,
  .hestix-metric-grid,
  .hestix-filter-form,
  .hestix-form-section-grid,
  .hestix-form-grid,
  .hestix-data-list {
    grid-template-columns: 1fr;
  }

  .hestix-tenant-card__header,
  .hestix-structure-item__header,
  .hestix-registration-request-card__header,
  .hestix-unit-list li {
    flex-direction: column;
    align-items: flex-start;
  }

  .hestix-badge-row {
    justify-content: flex-start;
  }

  .hestix-form-actions .hestix-button,
  .hestix-form-actions .hestix-button--primary,
  .hestix-form-actions .hestix-button--secondary {
    width: 100%;
  }
}

/* UI microfix: card alignment and superadmin technical forms */
.hestix-smart-access-codes-layout > .hestix-card,
.booking-hub-primary-grid > .hestix-card {
  margin-top: 0;
}

.hestix-admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 14px 18px;
  align-items: end;
  margin-top: 16px;
}

.hestix-admin-form-grid--filters {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.hestix-admin-form-grid > label {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
  align-content: start;
}

.hestix-admin-form-grid > label > span {
  color: var(--hestix-text);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.25;
}

.hestix-admin-form-grid small {
  color: var(--hestix-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.hestix-admin-form-grid input:not([type="checkbox"]):not([type="radio"]),
.hestix-admin-form-grid select,
.hestix-admin-form-grid textarea {
  width: 100%;
  min-height: 43px;
  border: 1px solid var(--hestix-border);
  border-radius: var(--hestix-radius-control);
  padding: 9px 11px;
  background: var(--hestix-surface);
  color: var(--hestix-text);
  font: inherit;
}

.hestix-admin-form-grid input[type="checkbox"],
.hestix-admin-form-grid input[type="radio"] {
  width: 1.1rem;
  height: 1.1rem;
  min-height: 1.1rem;
  margin: 0;
  accent-color: var(--hestix-green-700);
}

.hestix-admin-form-grid input:not([type="checkbox"]):not([type="radio"]):focus,
.hestix-admin-form-grid select:focus,
.hestix-admin-form-grid textarea:focus {
  border-color: var(--hestix-green-500);
  box-shadow: 0 0 0 3px rgb(37 160 101 / 14%);
  outline: none;
}

.hestix-admin-form-grid input:disabled,
.hestix-admin-form-grid select:disabled,
.hestix-admin-form-grid textarea:disabled {
  cursor: not-allowed;
  opacity: 0.68;
  background: #f3f6f1;
  color: #5f686c;
}

.hestix-admin-form-grid > label:has(input[type="checkbox"]),
.hestix-admin-form-grid > label:has(input[type="radio"]) {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--hestix-border);
  border-radius: var(--hestix-radius-control);
  background: #fbfcfa;
}

.hestix-admin-form-grid > label:has(input[type="checkbox"]) > input[type="checkbox"],
.hestix-admin-form-grid > label:has(input[type="radio"]) > input[type="radio"] {
  grid-column: 1;
  grid-row: 1;
}

.hestix-admin-form-grid > label:has(input[type="checkbox"]) > span,
.hestix-admin-form-grid > label:has(input[type="radio"]) > span {
  grid-column: 2;
  grid-row: 1;
}

.hestix-admin-form-grid > label:has(input[type="checkbox"]) > small,
.hestix-admin-form-grid > label:has(input[type="radio"]) > small,
.hestix-admin-form-grid > label:has(input[type="checkbox"]) > .hestix-field-error,
.hestix-admin-form-grid > label:has(input[type="radio"]) > .hestix-field-error {
  grid-column: 1 / -1;
}

.hestix-admin-form-grid .hestix-form-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
  margin-top: 4px;
}

@media (max-width: 1180px) {
  .hestix-admin-form-grid--filters {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 720px) {
  .hestix-admin-form-grid,
  .hestix-admin-form-grid--filters {
    grid-template-columns: 1fr;
  }

  .hestix-admin-form-grid .hestix-form-actions {
    justify-content: flex-start;
  }
}

/* ── Legal pages ── */
.hestix-legal-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hestix-legal-list__item {
  border: 1px solid var(--hestix-border);
  border-radius: var(--hestix-radius-control);
  background: var(--hestix-surface);
  overflow: hidden;
}

.hestix-legal-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}

.hestix-legal-link:hover {
  background: var(--hestix-green-100);
}

.hestix-legal-link--unavailable {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  opacity: 0.6;
  cursor: default;
}

.hestix-legal-version {
  color: var(--hestix-muted);
  font-size: 0.8rem;
}

.hestix-breadcrumb {
  margin-bottom: 18px;
}

.hestix-breadcrumb ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 8px;
  align-items: center;
}

.hestix-breadcrumb li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.hestix-breadcrumb li + li::before {
  content: "/";
  color: var(--hestix-muted);
}

.hestix-breadcrumb a {
  color: var(--hestix-primary);
  text-decoration: none;
}

.hestix-breadcrumb a:hover {
  text-decoration: underline;
}

.hestix-divider {
  border: none;
  border-top: 1px solid var(--hestix-border);
  margin: 20px 0;
}

.hestix-legal-content {
  line-height: 1.7;
  font-size: 0.95rem;
}

.hestix-legal-content h2,
.hestix-legal-content h3 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.hestix-legal-content p {
  margin: 0.6em 0;
}

.hestix-legal-content ul,
.hestix-legal-content ol {
  padding-left: 1.5em;
}

.hestix-legal-required-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px;
}

.hestix-legal-required-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  flex: 1;
}

.hestix-legal-required-check input[type="checkbox"] {
  margin-top: 4px;
  flex-shrink: 0;
}

.hestix-legal-required-check label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
}

/* ── Footer legal link ── */
.hestix-footer__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.hestix-footer__legal-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--hestix-green-700);
  text-decoration: none;
}

.hestix-footer__legal-link:hover {
  text-decoration: underline;
}

/* ── Legal page enhancements ── */
.hestix-legal-meta {
  margin-top: 8px;
}

.hestix-legal-meta p {
  margin: 0;
}

.hestix-legal-footer {
  display: flex;
  justify-content: flex-start;
}

/* Responsive legal required items */
@media (max-width: 720px) {
  .hestix-legal-required-item {
    flex-direction: column;
    gap: 10px;
  }
}

/* Step 13.2 — mapping Alloggiati compatto con help inline e popover non tagliato */
.hestix-mapping-form-panel {
  max-width: 760px;
  margin-top: 16px;
}

.hestix-form-grid--mapping {
  display: grid;
  grid-template-columns: 320px 220px auto;
  align-items: end;
  gap: 14px;
}

.hestix-form-grid--mapping .hestix-form-field {
  min-width: 0;
}

.hestix-form-grid--mapping .hestix-form-field--actions {
  align-self: end;
  justify-self: start;
  margin-bottom: 0;
}

.hestix-form-grid--mapping .hestix-input--compact {
  width: 150px;
  max-width: 150px;
}

.hestix-input-help-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hestix-help-popover--inline {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}

.hestix-help-popover--inline > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  border-radius: 999px;
  border: 1px solid var(--hestix-border);
  background: #fff;
  color: var(--hestix-green-800);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.hestix-help-popover--inline > summary::-webkit-details-marker {
  display: none;
}

.hestix-help-popover--inline .hestix-help-popover__content {
  position: absolute;
  z-index: 40;
  top: auto;
  right: 0;
  bottom: calc(100% + 8px);
  left: auto;
  width: min(280px, 70vw);
  padding: 10px 12px;
  border: 1px solid var(--hestix-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 35px rgb(23 99 63 / 14%);
  color: var(--hestix-muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.hestix-help-popover--inline .hestix-help-popover__content::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 10px;
  border-width: 6px;
  border-style: solid;
  border-color: #fff transparent transparent transparent;
  filter: drop-shadow(0 1px 0 var(--hestix-border));
}

.hestix-form-grid--mapping .hestix-form-field--actions .hestix-button {
  margin-top: 0;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .hestix-mapping-form-panel {
    max-width: none;
  }

  .hestix-form-grid--mapping {
    grid-template-columns: 1fr;
  }

  .hestix-form-grid--mapping .hestix-input--compact {
    width: 100%;
    max-width: 100%;
  }

  .hestix-form-grid--mapping .hestix-form-field--actions {
    justify-self: stretch;
  }

  .hestix-form-grid--mapping .hestix-form-field--actions .hestix-button {
    width: 100%;
  }

  .hestix-help-popover--inline .hestix-help-popover__content {
    right: auto;
    left: 0;
    width: min(260px, 78vw);
  }

  .hestix-help-popover--inline .hestix-help-popover__content::after {
    right: auto;
    left: 10px;
  }
}

/* Step 16.1a — Tenant dashboard v2 command center */
.tenant-dashboard-v2 {
  grid-column: 1 / -1;
  display: grid;
  gap: 1.2rem;
}

.tenant-dashboard-hero,
.tenant-dashboard-section,
.tenant-dashboard-spotlight {
  border: 1px solid rgba(31, 79, 61, 0.11);
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 42px rgba(16, 46, 34, 0.06);
}

.tenant-dashboard-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.5rem;
  overflow: hidden;
  padding: 1.55rem;
  background:
    radial-gradient(circle at 84% 16%, rgba(42, 116, 86, 0.14), transparent 22rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(244, 249, 245, 0.94));
}

.tenant-dashboard-hero::after {
  content: "";
  position: absolute;
  right: 2rem;
  bottom: -3rem;
  width: 24rem;
  height: 12rem;
  border-radius: 999px;
  background:
    radial-gradient(circle at 25% 35%, rgba(31, 79, 61, 0.13), transparent 2.5rem),
    radial-gradient(circle at 62% 24%, rgba(31, 79, 61, 0.11), transparent 3.6rem),
    linear-gradient(90deg, transparent 0 8%, rgba(31, 79, 61, 0.12) 8% 10%, transparent 10% 25%, rgba(31, 79, 61, 0.1) 25% 27%, transparent 27%);
  opacity: 0.62;
  pointer-events: none;
}

.tenant-dashboard-hero__content,
.tenant-dashboard-hero__actions {
  position: relative;
  z-index: 1;
}

.tenant-dashboard-eyebrow {
  margin: 0 0 0.4rem;
  color: #5c7468;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.tenant-dashboard-hero__heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.tenant-dashboard-hero__heading h2 {
  margin: 0;
  color: #183629;
  font-size: clamp(1.6rem, 2.4vw, 2.35rem);
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.tenant-dashboard-hero__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
  color: #50665b;
  font-weight: 700;
}

.tenant-dashboard-hero__summary {
  max-width: 48rem;
  margin: 0.75rem 0 0;
  color: #65746d;
  font-size: 0.98rem;
}

.tenant-dashboard-hero__actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.6rem;
  min-width: 17rem;
}

.tenant-dashboard-action,
button.tenant-dashboard-action {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.45rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(31, 79, 61, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: #194b37;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(16, 46, 34, 0.07);
}

.tenant-dashboard-action--primary {
  background: #1f6b4d;
  color: #fff;
  border-color: #1f6b4d;
}

.tenant-dashboard-action:hover,
.tenant-dashboard-module a:hover,
.tenant-dashboard-link:hover {
  transform: translateY(-1px);
}

.tenant-dashboard-pill,
.tenant-dashboard-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  padding: 0.16rem 0.52rem;
  border-radius: 999px;
  background: rgba(31, 79, 61, 0.08);
  color: #24533e;
  font-size: 0.74rem;
  font-weight: 850;
  white-space: nowrap;
}

.tenant-dashboard-pill--active,
.tenant-dashboard-chip--active {
  background: rgba(31, 116, 78, 0.11);
  color: #1f6f4e;
}

.tenant-dashboard-pill--warning,
.tenant-dashboard-chip--warning {
  background: rgba(201, 138, 36, 0.14);
  color: #95651d;
}

.tenant-dashboard-pill--future,
.tenant-dashboard-chip--future {
  background: rgba(98, 112, 104, 0.1);
  color: #68756d;
}

.tenant-dashboard-pill--disabled,
.tenant-dashboard-chip--inactive {
  background: rgba(98, 112, 104, 0.1);
  color: #737d77;
}

.tenant-dashboard-pill--battery {
  background: rgba(31, 116, 78, 0.1);
  color: #1f6f4e;
}

.tenant-dashboard-health--warning {
  color: #9a6415;
}

.tenant-dashboard-health--critical {
  color: #9a2f2f;
}

.tenant-dashboard-health--ok,
.tenant-dashboard-health--info {
  color: #1f6b4d;
}

.tenant-dashboard-kpi-rail {
  display: grid;
  grid-template-columns: repeat(7, minmax(7.5rem, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(31, 79, 61, 0.11);
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 14px 36px rgba(16, 46, 34, 0.055);
}

.tenant-dashboard-kpi {
  display: grid;
  gap: 0.3rem;
  min-height: 5.35rem;
  padding: 0.9rem 1rem;
  border-right: 1px solid rgba(31, 79, 61, 0.09);
}

.tenant-dashboard-kpi:last-child {
  border-right: 0;
}

.tenant-dashboard-kpi::before {
  content: "";
  width: 1.9rem;
  height: 0.22rem;
  border-radius: 999px;
  background: rgba(31, 79, 61, 0.16);
}

.tenant-dashboard-kpi--ok::before {
  background: #1f8a5b;
}

.tenant-dashboard-kpi--warning::before {
  background: #c98a24;
}

.tenant-dashboard-kpi--critical::before {
  background: #b64242;
}

.tenant-dashboard-kpi__label {
  color: #627369;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.tenant-dashboard-kpi__value {
  color: #183629;
  font-size: clamp(1.32rem, 1.7vw, 1.9rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
}

.tenant-dashboard-kpi__helper {
  color: #1f7a55;
  font-size: 0.78rem;
  font-weight: 750;
}

.tenant-dashboard-section,
.tenant-dashboard-spotlight {
  padding: 1rem;
}

.tenant-dashboard-section__header {
  margin-bottom: 0.85rem;
}

.tenant-dashboard-section__header--inline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
}

.tenant-dashboard-section__header h2,
.tenant-dashboard-structure h3 {
  margin: 0;
  color: #183629;
  letter-spacing: -0.025em;
}

.tenant-dashboard-section__header p,
.tenant-dashboard-module p,
.tenant-dashboard-structure p {
  margin: 0.22rem 0 0;
  color: #697970;
  font-size: 0.88rem;
}

.tenant-dashboard-module-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.tenant-dashboard-module {
  display: grid;
  gap: 0.65rem;
  min-height: 8.4rem;
  padding: 0.95rem;
  border: 1px solid rgba(31, 79, 61, 0.1);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 252, 249, 0.92));
}

.tenant-dashboard-module--active {
  border-color: rgba(31, 116, 78, 0.28);
  background:
    radial-gradient(circle at 100% 0%, rgba(31, 116, 78, 0.12), transparent 8rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 251, 247, 0.94));
}

.tenant-dashboard-module--warning {
  border-color: rgba(201, 138, 36, 0.32);
}

.tenant-dashboard-module--future {
  background: #fbfbfa;
}

.tenant-dashboard-module__top {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
}

.tenant-dashboard-module h3 {
  margin: 0;
  color: #1c3d2e;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.tenant-dashboard-module a,
.tenant-dashboard-link {
  color: #196548;
  font-weight: 800;
  font-size: 0.88rem;
  text-decoration: none;
  letter-spacing: -0.005em;
}

.tenant-dashboard-module__placeholder {
  color: #79847e;
  font-size: 0.82rem;
  font-weight: 750;
}

.tenant-dashboard-spotlight-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 1rem;
}

.tenant-dashboard-spotlight-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.9rem;
}

.tenant-dashboard-spotlight-metrics--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tenant-dashboard-spotlight-metrics > div {
  display: grid;
  gap: 0.25rem;
  padding: 0.72rem;
  border-radius: 0.9rem;
  background: rgba(31, 79, 61, 0.055);
}

.tenant-dashboard-warning-box {
  background: rgba(201, 138, 36, 0.12) !important;
}

.tenant-dashboard-spotlight-metrics span {
  color: #63756b;
  font-size: 0.75rem;
  font-weight: 800;
}

.tenant-dashboard-spotlight-metrics strong {
  color: #173729;
  font-size: 1.32rem;
  line-height: 1;
}

.tenant-dashboard-device-list,
.tenant-dashboard-unit-stack,
.tenant-dashboard-activity-list {
  display: grid;
  gap: 0.5rem;
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
}

.tenant-dashboard-device-list li,
.tenant-dashboard-unit-stack li,
.tenant-dashboard-activity-list__item {
  display: grid;
  gap: 0.28rem;
  padding: 0.75rem 0.8rem;
  border: 1px solid rgba(31, 79, 61, 0.09);
  border-radius: 0.9rem;
  background: #fff;
}

.tenant-dashboard-device-list li {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.tenant-dashboard-device-list strong,
.tenant-dashboard-unit-stack strong,
.tenant-dashboard-activity-list strong {
  color: #1d3d2f;
}

.tenant-dashboard-device-list small,
.tenant-dashboard-unit-stack small,
.tenant-dashboard-activity-list span,
.tenant-dashboard-activity-list small {
  display: block;
  color: #718078;
  font-size: 0.82rem;
}

.tenant-dashboard-device-list__meta,
.tenant-dashboard-chip-row {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tenant-dashboard-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(20rem, 0.9fr);
  gap: 1rem;
}

.tenant-dashboard-structure {
  display: grid;
  gap: 0.65rem;
  padding: 0.85rem;
  border: 1px solid rgba(31, 79, 61, 0.09);
  border-radius: 1rem;
  background: linear-gradient(180deg, #fff, rgba(248, 251, 249, 0.8));
}

.tenant-dashboard-structure + .tenant-dashboard-structure {
  margin-top: 0.75rem;
}

.tenant-dashboard-unit-stack li {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  align-items: center;
}

.tenant-dashboard-activity-list__item {
  position: relative;
  padding-left: 1rem;
}

.tenant-dashboard-activity-list__item::before {
  content: "";
  position: absolute;
  left: 0.45rem;
  top: 0.85rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: #517d95;
}

.tenant-dashboard-activity-list__item--ok::before {
  background: #1f8a5b;
}

.tenant-dashboard-activity-list__item--warning::before {
  background: #c98a24;
}

.tenant-dashboard-activity-list__item--critical::before {
  background: #b64242;
}

.tenant-dashboard-alloggiati-status {
  margin-top: 0.85rem;
  padding: 0.8rem;
  border-radius: 0.9rem;
  background: rgba(31, 79, 61, 0.055);
}

.tenant-dashboard-alloggiati-status p {
  margin: 0;
  color: #65746d;
}

.tenant-dashboard-alloggiati-status p + p {
  margin-top: 0.25rem;
}

.management-control-page {
  grid-column: 1 / -1;
  display: grid;
  gap: 1rem;
}

.management-control-hero .tenant-dashboard-hero__heading h1 {
  margin: 0;
  color: #183629;
  font-size: clamp(1.6rem, 2.4vw, 2.35rem);
  line-height: 1.05;
}

.management-control-toolbar {
  display: grid;
  grid-template-columns: auto max-content auto minmax(14rem, 18rem) auto;
  align-items: end;
  justify-content: start;
  gap: 0.55rem;
  width: fit-content;
  max-width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(31, 79, 61, 0.11);
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(16, 46, 34, 0.055);
}

.management-control-period-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.45rem;
  min-width: 2.45rem;
  height: 2.45rem;
  border: 1px solid rgba(31, 79, 61, 0.18);
  border-radius: 999px;
  background: #fff;
  color: #194b37;
  font-size: 1.35rem;
  font-weight: 900;
  text-decoration: none;
}

.management-control-period-label {
  justify-self: center;
  min-width: 9.5rem;
  padding: 0 0.45rem;
  color: #183629;
  font-size: 1.02rem;
  text-align: center;
  white-space: nowrap;
}

.management-control-period-picker {
  justify-self: center;
  position: relative;
}

.management-control-period-picker > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.management-control-period-picker > summary::-webkit-details-marker {
  display: none;
}

.management-control-period-picker > summary::marker {
  display: none;
  content: "";
}

.management-control-period-form,
.management-control-period-form input[type="month"] {
  display: none;
}

.management-control-period-picker__panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 50%;
  transform: translateX(-50%);
  padding: 0.85rem 0.75rem 0.75rem;
  min-width: 15.5rem;
  border: 1px solid rgba(31, 79, 61, 0.14);
  border-radius: 0.95rem;
  background: #fff;
  box-shadow: 0 14px 36px rgba(16, 46, 34, 0.12);
  z-index: 20;
}

.management-control-period-picker__year {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(31, 79, 61, 0.08);
}

.management-control-period-picker__year-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border: 1px solid rgba(31, 79, 61, 0.14);
  border-radius: 999px;
  background: #fff;
  color: #194b37;
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
  line-height: 1;
}

.management-control-period-picker__year-nav:hover {
  background: #f3f7f4;
  border-color: rgba(31, 79, 61, 0.24);
}

.management-control-period-picker__year-label {
  min-width: 3.2rem;
  text-align: center;
  color: #183629;
  font-size: 1.05rem;
  font-weight: 850;
}

.management-control-period-picker__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
}

.management-control-period-picker__month {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.42rem 0.15rem;
  border: 1px solid rgba(31, 79, 61, 0.09);
  border-radius: 0.55rem;
  background: #f9fbf9;
  color: #3a5344;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  transition: background 0.12s, border-color 0.12s;
}

.management-control-period-picker__month:hover {
  background: #e9f2ec;
  border-color: rgba(31, 79, 61, 0.22);
  color: #183629;
}

.management-control-period-picker__month--selected {
  background: #194b37;
  border-color: #194b37;
  color: #fff;
  font-weight: 800;
  pointer-events: none;
}

.management-control-period-picker__month--selected:hover {
  background: #194b37;
  color: #fff;
}

.management-control-scope-select {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
  width: 18rem;
  align-self: end;
}

.management-control-scope-select span {
  color: #627369;
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.management-control-scope-select select {
  width: 100%;
  min-height: 2.4rem;
  border: 1px solid rgba(31, 79, 61, 0.18);
  border-radius: 0.7rem;
  background: #fff;
  color: #183629;
  font: inherit;
  font-weight: 750;
}

.management-control-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}

.management-control-allocation-note {
  margin: -0.15rem 0 0;
  color: #687a71;
  font-size: 0.86rem;
  line-height: 1.45;
}

.management-control-yoy-note {
  margin: 0.25rem 0 0;
  color: #8a948e;
  font-size: 0.78rem;
  line-height: 1.4;
}

.management-control-previous-year-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.85rem 0 0;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(31, 79, 61, 0.12);
  border-radius: 8px;
  background: #fbfcf9;
}

.management-control-previous-year-card h2 {
  margin: 0 0 0.2rem;
  color: #244638;
  font-size: 0.98rem;
}

.management-control-previous-year-card p {
  margin: 0;
  color: #63746b;
  font-size: 0.86rem;
  line-height: 1.45;
}

.management-control-previous-year-card__status {
  flex: 0 0 auto;
  color: #63746b;
  font-size: 0.82rem;
  font-weight: 750;
}

@media (max-width: 720px) {
  .management-control-previous-year-card {
    align-items: stretch;
    flex-direction: column;
  }
}

/* ── Management control KPI YoY comparison ── */
.management-control-kpi-yoy {
  display: grid;
  gap: 0.12rem;
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(31, 79, 61, 0.09);
}

.management-control-kpi-yoy__label {
  color: #8a948e;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.management-control-kpi-yoy__value {
  color: #4a5e54;
  font-size: 0.78rem;
  font-weight: 750;
}

.management-control-kpi-yoy__value--muted {
  color: #9aa7a0;
  font-weight: 650;
}

.management-control-kpi-yoy__delta {
  font-size: 0.74rem;
  font-weight: 800;
  font-style: normal;
}

.management-control-kpi-yoy__delta--positive {
  color: #1f7a55;
}

.management-control-kpi-yoy__delta--negative {
  color: #b93b2d;
}

.management-control-kpi-yoy__delta--neutral {
  color: #627369;
}

.management-control-kpi-yoy__delta--muted {
  color: #9aa7a0;
}


.management-control-readiness-card {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
}

.management-control-readiness-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.management-control-readiness-card__header h2 {
  margin: 0;
  color: #183629;
  font-size: 1.08rem;
}

.management-control-readiness-card__header p {
  margin: 0.28rem 0 0;
  color: #627369;
  line-height: 1.45;
}

.management-control-readiness-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.9rem;
  padding: 0.25rem 0.65rem;
  border: 1px solid rgba(31, 79, 61, 0.14);
  border-radius: 999px;
  background: rgba(31, 79, 61, 0.08);
  color: #1d4d38;
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

.management-control-readiness-badge--processing,
.management-control-readiness-badge--partial {
  background: rgba(208, 138, 47, 0.12);
  color: #7a531f;
}

.management-control-readiness-badge--error {
  background: rgba(185, 65, 65, 0.12);
  color: #8e2d2d;
}

.management-control-readiness-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.management-control-readiness-list__item {
  min-height: 4.15rem;
  padding: 0.68rem 0.72rem;
  border: 1px solid rgba(31, 79, 61, 0.1);
  border-left: 0.22rem solid #2c7a57;
  border-radius: 0.7rem;
  background: #fff;
}

.management-control-readiness-list__item--missing,
.management-control-readiness-list__item--warning {
  border-left-color: #d08a2f;
}

.management-control-readiness-list__item--processing {
  border-left-color: #4965c7;
}

.management-control-readiness-list__item--error {
  border-left-color: #b94141;
}

.management-control-readiness-list__item span {
  display: block;
  color: #1d3d2f;
  font-size: 0.88rem;
  font-weight: 850;
}

.management-control-readiness-list__item small {
  display: block;
  margin-top: 0.2rem;
  color: #718078;
  font-size: 0.78rem;
  line-height: 1.35;
}

.management-control-readiness-warnings {
  display: grid;
  gap: 0.25rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.7rem;
  background: rgba(208, 138, 47, 0.1);
  color: #6b4d24;
}

.management-control-readiness-warnings p {
  margin: 0;
}

.management-control-readiness-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.management-control-readiness-actions form {
  margin: 0;
}

.management-control-chart-section {
  padding: 1rem;
}

.management-control-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
}

.management-control-chart-card {
  display: grid;
  gap: 0.75rem;
  min-height: 25rem;
  padding: 1rem;
  border: 1px solid rgba(31, 79, 61, 0.12);
  border-radius: 0.8rem;
  background: linear-gradient(180deg, #fff, rgba(248, 251, 249, 0.72));
  box-shadow: 0 14px 34px rgba(16, 46, 34, 0.055);
}

.management-control-chart-card__header {
  display: grid;
  gap: 0.25rem;
}

.management-control-chart-card__header h3 {
  margin: 0;
  color: #183629;
  font-size: 1rem;
  line-height: 1.25;
}

.management-control-chart-card__header p {
  margin: 0;
  color: #687a71;
  font-size: 0.86rem;
  line-height: 1.4;
}

.management-control-chart {
  min-height: 18.75rem;
}

.management-control-chart--unit-performance {
  min-height: 19rem;
}

.management-control-chart-empty {
  display: grid;
  place-items: center;
  min-height: 18.75rem;
  margin: 0;
  padding: 1rem;
  border: 1px dashed rgba(31, 79, 61, 0.2);
  border-radius: 0.7rem;
  background: rgba(31, 79, 61, 0.035);
  color: #667870;
  font-size: 0.9rem;
  text-align: center;
}

.management-control-chart-empty:empty,
.management-control-chart-empty[hidden] {
  display: none;
}

.management-control-data-actions {
  padding: 0.95rem;
}

.management-control-data-actions__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 0.7rem;
}

.management-control-data-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 5.2rem;
  padding: 0.78rem 0.85rem;
  border: 1px solid rgba(31, 79, 61, 0.1);
  border-radius: 0.95rem;
  background: linear-gradient(180deg, #fff, rgba(248, 251, 249, 0.82));
}

.management-control-data-action strong {
  display: block;
  color: #1d3d2f;
  font-size: 0.92rem;
}

.management-control-data-action span {
  display: block;
  margin-top: 0.22rem;
  color: #718078;
  font-size: 0.82rem;
  line-height: 1.35;
}

.management-control-data-action__button {
  min-height: 2.2rem;
  padding: 0.45rem 0.78rem;
  box-shadow: none;
}

.management-control-breakdown-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1rem;
}

.management-control-table-subtext {
  display: block;
  margin-top: 0.18rem;
  color: #718078;
  font-size: 0.78rem;
}

.management-control-scope-form {
  display: contents;
}

.management-control-apply-button {
  align-self: end;
  margin-left: 0;
  white-space: nowrap;
}
.management-control-tab-nav {
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
}

.hestix-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.management-control-cost-form {
  align-items: start;
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.management-control-cost-form .management-control-scope-select {
  min-width: 0;
}

.management-control-cost-form .management-control-scope-select input,
.management-control-cost-form .management-control-scope-select select {
  width: 100%;
  min-height: 2.4rem;
  border: 1px solid rgba(31, 79, 61, 0.18);
  border-radius: 0.7rem;
  background: #fff;
  color: #183629;
  font: inherit;
  font-weight: 750;
  padding: 0 0.75rem;
}

.management-control-cost-form .management-control-scope-select small,
.management-control-form-helper {
  color: #718078;
  font-size: 0.78rem;
  line-height: 1.35;
}

.management-control-form-helper {
  align-self: center;
  margin: 0;
}

.management-control-form-helper--wide {
  grid-column: 1 / -1;
}

.management-control-cost-form .management-control-apply-button {
  align-self: end;
  justify-self: flex-start;
  margin-left: 0;
}

.management-control-general-cost-card {
  background: #f8fbf5;
  border: 1px solid rgba(31, 79, 61, 0.14);
  border-radius: 8px;
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
}

.management-control-general-cost-card__header,
.management-control-general-cost-summary__header,
.management-control-general-cost-list__header {
  display: grid;
  gap: 0.2rem;
}

.management-control-general-cost-card__header h3,
.management-control-general-cost-summary__header h3,
.management-control-general-cost-list__header h3 {
  color: #183629;
  font-size: 1rem;
  line-height: 1.2;
  margin: 0;
}

.management-control-general-cost-card__header p,
.management-control-general-cost-list__header p {
  color: #718078;
  font-size: 0.84rem;
  line-height: 1.4;
  margin: 0;
}

.management-control-general-cost-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr));
}

.management-control-general-cost-form__notes {
  grid-column: span 2;
}

.management-control-general-cost-summary-grid {
  display: grid;
  gap: 1rem;
}

.management-control-general-cost-summary,
.management-control-general-cost-list {
  display: grid;
  gap: 0.75rem;
}

.management-control-general-cost-summary .tenant-dashboard-kpi-rail {
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
}

.management-control-general-cost-table-wrap {
  max-height: 24rem;
  overflow: auto;
}

.management-control-general-cost-table-wrap .hestix-table {
  margin-bottom: 0;
}

.management-control-general-cost-table-wrap thead th {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 1;
}

/* ── Management control collapsible forms ── */

.management-control-collapsible-form {
  margin: 0.65rem 0 0;
  border: 1px solid rgba(31, 79, 61, 0.14);
  border-radius: 0.8rem;
  background: #f8fbf5;
  overflow: hidden;
}

.management-control-collapsible-form > summary {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.8rem 1rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
  color: #1d3d2f;
  font-weight: 750;
  font-size: 0.92rem;
  transition: background 0.15s ease;
}

.management-control-collapsible-form > summary::-webkit-details-marker {
  display: none;
}

.management-control-collapsible-form > summary:hover {
  background: rgba(31, 79, 61, 0.05);
}

.management-control-collapsible-form__summary-text {
  flex: 0 0 auto;
  font-weight: 800;
  color: #194b37;
}

.management-control-collapsible-form__summary-desc {
  flex: 1 1 auto;
  min-width: 0;
  color: #718078;
  font-size: 0.82rem;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.management-control-collapsible-form__icon {
  flex: 0 0 auto;
  width: 1.3rem;
  height: 1.3rem;
  position: relative;
}

.management-control-collapsible-form__icon::before,
.management-control-collapsible-form__icon::after {
  content: "";
  position: absolute;
  background: #4a6b5a;
  border-radius: 2px;
  transition: transform 0.2s ease;
}

.management-control-collapsible-form__icon::before {
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  transform: translateY(-50%);
}

.management-control-collapsible-form__icon::after {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
}

.management-control-collapsible-form[open] > summary {
  border-bottom: 1px solid rgba(31, 79, 61, 0.1);
  background: rgba(31, 79, 61, 0.04);
}

.management-control-collapsible-form[open] .management-control-collapsible-form__icon::after {
  transform: translateX(-50%) rotate(90deg);
}

.management-control-collapsible-form .management-control-general-cost-card {
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.management-control-collapsible-form .tenant-dashboard-section {
  margin: 0;
  border: none;
  box-shadow: none;
}

/* ── Management control cost form row grid ── */

.management-control-cost-form--general,
.management-control-cost-form--commission,
.management-control-cost-form--rule {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.management-control-cost-form__category {
  width: min(100%, 24rem);
}

.management-control-cost-form--rule .management-control-cost-form__row--imports {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.management-control-cost-form__row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.management-control-cost-form__row--imports {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.management-control-cost-form__row--full {
  grid-template-columns: 1fr;
}

.management-control-cost-form__row .management-control-scope-select {
  width: 100%;
  min-width: 0;
}

.management-control-cost-form__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.25rem;
}

.management-control-cost-form__actions .tenant-dashboard-action {
  margin-left: 0;
}


@media (max-width: 1180px) {
  .tenant-dashboard-kpi-rail {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .management-control-breakdown-grid {
    grid-template-columns: 1fr;
  }

  .management-control-chart-grid {
    grid-template-columns: 1fr;
  }

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

  .tenant-dashboard-spotlight-grid,
  .tenant-dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }

  .management-control-cost-form__row,
  .management-control-cost-form__row--imports {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .management-control-cost-form--rule .management-control-cost-form__row--imports {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {

  .management-control-cost-form__row,
  .management-control-cost-form__row--imports {
    grid-template-columns: 1fr;
  }

  .management-control-cost-form--rule .management-control-cost-form__row--imports {
    grid-template-columns: 1fr;
  }

  .tenant-dashboard-hero {
    grid-template-columns: 1fr;
    padding: 1.1rem;
  }

  .tenant-dashboard-hero::after {
    opacity: 0.35;
    right: -7rem;
  }

  .tenant-dashboard-hero__actions {
    justify-content: flex-start;
    min-width: 0;
  }

  .tenant-dashboard-kpi-rail,
  .management-control-kpi-grid,
  .tenant-dashboard-module-grid,
  .tenant-dashboard-spotlight-metrics,
  .tenant-dashboard-spotlight-metrics--two {
    grid-template-columns: 1fr;
  }

  .management-control-toolbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .management-control-readiness-card__header {
    display: grid;
  }

  .management-control-readiness-badge {
    justify-self: flex-start;
    white-space: normal;
  }

  .management-control-scope-select {
    grid-column: 1 / -1;
    min-width: 0;
  }

  .management-control-data-action {
    grid-template-columns: 1fr;
  }

  .management-control-data-action__button {
    justify-self: flex-start;
  }

  .management-control-chart-card {
    min-height: 22rem;
    padding: 0.85rem;
  }

  .management-control-chart,
  .management-control-chart-empty {
    min-height: 16rem;
  }

  .tenant-dashboard-device-list li,
  .tenant-dashboard-unit-stack li {
    grid-template-columns: 1fr;
  }

  .tenant-dashboard-device-list__meta,
  .tenant-dashboard-chip-row {
    justify-content: flex-start;
  }
}


/* Step 16.1a polish — tenant dashboard alignment and activity readability */
.tenant-dashboard-spotlight-grid,
.tenant-dashboard-bottom-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.tenant-dashboard-spotlight,
.tenant-dashboard-section {
  min-width: 0;
}

.tenant-dashboard-spotlight {
  display: flex;
  flex-direction: column;
}

.tenant-dashboard-device-list {
  flex: 1;
}

.tenant-dashboard-activity-list__item {
  min-height: 4.15rem;
}

.tenant-dashboard-activity-list__item strong {
  overflow-wrap: anywhere;
}

.tenant-dashboard-activity-list__item span {
  color: #5f7167;
  font-weight: 700;
}

.tenant-dashboard-activity-list__item small {
  margin-top: 0.1rem;
  color: #78867e;
  font-weight: 750;
}

@media (max-width: 1180px) {
  .tenant-dashboard-spotlight-grid,
  .tenant-dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }
}


/* Step 16.1a polish — compact Smart Access dashboard rows */
.tenant-dashboard-device-list {
  gap: 0.38rem;
  margin-top: 0.7rem;
}

.tenant-dashboard-device-list li {
  min-height: 2.65rem;
  padding: 0.48rem 0.68rem;
  border-radius: 0.72rem;
}

.tenant-dashboard-device-list strong {
  font-size: 0.9rem;
  line-height: 1.15;
}

.tenant-dashboard-device-list small {
  margin-top: 0.08rem;
  font-size: 0.76rem;
  line-height: 1.15;
}

.tenant-dashboard-device-list__meta {
  gap: 0.28rem;
  font-size: 0.78rem;
}

.tenant-dashboard-device-list__meta > span:first-child {
  color: #4f5e56;
  font-weight: 800;
}

.tenant-dashboard-device-list .tenant-dashboard-pill {
  min-height: 1.25rem;
  padding: 0.08rem 0.42rem;
  font-size: 0.68rem;
}
/* Step 16.1b-fix — tenant dashboard compact without inner scroll */
.tenant-dashboard-spotlight-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: stretch;
}

.tenant-dashboard-bottom-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: start;
}

.tenant-dashboard-spotlight {
  min-height: 0;
}

.tenant-dashboard-device-list {
  max-height: none;
  overflow: visible;
  gap: 0.28rem;
  margin-top: 0.62rem;
  padding-right: 0;
}

.tenant-dashboard-device-list li {
  min-height: 2.05rem;
  padding: 0.28rem 0.48rem;
  border-radius: 0.62rem;
}

.tenant-dashboard-device-list strong {
  font-size: 0.82rem;
  line-height: 1.08;
}

.tenant-dashboard-device-list small {
  margin-top: 0.02rem;
  font-size: 0.69rem;
  line-height: 1.08;
}

.tenant-dashboard-device-list__meta {
  gap: 0.22rem;
  font-size: 0.72rem;
}

.tenant-dashboard-device-list__meta > span:first-child {
  color: #4f5e56;
  font-weight: 800;
  min-width: 6.8rem;
  text-align: right;
}

.tenant-dashboard-device-list .tenant-dashboard-pill {
  min-height: 1.06rem;
  padding: 0.04rem 0.34rem;
  font-size: 0.62rem;
}

.tenant-dashboard-activity {
  align-self: start;
}

.tenant-dashboard-activity .tenant-dashboard-section__header {
  margin-bottom: 0.55rem;
}

.tenant-dashboard-activity-list {
  gap: 0.34rem;
  margin-top: 0.55rem;
}

.tenant-dashboard-activity-list__item {
  min-height: 2.7rem;
  padding: 0.45rem 0.65rem 0.45rem 1rem;
}

.tenant-dashboard-activity-list__item strong {
  font-size: 0.8rem;
  line-height: 1.12;
}

.tenant-dashboard-activity-list__item span,
.tenant-dashboard-activity-list__item small {
  font-size: 0.71rem;
  line-height: 1.12;
}

.tenant-dashboard-unit-stack li {
  min-height: 2.55rem;
}

@media (max-width: 1180px) {
  .tenant-dashboard-spotlight-grid,
  .tenant-dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }

  .tenant-dashboard-device-list__meta > span:first-child {
    min-width: 0;
    text-align: left;
  }
}


/* Step 16.1b-fix2 — show all smart access devices and rebalance bottom cards */
.tenant-dashboard-spotlight-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.tenant-dashboard-bottom-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.tenant-dashboard-bottom-grid > .tenant-dashboard-section {
  min-width: 0;
}

.tenant-dashboard-activity {
  align-self: stretch;
}

.tenant-dashboard-activity-list {
  margin-top: 0.58rem;
}

.tenant-dashboard-device-list {
  max-height: 15.2rem;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.18rem;
  scrollbar-width: thin;
}

.tenant-dashboard-device-list li {
  min-height: 2rem;
  padding: 0.26rem 0.46rem;
}

.tenant-dashboard-device-list__meta {
  align-items: center;
}

@media (max-width: 1180px) {
  .tenant-dashboard-spotlight-grid,
  .tenant-dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }

  .tenant-dashboard-device-list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
}

/* Step 16.2a — Superadmin dashboard v2 */
.superadmin-dashboard-v2 {
  grid-column: 1 / -1;
  display: grid;
  gap: 1rem;
}

.superadmin-dashboard-hero,
.superadmin-dashboard-panel {
  border: 1px solid rgba(31, 79, 61, 0.11);
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 42px rgba(16, 46, 34, 0.06);
}

.superadmin-dashboard-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.3rem;
  overflow: hidden;
  padding: 1.45rem;
  background:
    radial-gradient(circle at 85% 18%, rgba(31, 116, 78, 0.17), transparent 22rem),
    linear-gradient(135deg, #ffffff, #f3f8f5);
}

.superadmin-dashboard-hero::after {
  content: "";
  position: absolute;
  right: 2.1rem;
  bottom: -3.4rem;
  width: 25rem;
  height: 12rem;
  border-radius: 999px;
  background:
    radial-gradient(circle at 18% 35%, rgba(31, 79, 61, 0.14), transparent 2.8rem),
    radial-gradient(circle at 62% 26%, rgba(31, 79, 61, 0.12), transparent 3.8rem),
    linear-gradient(90deg, transparent 0 8%, rgba(31, 79, 61, 0.13) 8% 10%, transparent 10% 24%, rgba(31, 79, 61, 0.11) 24% 26%, transparent 26%);
  opacity: 0.65;
  pointer-events: none;
}

.superadmin-dashboard-hero > * {
  position: relative;
  z-index: 1;
}

.superadmin-dashboard-eyebrow {
  margin: 0 0 0.4rem;
  color: #5c7468;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.superadmin-dashboard-hero__heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.superadmin-dashboard-hero__heading h2 {
  margin: 0;
  color: #183629;
  font-size: clamp(1.65rem, 2.4vw, 2.4rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.superadmin-dashboard-hero__summary,
.superadmin-dashboard-hero__meta {
  margin: 0.7rem 0 0;
  color: #65746d;
}

.superadmin-dashboard-hero__meta {
  font-size: 0.82rem;
  font-weight: 750;
}

.superadmin-dashboard-hero__actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.55rem;
  min-width: 20rem;
}

.superadmin-dashboard-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid rgba(31, 79, 61, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: #194b37;
  font-weight: 850;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(16, 46, 34, 0.07);
}

.superadmin-dashboard-action--primary {
  background: #1f6b4d;
  color: #fff;
  border-color: #1f6b4d;
}

.superadmin-dashboard-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  padding: 0.16rem 0.52rem;
  border-radius: 999px;
  background: rgba(31, 79, 61, 0.08);
  color: #24533e;
  font-size: 0.74rem;
  font-weight: 850;
  white-space: nowrap;
}

.superadmin-dashboard-pill--ok {
  background: rgba(31, 116, 78, 0.11);
  color: #1f6f4e;
}

.superadmin-dashboard-pill--info {
  background: rgba(69, 111, 134, 0.12);
  color: #335f76;
}

.superadmin-dashboard-pill--warning {
  background: rgba(201, 138, 36, 0.14);
  color: #95651d;
}

.superadmin-dashboard-pill--critical {
  background: rgba(180, 66, 66, 0.12);
  color: #9d3434;
}

.superadmin-dashboard-kpi-rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(31, 79, 61, 0.11);
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 14px 36px rgba(16, 46, 34, 0.055);
}

.superadmin-dashboard-kpi {
  display: grid;
  gap: 0.3rem;
  min-height: 4.85rem;
  padding: 0.78rem 0.9rem;
  border-right: 1px solid rgba(31, 79, 61, 0.09);
}

.superadmin-dashboard-kpi::before {
  content: "";
  width: 1.9rem;
  height: 0.22rem;
  border-radius: 999px;
  background: rgba(31, 79, 61, 0.16);
}

.superadmin-dashboard-kpi--ok::before {
  background: #1f8a5b;
}

.superadmin-dashboard-kpi--info::before {
  background: #517d95;
}

.superadmin-dashboard-kpi--warning::before {
  background: #c98a24;
}

.superadmin-dashboard-kpi--critical::before {
  background: #b64242;
}

.superadmin-dashboard-kpi__label {
  color: #627369;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.superadmin-dashboard-kpi__value {
  color: #183629;
  font-size: clamp(1.18rem, 1.45vw, 1.65rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
}

.superadmin-dashboard-kpi__helper {
  color: #1f7a55;
  font-size: 0.76rem;
  font-weight: 750;
}

.superadmin-dashboard-main-grid,
.superadmin-dashboard-ops-grid,
.superadmin-dashboard-bottom-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.superadmin-dashboard-panel {
  min-width: 0;
  padding: 1rem;
}

.superadmin-dashboard-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
  margin-bottom: 0.85rem;
}

.superadmin-dashboard-panel__header h2 {
  margin: 0;
  color: #183629;
  font-size: 1.02rem;
  letter-spacing: -0.025em;
}

.superadmin-dashboard-panel__header p,
.superadmin-dashboard-panel__note {
  margin: 0.22rem 0 0;
  color: #697970;
  font-size: 0.82rem;
}

.superadmin-dashboard-panel__header a,
.superadmin-dashboard-alert a {
  color: #196548;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.superadmin-dashboard-tenant-list,
.superadmin-dashboard-module-list,
.superadmin-dashboard-alert-list,
.superadmin-dashboard-event-list {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.superadmin-dashboard-tenant {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.4fr) auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.58rem 0.7rem;
  border: 1px solid rgba(31, 79, 61, 0.09);
  border-radius: 0.85rem;
  background: #fff;
}

.superadmin-dashboard-tenant strong,
.superadmin-dashboard-module strong,
.superadmin-dashboard-alert strong,
.superadmin-dashboard-event strong {
  color: #1d3d2f;
}

.superadmin-dashboard-tenant small,
.superadmin-dashboard-event span,
.superadmin-dashboard-event small,
.superadmin-dashboard-alert span,
.superadmin-dashboard-module small {
  display: block;
  color: #718078;
  font-size: 0.76rem;
}

.superadmin-dashboard-tenant__metrics {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.32rem;
}

.superadmin-dashboard-tenant__metrics span {
  display: inline-flex;
  min-height: 1.15rem;
  align-items: center;
  padding: 0.05rem 0.38rem;
  border-radius: 999px;
  background: rgba(31, 79, 61, 0.06);
  color: #52645a;
  font-size: 0.68rem;
  font-weight: 800;
}

.superadmin-dashboard-module {
  padding: 0.62rem 0.7rem;
  border: 1px solid rgba(31, 79, 61, 0.09);
  border-radius: 0.85rem;
  background: #fff;
}

.superadmin-dashboard-module__top {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.48rem;
}

.superadmin-dashboard-progress {
  overflow: hidden;
  height: 0.42rem;
  border-radius: 999px;
  background: rgba(31, 79, 61, 0.08);
}

.superadmin-dashboard-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #1f6b4d;
}

.superadmin-dashboard-module--future .superadmin-dashboard-progress span {
  background: #9aa7a0;
}

.superadmin-dashboard-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.superadmin-dashboard-metric-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.superadmin-dashboard-metric-grid > div {
  display: grid;
  gap: 0.24rem;
  min-height: 3.65rem;
  padding: 0.62rem;
  border-radius: 0.85rem;
  background: rgba(31, 79, 61, 0.055);
}

.superadmin-dashboard-warning-box {
  background: rgba(201, 138, 36, 0.12) !important;
}

.superadmin-dashboard-metric-grid span {
  color: #63756b;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.superadmin-dashboard-metric-grid strong {
  color: #173729;
  font-size: 1.18rem;
  line-height: 1;
}

.superadmin-dashboard-alert,
.superadmin-dashboard-event {
  position: relative;
  display: grid;
  gap: 0.16rem;
  min-height: 3rem;
  padding: 0.55rem 0.7rem 0.55rem 1rem;
  border: 1px solid rgba(31, 79, 61, 0.09);
  border-radius: 0.85rem;
  background: #fff;
}

.superadmin-dashboard-alert {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.superadmin-dashboard-event::before,
.superadmin-dashboard-alert::before {
  content: "";
  position: absolute;
  left: 0.42rem;
  top: 0.72rem;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
  background: #517d95;
}

.superadmin-dashboard-event--ok::before,
.superadmin-dashboard-alert--ok::before {
  background: #1f8a5b;
}

.superadmin-dashboard-event--warning::before,
.superadmin-dashboard-alert--warning::before {
  background: #c98a24;
}

.superadmin-dashboard-event--critical::before,
.superadmin-dashboard-alert--critical::before {
  background: #b64242;
}

@media (max-width: 1180px) {
  .superadmin-dashboard-main-grid,
  .superadmin-dashboard-ops-grid,
  .superadmin-dashboard-bottom-grid {
    grid-template-columns: 1fr;
  }

  .superadmin-dashboard-tenant {
    grid-template-columns: 1fr;
  }

  .superadmin-dashboard-tenant__metrics {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .superadmin-dashboard-hero {
    grid-template-columns: 1fr;
    padding: 1.1rem;
  }

  .superadmin-dashboard-hero__actions {
    justify-content: flex-start;
    min-width: 0;
  }

  .superadmin-dashboard-metric-grid,
  .superadmin-dashboard-metric-grid--three {
    grid-template-columns: 1fr;
  }
}
/* Step 16.6 — dashboard KPI action links */
.tenant-dashboard-kpi--link,
.superadmin-dashboard-kpi--link,
.superadmin-dashboard-tenant--link {
  color: inherit;
  text-decoration: none;
}

.tenant-dashboard-kpi--link,
.superadmin-dashboard-kpi--link {
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.tenant-dashboard-kpi--link:hover,
.superadmin-dashboard-kpi--link:hover {
  transform: translateY(-1px);
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(31, 79, 61, 0.13), 0 12px 28px rgba(16, 46, 34, 0.08);
}

.tenant-dashboard-kpi--link:focus-visible,
.superadmin-dashboard-kpi--link:focus-visible,
.superadmin-dashboard-tenant--link:focus-visible {
  outline: 3px solid rgba(31, 107, 77, 0.28);
  outline-offset: 2px;
}

.superadmin-dashboard-tenant--link {
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.superadmin-dashboard-tenant--link:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 107, 77, 0.22);
  box-shadow: 0 10px 24px rgba(16, 46, 34, 0.07);
}

/* Step 17.8a - booking operational hub */
.booking-hub-page {
  display: grid;
  gap: 16px;
}

.booking-hub-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.booking-hub-status {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--hestix-border);
  border-radius: 999px;
  background: #fbfcfa;
  color: var(--hestix-green-900);
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
}

.booking-hub-status--disconnected {
  color: var(--hestix-muted);
}

.booking-hub-primary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.booking-hub-primary-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100%;
  min-height: 174px;
}

.booking-hub-primary-card--main {
  border-color: rgba(34, 120, 82, 0.42);
  background: linear-gradient(180deg, #ffffff 0%, #fbfefa 100%);
}

.booking-hub-primary-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex: 1 1 auto;
}

.booking-hub-primary-card__header h2 {
  font-weight: 700;
  letter-spacing: -0.015em;
}

.booking-hub-primary-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.booking-hub-primary-card__meta,
.booking-hub-inline-note,
.booking-hub-table-subtext {
  margin: 0;
  color: var(--hestix-muted);
  font-size: 0.88rem;
}

.booking-hub-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 310px);
  gap: 16px;
  align-items: start;
}

.booking-hub-main-column,
.booking-hub-side-column {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.booking-hub-side-column {
  position: sticky;
  top: 84px;
}

.booking-hub-channel,
.booking-hub-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.booking-hub-channel--violet {
  border-color: rgba(250, 55, 110, 0.24);
  background: rgba(250, 55, 110, 0.08);
  color: #b32252;
}

.booking-hub-channel--blue {
  border-color: rgba(40, 60, 200, 0.22);
  background: rgba(40, 60, 200, 0.08);
  color: #2031a6;
}

.booking-hub-channel--green {
  border-color: rgba(34, 120, 82, 0.2);
  background: rgba(34, 120, 82, 0.08);
  color: var(--hestix-green-800);
}

.booking-hub-channel--greenAlt {
  border-color: rgba(13, 128, 112, 0.24);
  background: rgba(13, 128, 112, 0.09);
  color: #0d665d;
}

.booking-hub-channel--neutral {
  border-color: var(--hestix-border);
  background: #f4f7f3;
  color: var(--hestix-muted);
}

.booking-hub-badge--success {
  border-color: #b9dfc7;
  background: #eef9f1;
  color: #155b35;
}

.booking-hub-badge--warning {
  border-color: #ead7a0;
  background: #fff8e1;
  color: #6b5311;
}

.booking-hub-badge--danger {
  border-color: #e3bcbc;
  background: #fff4f4;
  color: #922d2d;
}

.booking-hub-badge--muted {
  border-color: var(--hestix-border);
  background: #f4f7f3;
  color: var(--hestix-muted);
}

.booking-hub-action-cell {
  display: grid;
  gap: 6px;
  justify-items: start;
}

.booking-hub-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.booking-hub-row-actions form {
  margin: 0;
}

.booking-hub-action-meta {
  display: grid;
  gap: 2px;
}

.booking-hub-card-body {
  display: grid;
  gap: 14px;
}

.booking-hub-filter-form {
  margin: 0;
}

.booking-hub-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.booking-hub-filter-actions {
  align-self: end;
}

.booking-hub-filter-actions .hestix-button {
  width: 100%;
}

.booking-hub-table-wrap {
  min-width: 0;
  max-width: 100%;
  max-height: 1120px;
  overflow-x: auto;
  overflow-y: auto;
}

.booking-hub-table-wrap .hestix-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.booking-hub-sort-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
}

.booking-hub-sort-link:hover,
.booking-hub-sort-link:focus-visible {
  text-decoration: underline;
}

.booking-hub-sort-indicator {
  color: var(--hestix-muted);
  font-size: 0.78rem;
  line-height: 1;
}

.booking-hub-summary-card {
  display: grid;
  gap: 14px;
}

.booking-hub-summary-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.booking-hub-summary-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--hestix-border);
  border-radius: 8px;
  background: #fbfcfa;
}

.booking-hub-summary-list dt {
  color: var(--hestix-muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.booking-hub-summary-list dd {
  margin: 0;
  color: var(--hestix-text);
  font-weight: 800;
}

.booking-hub-summary-list--compact {
  gap: 0;
}

.booking-hub-summary-list--compact div {
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid rgba(219, 227, 220, 0.74);
  border-radius: 0;
  background: transparent;
}

.booking-hub-summary-list--compact div:last-child {
  border-bottom: 0;
}

.booking-hub-summary-list--compact dt {
  font-size: 0.76rem;
}

.booking-hub-summary-list--compact dd {
  max-width: 46%;
  text-align: right;
  font-size: 0.8rem;
  line-height: 1.2;
}

.booking-hub-metric-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.booking-hub-metric-card {
  padding: 12px 14px;
  border: 1px solid var(--hestix-border);
  border-radius: 10px;
  background: #fbfcfa;
}

.booking-hub-metric-card span {
  display: block;
  color: var(--hestix-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.booking-hub-metric-card strong {
  display: block;
  margin-top: 8px;
  color: var(--hestix-text);
  font-size: 1.45rem;
  line-height: 1;
}

.booking-hub-side-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 22px 22px;
}

.booking-calendar-sidebar-card .hestix-card-description {
  margin-top: 2px;
  font-size: 0.78rem;
  line-height: 1.25;
}

.booking-calendar-sidebar-card__header {
  padding: 10px 14px 4px;
}

.booking-calendar-sidebar-card__body {
  padding: 4px 14px 8px;
}

.booking-calendar-sidebar-card__footer {
  padding: 0 14px 10px;
}

.booking-calendar-sidebar-card__link {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  color: var(--hestix-green-800);
  font-size: 0.76rem;
  font-weight: 800;
  text-decoration: none;
}

.booking-calendar-sidebar-card__link:hover,
.booking-calendar-sidebar-card__link:focus-visible {
  color: var(--hestix-green-900);
  text-decoration: underline;
}

.booking-hub-reference-card .hestix-card-description {
  margin-top: 6px;
  font-family: monospace;
  word-break: break-word;
}

/* ───────────────────────────────────────────────
   UI-CALENDAR-01 — Booking calendar timeline
   ─────────────────────────────────────────────── */

/* Toolbar: sticky period navigation + filters */
.booking-calendar-toolbar {
  padding: 12px 0;
  row-gap: 10px;
}

.booking-calendar-nav-group {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--hestix-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--hestix-surface);
}

.booking-calendar-nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 36px;
  padding: 0 12px;
  border-right: 1px solid var(--hestix-border);
  color: var(--hestix-green-800);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  background: #fbfcfa;
}

.booking-calendar-nav-button:last-child {
  border-right: 0;
}

.booking-calendar-nav-button:hover,
.booking-calendar-nav-button:focus-visible {
  background: var(--hestix-green-100);
  color: var(--hestix-green-900);
  outline: none;
}

.booking-calendar-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.booking-calendar-control {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--hestix-border);
  border-radius: 8px;
  background-color: var(--hestix-surface);
  color: var(--hestix-text);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 7px 34px 7px 10px;
  box-shadow: 0 1px 0 rgba(18, 69, 52, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.booking-calendar-control:focus,
.booking-calendar-control:focus-visible {
  border-color: var(--hestix-green-500);
  box-shadow: 0 0 0 3px rgba(51, 169, 111, 0.18);
  outline: none;
}

.booking-calendar-select {
  min-width: 150px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--hestix-green-800) 50%),
    linear-gradient(135deg, var(--hestix-green-800) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 50%,
    calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.booking-calendar-date-input {
  min-width: 150px;
  padding-right: 10px;
}

.booking-calendar-toolbar__range-select {
  min-width: 122px;
}
/* Filter label: compact micro-label matching Bootstrap form-label-sm idea */
.booking-calendar-toolbar__filter-label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--hestix-muted);
  line-height: 1.2;
  white-space: nowrap;
}
/* Apply button stays aligned at the bottom with the selects */
.booking-calendar-apply-button,
.booking-calendar-toolbar__apply-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid var(--hestix-green-700);
  border-radius: 8px;
  background: var(--hestix-green-700);
  color: #ffffff;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 6px 14px rgba(34, 120, 82, 0.14);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.booking-calendar-apply-button:hover,
.booking-calendar-apply-button:focus-visible,
.booking-calendar-toolbar__apply-btn:hover,
.booking-calendar-toolbar__apply-btn:focus-visible {
  border-color: var(--hestix-green-900);
  background: var(--hestix-green-900);
  color: #ffffff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(51, 169, 111, 0.18);
}

/* Timeline scroll container */
#booking-calendar-fragment,
.booking-calendar-fragment,
.booking-calendar-shell {
  min-width: 0;
  max-width: 100%;
}

.booking-calendar-timeline {
  position: relative;
  overflow-x: auto;
  overflow-y: visible;
  max-width: 100%;
  border: 1px solid var(--hestix-border);
  border-radius: var(--hestix-radius-card);
  background: var(--hestix-surface);
  /* scroll margin for sticky elements */
  scroll-margin-top: 16px;
}

/* Timeline grid: uses CSS grid with sticky unit column */
.booking-calendar-timeline-grid {
  display: grid;
  min-width: max-content;
}

/* Header row (days) */
.booking-calendar-timeline-header {
  display: contents;
}
.booking-calendar-timeline-unit-spacer {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--hestix-surface);
  border-right: 1px solid var(--hestix-border);
  border-bottom: 1px solid var(--hestix-border);
  border-radius: var(--hestix-radius-card) 0 0 0;
  min-width: 160px;
  max-width: 200px;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--hestix-muted);
  display: flex;
  align-items: flex-end;
}
.booking-calendar-timeline-day-header {
  padding: 6px 4px;
  text-align: center;
  border-bottom: 1px solid var(--hestix-border);
  font-size: 0.74rem;
  line-height: 1.3;
  color: var(--hestix-muted);
  min-width: 40px;
}
.booking-calendar-timeline-day-header--today {
  background: var(--hestix-green-100);
  font-weight: 800;
  color: var(--hestix-green-900);
}
.booking-calendar-timeline-day-header--weekend {
  background: #fafaf7;
}
.booking-calendar-timeline-day-header__day {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--hestix-text);
}
.booking-calendar-timeline-day-header__weekday {
  display: block;
  text-transform: capitalize;
}

/* Unit row */
.booking-calendar-timeline-row {
  display: contents;
}
.booking-calendar-timeline-row-label {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--hestix-surface);
  border-right: 1px solid var(--hestix-border);
  border-bottom: 1px solid var(--hestix-border);
  min-width: 160px;
  max-width: 200px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}
.booking-calendar-timeline-row-label__name {
  font-weight: 700;
  font-size: 0.84rem;
  color: var(--hestix-text);
  line-height: 1.2;
}
.booking-calendar-timeline-row-label__code {
  font-size: 0.74rem;
  color: var(--hestix-muted);
}
.booking-calendar-timeline-row-label--unmapped {
  background: #fdf8f0;
}
.booking-calendar-timeline-row-label--unmapped .booking-calendar-timeline-row-label__name {
  color: #8b6914;
}

/* Day cell backgrounds */
.booking-calendar-timeline-day-cell {
  border-bottom: 1px solid var(--hestix-border);
  border-right: 1px solid rgba(219, 227, 220, 0.38);
  min-height: 44px;
  position: relative;
}
.booking-calendar-timeline-day-cell--weekend {
  background: #fafaf7;
}
.booking-calendar-timeline-day-cell--today {
  background: var(--hestix-green-100);
}

/* Reservation bars */
.booking-calendar-timeline-bar {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 1px;
  right: 1px;
  border-radius: 5px;
  padding: 2px 30px 2px 5px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.72rem;
  line-height: 1.3;
  font-weight: 700;
  cursor: default;
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: box-shadow 0.15s ease;
  min-width: 0;
}
.booking-calendar-timeline-bar:hover,
.booking-calendar-timeline-bar:focus-visible {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  z-index: 3;
}
.booking-calendar-timeline-bar__guest {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.booking-calendar-timeline-bar__channel {
  font-size: 0.66rem;
  font-weight: 600;
  opacity: 0.72;
  flex-shrink: 0;
}
.booking-calendar-timeline-bar__channel-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
}

/* Channel color variants — solid fill with white text */
.booking-calendar-timeline-bar--violet {
  background: #e83a7c;
  border-color: #e83a7c;
  color: #ffffff;
}
.booking-calendar-timeline-bar--blue {
  background: #003b95;
  border-color: #003b95;
  color: #ffffff;
}
.booking-calendar-timeline-bar--green {
  background: #1e8c5c;
  border-color: #1e8c5c;
  color: #ffffff;
}
.booking-calendar-timeline-bar--greenAlt {
  background: #0f766e;
  border-color: #0f766e;
  color: #ffffff;
}
.booking-calendar-timeline-bar--neutral {
  background: #a0aaa4;
  border-color: #a0aaa4;
  color: #ffffff;
}

/* Empty timeline message */
.booking-calendar-timeline-empty {
  padding: 24px;
  text-align: center;
  color: var(--hestix-muted);
  font-size: 0.88rem;
}

/* Booking hub layout guard: keep the timeline inside the main column */
.booking-hub-content-grid > .booking-hub-main-column,
.booking-hub-content-grid > .booking-hub-side-column {
  min-width: 0;
}

.booking-hub-main-column {
  min-width: 0;
  overflow: hidden;
}

.booking-calendar-timeline {
  width: 100%;
  max-width: 100%;
}


/* Channel legend strip */
.booking-calendar-channel-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  padding: 8px 0 4px;
  font-size: 0.78rem;
  color: var(--hestix-muted);
}
.booking-calendar-channel-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  white-space: nowrap;
}
.booking-calendar-channel-legend__swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}
.booking-calendar-channel-legend__marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid var(--hestix-border);
  color: var(--hestix-text);
  font-size: 0.64rem;
  font-weight: 900;
  line-height: 1;
}
.booking-calendar-channel-legend__swatch--violet { background: #e83a7c; }
.booking-calendar-channel-legend__swatch--blue   { background: #003b95; }
.booking-calendar-channel-legend__swatch--green  { background: #1e8c5c; }
.booking-calendar-channel-legend__swatch--greenAlt { background: #0f766e; }
.booking-calendar-channel-legend__swatch--neutral { background: #a0aaa4; }

/* Floating action menu on calendar bars */
.booking-calendar-timeline-bar__actions {
  display: inline-flex;
  align-items: center;
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  flex-shrink: 0;
}
.booking-calendar-timeline-bar__menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  font-size: 0.8rem;
  line-height: 1;
  color: inherit;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  cursor: pointer;
  opacity: 0.9;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.booking-calendar-timeline-bar:hover .booking-calendar-timeline-bar__menu-button,
.booking-calendar-timeline-bar:focus-within .booking-calendar-timeline-bar__menu-button {
  background: rgba(255, 255, 255, 0.26);
  border-color: rgba(255, 255, 255, 0.48);
  opacity: 1;
}
.booking-calendar-timeline-bar__menu-button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 1px;
}

.booking-calendar-floating-menu {
  position: fixed;
  z-index: 1080;
  min-width: 210px;
  max-width: min(280px, calc(100vw - 16px));
  padding: 6px;
  border: 1px solid var(--hestix-border);
  border-radius: 8px;
  background: var(--hestix-surface);
  box-shadow: 0 14px 34px rgba(20, 40, 30, 0.18);
}

.booking-calendar-floating-menu form {
  margin: 0;
}

.booking-calendar-floating-menu__item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--hestix-text);
  font: inherit;
  font-size: 0.83rem;
  font-weight: 750;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.booking-calendar-floating-menu__item:hover,
.booking-calendar-floating-menu__item:focus-visible {
  background: var(--hestix-green-100);
  color: var(--hestix-green-900);
  outline: none;
}

.booking-calendar-tooltip {
  position: fixed;
  z-index: 1070;
  width: min(260px, calc(100vw - 16px));
  padding: 10px 12px;
  border: 1px solid rgba(20, 90, 56, 0.18);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(20, 40, 30, 0.16);
  color: var(--hestix-text);
  pointer-events: none;
}

.booking-calendar-tooltip__title {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
}

.booking-calendar-tooltip__list {
  display: grid;
  gap: 4px;
  margin: 0;
}

.booking-calendar-tooltip__list div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
}

.booking-calendar-tooltip__list dt {
  color: var(--hestix-muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.booking-calendar-tooltip__list dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--hestix-text);
  font-size: 0.76rem;
  font-weight: 700;
}

.hestix-floating-tooltip {
  position: fixed;
  z-index: 1070;
  width: min(320px, calc(100vw - 16px));
  padding: 10px 12px;
  border: 1px solid rgba(20, 90, 56, 0.18);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(20, 40, 30, 0.16);
  color: var(--hestix-text);
  pointer-events: none;
}

.hestix-floating-tooltip__title {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
}

.hestix-floating-tooltip__list {
  display: grid;
  gap: 4px;
  margin: 0;
}

.hestix-floating-tooltip__list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.hestix-floating-tooltip__list dt {
  overflow-wrap: anywhere;
  color: var(--hestix-muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.hestix-floating-tooltip__list dd {
  margin: 0;
  color: var(--hestix-text);
  font-size: 0.76rem;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.annual-balance-cost-tooltip-trigger {
  border-bottom: 1px dotted currentColor;
  cursor: help;
}

.annual-balance-cost-tooltip-trigger:focus-visible {
  border-radius: 4px;
  outline: 2px solid rgba(20, 90, 56, 0.35);
  outline-offset: 2px;
}

/* ───────────────────────────────────────────────
   End UI-CALENDAR-01
   ─────────────────────────────────────────────── */

/* Step 21.9g - booking reservation detail operational costs */
.booking-detail-page {
  display: grid;
  gap: 16px;
}

.booking-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.booking-detail-header h1 {
  margin: 8px 0 0;
}

.booking-detail-header__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--hestix-muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.booking-detail-header__mapping,
.booking-detail-amount-grid {
  display: grid;
  gap: 10px;
  margin: 0;
}

.booking-detail-header__mapping {
  min-width: min(360px, 100%);
}

.booking-detail-amount-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.booking-detail-header__mapping div,
.booking-detail-amount-grid div,
.booking-detail-cost-summary div {
  padding: 10px 12px;
  border: 1px solid var(--hestix-border);
  border-radius: 8px;
  background: #fbfcfa;
}

.booking-detail-header__mapping dt,
.booking-detail-amount-grid dt,
.booking-detail-cost-summary span,
.booking-detail-cost-summary small {
  color: var(--hestix-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.booking-detail-header__mapping dd,
.booking-detail-amount-grid dd {
  margin: 4px 0 0;
  color: var(--hestix-text);
  font-weight: 800;
}

.booking-detail-access-pin {
  color: var(--hestix-green-900);
  font-size: 1.35rem;
}

.booking-detail-grid,
.booking-detail-costs-grid {
  display: grid;
  gap: 16px;
  align-items: stretch;
}

.booking-detail-grid > .hestix-card + .hestix-card,
.booking-detail-costs-grid > .hestix-card + .hestix-card {
  margin-top: 0;
}

.booking-detail-grid {
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1fr);
}

.booking-detail-costs-grid {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
}

.booking-detail-provider-card,
.booking-detail-charges-card,
.booking-detail-costs-card {
  min-width: 0;
}

.booking-detail-charges-card .hestix-table-wrap {
  max-height: 360px;
  overflow: auto;
}

.booking-detail-total {
  color: var(--hestix-green-900);
  font-size: 1.05rem;
  white-space: nowrap;
}

.booking-detail-charges-section {
  border-bottom: 1px solid var(--hestix-border);
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.booking-detail-charges-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.booking-detail-charges-section__title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--hestix-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0 0 8px;
}

.booking-detail-charges-section__helper {
  font-size: 0.78rem;
  color: var(--hestix-text-muted);
  margin: 0 0 8px;
}

.booking-detail-charges-section--secondary .hestix-table-wrap {
  max-height: 200px;
  overflow: auto;
}

.booking-detail-charges-section--secondary .hestix-table {
  opacity: 0.78;
  font-size: 0.82rem;
}

.booking-detail-charges-subtotal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 0;
  font-size: 0.85rem;
  color: var(--hestix-text-muted);
}

.booking-detail-charges-subtotal strong {
  color: var(--hestix-text);
}

.booking-detail-costs-body {
  display: grid;
  gap: 14px;
}

.booking-detail-cost-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.booking-detail-cost-summary strong {
  display: block;
  margin-top: 6px;
  color: var(--hestix-text);
}

.booking-detail-cost-summary small {
  display: block;
  margin-top: 3px;
}

.booking-detail-cost-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 980px) {
  .booking-detail-header,
  .booking-detail-grid,
  .booking-detail-costs-grid {
    grid-template-columns: 1fr;
  }

  .booking-detail-header {
    display: grid;
  }

  .booking-detail-cost-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 640px) {
  .booking-detail-amount-grid,
  .booking-detail-cost-summary,
  .booking-detail-cost-form-grid {
    grid-template-columns: 1fr;
  }
}

/* Step 17.5c-ter - booking Octorate mapping console */
.booking-octorate-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.booking-octorate-page-header__side {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.booking-octorate-page-header h1 {
  margin: 0;
  font-size: clamp(1.7rem, 2vw, 2.2rem);
  line-height: 1.15;
}

.booking-octorate-page-header p,
.booking-octorate-inline-note,
.booking-octorate-focus-header p,
.booking-octorate-kpi-card p,
.booking-octorate-property-row p,
.booking-octorate-property-row small,
.booking-octorate-product-card p {
  margin: 0;
  color: var(--hestix-muted);
  font-size: 0.9rem;
}

.booking-octorate-page-header p {
  margin-top: 6px;
}

.booking-octorate-status-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--hestix-border);
  border-radius: 10px;
  background: #fbfcfa;
}

.booking-octorate-status-item {
  display: grid;
  gap: 3px;
}

.booking-octorate-status-item span,
.booking-octorate-kpi-card span,
.booking-octorate-focus-header > span,
.booking-octorate-form-field span,
.booking-octorate-product-meta dt,
.booking-octorate-error-details dt {
  color: var(--hestix-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.booking-octorate-status-item strong {
  color: var(--hestix-text);
  font-size: 0.96rem;
}

.booking-octorate-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.booking-octorate-inline-note {
  margin-top: 10px;
}

.booking-octorate-console {
  display: grid;
  grid-template-columns: minmax(0, 64fr) minmax(320px, 36fr);
  gap: 24px;
  margin-top: 22px;
  align-items: start;
}

.booking-octorate-left,
.booking-octorate-right {
  display: grid;
  gap: 16px;
}

.booking-octorate-right {
  position: sticky;
  top: 84px;
}

.booking-octorate-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.booking-octorate-kpi-card,
.booking-octorate-info-box,
.booking-octorate-saved-card,
.booking-octorate-focus-panel,
.booking-octorate-property-row,
.booking-octorate-product-card {
  border: 1px solid var(--hestix-border);
  border-radius: 10px;
  background: var(--hestix-surface);
}

.booking-octorate-kpi-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  min-height: 116px;
  padding: 14px;
}

.booking-octorate-kpi-card strong {
  display: block;
  margin-top: 10px;
  color: var(--hestix-text);
  font-size: 1.55rem;
  line-height: 1;
}

.booking-octorate-kpi-card p {
  margin-top: 7px;
}

.booking-octorate-icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 10px;
  background: var(--hestix-green-100);
  color: var(--hestix-green-800);
}

.booking-octorate-icon-tile svg {
  width: 21px;
  height: 21px;
}

.booking-octorate-info-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
  border-color: rgba(34, 120, 82, 0.22);
  background: #fbfefa;
}

.booking-octorate-info-box p {
  margin: 0;
}

.booking-octorate-info-box p + p {
  margin-top: 5px;
}

.booking-octorate-info-box--compact {
  margin-top: 16px;
}

.booking-octorate-info-box__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border: 1px solid rgba(34, 120, 82, 0.35);
  border-radius: 50%;
  color: var(--hestix-green-800);
  font-size: 0.78rem;
  font-weight: 800;
}

.booking-octorate-saved-card,
.booking-octorate-focus-panel {
  padding: 16px;
}

.booking-octorate-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.booking-octorate-section-title h2,
.booking-octorate-focus-header h2,
.booking-octorate-focus-empty h3,
.booking-octorate-property-row h3,
.booking-octorate-product-card h3 {
  margin: 0;
  color: var(--hestix-text);
}

.booking-octorate-section-title h2 {
  font-size: 1.05rem;
}

.booking-octorate-saved-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--hestix-border);
  border-radius: 10px;
}

.booking-octorate-saved-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.booking-octorate-saved-table th,
.booking-octorate-saved-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--hestix-border);
  text-align: left;
  vertical-align: middle;
}

.booking-octorate-saved-table th {
  color: #34483d;
  font-size: 0.8rem;
  font-weight: 800;
  background: #f7faf5;
}

.booking-octorate-saved-table tr:last-child td {
  border-bottom: 0;
}

.booking-octorate-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.booking-octorate-chip--success {
  border-color: #b9dfc7;
  background: #eef9f1;
  color: #155b35;
}

.booking-octorate-chip--warning {
  border-color: #ead7a0;
  background: #fff8e1;
  color: #6b5311;
}

.booking-octorate-chip--muted {
  border-color: var(--hestix-border);
  background: #f4f7f3;
  color: var(--hestix-muted);
}

.booking-octorate-property-list,
.booking-octorate-product-list {
  display: grid;
  gap: 10px;
}

.booking-octorate-property-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 13px;
}

.booking-octorate-property-row--active {
  border-color: var(--hestix-green-500);
  background: #f7fdf9;
}

.booking-octorate-property-row__main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.booking-octorate-property-row h3,
.booking-octorate-product-card h3 {
  font-size: 0.98rem;
  line-height: 1.3;
}

.booking-octorate-property-row p {
  margin-top: 4px;
}

.booking-octorate-property-row small {
  display: block;
  margin-top: 5px;
}

.booking-octorate-property-row__side {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.booking-octorate-property-advanced {
  grid-column: 1 / -1;
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid var(--hestix-border);
}

.booking-octorate-property-advanced summary {
  cursor: pointer;
  color: var(--hestix-green-800);
  font-size: 0.88rem;
  font-weight: 800;
}

.booking-octorate-property-advanced > p {
  margin: 8px 0 10px;
}

.booking-octorate-focus-panel {
  border-color: rgba(34, 120, 82, 0.42);
  display: grid;
  gap: 14px;
}

.booking-octorate-focus-header {
  display: grid;
  gap: 6px;
}

.booking-octorate-focus-header h2 {
  font-size: 1.25rem;
}

.booking-octorate-focus-header > span {
  color: var(--hestix-green-800);
}

.booking-octorate-focus-empty {
  padding: 18px;
  border: 1px dashed var(--hestix-border);
  border-radius: 10px;
  background: #fbfcfa;
}

.booking-octorate-focus-empty p {
  margin: 8px 0 0;
  color: var(--hestix-muted);
}

.booking-octorate-product-card {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.booking-octorate-product-card__header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.booking-octorate-product-card__header .booking-octorate-chip {
  margin-top: 2px;
}

.booking-octorate-product-meta,
.booking-octorate-error-details dl {
  display: grid;
  gap: 7px;
  margin: 0;
}

.booking-octorate-product-meta div,
.booking-octorate-error-details dl div {
  display: grid;
  gap: 2px;
}

.booking-octorate-product-meta dd,
.booking-octorate-error-details dd {
  margin: 0;
}

.booking-octorate-product-form,
.booking-octorate-property-form {
  display: grid;
  gap: 12px;
}

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

.booking-octorate-form-grid--property {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
}

.booking-octorate-form-field {
  display: grid;
  gap: 6px;
  align-content: start;
}

.booking-octorate-form-field select,
.booking-octorate-error-details textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--hestix-border);
  border-radius: 8px;
  padding: 8px 10px;
  background: #ffffff;
  color: inherit;
  font: inherit;
}

.booking-octorate-form-field select:disabled {
  background: #f2f4f1;
  color: var(--hestix-muted);
}

.booking-octorate-form-actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}

.booking-octorate-alert {
  padding: 12px 14px;
  border-radius: 8px;
}

.booking-octorate-alert p {
  margin: 0;
}

.booking-octorate-alert--warning {
  border: 1px solid #ead7a0;
  background: #fff8e1;
  color: #6b5311;
}

.booking-octorate-alert--danger {
  border: 1px solid #e2b3b3;
  background: #fff5f5;
  color: #7a1f1f;
}

.booking-octorate-alert--success {
  border: 1px solid #b8dcc8;
  background: #f1fbf5;
  color: #1e6b3d;
}

.booking-octorate-meta-list {
  margin-top: 0;
}

.booking-octorate-error-details {
  padding: 14px;
  border: 1px solid var(--hestix-border);
  border-radius: 8px;
  background: #ffffff;
  display: grid;
  gap: 12px;
}

.booking-octorate-error-details__support {
  display: grid;
  gap: 6px;
}

.booking-octorate-error-details__support p {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 700;
}

@media (max-width: 1180px) {
  .booking-hub-primary-grid,
  .booking-octorate-console {
    grid-template-columns: minmax(0, 1fr);
  }

  .booking-hub-content-grid {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .booking-hub-side-column,
  .booking-octorate-right {
    position: static;
  }
}

@media (max-width: 900px) {
  .booking-hub-header,
  .booking-hub-primary-card__footer,
  .booking-octorate-page-header__side,
  .booking-octorate-page-header,
  .booking-octorate-property-row__side,
  .booking-octorate-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .booking-octorate-page-header {
    display: grid;
  }

  .booking-hub-status,
  .booking-hub-primary-card__footer .hestix-button,
  .booking-hub-side-actions .hestix-button,
  .booking-hub-action-cell .hestix-button,
  .booking-octorate-status-strip,
  .booking-octorate-kpi-grid,
  .booking-octorate-property-row,
  .booking-octorate-form-grid,
  .booking-octorate-form-grid--property {
    width: 100%;
  }

  .booking-hub-primary-grid,
  .booking-hub-content-grid,
  .booking-hub-filter-grid,
  .booking-octorate-status-strip,
  .booking-octorate-kpi-grid,
  .booking-octorate-property-row,
  .booking-octorate-form-grid,
  .booking-octorate-form-grid--property {
    grid-template-columns: 1fr;
  }

  .booking-octorate-actions,
  .booking-octorate-property-row__side,
  .booking-octorate-actions .hestix-button,
  .booking-octorate-property-row .hestix-button,
  .booking-octorate-product-card .hestix-button {
    width: 100%;
  }

  .booking-octorate-product-card__header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .booking-octorate-product-card__header .booking-octorate-chip {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

/* Step 17.13b — Toast notifiche live via polling leggero */
.hestix-toast-container {
  position: fixed;
  top: calc(var(--hestix-topbar-height) + 12px);
  right: 16px;
  z-index: 9999;
  display: grid;
  gap: 10px;
  max-width: 400px;
  width: calc(100% - 32px);
  pointer-events: none;
}

.hestix-toast {
  pointer-events: auto;
  padding: 14px 16px;
  border: 1px solid var(--hestix-border);
  border-radius: 14px;
  background: var(--hestix-surface);
  box-shadow: 0 14px 36px rgb(22 68 49 / 12%);
  animation: hestix-toast-in 0.25s ease-out;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.hestix-toast--dismissing {
  opacity: 0;
  transform: translateX(30px);
}

@keyframes hestix-toast-in {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hestix-toast__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.hestix-toast__badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--hestix-green-100);
  color: var(--hestix-green-800);
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.hestix-toast--success .hestix-toast__badge {
  background: #e8f6ee;
  color: #17633f;
}

.hestix-toast--warning .hestix-toast__badge {
  background: #fff6df;
  color: #835a06;
}

.hestix-toast--error .hestix-toast__badge {
  background: #fdecea;
  color: #b93b2d;
}

.hestix-toast--info .hestix-toast__badge {
  background: #eef2ed;
  color: #4f5e56;
}

.hestix-toast__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--hestix-muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.hestix-toast__close:hover,
.hestix-toast__close:focus {
  background: #f3f6f2;
  color: var(--hestix-text);
  outline: none;
}

.hestix-toast__title {
  display: block;
  margin-bottom: 4px;
  color: var(--hestix-text);
  font-size: 0.95rem;
  line-height: 1.3;
}

.hestix-toast__body {
  margin: 4px 0 0;
  color: var(--hestix-muted);
  font-size: 0.86rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.hestix-toast__actions {
  margin-top: 10px;
}

.hestix-toast__action {
  min-height: 32px;
  padding: 5px 11px;
  font-size: 0.83rem;
  font-weight: 700;
  text-decoration: none;
}

.hestix-timeline-item {
  border: 1px solid var(--hestix-border);
  border-radius: 8px;
  padding: 1rem;
  margin: 0 0 1rem;
  background: var(--hestix-surface);
}

@media (max-width: 720px) {
  .hestix-toast-container {
    right: 8px;
    left: 8px;
    max-width: none;
    width: auto;
  }
}

/* Annual balance */
.annual-balance-page {
  grid-column: 1 / -1;
  display: grid;
  gap: 1rem;
}

.annual-balance-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  min-height: 8.5rem;
  padding: 1.35rem 1.45rem;
  border: 1px solid rgba(31, 79, 61, 0.12);
  border-radius: 1.25rem;
  background:
    linear-gradient(135deg, rgba(234, 247, 239, 0.95), rgba(255, 255, 255, 0.96) 58%),
    var(--hestix-surface);
  box-shadow: var(--hestix-shadow-soft);
}

.annual-balance-hero-main {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.annual-balance-hero-main p {
  margin: 0;
  color: #627369;
  line-height: 1.45;
}

.annual-balance-hero-main > p:first-child {
  color: #1f7250;
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.055em;
}

.annual-balance-hero-main div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.annual-balance-hero-main h1 {
  margin: 0;
  color: #183629;
  font-size: clamp(1.65rem, 2.3vw, 2.35rem);
  line-height: 1.05;
}

.annual-balance-hero-main span {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.22rem 0.68rem;
  border-radius: 999px;
  background: var(--hestix-green-100);
  color: var(--hestix-green-800);
  font-size: 0.78rem;
  font-weight: 850;
}

.annual-balance-hero-actions {
  display: flex;
  justify-content: flex-end;
  min-width: max-content;
}

.annual-balance-filter-card {
  display: grid;
  gap: 0.45rem;
  padding: 0.85rem;
  border: 1px solid rgba(31, 79, 61, 0.11);
  border-radius: 1.05rem;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 10px 26px rgba(16, 46, 34, 0.045);
}

.annual-balance-filter-card p {
  margin: 0;
  color: #718078;
  font-size: 0.78rem;
  line-height: 1.35;
}

.annual-balance-filter-grid {
  display: grid;
  grid-template-columns: 8rem 10.5rem minmax(11rem, 15rem) minmax(13rem, 18rem) auto;
  align-items: start;
  justify-content: start;
  gap: 0.7rem;
}

.annual-balance-filter-grid label {
  display: grid;
  grid-template-rows: auto 2.45rem minmax(1.6rem, auto);
  gap: 0.25rem;
  min-width: 0;
}

.annual-balance-filter-grid span {
  color: #627369;
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.annual-balance-filter-help {
  color: #718078;
  font-size: 0.72rem;
  line-height: 1.25;
}

.annual-balance-filter-grid input,
.annual-balance-filter-grid select {
  width: 100%;
  min-height: 2.45rem;
  padding: 0 0.75rem;
  border: 1px solid rgba(31, 79, 61, 0.18);
  border-radius: 0.7rem;
  background: #fff;
  color: #183629;
  font: inherit;
  font-weight: 750;
}

.annual-balance-filter-grid button {
  align-self: start;
  justify-self: start;
  width: auto;
  max-width: max-content;
  margin-top: 1.48rem;
  white-space: nowrap;
}

.annual-balance-notes {
  display: grid;
  gap: 0.35rem;
  padding: 0.62rem 0.76rem;
  border: 1px solid rgba(208, 138, 47, 0.2);
  border-radius: 0.82rem;
  background: #fff9ea;
  color: #6b4d24;
}

.annual-balance-notes h2 {
  margin: 0;
  color: #5f431d;
  font-size: 0.86rem;
  line-height: 1.25;
}

.annual-balance-notes div {
  display: grid;
  gap: 0.18rem;
}

.annual-balance-note-item {
  margin: 0;
  color: #75572b;
  font-size: 0.78rem;
  line-height: 1.32;
}

.annual-balance-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.annual-balance-kpi {
  display: grid;
  gap: 0.32rem;
  min-height: 8.4rem;
  padding: 1.1rem 1.15rem;
  border: 1px solid rgba(31, 79, 61, 0.11);
  border-radius: 1.25rem;
  background: var(--hestix-surface);
  box-shadow: 0 12px 28px rgba(16, 46, 34, 0.05);
}

.annual-balance-kpi::before {
  content: "";
  width: 2.15rem;
  height: 0.24rem;
  border-radius: 999px;
  background: rgba(31, 79, 61, 0.18);
}

.annual-balance-kpi--revenue::before,
.annual-balance-kpi--margin::before {
  background: #1f8a5b;
}

.annual-balance-kpi--costs::before {
  background: #c98a24;
}

.annual-balance-kpi--ratio::before {
  background: #8aa398;
}

.annual-balance-kpi span {
  color: #627369;
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.annual-balance-kpi strong {
  color: #183629;
  font-size: clamp(1.45rem, 2vw, 2rem);
  font-weight: 900;
  line-height: 1;
}

.annual-balance-kpi strong.annual-balance-tone--critical {
  color: var(--hestix-red);
}

.annual-balance-kpi small,
.annual-balance-kpi em {
  color: #627369;
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 750;
  line-height: 1.35;
}

.annual-balance-kpi em {
  color: #1f7a55;
}

.annual-balance-kpi--costs em {
  color: #9a6415;
}

.annual-balance-kpi small.annual-balance-tone--critical,
.annual-balance-kpi em.annual-balance-tone--critical {
  color: var(--hestix-red);
}

.annual-balance-layout {
  display: grid;
  grid-template-columns: minmax(0, 65fr) minmax(20rem, 35fr);
  gap: 1.5rem;
  align-items: start;
}

.annual-balance-profit-card,
.annual-balance-chart-placeholder,
.annual-balance-breakdown-card {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border: 1px solid rgba(31, 79, 61, 0.11);
  border-radius: 1.15rem;
  background: var(--hestix-surface);
  box-shadow: 0 12px 28px rgba(16, 46, 34, 0.045);
}

.annual-balance-profit-card > div:first-child,
.annual-balance-breakdown-card > div:first-child {
  display: grid;
  gap: 0.18rem;
}

.annual-balance-profit-card h2,
.annual-balance-chart-placeholder h2,
.annual-balance-breakdown-card h2 {
  margin: 0;
  color: #183629;
  font-size: 1.04rem;
  line-height: 1.25;
}

.annual-balance-profit-card p,
.annual-balance-chart-placeholder p,
.annual-balance-breakdown-card p {
  margin: 0;
  color: #687a71;
  font-size: 0.86rem;
  line-height: 1.45;
}

.annual-balance-profit-card .hestix-table {
  min-width: 900px;
}

.annual-balance-profit-table {
  font-size: 0.84rem;
  table-layout: fixed;
}

.annual-balance-profit-table th,
.annual-balance-profit-table td {
  padding-right: 0.5rem;
  padding-left: 0.5rem;
  text-align: right;
  white-space: nowrap;
}

.annual-balance-profit-table th:first-child,
.annual-balance-profit-table td:first-child {
  width: 5.6rem;
  min-width: 5.6rem;
  text-align: left;
}

.annual-balance-profit-table thead tr:nth-child(2) th {
  font-size: 0.78rem;
}

.annual-balance-delta-percent {
  display: block;
  margin-top: 0.12rem;
  color: inherit;
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.1;
}

.annual-balance-profit-card .hestix-table thead tr:first-child th {
  background: #edf5ee;
  text-align: center;
}

.annual-balance-profit-card .hestix-table thead tr:first-child th:first-child {
  text-align: left;
}

.annual-balance-profit-card .hestix-table .annual-balance-table-group-start {
  border-left: 1px solid rgba(31, 79, 61, 0.14);
}

.annual-balance-profit-card .hestix-table tbody .annual-balance-table-group-start {
  box-shadow: inset 1px 0 0 rgba(31, 79, 61, 0.05);
}

.annual-balance-total-row th,
.annual-balance-total-row td {
  border-top: 2px solid rgba(31, 79, 61, 0.28);
  border-bottom: 1px solid rgba(31, 79, 61, 0.18);
  background: #e8f3eb;
  color: #183629;
  font-weight: 900;
}

.annual-balance-tone--success {
  color: #1f7a55;
  font-weight: 850;
}

.annual-balance-tone--critical {
  color: var(--hestix-red);
  font-weight: 850;
}

.annual-balance-side-panel {
  display: grid;
  gap: 1rem;
}

.annual-balance-chart-placeholder {
  min-height: 13rem;
}

.annual-balance-chart {
  min-height: 15rem;
}

.annual-balance-chart-empty {
  display: grid;
  place-items: center;
  min-height: 10rem;
  margin: 0;
  border: 1px dashed rgba(31, 79, 61, 0.16);
  border-radius: 0.8rem;
  background: linear-gradient(180deg, #fbfdf9, #f4f8f2);
  color: #687a71;
  font-size: 0.86rem;
  font-weight: 750;
}

.annual-balance-comparison-bars {
  display: grid;
  gap: 0.8rem;
}

.annual-balance-comparison-bars div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem 0.75rem;
  min-width: 0;
}

.annual-balance-comparison-bars span {
  color: #627369;
  font-size: 0.78rem;
  font-weight: 850;
}

.annual-balance-comparison-bars strong {
  min-width: 0;
  color: #183629;
  font-size: 0.86rem;
  font-weight: 850;
  text-align: right;
  overflow-wrap: anywhere;
}

.annual-balance-comparison-bars i {
  grid-column: 1 / -1;
  display: block;
  max-width: 100%;
  height: 0.62rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #1f8a5b, rgba(31, 138, 91, 0.26));
}

.annual-balance-comparison-bars div:nth-child(2) i {
  background: linear-gradient(90deg, #8aa398, rgba(138, 163, 152, 0.26));
}

.annual-balance-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.annual-balance-breakdown-card .hestix-table {
  min-width: 520px;
}

.annual-balance-logic-note {
  align-content: start;
  background: #fff9ea;
  border-color: rgba(208, 138, 47, 0.2);
}

.annual-balance-logic-note p {
  color: #68502b;
}

@media (max-width: 1180px) {
  .annual-balance-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .annual-balance-hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 1.1rem;
  }

  .annual-balance-hero-actions {
    justify-content: flex-start;
    min-width: 0;
  }

  .annual-balance-filter-grid,
  .annual-balance-kpi-grid,
  .annual-balance-breakdown-grid {
    grid-template-columns: 1fr;
  }

  .annual-balance-filter-grid button {
    justify-self: flex-start;
    max-width: 100%;
    margin-top: 0;
  }

  .annual-balance-profit-card,
  .annual-balance-chart-placeholder,
  .annual-balance-breakdown-card {
    padding: 0.85rem;
  }
}

/* step-21-12d-management-control-data-actions-layout-start */
.management-control-data-actions__grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  align-items: stretch;
}

.management-control-data-action {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
}

.management-control-data-action > div {
  min-width: 0;
}

.management-control-data-action strong,
.management-control-data-action span,
.management-control-data-action small {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.management-control-data-action__button {
  align-self: flex-end;
  max-width: 100%;
  white-space: normal;
}

@media (max-width: 720px) {
  .management-control-data-actions__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .management-control-data-action__button {
    align-self: stretch;
    width: 100%;
  }
}
/* step-21-12d-management-control-data-actions-layout-end */

/* step-21-12d-filter-shell-start */
.management-control-filter-shell {
  display: contents;
}

.management-control-filter-shell__primary {
  display: contents;
}

.management-control-filter-shell__primary > form {
  display: contents;
  margin: 0;
}

.management-control-filter-shell__hint {
  display: none !important;
}

@media (max-width: 760px) {
  .management-control-toolbar {
    width: 100%;
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .management-control-scope-select,
  .management-control-apply-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .management-control-apply-button {
    justify-self: stretch;
  }
}
/* step-21-12d-filter-shell-end */

/* Guest CRM operations */
.guest-crm-status-grid {
  align-items: start;
}

.guest-crm-status-grid > .hestix-card {
  align-self: start;
  margin-top: 0;
}

.guest-crm-dashboard {
  background:
    linear-gradient(180deg, rgb(240 247 238 / 72%) 0%, rgb(255 255 255 / 0%) 360px),
    var(--hestix-background);
}

.guest-crm-dashboard__title {
  align-items: flex-start;
}

.guest-crm-dashboard__filters {
  margin-bottom: 16px;
}

.guest-crm-dashboard__filter-row {
  grid-template-columns: repeat(6, minmax(150px, 1fr));
}

.guest-crm-dashboard__search {
  grid-column: span 2;
}

.guest-crm-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
}

.guest-crm-kpi-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: flex-start;
  height: 100%;
  min-height: 136px;
  padding: 16px;
  border-radius: 8px;
}

.guest-crm-kpi-card strong {
  display: block;
  margin: 0;
  color: var(--hestix-text);
  font-size: 2rem;
  line-height: 1;
}

.guest-crm-kpi-card span {
  display: block;
  color: var(--hestix-muted);
  font-size: 0.86rem;
  line-height: 1.35;
  margin-bottom: 0;
}

.guest-crm-kpi-card span:last-child {
  margin-top: auto;
}

.guest-crm-kpi-card__label {
  color: var(--hestix-text) !important;
  font-weight: 800;
  line-height: 1.2;
}

.guest-crm-kpi-card--success {
  border-color: #cfe8d8;
  background: #f5fbf7;
}

.guest-crm-kpi-card--warning {
  border-color: #f1dfad;
  background: #fffaf0;
}

.guest-crm-kpi-card--danger {
  border-color: #efc3bc;
  background: #fff7f5;
}

.guest-crm-kpi-card--info {
  border-color: #c8d9e8;
  background: #f5f9fc;
}

.guest-crm-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.guest-crm-dashboard-card {
  margin-top: 0 !important;
  border-radius: 8px;
}

.guest-crm-dashboard-card--wide {
  grid-column: 1 / -1;
}

.guest-crm-stay-list,
.guest-crm-mini-list,
.guest-crm-issue-list {
  display: grid;
  gap: 10px;
}

.guest-crm-stay-row,
.guest-crm-mini-row,
.guest-crm-issue-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e3ebe1;
  border-radius: 8px;
  background: #fbfdf9;
}

.guest-crm-stay-row__body,
.guest-crm-mini-row > div,
.guest-crm-issue-row > div {
  min-width: 0;
  flex: 1;
}

.guest-crm-stay-row__top,
.guest-crm-stay-row__meta,
.guest-crm-mini-row span,
.guest-crm-issue-row span {
  display: block;
  color: var(--hestix-muted);
  font-size: 0.86rem;
}

.guest-crm-stay-row__top strong,
.guest-crm-mini-row strong,
.guest-crm-issue-row strong {
  display: block;
  color: var(--hestix-text);
  font-size: 0.95rem;
}

.guest-crm-stay-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 4px;
}

.guest-crm-badge-row {
  justify-content: flex-start;
  margin-top: 8px;
}

.guest-crm-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #dfeee4;
  color: #17633f;
  font-size: 0.82rem;
  font-weight: 900;
}

.guest-crm-issue-row {
  align-items: center;
  justify-content: space-between;
}

.guest-crm-chart {
  min-height: 260px;
}

.guest-crm-table-contact {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.guest-crm-dashboard .hestix-badge--danger {
  border-color: #f0b8b0;
  background: #fff0ee;
  color: #9a3328;
}

.guest-crm-dashboard .hestix-badge--info {
  border-color: #bdd4e8;
  background: #eef7ff;
  color: #245f8f;
}

@media (max-width: 1180px) {
  .guest-crm-kpi-grid,
  .guest-crm-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guest-crm-dashboard__filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .guest-crm-kpi-grid,
  .guest-crm-dashboard-grid,
  .guest-crm-dashboard__filter-row {
    grid-template-columns: 1fr;
  }

  .guest-crm-dashboard__search {
    grid-column: auto;
  }

  .guest-crm-stay-row,
  .guest-crm-mini-row {
    align-items: flex-start;
  }
}

.product-roadmap-page {
  display: grid;
  gap: 18px;
}

.product-roadmap-tabs {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--hestix-border);
  border-radius: var(--hestix-radius-control);
  background: #f6f8f2;
}

.product-roadmap-tab {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 13px;
  border-radius: calc(var(--hestix-radius-control) - 3px);
  color: var(--hestix-text);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
}

.product-roadmap-tab:hover,
.product-roadmap-tab:focus {
  background: #ffffff;
  color: var(--hestix-green-800);
}

.product-roadmap-tab--active {
  background: var(--hestix-green-700);
  color: #ffffff;
  box-shadow: 0 6px 16px rgb(31 122 77 / 16%);
}

.product-roadmap-tab--active:hover,
.product-roadmap-tab--active:focus {
  background: var(--hestix-green-800);
  color: #ffffff;
}

.product-roadmap-panel[hidden] {
  display: none;
}

.product-roadmap-update-message[hidden] {
  display: none;
}

.product-roadmap-section {
  display: grid;
  gap: 16px;
}

.product-roadmap-section__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 2px 0;
}

.product-roadmap-section__header p {
  margin: 5px 0 0;
  color: var(--hestix-muted);
}

.product-roadmap-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.product-roadmap-summary__item {
  min-height: 78px;
  padding: 14px 16px;
  border: 1px solid var(--hestix-border);
  border-radius: var(--hestix-radius-control);
  background: #ffffff;
}

.product-roadmap-summary__item span {
  display: block;
  color: var(--hestix-muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.product-roadmap-summary__item strong {
  display: block;
  margin-top: 4px;
  color: var(--hestix-text);
  font-size: 1.45rem;
  line-height: 1.1;
}

.product-roadmap-summary__item--critical {
  border-color: #f1c7bd;
  background: #fff6f3;
}

.product-roadmap-summary__item--blocked {
  border-color: #eed38e;
  background: #fff9e8;
}

.product-roadmap-groups,
.product-checklist-sections {
  display: grid;
  gap: 14px;
}

.product-roadmap-group,
.product-checklist-group {
  display: grid;
  gap: 12px;
}

.product-roadmap-group {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-roadmap-group__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  grid-column: 1 / -1;
  padding: 0 2px;
}

.product-roadmap-group > .hestix-empty-state {
  grid-column: 1 / -1;
}

.product-roadmap-group__title span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #edf4e7;
  color: var(--hestix-green-800);
  font-size: 0.82rem;
  font-weight: 850;
}

.product-roadmap-item,
.product-checklist-item {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 11px;
  padding: 15px 16px;
  border: 1px solid var(--hestix-border);
  border-left-width: 4px;
  border-radius: var(--hestix-radius-control);
  background: #ffffff;
  box-shadow: 0 8px 20px rgb(24 52 37 / 5%);
}

.product-roadmap-item--in_progress,
.product-checklist-item--in_progress {
  border-left-color: #1f7a4d;
}

.product-roadmap-item--planned,
.product-roadmap-item--todo,
.product-checklist-item--todo {
  border-left-color: #6f7f92;
}

.product-roadmap-item--done,
.product-checklist-item--done {
  border-left-color: #8eb78d;
}

.product-checklist-item--done {
  background: #f7f9f5;
  color: #6c756d;
  opacity: 0.76;
}

.product-checklist-item--done h4 {
  text-decoration: line-through;
}

.product-checklist-item--blocked,
.product-checklist-item--suspended {
  border-left-color: #b87912;
  background: #fffdfa;
}

.product-checklist-item--priority-critical,
.product-checklist-item--priority-high {
  border-top-color: #f0c4bc;
}

.product-roadmap-item h4,
.product-checklist-item h4 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: 0;
}

.product-roadmap-item p,
.product-checklist-item p {
  margin: 5px 0 0;
  color: var(--hestix-muted);
  font-size: 0.93rem;
}

.product-roadmap-meta {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  max-width: none;
}

.product-roadmap-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  max-width: 100%;
  padding: 4px 9px;
  border: 1px solid #dde5dd;
  border-radius: 999px;
  background: #f5f7f3;
  color: #48584f;
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.product-roadmap-pill--module {
  background: #eef5ea;
  color: var(--hestix-green-800);
}

.product-roadmap-pill--type {
  background: #eef2f7;
  color: #3e536c;
}

.product-roadmap-pill--visibility,
.product-roadmap-pill--roadmap-id {
  background: #f4f0e6;
  color: #68512a;
}

.product-roadmap-pill--priority-critical,
.product-roadmap-pill--priority-high {
  border-color: #e6b3aa;
  background: #fff0ee;
  color: #9a2f25;
}

.product-roadmap-pill--priority-medium {
  border-color: #ead8a5;
  background: #fff8e7;
  color: #78560e;
}

.product-roadmap-pill--priority-low,
.product-roadmap-pill--priority-later {
  background: #eef2ed;
  color: #526159;
}

.product-roadmap-pill--status-in_progress {
  background: #e8f6ee;
  color: #17633f;
}

.product-roadmap-pill--status-discarded {
  background: #eceff1;
  color: #59636b;
}

.product-roadmap-pill--status-blocked,
.product-roadmap-pill--status-suspended {
  border-color: #ead8a5;
  background: #fff8e7;
  color: #78560e;
}

.product-roadmap-pill--status-done {
  background: #edf4e7;
  color: #38663c;
}

.product-checklist-items {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.product-checklist-item {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 12px 14px;
  box-shadow: none;
}

.product-checklist-item__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.product-checklist-item__heading .product-roadmap-meta {
  justify-content: flex-end;
  min-width: min(460px, 48%);
}

.product-checklist-item p {
  margin-top: 4px;
  font-size: 0.89rem;
  line-height: 1.45;
}

.product-checklist-compact-extra {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 8px;
}

.product-checklist-compact-extra details {
  color: var(--hestix-muted);
  font-size: 0.86rem;
}

.product-checklist-compact-extra summary {
  cursor: pointer;
  font-weight: 850;
}

.product-checklist-roadmap-ids {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.product-checklist-notes {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--hestix-muted);
  font-size: 0.88rem;
}

.product-checklist-notes li + li {
  margin-top: 3px;
}

.product-roadmap-edit-form,
.product-checklist-edit-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(24, 52, 37, 0.10);
}

.product-roadmap-edit-form label,
.product-checklist-edit-form label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.product-roadmap-edit-form label span,
.product-checklist-edit-form label span {
  color: var(--hestix-muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.product-roadmap-edit-form select,
.product-roadmap-edit-form input,
.product-checklist-edit-form select,
.product-checklist-edit-form input {
  width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--hestix-border);
  border-radius: var(--hestix-radius-control);
  background: #ffffff;
  color: var(--hestix-text);
  font-size: 0.86rem;
}

.product-roadmap-edit-form .hestix-button,
.product-checklist-edit-form .hestix-button {
  min-height: 36px;
  padding: 6px 12px;
  white-space: nowrap;
}

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

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

  .product-roadmap-edit-form,
  .product-checklist-edit-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-checklist-item__heading {
    display: grid;
  }

  .product-checklist-item__heading .product-roadmap-meta {
    justify-content: flex-start;
    min-width: 0;
  }
}

@media (max-width: 560px) {
  .product-roadmap-summary {
    grid-template-columns: 1fr;
  }

  .product-roadmap-group,
  .product-checklist-items {
    grid-template-columns: 1fr;
  }

  .product-roadmap-edit-form,
  .product-checklist-edit-form {
    grid-template-columns: 1fr;
  }

  .product-roadmap-tabs {
    width: 100%;
  }

  .product-roadmap-tab {
    flex: 1 1 0;
    justify-content: center;
  }
}

/* PRODUCT ROADMAP SECTION TITLE POLISH */
.product-roadmap-section {
  scroll-margin-top: 82px;
}

.product-roadmap-section + .product-roadmap-section {
  margin-top: 18px;
  padding-top: 20px;
  border-top: 1px solid rgba(24, 52, 37, 0.10);
}

.product-roadmap-section__header {
  padding: 12px 14px;
  border-left: 5px solid var(--hestix-green-700);
  border-radius: var(--hestix-radius-control);
  background: linear-gradient(90deg, rgba(31, 122, 77, 0.10), rgba(255, 255, 255, 0));
}

.product-roadmap-section__header h2 {
  margin: 0;
  color: var(--hestix-text);
  font-size: 1.42rem;
  font-weight: 950;
  line-height: 1.15;
  letter-spacing: 0;
}

.product-roadmap-section__header p {
  margin-top: 6px;
  font-size: 0.98rem;
}

.product-roadmap-group__title {
  margin-top: 8px;
  padding: 10px 12px;
  border-left: 4px solid var(--hestix-green-700);
  border-radius: var(--hestix-radius-control);
  background: rgba(31, 122, 77, 0.075);
}

.product-roadmap-group__title h3 {
  margin: 0;
  color: var(--hestix-text);
  font-size: 1.16rem;
  font-weight: 950;
  line-height: 1.2;
  letter-spacing: 0;
}

.product-roadmap-group__title span {
  min-width: 32px;
  height: 32px;
  font-size: 0.9rem;
  box-shadow: inset 0 0 0 1px rgba(31, 122, 77, 0.10);
}

.product-checklist-section .product-roadmap-group__title {
  border-left-color: #b87912;
  background: rgba(184, 121, 18, 0.075);
}

.product-checklist-section .product-roadmap-group__title span {
  background: #fff8e7;
  color: #78560e;
}

@media (max-width: 560px) {
  .product-roadmap-section__header {
    padding: 10px 12px;
  }

  .product-roadmap-section__header h2 {
    font-size: 1.25rem;
  }

  .product-roadmap-group__title h3 {
    font-size: 1.05rem;
  }
}

/* BEGIN GUEST-CRM-KPI-CARDS-POLISH-01 */
.guest-crm-kpi-grid,
.guest-crm-dashboard-kpis,
.guest-crm-kpi-cards,
.hestix-guest-crm-kpis {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.85rem;
  align-items: stretch;
  margin-top: 0.85rem;
  margin-bottom: 1rem;
}

@media (min-width: 760px) {
  .guest-crm-kpi-grid,
  .guest-crm-dashboard-kpis,
  .guest-crm-kpi-cards,
  .hestix-guest-crm-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1120px) {
  .guest-crm-kpi-grid,
  .guest-crm-dashboard-kpis,
  .guest-crm-kpi-cards,
  .hestix-guest-crm-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.guest-crm-kpi-card {
  min-height: 7.25rem;
  padding: 1rem 1.1rem;
  border-radius: 0.85rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.7rem;
  overflow: hidden;
}

.guest-crm-kpi-card > * {
  min-width: 0;
}

.guest-crm-kpi-card strong,
.guest-crm-kpi-card .guest-crm-kpi-value,
.guest-crm-kpi-card .kpi-value {
  display: block;
  font-size: clamp(1.45rem, 1.7vw, 2rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--hestix-ink, #1f2d24);
}

.guest-crm-kpi-card small,
.guest-crm-kpi-card .guest-crm-kpi-caption,
.guest-crm-kpi-card .guest-crm-kpi-description,
.guest-crm-kpi-card .kpi-caption {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  line-height: 1.35;
  color: rgba(31, 45, 36, 0.62);
}

.guest-crm-kpi-card h2,
.guest-crm-kpi-card h3,
.guest-crm-kpi-card h4,
.guest-crm-kpi-card .guest-crm-kpi-title,
.guest-crm-kpi-card .kpi-title {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  line-height: 1.25;
  font-weight: 700;
  color: rgba(31, 45, 36, 0.82);
}

/* Stato soft: non dipende da una sola nomenclatura, copre le classi più probabili. */
.guest-crm-kpi-card--in-house,
.guest-crm-kpi-card.is-in-house,
.guest-crm-kpi-card[data-tone="success"] {
  background: #f0f8f2;
  border-color: rgba(25, 118, 72, 0.12);
}

.guest-crm-kpi-card--arrivals,
.guest-crm-kpi-card.is-arrivals,
.guest-crm-kpi-card[data-tone="warning"] {
  background: #fbf6e8;
  border-color: rgba(169, 116, 28, 0.14);
}

.guest-crm-kpi-card--departures,
.guest-crm-kpi-card.is-departures,
.guest-crm-kpi-card[data-tone="neutral"] {
  background: #f8faf8;
  border-color: rgba(31, 45, 36, 0.08);
}

.guest-crm-kpi-card--incomplete,
.guest-crm-kpi-card.is-incomplete,
.guest-crm-kpi-card[data-tone="danger"] {
  background: #fff4f2;
  border-color: rgba(174, 53, 41, 0.14);
}

.guest-crm-kpi-card--returning,
.guest-crm-kpi-card.is-returning,
.guest-crm-kpi-card[data-tone="info"] {
  background: #f1f7fb;
  border-color: rgba(37, 99, 150, 0.12);
}

.guest-crm-kpi-card--phone,
.guest-crm-kpi-card.is-phone,
.guest-crm-kpi-card[data-tone="green"] {
  background: #f0f8f2;
  border-color: rgba(25, 118, 72, 0.12);
}

@media (max-width: 520px) {
  .guest-crm-kpi-card {
    min-height: 6.5rem;
    padding: 0.9rem;
  }
}
/* END GUEST-CRM-KPI-CARDS-POLISH-01 */

/* Management control analytics summary */

/* Filter compact controls */
.analytics-filter-control--year .form-select {
  max-width: 170px;
}
.analytics-filter-control--scope .form-select {
  max-width: 260px;
}
.analytics-filter-control--structure .form-select,
.analytics-filter-control--unit .form-select {
  max-width: 320px;
}

@media (max-width: 575.98px) {
  .analytics-filter-control--year .form-select,
  .analytics-filter-control--scope .form-select,
  .analytics-filter-control--structure .form-select,
  .analytics-filter-control--unit .form-select {
    max-width: none;
    width: 100%;
  }
}

.analytics-hero {
  background:
    linear-gradient(135deg, rgb(18 69 52 / 98%) 0%, rgb(26 91 67 / 96%) 48%, rgb(34 120 82 / 92%) 100%);
  box-shadow: 0 22px 54px rgb(18 69 52 / 18%);
}

.analytics-insight-card {
  border-left: 5px solid var(--hestix-green-700);
  background: linear-gradient(135deg, #f0f8f2 0%, #fffdf6 100%);
  box-shadow: var(--hestix-shadow-soft);
}

.analytics-insight-card--warning {
  border-left-color: #b56a2a;
  background: linear-gradient(135deg, #fff8e9 0%, #fffdf8 100%);
}

.analytics-insight-card--muted {
  border-left-color: #8a8f98;
  background: linear-gradient(135deg, #f6f8f7 0%, #fffdf8 100%);
}

.analytics-section-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px;
  border: 1px solid rgb(18 69 52 / 10%);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgb(18 69 52 / 6%);
}

.analytics-section-nav__item {
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--hestix-text);
  font-size: 0.85rem;
  font-weight: 800;
  text-decoration: none;
}

.analytics-section-nav__item:hover,
.analytics-section-nav__item:focus-visible {
  background: var(--hestix-green-100);
  color: var(--hestix-green-900);
  outline: none;
}

.analytics-section {
  scroll-margin-top: 90px;
}

.analytics-section__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
}

.analytics-kpi-grid {
  display: grid;
  gap: 12px;
}

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

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

.analytics-primary-kpi-card .card-body {
  display: flex;
  flex-direction: column;
  min-height: 168px;
  padding: 14px;
}

.analytics-kpi-card__top,
.analytics-kpi-card__bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.analytics-kpi-card__label,
.analytics-mini-kpi-card__label {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
  color: var(--hestix-muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.analytics-kpi-icon,
.analytics-mini-kpi-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: 1px solid rgb(31 122 85 / 12%);
  border-radius: 999px;
  background: #edf8f1;
  color: var(--hestix-green-900);
  font-size: 0.78rem;
  line-height: 1;
}

.analytics-mini-kpi-icon {
  width: 28px;
  height: 28px;
  font-size: 0.78rem;
}

.analytics-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  border: 1.5px solid rgb(18 69 52 / 22%);
  border-radius: 999px;
  background: #f2f8f4;
  color: var(--hestix-green-800);
  cursor: help;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.68rem;
  font-style: italic;
  font-weight: 700;
  line-height: 1;
  user-select: none;
}

.analytics-info-icon--sm {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  font-size: 0.6rem;
}

.analytics-info-icon:focus-visible {
  outline: 2px solid rgb(31 122 85 / 42%);
  outline-offset: 2px;
}

.analytics-kpi-value {
  display: block;
  margin-top: 10px;
  color: var(--hestix-text);
  font-size: clamp(1.25rem, 1.4vw, 1.55rem);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.analytics-kpi-helper {
  min-height: 32px;
  margin: 5px 0 8px;
  color: var(--hestix-muted);
  font-size: 0.76rem;
  line-height: 1.25;
}

.analytics-kpi-sparkline {
  height: 34px;
  margin-top: auto;
}

.analytics-mini-kpi-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  min-height: 88px;
  padding: 12px;
  border: 1px solid rgb(18 69 52 / 9%);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgb(18 69 52 / 6%);
}

.analytics-mini-kpi-card__value {
  display: block;
  margin-top: 4px;
  color: var(--hestix-text);
  font-size: 1rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.analytics-mini-kpi-card__meta {
  margin: 4px 0 0;
  color: var(--hestix-muted);
  font-size: 0.74rem;
  line-height: 1.25;
}

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

.analytics-chart-card {
  grid-column: span 3;
  min-width: 0;
}

.analytics-chart-card--trend {
  grid-column: span 5;
}

.analytics-chart-card--channel-mix {
  grid-column: span 3;
}

.analytics-chart-card--delta {
  grid-column: span 4;
}

.analytics-side-panel {
  display: grid;
  grid-column: span 12;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.analytics-section-card {
  border: 1px solid rgb(18 69 52 / 9%);
  box-shadow: var(--hestix-shadow-soft);
}

.analytics-details-grid {
  display: grid;
  gap: 14px;
}

.analytics-details-grid--two {
  grid-template-columns: repeat(2, minmax(280px, 1fr));
}

.analytics-details-grid--seasonality {
  grid-template-columns: minmax(280px, 5fr) minmax(280px, 7fr);
}

.analytics-details-grid__full {
  grid-column: 1 / -1;
}

.analytics-cost-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.analytics-cost-summary > div {
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid rgb(18 69 52 / 9%);
  border-radius: 0.5rem;
  background: rgb(248 250 249);
}

.analytics-cost-summary strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.05rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.analytics-table-card {
  border: 1px solid rgb(18 69 52 / 9%);
  box-shadow: var(--hestix-shadow-soft);
}

.analytics-table-card--compact .card-header {
  padding: 0.7rem 0.9rem;
}

.analytics-table-card--compact .table {
  font-size: 0.82rem;
}

.analytics-table-card--compact .table th,
.analytics-table-card--compact .table td {
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}

.analytics-info-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid rgb(31 122 85 / 14%);
  border-radius: 8px;
  background: #f7fbf8;
}

.analytics-insight-list,
.analytics-quality-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.analytics-insight-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 0;
  padding: 9px;
  border-radius: 8px;
  background: rgb(255 255 255 / 72%);
}

.analytics-insight-emoji {
  flex: 0 0 auto;
  font-size: 1rem;
  line-height: 1.2;
}

.analytics-insight-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
  font-size: 0.8rem;
  line-height: 1.25;
}

.analytics-insight-copy span,
.analytics-quality-list span:last-child {
  color: var(--hestix-muted);
}

.analytics-quality-list li {
  display: grid;
  gap: 5px;
  font-size: 0.78rem;
  line-height: 1.25;
}

.analytics-seasonality-list {
  display: grid;
  gap: 9px;
}

.analytics-seasonality-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgb(18 69 52 / 8%);
}

.analytics-seasonality-list dt {
  color: var(--hestix-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.analytics-seasonality-list dd {
  margin: 0;
  color: var(--hestix-text);
  font-size: 0.85rem;
  font-weight: 800;
  text-align: right;
}

.hestix-kpi-card {
  border: 1px solid rgb(18 69 52 / 10%);
  box-shadow: 0 12px 28px rgb(18 69 52 / 8%);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.hestix-kpi-card:hover {
  border-color: rgb(34 120 82 / 22%);
  box-shadow: 0 18px 38px rgb(18 69 52 / 12%);
  transform: translateY(-2px);
}

.analytics-kpi-help {
  cursor: help;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 0.2em;
}

.analytics-delta--positive {
  color: var(--hestix-green-700);
}

.analytics-delta--negative {
  color: var(--hestix-red);
}

.analytics-delta--neutral {
  color: var(--hestix-text);
}

.analytics-delta--muted {
  color: var(--hestix-muted);
}

.hestix-chart-card {
  border: 1px solid rgb(18 69 52 / 10%);
  box-shadow: var(--hestix-shadow-soft);
}

.hestix-chart-container {
  min-height: 320px;
}

.management-control-analytics-page .hestix-chart-container {
  min-height: 260px;
}

.hestix-table--compact {
  font-size: 0.875rem;
}

.hestix-table--compact th,
.hestix-table--compact td {
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.border-dashed {
  border-style: dashed !important;
}

/* ---------------------------------- */
/*  MANAGEMENT-CONTROL-ANALYTICS       */
/*  RESPONSIVE-POLISH-01               */
/* ---------------------------------- */

/* Phone narrow: <576px — single column */
@media (max-width: 575.98px) {
  .analytics-kpi-grid--primary,
  .analytics-kpi-grid--secondary {
    grid-template-columns: 1fr;
  }

  .analytics-primary-kpi-card .card-body {
    min-height: auto;
    padding: 12px;
  }

  .analytics-dashboard-grid,
  .analytics-details-grid,
  .analytics-details-grid--two,
  .analytics-details-grid--seasonality {
    grid-template-columns: 1fr;
  }

  .analytics-cost-summary {
    grid-template-columns: 1fr;
  }

  .analytics-side-panel {
    grid-template-columns: 1fr;
    grid-column: auto;
  }

  .analytics-chart-card,
  .analytics-chart-card--trend,
  .analytics-chart-card--channel-mix,
  .analytics-chart-card--delta,
  .analytics-details-grid__full {
    grid-column: auto;
  }

  .analytics-section__header,
  .analytics-info-strip {
    flex-direction: column;
    align-items: stretch;
  }

  .management-control-analytics-page .hestix-chart-container {
    min-height: 240px;
  }

  .management-control-hero .tenant-dashboard-hero__heading h1 {
    font-size: 1.3rem;
  }

  .management-control-hero.tenant-dashboard-hero {
    grid-template-columns: 1fr;
    padding: 1.1rem;
  }

  .management-control-hero .tenant-dashboard-hero__actions {
    justify-content: flex-start;
    min-width: 0;
  }

  /* Compact tables on phone */
  .analytics-table-card--compact .table {
    font-size: 0.76rem;
  }

  .analytics-table-card--compact .table th,
  .analytics-table-card--compact .table td {
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .analytics-info-strip {
    gap: 10px;
    padding: 12px;
  }
}

/* Tablet: 576px–991px — 2 columns for KPIs, charts split */
@media (min-width: 576px) and (max-width: 991.98px) {
  .analytics-kpi-grid--primary,
  .analytics-kpi-grid--secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Trend full-width; donut + delta side by side */
  .analytics-chart-card--trend {
    grid-column: span 12;
  }

  .analytics-chart-card--channel-mix,
  .analytics-chart-card--delta {
    grid-column: span 6;
  }

  .analytics-side-panel {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-column: span 12;
  }

  .management-control-analytics-page .hestix-chart-container {
    min-height: 260px;
  }
}

/* Small desktop / large tablet: 992px–1199px — 3-col KPIs */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .analytics-kpi-grid--primary,
  .analytics-kpi-grid--secondary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Section header / info strip wrap at ≤767px (shared) */
@media (max-width: 767.98px) {
  .analytics-section__header,
  .analytics-info-strip {
    flex-direction: column;
    align-items: stretch;
  }

  /* Stack details grids to 1 col */
  .analytics-details-grid--two,
  .analytics-details-grid--seasonality {
    grid-template-columns: 1fr !important;
  }
}

.hestix-analytics-tooltip {
  background: var(--hestix-analytics-tooltip-bg, #6b7280);
  color: #ffffff;
  border-radius: 0.65rem;
  box-shadow: 0 10px 24px rgba(20, 90, 56, 0.22);
  font-weight: 700;
  padding: 0.45rem 0.75rem;
}

.hestix-analytics-tooltip--direct,
.hestix-analytics-tooltip--positive {
  --hestix-analytics-tooltip-bg: #1f7a55;
}

.hestix-analytics-tooltip--booking {
  --hestix-analytics-tooltip-bg: #245f8f;
}

.hestix-analytics-tooltip--airbnb {
  --hestix-analytics-tooltip-bg: #d86f45;
}

.hestix-analytics-tooltip--other {
  --hestix-analytics-tooltip-bg: #6b7280;
}

.hestix-analytics-tooltip--negative {
  --hestix-analytics-tooltip-bg: #b34d45;
}

.hestix-analytics-tooltip--neutral {
  --hestix-analytics-tooltip-bg: #8a8f98;
}

.apexcharts-tooltip:has(.hestix-analytics-tooltip) {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* step-management-control-analytics-desktop-tables-polish-start */
/*
  Management Control Analytics — desktop table polish.
  Scope: only analytics page tables. No data/layout logic changes.
*/

.management-control-analytics-page .analytics-table-card {
  overflow: hidden;
  border-radius: 0.85rem;
  background: #ffffff;
}

.management-control-analytics-page .analytics-table-card .card-header {
  padding: 0.62rem 0.85rem;
  border-bottom: 1px solid rgb(18 69 52 / 10%);
  background: linear-gradient(180deg, #fbfdf9 0%, #f4f8f3 100%) !important;
}

.management-control-analytics-page .analytics-table-card .card-header h2,
.management-control-analytics-page .analytics-table-card .card-header h3 {
  color: #183629;
  font-size: 0.92rem;
  font-weight: 850;
  letter-spacing: -0.01em;
}

.management-control-analytics-page .analytics-table-card .table {
  margin-bottom: 0;
  font-size: 0.82rem;
}

.management-control-analytics-page .analytics-table-card .table thead th {
  border-bottom: 1px solid rgb(18 69 52 / 12%);
  background: #f5f9f5;
  color: #2e4639;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.management-control-analytics-page .analytics-table-card .table tbody th {
  color: #183629;
  font-weight: 850;
}

.management-control-analytics-page .analytics-table-card .table th,
.management-control-analytics-page .analytics-table-card .table td {
  padding-top: 0.48rem;
  padding-bottom: 0.48rem;
  vertical-align: middle;
}

.management-control-analytics-page .analytics-table-card .table td.text-end,
.management-control-analytics-page .analytics-table-card .table th.text-end {
  font-variant-numeric: tabular-nums;
}

/* Marginalità & Costi: poche colonne, non deve diventare una striscia infinita. */
@media (min-width: 992px) {
  .management-control-analytics-page #analytics-margin-costs > .analytics-table-card,
  .management-control-analytics-page #analytics-margin-costs .analytics-table-card {
    width: min(100%, 1080px);
    max-width: 1080px;
  }
}

/*
  Canali desktop:
  - header e KPI restano full-width;
  - Confronto canali va a sinistra;
  - Top unità + Canali principali vanno a destra.
*/
@media (min-width: 1200px) {
  .management-control-analytics-page #analytics-channels {
    display: grid;
    grid-template-columns: minmax(340px, 0.78fr) minmax(0, 1.72fr);
    gap: 14px;
    align-items: start;
  }

  .management-control-analytics-page #analytics-channels > .analytics-section__header,
  .management-control-analytics-page #analytics-channels > .analytics-kpi-grid {
    grid-column: 1 / -1;
  }

  .management-control-analytics-page #analytics-channels > .analytics-table-card {
    grid-column: 1;
    margin-bottom: 0 !important;
  }

  .management-control-analytics-page #analytics-channels > .analytics-details-grid {
    grid-column: 2;
    margin-bottom: 0 !important;
    grid-template-columns: minmax(420px, 1.15fr) minmax(300px, 0.85fr);
    align-items: stretch;
  }

  .management-control-analytics-page #analytics-channels > .analytics-details-grid > div {
    min-width: 0;
  }
}

/* Desktop/laptop: evitare full-width inutili, ma senza layout troppo stretto. */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .management-control-analytics-page #analytics-channels > .analytics-table-card {
    width: min(100%, 760px);
    max-width: 760px;
  }

  .management-control-analytics-page #analytics-channels > .analytics-details-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Stagionalità: due blocchi sì, ma non larghi quanto un campo da calcio. */
@media (min-width: 1200px) {
  .management-control-analytics-page #analytics-seasonality > .analytics-details-grid--seasonality {
    width: min(100%, 1480px);
    grid-template-columns: minmax(340px, 0.75fr) minmax(520px, 1.25fr);
  }
}

/* Mobile/tablet: preserva lo stack già corretto. */
@media (max-width: 767.98px) {
  .management-control-analytics-page #analytics-margin-costs .analytics-table-card,
  .management-control-analytics-page #analytics-channels .analytics-table-card,
  .management-control-analytics-page #analytics-seasonality .analytics-table-card {
    width: 100%;
    max-width: none;
  }

  .management-control-analytics-page .analytics-table-card .table {
    font-size: 0.76rem;
  }

  .management-control-analytics-page .analytics-table-card .table th,
  .management-control-analytics-page .analytics-table-card .table td {
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
  }
}
/* step-management-control-analytics-desktop-tables-polish-end */

/* step-management-control-analytics-info-buttons-touch-start */
/*
  Management Control Analytics — touch-friendly info buttons.
  Scope: analytics page only.
*/
.management-control-analytics-page .analytics-info-icon {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--hestix-green-800);
  cursor: pointer;
  font: inherit;
  font-size: 0;
  line-height: 1;
  text-decoration: none;
  user-select: none;
  vertical-align: middle;
}

.management-control-analytics-page .analytics-info-icon--sm {
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
}

.management-control-analytics-page .analytics-info-icon::before {
  content: "?";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1.5px solid rgb(18 69 52 / 22%);
  border-radius: 999px;
  background: #f2f8f4;
  color: var(--hestix-green-800);
  box-shadow: 0 3px 8px rgb(18 69 52 / 8%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.14s ease, box-shadow 0.14s ease;
}

.management-control-analytics-page .analytics-info-icon--sm::before {
  width: 20px;
  height: 20px;
  font-size: 0.68rem;
}

.management-control-analytics-page .analytics-info-icon:hover::before,
.management-control-analytics-page .analytics-info-icon:focus-visible::before,
.management-control-analytics-page .analytics-info-icon:active::before {
  border-color: rgb(18 69 52 / 34%);
  background: var(--hestix-green-800);
  color: #ffffff;
  box-shadow: 0 6px 14px rgb(18 69 52 / 14%);
  transform: translateY(-1px);
}

.management-control-analytics-page .analytics-info-icon:focus-visible {
  outline: 3px solid rgb(31 122 85 / 28%);
  outline-offset: 1px;
}

.management-control-analytics-page .analytics-info-icon > span[aria-hidden="true"] {
  font-size: 0;
}
/* step-management-control-analytics-info-buttons-touch-end */
