/* ==========================================================================
 * HappyM CRM 4.0 Enterprise Shell & UX Standard for FakeCRM v2.2.2
 * Aligned with HappyM-New-Web (UI-DESIGN-CONTRACT.md & 06-FORMS-VALIDATION.md)
 * Preserves .blueprint-layout / .blueprint-board / .command-deck in #view-tech
 * ========================================================================== */

:root {
  --happym-sidebar-width: 14.25rem; /* 228px */
  --happym-sidebar-collapsed-width: 3.75rem; /* 60px */
  --hm-sidebar-bg: #121e2d;
  --hm-sidebar-top: #0b1727;
  --hm-sidebar-border: #1e2f45;
  --hm-sidebar-active: #2892ff;
  --hm-topbar-h: 40px;
  --hm-footer-h: 30px;
  --hm-frame-matting: #b8c0ca;
  --hm-case-border: #9aa5b4;
  --hm-title-ink: #102a56;
  --hm-primary: #287be0;
  --hm-primary-hover: #1d66c2;
  --hm-zebra-odd: #ffffff;
  --hm-zebra-even: #f3f1ec;
  --hm-row-hover: #eef5ff;
  --hm-row-selected: #eaf3ff;
  --hm-input-h: 31px;
}

/* ==========================================================================
 * 1. ROOT SHELL LAYOUT (SIDEBAR + MAIN COLUMN)
 * ========================================================================== */
.hm-layout-root {
  display: flex;
  flex-direction: row;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  background: var(--hm-frame-matting);
}

.hm-layout-root.hidden {
  display: none !important;
}

/* ==========================================================================
 * 2. COLLAPSIBLE INVERTED SIDEBAR (aside#hmSidebar) & FLYOUT
 * ========================================================================== */
.navbar-vertical.navbar-inverted {
  width: var(--happym-sidebar-width);
  min-width: var(--happym-sidebar-width);
  max-width: var(--happym-sidebar-width);
  height: 100dvh;
  background: var(--hm-sidebar-bg);
  border-right: 1px solid var(--hm-sidebar-border);
  color: #dbe7f5;
  display: flex;
  flex-direction: column;
  transition: width 0.16s ease, min-width 0.16s ease, max-width 0.16s ease;
  z-index: 60;
  user-select: none;
}

body.navbar-vertical-collapsed .navbar-vertical.navbar-inverted {
  width: var(--happym-sidebar-collapsed-width);
  min-width: var(--happym-sidebar-collapsed-width);
  max-width: var(--happym-sidebar-collapsed-width);
}

.navbar-vertical__top {
  height: var(--hm-topbar-h);
  min-height: var(--hm-topbar-h);
  background: var(--hm-sidebar-top);
  border-bottom: 1px solid var(--hm-sidebar-border);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
}

body.navbar-vertical-collapsed .navbar-vertical__top {
  justify-content: center;
  padding: 0 6px;
}

.hm-nav-burger {
  width: 32px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}

.hm-nav-burger:hover {
  transform: translateY(-0.5px);
  box-shadow: 0 2px 7px rgba(40, 146, 255, 0.35);
}

.hm-nav-burger__bar {
  width: 15px;
  height: 2.2px;
  border-radius: 2px;
  display: block;
}
.hm-nav-burger__bar--1 { background: #22c55e; }
.hm-nav-burger__bar--2 { background: #14b8a6; }
.hm-nav-burger__bar--3 { background: #38bdf8; }

.navbar-vertical__brand {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.12;
}

.navbar-vertical__brand-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.navbar-vertical__brand-sub {
  font-size: 10px;
  color: #7dd3fc;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.navbar-vertical-collapsed .navbar-vertical__brand {
  display: none;
}

.navbar-vertical__scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.navbar-vertical__scroll::-webkit-scrollbar {
  width: 4px;
}
.navbar-vertical__scroll::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.28);
  border-radius: 3px;
}

.navbar-vertical-label-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 8px 3px;
}

.navbar-vertical-label {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #64748b;
  white-space: nowrap;
}

.navbar-vertical-line {
  flex: 1;
  height: 1px;
  background: rgba(148, 163, 184, 0.16);
}

body.navbar-vertical-collapsed .navbar-vertical-label {
  display: none;
}
body.navbar-vertical-collapsed .navbar-vertical-label-wrapper {
  padding: 6px 4px;
}

.hm-nav-item {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: #cbd5e1;
  border-radius: 6px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  position: relative;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.hm-nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.hm-nav-item.is-active {
  background: rgba(40, 146, 255, 0.18);
  border-color: rgba(40, 146, 255, 0.42);
  color: #ffffff;
  font-weight: 700;
}

.hm-nav-item.is-active::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 5px;
  bottom: 5px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--hm-sidebar-active);
}

.hm-nav-item__icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #94a3b8;
}

.hm-nav-item.is-active .hm-nav-item__icon,
.hm-nav-item:hover .hm-nav-item__icon {
  color: #38bdf8;
}

.hm-nav-item__icon svg {
  width: 16px;
  height: 16px;
}

.hm-nav-item__label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hm-nav-item__badge {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
  line-height: 1.3;
}

.hm-nav-item__badge--alarm {
  background: #dc2626;
  color: #ffffff;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.25);
}

.hm-nav-item__badge--warn {
  background: #d97706;
  color: #ffffff;
}

.hm-nav-item__badge--ok {
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7;
}

body.navbar-vertical-collapsed .hm-nav-item {
  justify-content: center;
  padding: 8px 0;
}

body.navbar-vertical-collapsed .hm-nav-item__label {
  display: none;
}

body.navbar-vertical-collapsed .hm-nav-item__badge {
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 9px;
  padding: 0 4px;
}

.navbar-vertical__bottom {
  margin-top: auto;
  border-top: 1px solid var(--hm-sidebar-border);
  padding: 6px;
  background: rgba(11, 23, 39, 0.68);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Collapsed sidebar hover flyout */
.hm-nav-flyout {
  position: fixed;
  z-index: 950;
  background: #0b1727;
  color: #f8fafc;
  border: 1px solid #284366;
  border-radius: 7px;
  padding: 7px 11px;
  box-shadow: 0 8px 22px rgba(2, 6, 23, 0.45);
  pointer-events: none;
  min-width: 175px;
  max-width: 260px;
}

.hm-nav-flyout__title {
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
}

.hm-nav-flyout__sub {
  font-size: 10.5px;
  color: #93c5fd;
  margin-top: 2px;
}

/* ==========================================================================
 * 3. MAIN COLUMN & CLINICAL-SKY TOPBAR (Gruppo › [Combo] › Tenant › [Combo])
 * ========================================================================== */
.hm-main-column {
  flex: 1;
  min-width: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hm-topbar {
  height: var(--hm-topbar-h);
  min-height: var(--hm-topbar-h);
  background: linear-gradient(180deg, #eaf4ff 0%, #d5e8ff 100%);
  border-bottom: 1px solid #adc4e2;
  color: var(--hm-title-ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 10px;
  z-index: 40;
}

.hm-topbar__scope-chain {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  flex-wrap: nowrap;
}

.hm-topbar__logo {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid #b8cce6;
  padding: 1px;
  flex-shrink: 0;
}

.hm-scope-tag {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #1e3a8a;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #b8cce6;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.hm-scope-arrow {
  font-size: 13px;
  font-weight: 800;
  color: #3b6998;
  line-height: 1;
  flex-shrink: 0;
}

select.hm-scope-select,
.hm-scope-select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  line-height: 26px !important;
  border-radius: 5px;
  border: 1px solid #96b4d8;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
  background-size: 12px 12px;
  color: var(--hm-title-ink);
  font-size: 12px;
  font-weight: 700;
  padding: 0 26px 0 8px;
  width: 216px;
  min-width: 160px;
  max-width: 238px;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  cursor: pointer;
  flex: 0 1 auto;
}

select.hm-scope-select--tenant,
.hm-scope-select--tenant {
  width: 244px;
  min-width: 185px;
  max-width: 268px;
  border-color: #6b9bd2;
  background-color: #f8fbff;
}

.hm-scope-select:focus {
  outline: 2px solid rgba(40, 123, 224, 0.32);
  border-color: var(--hm-primary);
}

.hm-vertical-pill {
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
  white-space: nowrap;
}

.hm-topbar .hm-vertical-pill {
  display: none;
}

.hm-topbar .op-state-pill {
  border-width: 1px;
  border-style: solid;
}

.hm-topbar .op-state-pill--live {
  background: #dcfce7;
  color: #065f46;
  border-color: #6ee7b7;
}

.hm-topbar .op-state-pill--testing {
  background: #e0f2fe;
  color: #075985;
  border-color: #7dd3fc;
}

.hm-topbar .op-state-pill--offline {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}

.hm-topbar__right {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  white-space: nowrap;
}

.hm-engine-pill {
  font-size: 10.5px;
  font-weight: 700;
  color: #0f3d6e;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #9dbadd;
  border-radius: 5px;
  padding: 2px 7px;
  white-space: nowrap;
}

.hm-health-omino {
  height: 27px;
  border-radius: 999px;
  border: 1px solid #9dbadd;
  background: #ffffff;
  color: var(--hm-title-ink);
  font-size: 11px;
  font-weight: 800;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.14s ease;
}

.hm-health-omino:hover {
  background: #f0f7ff;
  border-color: var(--hm-primary);
}

.hm-health-omino--alarm {
  background: #fef2f2;
  border-color: #f87171;
  color: #991b1b;
}

.hm-health-omino--warn {
  background: #fffbeb;
  border-color: #fbbf24;
  color: #92400e;
}

.hm-health-omino--ok {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #065f46;
}

.hm-top-util-btn {
  height: 27px;
  border-radius: 5px;
  border: 1px solid #9bb8dc;
  background: rgba(255, 255, 255, 0.85);
  color: var(--hm-title-ink);
  font-size: 11px;
  font-weight: 700;
  padding: 0 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.hm-top-util-btn:hover {
  background: #ffffff;
  border-color: var(--hm-primary);
}

.hm-top-util-btn--ghost {
  background: transparent;
  border-color: rgba(16, 42, 86, 0.22);
}

/* Adjust existing op-state-pill & ext-chip for light clinical-sky topbar */
.hm-topbar .op-state-pill {
  height: 26px;
  padding: 0 8px;
  font-size: 10.5px;
  font-weight: 800;
}

.hm-topbar .ext-chip {
  height: 25px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  font-size: 10.5px;
  font-weight: 800;
  border-radius: 4px;
}

/* ==========================================================================
 * 4. OUTER MATTING (.hm-list-page__card) & CENTRAL CASE (#hmCentralCase)
 * ========================================================================== */
.hm-list-page__card {
  flex: 1;
  min-height: 0;
  background: var(--hm-frame-matting);
  padding: 6px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hm-central-case {
  flex: 1;
  min-height: 0;
  background: #ffffff;
  border: 1px solid var(--hm-case-border);
  border-radius: 7px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

/* Zone 1: Contextual Toolbar */
.hm-zone-toolbar {
  min-height: 38px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f7fb 100%);
  border-bottom: 1px solid #d5dfec;
  padding: 4px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.hm-zone-toolbar__left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.hm-zone-toolbar__heading {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.hm-zone-toolbar__code {
  font-size: 10px;
  font-weight: 800;
  color: #287be0;
  background: #eaf3ff;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  padding: 1px 5px;
}

.hm-zone-toolbar__title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--hm-title-ink);
  margin: 0;
  white-space: nowrap;
}

.hm-scope-segmented {
  display: inline-flex;
  align-items: center;
  background: #e6ecf5;
  border: 1px solid #c7d4e5;
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.hm-scope-segmented__btn {
  border: none;
  background: transparent;
  color: #334155;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s ease;
}

.hm-scope-segmented__btn:hover:not(:disabled) {
  color: var(--hm-title-ink);
  background: rgba(255, 255, 255, 0.55);
}

.hm-scope-segmented__btn.is-active {
  background: var(--hm-primary);
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.18);
}

.hm-scope-segmented__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.hm-zone-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.hm-archive-action {
  height: 28px;
  border-radius: 5px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  font-size: 11.5px;
  font-weight: 700;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s ease;
}

.hm-archive-action:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.hm-archive-action--primary {
  background: var(--hm-primary);
  border-color: #1d66c2;
  color: #ffffff;
}

.hm-archive-action--primary:hover:not(:disabled) {
  background: var(--hm-primary-hover);
  border-color: #1854a3;
}

.hm-archive-action--emerald {
  background: #059669;
  border-color: #047857;
  color: #ffffff;
}

.hm-archive-action--amber {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #92400e;
}

.hm-archive-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Zone Workspace */
.hm-central-case > .workspace {
  flex: 1;
  min-height: 0;
  padding: 8px;
  background: #f3f6fa;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
 * 5. CRM 4.0 ZEBRA GRIDS, COMPACT CONTROLS, SINGLE-LINE ELLIPSIS & STICKY ⋮
 * ========================================================================== */
.view-panel:not(#view-tech) .edit-grid tbody tr:nth-child(odd),
.view-panel:not(#view-tech) .edit-grid tbody tr:nth-child(odd) td {
  background: var(--hm-zebra-odd);
}

.view-panel:not(#view-tech) .edit-grid tbody tr:nth-child(even),
.view-panel:not(#view-tech) .edit-grid tbody tr:nth-child(even) td {
  background: var(--hm-zebra-even);
}

.view-panel:not(#view-tech) .edit-grid tbody tr:hover,
.view-panel:not(#view-tech) .edit-grid tbody tr:hover td {
  background: var(--hm-row-hover);
}

.view-panel:not(#view-tech) .edit-grid tbody tr.row-selected,
.view-panel:not(#view-tech) .edit-grid tbody tr.row-selected td,
.view-panel:not(#view-tech) .edit-grid tbody tr.is-selected-row,
.view-panel:not(#view-tech) .edit-grid tbody tr.is-selected-row td,
.view-panel:not(#view-tech) .edit-grid tbody tr.active,
.view-panel:not(#view-tech) .edit-grid tbody tr.active td {
  background: var(--hm-row-selected) !important;
}

.view-panel:not(#view-tech) .edit-grid th {
  background: #e9eff7;
  color: var(--hm-title-ink);
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 6px 8px;
  border-bottom: 1px solid #cbd5e1;
}

.view-panel:not(#view-tech) .edit-grid td {
  padding: 5px 8px;
  font-size: 12px;
  vertical-align: middle;
}

/* Sticky Rightmost Single ⋮ Action Column */
.edit-grid th.hm-col-actions,
.edit-grid td.hm-col-actions {
  position: sticky;
  right: 0;
  width: 46px;
  min-width: 46px;
  max-width: 46px;
  padding: 4px 5px !important;
  text-align: center !important;
  border-left: 1px solid #d5dfec;
  box-shadow: -2px 0 6px rgba(15, 23, 42, 0.05);
}

.edit-grid thead th.hm-col-actions {
  z-index: 9;
  background: #e9eff7 !important;
}

.edit-grid tbody td.hm-col-actions {
  z-index: 5;
  background: #ffffff;
}

.hm-row-dots-btn {
  width: 27px;
  height: 27px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

.hm-row-dots-btn svg {
  width: 15px;
  height: 15px;
  pointer-events: none;
}

.hm-row-dots-btn:hover,
.hm-row-dots-btn.is-open {
  background: #eff6ff;
  border-color: #60a5fa;
  color: #1d4ed8;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.16);
}

/* Floating Row Actions Popover Menu */
.hm-row-action-popover {
  position: fixed;
  z-index: 3600;
  min-width: 186px;
  max-width: 310px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.2), 0 2px 6px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.hm-row-menu__sep {
  height: 1px;
  background: #e2e8f0;
  margin: 3px 4px;
}

.hm-row-menu__item {
  width: 100%;
  min-width: 0;
  border: none;
  background: transparent;
  color: #1e293b;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  text-align: left;
  padding: 6px 9px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: background 0.1s ease, color 0.1s ease;
}

.hm-row-menu__item:hover:not(:disabled):not(.is-disabled) {
  background: #f1f5f9;
  color: #0f172a;
}

.hm-row-menu__item--danger {
  color: #b91c1c;
}

.hm-row-menu__item--active {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
}

.hm-row-menu__item--active .hm-row-menu__ico {
  color: #2563eb;
}

.hm-row-menu__item--danger:hover:not(:disabled):not(.is-disabled) {
  background: #fef2f2;
  color: #991b1b;
}

.hm-row-menu__item:disabled,
.hm-row-menu__item.is-disabled {
  opacity: 0.5;
  cursor: default;
}

.hm-row-menu__ico {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.82;
}

.hm-row-menu__ico svg {
  width: 13.5px;
  height: 13.5px;
}

.hm-row-menu__lbl {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Global Single-Line Ellipsis (...) & Zero Overflow on Labels and Controls */
.hm-ellipsis {
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

form label:not(.checkbox-row):not(.switch-inline):not(.hm-collaudo-choice-card):not(.hm-wam-switch):not(.mod-chip):not(.small):not([for]),
.form-compact label:not(.checkbox-row):not(.switch-inline):not(.hm-collaudo-choice-card):not(.hm-wam-switch):not(.mod-chip):not(.small):not([for]),
.form-stack label:not(.checkbox-row):not(.switch-inline):not(.hm-collaudo-choice-card):not(.hm-wam-switch):not(.mod-chip):not(.small):not([for]),
.workspace label:not(.checkbox-row):not(.switch-inline):not(.hm-collaudo-choice-card):not(.hm-wam-switch):not(.mod-chip):not(.small):not([for]):not([style*="row"]),
.modal-card label:not(.checkbox-row):not(.switch-inline):not(.hm-collaudo-choice-card):not(.hm-wam-switch):not(.mod-chip):not(.small):not([for]):not([style*="row"]),
.compact-field:not([style*="row"]) {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  max-width: 100%;
}

form label:not(.checkbox-row):not(.switch-inline):not(.hm-collaudo-choice-card):not(.hm-wam-switch):not(.mod-chip):not(.small):not([for]) > span,
.form-compact label:not(.checkbox-row):not(.switch-inline):not(.hm-collaudo-choice-card):not(.hm-wam-switch):not(.mod-chip):not(.small):not([for]) > span,
.form-stack label:not(.checkbox-row):not(.switch-inline):not(.hm-collaudo-choice-card):not(.hm-wam-switch):not(.mod-chip):not(.small):not([for]) > span,
.workspace label:not(.checkbox-row):not(.switch-inline):not(.hm-collaudo-choice-card):not(.hm-wam-switch):not(.mod-chip):not(.small):not([for]):not([style*="row"]) > span,
.modal-card label:not(.checkbox-row):not(.switch-inline):not(.hm-collaudo-choice-card):not(.hm-wam-switch):not(.mod-chip):not(.small):not([for]):not([style*="row"]) > span,
.compact-field:not([style*="row"]) > span {
  display: block;
  height: 15px;
  line-height: 15px;
  min-width: 0;
  max-width: 100%;
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

.checkbox-row > input[type="checkbox"],
.checkbox-row > input[type="radio"] {
  flex-shrink: 0;
  margin: 0;
}

.checkbox-row > span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Homogeneous Multi-Column Control Rows (Flush Baseline, Never Staggered) */
.cmd-row-2,
.cmd-row-3,
.hm-wam-editor__grid {
  align-items: end;
}

.cmd-row-2:has(> .checkbox-row:first-child):not(:has(> label:not(.checkbox-row))),
.cmd-row-3:has(> .checkbox-row:first-child):not(:has(> label:not(.checkbox-row))) {
  align-items: center;
}

.cmd-row-2:has(> label:not(.checkbox-row)) > .checkbox-row,
.cmd-row-3:has(> label:not(.checkbox-row)) > .checkbox-row {
  min-height: var(--hm-input-h);
  margin-top: 0 !important;
}

/* Compact 31px Form Controls (Inputs & Selects Homogeneous Everywhere) */
form label input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]):not([type="range"]):not([type="hidden"]),
.form-compact input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]):not([type="range"]):not([type="hidden"]),
.workspace input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]):not([type="range"]):not([type="hidden"]):not(.input-search),
.modal-card input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]):not([type="range"]):not([type="hidden"]):not(.input-search),
form label select:not([multiple]),
.form-compact select:not([multiple]):not(.select-compact),
.workspace select:not([multiple]):not(.select-compact),
.modal-card select:not([multiple]):not(.select-compact),
.cell-input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: var(--hm-input-h);
  min-height: var(--hm-input-h);
  max-height: var(--hm-input-h);
  box-sizing: border-box;
  padding: 3px 8px;
  font-size: 12px;
  line-height: 1.25;
  border-radius: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cmd-row-inline > input:not([type="checkbox"]):not([type="radio"]),
.cmd-row-inline > select:not(.select-compact) {
  flex: 1 1 0%;
  width: auto;
  min-width: 0;
}

.auth-pwd-wrap input {
  padding-right: 64px !important;
}

.select-compact,
select.select-compact {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  height: 29px !important;
  min-height: 29px !important;
  max-height: 29px !important;
  flex: 0 0 auto;
  box-sizing: border-box !important;
  padding: 2px 28px 2px 8px !important;
  font-size: 11.5px;
  line-height: 23px !important;
  border-radius: 5px;
  max-width: 100%;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.edit-grid .select-compact {
  width: 100%;
  height: var(--hm-input-h) !important;
  min-height: var(--hm-input-h) !important;
  max-height: var(--hm-input-h) !important;
}

.input-search {
  height: var(--hm-input-h);
  min-height: var(--hm-input-h);
  max-height: var(--hm-input-h);
  padding: 3px 8px;
  font-size: 12px;
  border-radius: 5px;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

select:not([multiple]):not([size]):not(.hm-scope-select):not(.topbar__client-select):not(.topbar__pharmacy-select) {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: var(--hm-input-h) !important;
  min-height: var(--hm-input-h) !important;
  max-height: var(--hm-input-h) !important;
  flex: 0 0 var(--hm-input-h);
  box-sizing: border-box !important;
  line-height: 23px !important;
  padding: 3px 28px 3px 9px !important;
  font-size: 12px;
  border-radius: 5px;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 8px center !important;
  background-size: 12px 12px !important;
}

select:not([multiple]):not([size]):disabled {
  background-color: #f1f5f9;
}

.form-compact label > span,
.form-stack label > span,
.cmd-row-2 > label > span,
.cmd-row-3 > label > span {
  display: block;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Keep ::-ms-expand and ::picker-icon in SEPARATE rules so unknown pseudo-elements never invalidate Blink/WebKit/Gecko! */
select::-ms-expand {
  display: none !important;
}

select::picker-icon {
  display: none !important;
  content: none !important;
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
}

select::-webkit-inner-spin-button,
select::-webkit-calendar-picker-indicator {
  display: none !important;
}

.filter-bar select,
.filter-bar__left select,
.filter-bar__right select,
.poll-box select.select-compact,
.panel-subbar select,
.btn-row select.select-compact {
  display: inline-block;
  width: auto !important;
  min-width: 108px !important;
  max-width: 215px !important;
  flex: 0 1 168px !important;
  padding: 3px 28px 3px 9px !important;
  text-overflow: ellipsis !important;
}

.form-compact textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  font-size: 12px;
  padding: 5px 8px;
  border-radius: 5px;
}

/* ==========================================================================
 * 6. FRAMED KPI TOTALIZERS (HOME 01, MONITOR, USERS 07 & SUPERCONTROL 91)
 * ========================================================================== */
.hm-kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 8px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.hm-kpi-card,
.hm-kpi-box {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-top: 2.5px solid #94a3b8;
  border-radius: 8px;
  padding: 7px 10px 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3px;
  min-width: 0;
  overflow: hidden;
}

.hm-kpi-card--teal { border-top-color: #0d9488; }
.hm-kpi-card--blue { border-top-color: #2563eb; }
.hm-kpi-card--amber { border-top-color: #d97706; }
.hm-kpi-card--purple { border-top-color: #7c3aed; }
.hm-kpi-card--emerald { border-top-color: #16a34a; }
.hm-kpi-card--rose { border-top-color: #e11d48; }

.hm-kpi-card--alarm,
.hm-kpi-box--alarm {
  border-color: #fca5a5;
  border-top-color: #dc2626;
  background: #fef2f2;
}

.hm-kpi-card--warn,
.hm-kpi-box--warn {
  border-color: #fcd34d;
  border-top-color: #d97706;
  background: #fffbeb;
}

.hm-kpi-card--ok,
.hm-kpi-box--ok {
  border-color: #a7f3d0;
  border-top-color: #10b981;
  background: #f8fffb;
}

.hm-kpi-card__lbl,
.hm-kpi-box__lbl {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  max-width: 100%;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.035em;
  color: #475569;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hm-kpi-lbl-txt {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hm-kpi-card__val,
.hm-kpi-box__val {
  font-size: 16.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--hm-title-ink);
  line-height: 1.15;
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hm-kpi-val-denom {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

.hm-kpi-card__sub,
.hm-kpi-box__sub {
  font-size: 10.5px;
  font-weight: 600;
  color: #475569;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hm-kpi-badges {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  min-width: 0;
  overflow: hidden;
  margin-top: 2px;
}

.hm-kpi-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 17px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1;
  background: #f1f5f9;
  border: 1px solid #dbe4ef;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  max-width: 100%;
}

.hm-kpi-badge--teal { background: #ecfeff; border-color: #a5f3fc; color: #0f766e; }
.hm-kpi-badge--blue { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.hm-kpi-badge--amber { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.hm-kpi-badge--purple { background: #f5f3ff; border-color: #ddd6fe; color: #6d28d9; }
.hm-kpi-badge--emerald { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.hm-kpi-badge--rose { background: #fff1f2; border-color: #fecdd3; color: #be123c; }
.hm-kpi-badge--red { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }

/* Engine 3-Tier Banner Card */
.hm-engine-composition-bar {
  background: linear-gradient(90deg, #eff6ff 0%, #f8fafc 60%, #f0fdf4 100%);
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px 10px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.hm-engine-tiers {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 11.5px;
}

.hm-tier-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: 2px 8px;
  font-weight: 700;
  color: var(--hm-title-ink);
}

.hm-tier-chip--ext {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e40af;
}

.hm-tier-chip--eng {
  background: #dcfce7;
  border-color: #86efac;
  color: #065f46;
}

/* Split Workspace for Super-Control & Notebook */
.hm-split-workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr);
  gap: 8px;
  overflow: hidden;
}

.hm-card-fill {
  background: #ffffff;
  border: 1px solid #d5dfec;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.hm-card-fill__head {
  padding: 7px 10px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}

.hm-card-fill__title {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--hm-title-ink);
  margin: 0;
}

.hm-card-fill__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 10px;
}

/* Auto-Test 7-Step Stepper */
.hm-autotest-step {
  border: 1px solid #e2e8f0;
  border-left-width: 4px;
  border-radius: 6px;
  padding: 7px 10px;
  margin-bottom: 6px;
  background: #ffffff;
}
.hm-autotest-step--PASS { border-left-color: #10b981; }
.hm-autotest-step--WARNING { border-left-color: #f59e0b; background: #fffdf7; }
.hm-autotest-step--ALARM { border-left-color: #ef4444; background: #fef2f2; }

.hm-autotest-step__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--hm-title-ink);
}

.hm-autotest-step__url {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10.5px;
  color: #475569;
  margin-top: 2px;
  word-break: break-all;
}

.hm-autotest-step__sum {
  font-size: 11.5px;
  color: #1e293b;
  margin-top: 3px;
}

/* Schema Tecnico Group Overview Matrix inside untouched blueprint aesthetic */
.blueprint-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(275px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.blueprint-tenant-mini {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 10px;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.blueprint-tenant-mini__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}

.blueprint-tenant-mini__title {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
}

.blueprint-tenant-mini__dom {
  font-size: 10.5px;
  color: #93c5fd;
  word-break: break-all;
}

.blueprint-tenant-mini__metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.blueprint-tenant-mini__cell {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 5px;
  padding: 3px 5px;
  text-align: center;
}

.blueprint-tenant-mini__cell strong {
  display: block;
  font-size: 12px;
  color: #38bdf8;
}

.blueprint-tenant-mini__cell span {
  font-size: 9.5px;
  color: #cbd5e1;
}

/* ==========================================================================
 * 7. BLURRED FOREGROUND MODALS (FIXED W×H), COMPACT FOOTER & INFO POPOVERS
 * ========================================================================== */
.modal-backdrop {
  background: rgba(15, 23, 42, 0.50) !important;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 900;
}

.modal-card {
  border: 1px solid #94a3b8;
  border-radius: 9px;
  box-shadow: 0 22px 52px rgba(15, 23, 42, 0.42);
  width: 600px;
  max-width: 95vw;
  max-height: 90dvh;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

/* Compact content-hugging modal dimensions (zero empty bottom space) */
.modal-card--fixed-sm {
  width: 540px !important;
  max-width: 95vw !important;
  height: auto !important;
  max-height: calc(100dvh - 28px) !important;
}

.modal-card--fixed-md,
.modal-card.modal-card--wide {
  width: 740px !important;
  max-width: 95vw !important;
  height: auto !important;
  max-height: calc(100dvh - 28px) !important;
}

.modal-card--fixed-lg,
.modal-card.modal-card--xl {
  width: 920px !important;
  max-width: 96vw !important;
  height: auto !important;
  max-height: calc(100dvh - 28px) !important;
}

.modal-card.modal-card--portfolio {
  width: 1140px !important;
  max-width: 96vw !important;
  height: 86dvh !important;
  max-height: 92dvh !important;
}

.modal-card.modal-card--monitor {
  width: 94vw !important;
  max-width: 1720px !important;
  height: 88dvh !important;
  max-height: 92dvh !important;
}

.modal-monitor-body {
  flex: 1;
  min-height: 0;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  background: #f3f6fa;
}

.modal-card__head {
  background: linear-gradient(180deg, #eaf4ff 0%, #dcebff 100%);
  border-bottom: 1px solid #b8cce6;
  padding: 8px 12px;
  margin: 0;
  cursor: move;
  user-select: none;
  flex-shrink: 0;
}

.modal-card__head h3 {
  font-size: 13.5px;
  color: var(--hm-title-ink);
}

.modal-card > form {
  padding: 10px 14px 0;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.modal-card > .modal-body-pad,
.modal-card > .sys-tab-pane,
.modal-card > .split-2-modal,
.modal-card > .ub-tab-pane {
  padding: 10px 14px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.modal-card > .sys-tab-pane--flex:not(.hidden) {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  background: #f3f6fa;
}

.hm-portfolio-section--groups {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hm-groups-compact-card .table-scroll {
  max-height: 148px;
}

.hm-portfolio-section--tenants {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow: hidden;
}

.modal-card > form > .fly-tab-pane,
.modal-card > form > .prod-tab-pane,
.modal-card > form > .ev-tab-pane,
.modal-card > form > .srv-tab-pane,
.modal-card > form > .bp-tab-pane,
.modal-card > form > .bc-tab-pane,
.modal-card > form > .ca-tab-pane,
.modal-card > form > .eng-tab-pane,
.modal-card > form > .cpn-tab-pane,
.modal-card > form > .sch-tab-pane,
.modal-card > form > .et-tab-pane,
.modal-card > form > .modal-scroll-pane {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.modal-card__foot {
  padding: 8px 14px;
  margin: auto -14px 0;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-shrink: 0;
}

.modal-card > .modal-card__foot {
  margin: auto 0 0;
}

.hm-modal-dirty-bar {
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  color: #92400e;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 12px;
  display: none;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.hm-modal-dirty-bar.is-visible {
  display: flex;
}

.hm-btn-modal {
  min-width: 78px;
  height: 30px;
  padding: 0 12px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.hm-btn-modal--danger {
  background: #dc2626;
  border: 1px solid #b91c1c;
  color: #ffffff;
}
.hm-btn-modal--danger:hover {
  background: #b91c1c;
}

.hm-confirm-danger-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 4px solid #dc2626;
  border-radius: 6px;
  padding: 10px 12px;
  color: #7f1d1d;
  font-size: 12px;
}

.hm-confirm-danger-impact {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed #fca5a5;
  font-size: 11.5px;
  color: #991b1b;
}

/* Inline Feedback Box inside Test / Action Modals */
.hm-feedback-box {
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 11.5px;
  line-height: 1.38;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
}
.hm-feedback-box--ok {
  border-color: #86efac;
  background: #f0fdf4;
  color: #14532d;
}
.hm-feedback-box--err {
  border-color: #fecaca;
  background: #fef2f2;
  color: #7f1d1d;
}

/* Semantic KPI Icon Badges & Concise Info Tip Popover */
.hm-kpi-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
  margin-bottom: 1px;
}

.hm-kpi-ico {
  width: 21px;
  height: 21px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hm-kpi-ico svg { width: 12.5px; height: 12.5px; }
.hm-kpi-ico--blue { background: #dbeafe; color: #1d4ed8; }
.hm-kpi-ico--teal { background: #ccfbf1; color: #0f766e; }
.hm-kpi-ico--emerald { background: #dcfce7; color: #15803d; }
.hm-kpi-ico--amber { background: #fef3c7; color: #b45309; }
.hm-kpi-ico--purple { background: #ede9fe; color: #6d28d9; }
.hm-kpi-ico--rose { background: #ffe4e6; color: #be123c; }

.hm-info-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 10px;
  font-weight: 800;
  font-style: normal;
  cursor: help;
  vertical-align: middle;
  margin-left: 3px;
  flex-shrink: 0;
}
.hm-info-tip:hover {
  background: #287be0;
  color: #ffffff;
}

.hm-info-popover {
  position: fixed;
  z-index: 1200;
  max-width: 290px;
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid #334155;
  border-radius: 7px;
  padding: 7px 10px;
  font-size: 11px;
  line-height: 1.4;
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.45);
  pointer-events: none;
}

.pill--coupon {
  background: #ede9fe;
  color: #5b21b6;
  border: 1px solid #c4b5fd;
  font-weight: 800;
}

/* Compact Fixed Bottom Footer (#0b1727, 30px) with Icons & Short Captions */
.app-footer {
  height: var(--hm-footer-h);
  min-height: var(--hm-footer-h);
  max-height: var(--hm-footer-h);
  background: #0b1727;
  border-top: 1px solid #1e2f45;
  color: #cbd5e1;
  font-size: 10.5px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  overflow: hidden;
}

.app-footer__left,
.app-footer__right {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
}

.app-footer__center {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  white-space: nowrap;
  color: #94a3b8;
  font-size: 10px;
}

.hm-ft-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 6px;
  border-radius: 4px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #e2e8f0;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.hm-ft-chip svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  color: #38bdf8;
}

.hm-ft-health {
  cursor: pointer;
  border-radius: 999px;
  padding: 0 8px;
  transition: filter 0.12s ease;
}
.hm-ft-health:hover { filter: brightness(1.12); }
.hm-ft-health--ok { background: rgba(16, 185, 129, 0.2); border-color: rgba(52, 211, 153, 0.45); color: #6ee7b7; }
.hm-ft-health--ok svg { color: #34d399; }
.hm-ft-health--warn { background: rgba(217, 119, 6, 0.25); border-color: rgba(251, 191, 36, 0.5); color: #fde68a; }
.hm-ft-health--warn svg { color: #fbbf24; }
.hm-ft-health--alarm { background: rgba(220, 38, 38, 0.32); border-color: rgba(248, 113, 113, 0.65); color: #fecaca; }
.hm-ft-health--alarm svg { color: #f87171; }

.hm-ft-slot--live { border-color: rgba(52, 211, 153, 0.4); color: #a7f3d0; }
.hm-ft-slot--testing { border-color: rgba(56, 189, 248, 0.45); color: #bae6fd; }
.hm-ft-slot--offline { border-color: rgba(251, 191, 36, 0.5); color: #fde68a; }

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

/* ==========================================================================
 * 9. FAKECRM v2.6.0 — TOPBAR LENS SWITCHER, SQUARE MONITOR, SEMAPHORE TOOLTIP
 * ========================================================================== */
.hm-viewslot-switch {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.08);
  border: 1px solid #96b4d8;
  border-radius: 6px;
  padding: 1px;
  height: 28px;
  flex-shrink: 0;
}

.hm-viewslot-btn {
  border: none;
  background: transparent;
  color: #334155;
  font-size: 10.5px;
  font-weight: 800;
  height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: all 0.14s ease;
}

.hm-viewslot-btn.is-active[data-admin-view-slot="stage"] {
  background: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(29, 78, 216, 0.35);
}

.hm-viewslot-btn.is-active[data-admin-view-slot="live"] {
  background: #0f766e;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 118, 110, 0.35);
}

/* Zone 1 Persistent Active Channel Badge (LIVE Read-Only vs STAGE Editable) */
.hm-zone-slot-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}
.hm-zone-slot-badge--stage {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #93c5fd;
}
.hm-zone-slot-badge--live {
  background: #ccfbf1;
  color: #065f46;
  border: 1px solid #5eead4;
}
body.is-admin-live-lens .hm-central-case {
  border-color: #14b8a6;
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.18);
}

/* Square Topbar Monitor Button with Radar Pulse Icon & Signal Counter */
.hm-top-monitor {
  height: 28px;
  border-radius: 6px;
  border: 1px solid #9dbadd;
  background: #ffffff;
  color: var(--hm-title-ink);
  font-size: 10.5px;
  font-weight: 800;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.14s ease;
  position: relative;
}
.hm-top-monitor--square {
  width: 30px;
  height: 30px;
  min-width: 30px;
  padding: 0;
  margin-right: 4px;
  border-radius: 7px;
}
.hm-top-monitor:hover { filter: brightness(0.96); transform: translateY(-0.5px); }
.hm-top-monitor__svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.hm-top-monitor__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
}
.hm-top-monitor--square .hm-top-monitor__dot {
  position: absolute;
  bottom: 3px;
  left: 3px;
  width: 6px;
  height: 6px;
  border: 1px solid #ffffff;
}
.hm-top-monitor__badge {
  position: absolute;
  top: -5px;
  right: -6px;
  min-width: 16px;
  height: 15px;
  padding: 0 4px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #059669;
  color: #ffffff;
  border: 1.5px solid #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
}
.hm-top-monitor--green { background: #ecfdf5; border-color: #6ee7b7; color: #065f46; }
.hm-top-monitor--green .hm-top-monitor__dot { background: #10b981; }
.hm-top-monitor--green .hm-top-monitor__badge { background: #059669; }
.hm-top-monitor--yellow { background: #fffbeb; border-color: #fbbf24; color: #92400e; }
.hm-top-monitor--yellow .hm-top-monitor__dot { background: #f59e0b; }
.hm-top-monitor--yellow .hm-top-monitor__badge { background: #d97706; }
.hm-top-monitor--red { background: #fef2f2; border-color: #f87171; color: #991b1b; box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.16); }
.hm-top-monitor--red .hm-top-monitor__dot { background: #ef4444; }
.hm-top-monitor--red .hm-top-monitor__badge { background: #dc2626; }

/* 4-Badge Monitor KPI Strip (Figure 2 Layout) */
.hm-kpi-strip--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

/* Full-Width Synoptic Monitor Grid & Compact Semaphores with Numeric Counters */
.hm-synoptic-grid {
  width: 100%;
  table-layout: auto;
}
.hm-synoptic-grid th.hm-sem-col,
.hm-synoptic-grid td.hm-sem-cell {
  text-align: center !important;
  width: 11.2%;
}

.hm-sem-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.hm-sem-pill--compact {
  min-width: 56px;
  height: 26px;
  padding: 0 9px;
}
.hm-sem-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.14);
}
.hm-sem-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.hm-sem-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1;
  background: rgba(255, 255, 255, 0.85);
}
.hm-sem-pill--green { background: #ecfdf5; border-color: #6ee7b7; color: #065f46; }
.hm-sem-pill--green .hm-sem-dot { background: #10b981; box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.22); }
.hm-sem-pill--yellow { background: #fffbeb; border-color: #fbbf24; color: #92400e; }
.hm-sem-pill--yellow .hm-sem-dot { background: #f59e0b; box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.26); }
.hm-sem-pill--red { background: #fef2f2; border-color: #f87171; color: #991b1b; }
.hm-sem-pill--red .hm-sem-dot { background: #ef4444; box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.26); }
.hm-sem-pill--gray { background: #f1f5f9; border-color: #cbd5e1; color: #475569; }
.hm-sem-pill--gray .hm-sem-dot { background: #94a3b8; }

/* Custom Graphical Multi-Line Wrapping Semaphore Hover Tooltip */
.hm-sem-tooltip {
  position: fixed;
  z-index: 2800;
  width: 356px;
  max-width: calc(100vw - 20px);
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid #334155;
  border-radius: 9px;
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.52), 0 2px 8px rgba(2, 6, 23, 0.28);
  overflow: hidden;
  pointer-events: none;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.hm-sem-tooltip__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 11px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
}
.hm-sem-tooltip__title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
}
.hm-sem-tip-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-top: 3px;
  flex-shrink: 0;
}
.hm-sem-tip-dot--green { background: #10b981; box-shadow: 0 0 6px #10b981; }
.hm-sem-tip-dot--yellow { background: #f59e0b; box-shadow: 0 0 6px #f59e0b; }
.hm-sem-tip-dot--red { background: #ef4444; box-shadow: 0 0 6px #ef4444; }
.hm-sem-tip-dot--gray { background: #94a3b8; }
.hm-sem-tooltip__title {
  font-size: 11.5px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.3;
  white-space: normal;
}
.hm-sem-tooltip__sub {
  font-size: 10.5px;
  color: #93c5fd;
  margin-top: 1px;
  white-space: normal;
}
.hm-sem-tooltip__sig {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.hm-sem-tooltip__sig--ok { background: rgba(16, 185, 129, 0.22); color: #6ee7b7; border: 1px solid rgba(52, 211, 153, 0.4); }
.hm-sem-tooltip__sig--warn { background: rgba(239, 68, 68, 0.28); color: #fecaca; border: 1px solid rgba(248, 113, 113, 0.5); }
.hm-sem-tooltip__summary {
  padding: 8px 11px 4px;
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.4;
  white-space: normal;
}
.hm-sem-tooltip__detail {
  padding: 2px 11px 8px;
  font-size: 11px;
  color: #cbd5e1;
  line-height: 1.45;
  white-space: normal;
}
.hm-sem-tooltip__meta {
  padding: 6px 11px;
  background: rgba(15, 23, 42, 0.85);
  border-top: 1px solid #1e293b;
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 10px;
  color: #7dd3fc;
  line-height: 1.35;
  white-space: normal;
}

/* Zebra & Sticky Actions inside Modals (#modalSynopticMonitor & #modalSystem) */
#modalSynopticMonitor .edit-grid tbody tr:nth-child(odd) td,
#modalSystem .edit-grid tbody tr:nth-child(odd) td {
  background: var(--hm-zebra-odd);
}
#modalSynopticMonitor .edit-grid tbody tr:nth-child(even) td,
#modalSystem .edit-grid tbody tr:nth-child(even) td {
  background: var(--hm-zebra-even);
}
#modalSynopticMonitor .edit-grid tbody tr:hover td,
#modalSystem .edit-grid tbody tr:hover td {
  background: var(--hm-row-hover);
}
#modalSynopticMonitor .edit-grid tbody tr.is-selected-row td,
#modalSystem .edit-grid tbody tr.row-selected td {
  background: var(--hm-row-selected) !important;
}

/* Strict Read-Only LIVE Lens Banner & Anti-Squash Horizontal Strips */
.hm-live-lens-banner {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 14px;
  padding: 6px 12px;
  border-bottom: 1px solid #cbd5e1;
  font-size: 11.5px;
  line-height: 1.38;
  flex-shrink: 0;
}
.hm-live-lens-banner > div:first-child,
.hm-live-lens-banner__copy {
  flex: 1 1 360px;
  min-width: 0;
}
.hm-live-lens-banner--disconnected {
  background: linear-gradient(90deg, #fffbeb 0%, #fef3c7 100%);
  border-bottom-color: #f59e0b;
  color: #78350f;
}
.hm-live-lens-banner--collaudo {
  background: linear-gradient(90deg, #ecfeff 0%, #e0f2fe 100%);
  border-bottom-color: #38bdf8;
  color: #0c4a6e;
}
.hm-live-lens-banner__actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}

.status-strip,
.overlap-alert,
.panel-subbar,
.hm-engine-comp-bar,
.hm-wam-toolbar {
  width: 100%;
  box-sizing: border-box;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.status-strip > div:first-child,
.overlap-alert > div:first-child,
.filter-bar__left,
.hm-wam-toolbar__left {
  flex: 1 1 280px;
  min-width: 0;
}

.status-strip > .btn-row,
.status-strip > button,
.filter-bar__right,
.hm-wam-toolbar__right {
  flex-shrink: 0;
  margin-left: auto;
}

/* Modal Choice Cards for Live Collaudo User Channel */
.hm-collaudo-choice-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}
.hm-collaudo-choice-card {
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 9px 11px;
  background: #f8fafc;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  transition: border-color 0.14s ease, background 0.14s ease;
}
.hm-collaudo-choice-card:has(input:checked) {
  border-color: #2563eb;
  background: #eff6ff;
}
.hm-ft-slot--unpublished {
  border-color: rgba(248, 113, 113, 0.6);
  color: #fecaca;
}

/* ==========================================================================
 * 9. v2.7.0 — MANIFEST STRIPS (REAL CRM), FLYER WORKSPACE & DIRECTIONAL SVG
 * ========================================================================== */
.hm-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.hm-kpi-frames-grid {
  display: grid;
  gap: 8px;
  flex-shrink: 0;
}
.hm-kpi-frames-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hm-kpi-frame {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-top: 3px solid #287be0;
  border-radius: 7px;
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.hm-kpi-frame__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}
.hm-kpi-frame__lbl {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hm-kpi-frame__val {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
}
.hm-kpi-frame__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 10.5px;
  color: #64748b;
  min-width: 0;
}

.hm-info-dot {
  width: 17px;
  height: 17px;
  border-radius: 999px;
  border: 1px solid #94a3b8;
  background: #f1f5f9;
  color: #334155;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  flex-shrink: 0;
}
.hm-info-dot:hover {
  background: #287be0;
  border-color: #1d4ed8;
  color: #ffffff;
}

/* Real-CRM Horizontal Section Strips (.hm-wam-*) */
.hm-wam-toolbar {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
  margin-bottom: 6px;
}
.hm-wam-toolbar__left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}
.hm-wam-toolbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hm-wam-modbar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.hm-wam-modpill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s ease;
}
.hm-wam-modpill.is-on {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #065f46;
}
.hm-wam-modpill.is-off {
  background: #f1f5f9;
  color: #94a3b8;
}
.hm-wam-modpill__dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #94a3b8;
}
.hm-wam-modpill.is-on .hm-wam-modpill__dot {
  background: #10b981;
}

.hm-wam-strips-scroll {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 2px;
}

.hm-wam-strip {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
  flex-shrink: 0;
}
.hm-wam-strip.is-visible {
  border-left: 4px solid #10b981;
}
.hm-wam-strip.is-muted {
  border-left: 4px solid #94a3b8;
  background: #f8fafc;
}
.hm-wam-strip.is-expanded {
  border-color: #287be0;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.hm-wam-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  min-width: 0;
}
.hm-wam-row__order-box {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.hm-wam-arrows {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.hm-wam-arrow-btn {
  width: 19px;
  height: 15px;
  border-radius: 3px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 9.5px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}
.hm-wam-arrow-btn:hover:not(:disabled) {
  background: #e2e8f0;
}
.hm-wam-arrow-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.hm-wam-order {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hm-wam-row__main {
  flex: 1 1 0;
  min-width: 0;
  border: none;
  background: transparent;
  text-align: left;
  padding: 0;
  cursor: pointer;
}
.hm-wam-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.hm-wam-title-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.hm-wam-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #0f172a;
}
.hm-wam-sub {
  font-size: 11px;
  color: #64748b;
}

.hm-wam-row__right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.hm-wam-gov-pill {
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.hm-wam-gov-pill.is-off {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.hm-wam-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.hm-wam-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.hm-wam-switch__track {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  transition: background 0.15s ease;
}
.hm-wam-switch__thumb {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.28);
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.15s ease;
}
.hm-wam-switch input:checked + .hm-wam-switch__track {
  background: #10b981;
}
.hm-wam-switch input:checked + .hm-wam-switch__track .hm-wam-switch__thumb {
  transform: translateX(16px);
}
.hm-wam-switch input:disabled + .hm-wam-switch__track {
  opacity: 0.45;
  cursor: not-allowed;
}

.hm-wam-chevron-btn {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.hm-wam-chevron-btn:hover {
  background: #e2e8f0;
}

.hm-wam-editor {
  border-top: 1px dashed #cbd5e1;
  background: #f8fafc;
  padding: 10px 12px;
  border-radius: 0 0 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hm-wam-editor__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.hm-wam-editor__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.hm-wam-editor__info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}
.hm-wam-blocks-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

/* Flyer Workspace Split & Style Selectors */
.hm-flyer-workspace-split {
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 10px;
  overflow: hidden;
}

.hm-style-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.hm-size-choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.hm-style-choice-btn {
  height: 29px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: all 0.12s ease;
}
.hm-style-choice-btn:hover:not(:disabled) {
  border-color: #60a5fa;
  background: #eff6ff;
}
.hm-style-choice-btn.is-selected {
  border-color: #2563eb;
  background: #dbeafe;
  color: #1e3a8a;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
}

.flyer-preview-canvas--tall {
  min-height: 270px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 16px;
}
.hm-flyer-prev-copy {
  max-width: 255px;
  min-width: 0;
}
.hm-flyer-prev-bullets {
  margin: 0 0 8px;
  padding-left: 16px;
  font-size: 11px;
  color: #334155;
}
.hm-flyer-action-footer {
  border-top: 1px solid #e2e8f0;
  padding-top: 8px;
}

/* Directional SVG Architecture Canvas (#techArchitectureCanvas) */
.hm-tech-combo {
  height: 29px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid #38bdf8;
  background: #0f172a;
  color: #f8fafc;
  font-size: 11.5px;
  font-weight: 700;
  min-width: 280px;
  max-width: 420px;
  cursor: pointer;
}

.hm-arch-svg-wrap {
  width: 100%;
  background: #070f1d;
  border: 1px solid rgba(56, 189, 248, 0.24);
  border-radius: 10px;
  padding: 4px;
  overflow: hidden;
}
.hm-arch-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 415px;
}
.hm-arch-node.is-dimmed {
  opacity: 0.28;
  transition: opacity 0.18s ease;
}
.hm-arch-node.is-active {
  opacity: 1;
  transition: opacity 0.18s ease;
}
.hm-arch-node:hover rect:first-child {
  stroke-width: 2.6;
}

@keyframes hmArchDashFlow {
  to {
    stroke-dashoffset: -44;
  }
}
.hm-arch-flow-anim {
  animation: hmArchDashFlow 1.5s linear infinite;
}

.hm-arch-insight-bar {
  margin-top: 8px;
  padding: 7px 11px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.22);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.hm-arch-insight-bar__main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.hm-arch-insight-bar__txt {
  color: #e2e8f0;
  font-size: 11.5px;
  line-height: 1.35;
}

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

/* ==========================================================================
 * v2.8.0: TOP-OF-SIDEBAR ENGINE SWITCH + ILLUMINATED SOURCE NOTE + GOVERNANCE
 * ========================================================================== */
.hm-sidebar-lens {
  margin: 7px 7px 2px;
  padding: 6px;
  border-radius: 8px;
  background: linear-gradient(180deg, #091322 0%, #0f1f33 100%);
  border: 1px solid #243b58;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}

.hm-sidebar-lens__switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  background: #060d18;
  padding: 2px;
  border-radius: 6px;
  border: 1px solid #1e334d;
}

.hm-sidebar-lens__btn {
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #94a3b8;
  font-size: 10.5px;
  font-weight: 800;
  padding: 5px 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.14s ease;
  text-align: center;
}

.hm-sidebar-lens__btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
}

.hm-sidebar-lens__btn[data-admin-view-slot="live"].is-active {
  background: linear-gradient(180deg, #059669 0%, #047857 100%);
  color: #ffffff;
  box-shadow: 0 1px 5px rgba(5, 150, 105, 0.45);
}

.hm-sidebar-lens__btn[data-admin-view-slot="stage"].is-active {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  box-shadow: 0 1px 5px rgba(37, 99, 235, 0.45);
}

.hm-sidebar-lens__mini {
  display: none;
}

.hm-sidebar-lens__status {
  padding: 4px 7px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.2);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hm-sidebar-lens__status--fake {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(120, 53, 15, 0.22);
}

.hm-sidebar-lens__status--real {
  border-color: rgba(16, 185, 129, 0.48);
  background: rgba(6, 78, 59, 0.28);
}

.hm-sidebar-lens__status--reset0 {
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(30, 41, 59, 0.45);
}

.hm-sidebar-lens__led-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.hm-source-led {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
  flex-shrink: 0;
}

.hm-source-led--fake {
  background: #fbbf24;
  box-shadow: 0 0 8px #f59e0b, 0 0 2px #fde68a;
}

.hm-source-led--real {
  background: #34d399;
  box-shadow: 0 0 8px #10b981, 0 0 2px #a7f3d0;
}

.hm-source-led--reset0 {
  background: #94a3b8;
  box-shadow: 0 0 4px rgba(148, 163, 184, 0.5);
}

.hm-sidebar-lens__mode {
  font-size: 10.5px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.hm-sidebar-lens__status--fake .hm-sidebar-lens__mode {
  color: #fde68a;
}

.hm-sidebar-lens__status--real .hm-sidebar-lens__mode {
  color: #6ee7b7;
}

.hm-sidebar-lens__eng {
  margin-left: auto;
  font-size: 9.5px;
  font-weight: 700;
  color: #bae6fd;
  background: rgba(14, 116, 144, 0.32);
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 0 5px;
  border-radius: 4px;
  white-space: nowrap;
}

.hm-sidebar-lens__note {
  font-size: 9.5px;
  color: #cbd5e1;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.navbar-vertical-collapsed .hm-sidebar-lens {
  margin: 6px 4px 2px;
  padding: 4px 3px;
  align-items: center;
}

body.navbar-vertical-collapsed .hm-sidebar-lens__switch {
  grid-template-columns: 1fr;
  width: 100%;
}

body.navbar-vertical-collapsed .hm-sidebar-lens__full,
body.navbar-vertical-collapsed .hm-sidebar-lens__mode,
body.navbar-vertical-collapsed .hm-sidebar-lens__eng,
body.navbar-vertical-collapsed .hm-sidebar-lens__note {
  display: none;
}

body.navbar-vertical-collapsed .hm-sidebar-lens__mini {
  display: inline;
  font-size: 10px;
}

body.navbar-vertical-collapsed .hm-sidebar-lens__status {
  padding: 4px;
  align-items: center;
  justify-content: center;
}

/* Mandatory "prosegui" confirmation input */
.hm-prosegui-gate-label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 12px;
  border-radius: 7px;
  background: #fffbeb;
  border: 1px solid #f59e0b;
  color: #78350f;
  font-size: 12px;
  font-weight: 700;
}

.hm-prosegui-input {
  height: 34px !important;
  font-size: 13.5px !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em;
  border: 1.5px solid #d97706 !important;
  background: #ffffff !important;
  color: #0f172a !important;
  padding: 0 10px !important;
  border-radius: 6px !important;
}

/* 90 · Collaudo LIVE & Sorgenti cards */
.hm-collaudo-dual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.hm-collaudo-env-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

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

.hm-collaudo-env-card--live {
  border-top: 4px solid #059669;
}

.hm-collaudo-env-card--stage {
  border-top: 4px solid #2563eb;
}

/* 92 · Simplified Registration Fields 4-state pill selector */
.hm-reg-mode-seg {
  display: inline-flex;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
  flex-wrap: wrap;
}

.hm-reg-mode-btn {
  border: none;
  background: transparent;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.12s ease;
  white-space: nowrap;
}

.hm-reg-mode-btn:hover:not(:disabled) {
  background: #ffffff;
  color: #0f172a;
}

.hm-reg-mode-btn.is-active[data-rf-mode="REQUIRED_REG"] {
  background: #059669;
  color: #ffffff;
}

.hm-reg-mode-btn.is-active[data-rf-mode="OPTIONAL_REG"] {
  background: #2563eb;
  color: #ffffff;
}

.hm-reg-mode-btn.is-active[data-rf-mode="PROFILE_ONLY"] {
  background: #475569;
  color: #ffffff;
}

.hm-reg-mode-btn.is-active[data-rf-mode="DISABLED"] {
  background: #dc2626;
  color: #ffffff;
}

.hm-reg-mode-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 1180px) {
  .hm-kpi-frames-grid--4,
  .hm-collaudo-dual-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hm-flyer-workspace-split,
  .hm-wam-editor__grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
 * v2.9.0: OPERATOR SIDEBAR STACK, CUSTOM BLACK TOOLTIPS, ACTION DROPDOWNS,
 * DOUBLE-HEIGHT EXPANDED GRIDS, IMAGE ZOOM LIGHTBOX & RESPONSIVE COMPACTNESS
 * ========================================================================== */

/* 1. Sidebar Control Stack (#sidebarChannelLensBox) — Zero Overflow */
.hm-sidebar-lens {
  margin: 6px 6px 3px;
  padding: 6px;
  gap: 5px;
  overflow: hidden;
}

/* #0: Prominent Selected Pharmacy Sigla Badge FIRST */
.hm-sidebar-sigla-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 6px;
  background: linear-gradient(90deg, #0c2d48 0%, #144272 100%);
  border: 1px solid #38bdf8;
  box-shadow: 0 1px 6px rgba(56, 189, 248, 0.22);
  min-width: 0;
  cursor: default;
}

.hm-sidebar-sigla-badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #38bdf8;
  box-shadow: 0 0 6px #38bdf8;
  flex-shrink: 0;
}

.hm-sidebar-sigla-badge__full {
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hm-sidebar-sigla-badge__mini {
  display: none;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.03em;
  color: #ffffff;
}

/* #1: LIVE / STAGE Minimal Switch */
.hm-sidebar-lens__btn {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 4px 3px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* #2: Compact Single-Row Status + Smaller Engine Version Badge */
.hm-sidebar-lens__status {
  padding: 3px 6px;
  min-width: 0;
}

.hm-sidebar-lens__mode {
  font-size: 10px;
  font-weight: 800;
}

.hm-sidebar-lens__eng {
  font-size: 9px;
  font-weight: 700;
  padding: 0 4px;
  line-height: 1.35;
}

/* #3: Minimalist External App Link Buttons (↗ Prod | ↗ Stage) */
.hm-sidebar-ext-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  min-width: 0;
}

.hm-sidebar-ext-btn {
  height: 24px;
  border-radius: 5px;
  border: 1px solid #263f5d;
  background: rgba(15, 23, 42, 0.78);
  color: #dbeafe;
  font-size: 10.5px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 4px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.hm-sidebar-ext-btn:hover {
  background: rgba(37, 99, 235, 0.25);
  border-color: #60a5fa;
  color: #ffffff;
}

.hm-sidebar-ext-btn--prod .hm-sidebar-ext-btn__arr {
  color: #34d399;
  font-weight: 900;
}

.hm-sidebar-ext-btn--stage .hm-sidebar-ext-btn__arr {
  color: #60a5fa;
  font-weight: 900;
}

/* #4: Business | Tecnico Menu Mode Switch */
.hm-sidebar-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: #060d18;
  padding: 2px;
  border-radius: 6px;
  border: 1px solid #1e334d;
  min-width: 0;
}

.hm-sidebar-mode-btn {
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #94a3b8;
  font-size: 10.5px;
  font-weight: 800;
  padding: 4px 4px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.12s ease;
}

.hm-sidebar-mode-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
}

.hm-sidebar-mode-btn[data-sidebar-menu-mode="business"].is-active {
  background: #1e3a5f;
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.45);
}

.hm-sidebar-mode-btn[data-sidebar-menu-mode="tech"].is-active {
  background: #3b2712;
  color: #fde68a;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.5);
}

.hm-sidebar-mode-btn__mini {
  display: none;
}

/* Collapsed Sidebar (60px) Rules for New Stack */
body.navbar-vertical-collapsed .hm-sidebar-sigla-badge {
  padding: 4px 2px;
  width: 100%;
}
body.navbar-vertical-collapsed .hm-sidebar-sigla-badge__dot,
body.navbar-vertical-collapsed .hm-sidebar-sigla-badge__full {
  display: none;
}
body.navbar-vertical-collapsed .hm-sidebar-sigla-badge__mini {
  display: inline;
}
body.navbar-vertical-collapsed .hm-sidebar-ext-links {
  grid-template-columns: 1fr;
  width: 100%;
  gap: 3px;
}
body.navbar-vertical-collapsed .hm-sidebar-ext-btn__lbl {
  display: none;
}
body.navbar-vertical-collapsed .hm-sidebar-mode-switch {
  grid-template-columns: 1fr;
  width: 100%;
}
body.navbar-vertical-collapsed .hm-sidebar-mode-btn__full {
  display: none;
}
body.navbar-vertical-collapsed .hm-sidebar-mode-btn__mini {
  display: inline;
  font-size: 10px;
}

/* 2. Global Custom Formatted Black Tooltip (#hmInfoPopover.hm-dark-tip) */
.hm-info-popover,
.hm-dark-tip {
  position: fixed;
  z-index: 3600 !important;
  max-width: 315px;
  background: #070b14 !important;
  color: #f8fafc !important;
  border: 1px solid #334155 !important;
  border-radius: 8px !important;
  padding: 8px 11px !important;
  font-size: 11px !important;
  line-height: 1.42 !important;
  box-shadow: 0 14px 32px rgba(2, 6, 23, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.04) !important;
  pointer-events: none;
}

.hm-dark-tip__head {
  font-size: 11.5px;
  font-weight: 800;
  color: #7dd3fc;
  margin-bottom: 3px;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.hm-dark-tip__body {
  color: #e2e8f0;
}

.hm-dark-tip__list {
  margin: 2px 0 0;
  padding-left: 14px;
  color: #e2e8f0;
}

.hm-dark-tip__list li {
  margin-bottom: 2px;
}

/* 3. Action Dropdown Trigger Buttons & Single-Row Non-Wrapping Toolbars */
.hm-dropdown-trigger {
  display: inline-flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  min-width: 0;
  max-width: 230px;
  height: var(--hm-input-h, 29px);
  min-height: var(--hm-input-h, 29px);
  padding: 3px 9px !important;
  white-space: nowrap !important;
  overflow: hidden;
  flex-shrink: 0;
}

.hm-dropdown-trigger > span:not(.hm-btn-ico):not(.hm-btn-caret),
.hm-seg-combo-btn__lbl {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.hm-btn-ico,
.hm-btn-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.hm-btn-caret {
  margin-left: 2px;
}

.seg-switch.hm-seg-switch--combo,
.hm-reg-mode-seg.hm-seg-switch--combo {
  display: inline-flex !important;
  align-items: center;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
  gap: 0 !important;
  min-width: 0;
  flex-shrink: 0;
}

.seg-switch.hm-seg-switch--combo > .seg-switch__btn,
.hm-reg-mode-seg.hm-seg-switch--combo > .hm-reg-mode-btn {
  display: none !important;
}

.hm-seg-combo-btn {
  font-weight: 700 !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

.hm-seg-combo-btn:hover:not(:disabled),
.hm-seg-combo-btn.is-open {
  background: #f8fafc !important;
  border-color: #64748b !important;
}

.hm-reg-mode-seg.hm-seg-switch--combo .hm-seg-combo-btn {
  width: 100%;
  max-width: 100%;
}

.hm-btn-ico svg {
  width: 12.5px;
  height: 12.5px;
}

.hm-btn-caret svg {
  width: 11px;
  height: 11px;
  opacity: 0.8;
}

.hm-zone-toolbar {
  flex-wrap: nowrap !important;
  gap: 8px !important;
  padding: 5px 10px !important;
}

.hm-zone-toolbar__left {
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: nowrap !important;
  overflow: hidden;
}

.hm-zone-toolbar__right {
  flex-shrink: 0;
  flex-wrap: nowrap !important;
}

.hm-scope-segmented {
  flex-wrap: nowrap !important;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
}

.hm-scope-segmented__btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.hm-scope-segmented__btn.is-tab-primary-shrink {
  flex: 0 1 auto !important;
  min-width: 48px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap !important;
  padding: 5px 8px !important;
  min-height: 38px;
  overflow: visible !important;
}

.filter-bar__left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap !important;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}
.filter-bar__left > * {
  flex-shrink: 1;
}
.filter-bar__left .seg-switch.hm-seg-switch--combo {
  flex: 0 1 auto !important;
  min-width: 82px;
}
.filter-bar__left .hm-seg-combo-btn {
  width: 100%;
  min-width: 82px;
}
.filter-bar__left .input-search {
  flex: 0 1 220px !important;
  min-width: 115px !important;
}
.filter-bar__left select.select-compact {
  flex: 0 1 155px;
  min-width: 96px;
  max-width: 180px;
  text-overflow: ellipsis;
}

.filter-bar__right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap !important;
  flex-shrink: 0;
  margin-left: auto;
}

.seg-switch {
  flex-wrap: nowrap !important;
  flex-shrink: 0;
}

.seg-switch__btn {
  white-space: nowrap !important;
  font-size: 11px !important;
  padding: 3px 8px !important;
}

/* 4. Double-Height Expanded Product & Category Grids + Sticky Rightmost Column */
.hm-grid-expanded tbody tr.hm-exp-row td {
  padding: 7px 9px !important;
  vertical-align: middle;
}

.hm-grid-expanded td.hm-col-thumb {
  width: 66px;
  padding: 5px 7px !important;
  text-align: center;
}

.hm-prod-thumb-zoom {
  position: relative;
  width: 52px;
  height: 52px;
  padding: 2px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  cursor: zoom-in;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
}

.hm-prod-thumb-zoom img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 5px;
}

.hm-prod-thumb-zoom:hover {
  border-color: #2563eb;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.22);
  transform: scale(1.04);
}

.hm-prod-thumb-zoom__lens {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: rgba(9, 14, 26, 0.82);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.78;
}

.hm-prod-thumb-zoom:hover .hm-prod-thumb-zoom__lens {
  opacity: 1;
  background: #2563eb;
}

.hm-prod-thumb-zoom__lens svg {
  width: 10.5px;
  height: 10.5px;
}

.hm-dbl-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.hm-dbl-cell__top,
.hm-dbl-cell__bot {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
  min-width: 0;
}

.hm-dbl-title {
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hm-dbl-sub-inline {
  font-size: 11px;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hm-meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 4px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.35;
}

.hm-meta-chip--brand {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

.hm-flyer-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #64748b;
  transition: all 0.12s ease;
}

.hm-flyer-tag-pill.is-on {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.2);
}

.hm-flyer-tag-pill:hover:not(:disabled) {
  border-color: #2563eb;
}

.hm-flyer-tag-pill:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.hm-flyer-tag-pill__ico {
  width: 11px;
  height: 11px;
  display: inline-flex;
}
.hm-flyer-tag-pill__ico svg {
  width: 11px;
  height: 11px;
}

.cell-input--xs {
  height: 23px !important;
  font-size: 11px !important;
  padding: 0 6px !important;
}

.cell-input--price {
  width: 74px !important;
  height: 25px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  padding: 0 5px !important;
}

.cell-input--listprice {
  width: 68px !important;
  height: 25px !important;
  font-size: 11px !important;
  color: #64748b !important;
  padding: 0 5px !important;
}

.cell-input--stock {
  width: 60px !important;
  height: 25px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  padding: 0 5px !important;
}

.hm-inline-chk {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  margin: 0;
}

.hm-clickable-pill {
  cursor: pointer;
  border: 1px solid transparent;
}
.hm-clickable-pill:hover {
  filter: brightness(0.95);
  border-color: #2563eb;
}

/* Keep sticky rightmost action column crisp on zebra/hover rows */
.view-panel:not(#view-tech) .edit-grid tbody tr:nth-child(odd) td.hm-col-actions {
  background: var(--hm-zebra-odd) !important;
}
.view-panel:not(#view-tech) .edit-grid tbody tr:nth-child(even) td.hm-col-actions {
  background: var(--hm-zebra-even) !important;
}
.view-panel:not(#view-tech) .edit-grid tbody tr:hover td.hm-col-actions {
  background: var(--hm-row-hover) !important;
}

/* 5. High-Contrast Image Lightbox Zoom (#hmImageZoomLightbox) */
.hm-zoom-lightbox {
  position: fixed;
  inset: 0;
  z-index: 3700;
  background: rgba(7, 11, 20, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.hm-zoom-lightbox.hidden {
  display: none !important;
}

.hm-zoom-lightbox__card {
  position: relative;
  max-width: min(760px, 92vw);
  max-height: 88dvh;
  background: #ffffff;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.58);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.hm-zoom-lightbox__img {
  max-width: 100%;
  max-height: 72dvh;
  object-fit: contain;
  border-radius: 8px;
  background: #f8fafc;
}

.hm-zoom-lightbox__cap {
  font-size: 12.5px;
  font-weight: 800;
  color: #0f172a;
  text-align: center;
}

.hm-zoom-lightbox__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #0f172a;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 6. Compact Typography & Responsive Tightening (1366px / 1280px / 1024px) */
@media (max-width: 1380px) {
  :root {
    --happym-sidebar-width: 13rem; /* 208px */
  }
  .hm-zone-toolbar__title {
    font-size: 13px !important;
  }
  .hm-zone-slot-badge {
    font-size: 10px !important;
    padding: 2px 6px !important;
  }
  .hm-scope-segmented__btn {
    padding: 3px 7px !important;
    font-size: 11px !important;
  }
  .hm-archive-action {
    padding: 0 8px !important;
    font-size: 11px !important;
  }
  .input-search {
    min-width: 165px !important;
    max-width: 215px !important;
  }
}

@media (max-width: 1200px) {
  .hm-zone-slot-badge {
    display: none !important;
  }
  .hm-topbar__scope-chain .hm-scope-tag {
    display: none;
  }
  select.hm-scope-select,
  .hm-scope-select {
    min-width: 82px;
    width: auto;
    flex: 0 1 180px;
  }
  select.hm-scope-select--tenant,
  .hm-scope-select--tenant {
    min-width: 100px;
    width: auto;
    flex: 0 1 215px;
  }
}

@media (max-width: 960px) {
  :root {
    --happym-sidebar-width: 11.75rem;
  }
  .hm-topbar__scope-chain {
    gap: 4px;
  }
  select.hm-scope-select,
  .hm-scope-select,
  select.hm-scope-select--tenant,
  .hm-scope-select--tenant {
    font-size: 11px;
    padding: 0 22px 0 6px;
  }
}

/* ==========================================================================
 * v2.11.0: MAX 3-LINE GRID CLAMP, MAX 2-LINE FORM/BADGE CLAMP, COMPACT TECH
 * BARS, VISUAL WYSIWYG + MONACO STYLE STUDIO & OVERLAY DIRECTOR TIMELINE
 * ========================================================================== */

/* 1. Universal 3-line max cell clamp on FakeCRM grids (with '...' + tooltip) */
.hm-cell-clamp-3,
.edit-grid td .cell-multi__sub,
.edit-grid td .hm-grid-text,
.edit-grid td .small:not(.checkbox-row),
.edit-grid td .muted:not(span.pill) {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  line-height: 1.34;
  max-height: calc(1.34em * 3 + 2px);
}

.edit-grid td {
  max-width: 440px;
}

/* 2. Max 2-line clamp for form subtitles, check rows, domain chips & badges */
.hm-label-clamp-2,
.hm-badge-clamp-2,
.check-row > span,
.checkbox-row > span,
.hm-collaudo-env-card h3,
.hm-collaudo-env-card .muted.small {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  line-height: 1.32;
  max-height: calc(1.32em * 2 + 2px);
  min-width: 0;
  max-width: 100%;
}

.hm-collaudo-env-card code,
.hm-domain-chip {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.hm-collaudo-env-card .btn-row .btn {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Concise 1-line technical bar replacing verbose prose boxes */
.hm-tech-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  font-size: 11.5px;
  color: #1e293b;
  min-width: 0;
}

.hm-tech-bar--amber {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #92400e;
}

.hm-tech-bar__txt {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Multiline rich dark tooltip refinements */
.hm-dark-tip {
  max-width: 390px !important;
  max-height: 68dvh;
  overflow-y: auto;
  white-space: normal;
  word-break: break-word;
}

/* 3. Visual WYSIWYG + Monaco Style Studio Modal */
.modal-card.modal-card--studio {
  width: 97vw !important;
  max-width: 1680px !important;
  height: 92dvh !important;
  max-height: 94dvh !important;
}

.hm-studio-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 236px minmax(360px, 1fr) 470px;
  gap: 10px;
  padding: 10px 12px;
  background: #e9eff7;
  overflow: hidden;
}

.hm-studio-col {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.hm-studio-col__head {
  padding: 7px 10px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 800;
  color: #0f172a;
  flex-shrink: 0;
}

.hm-studio-col__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px;
}

.hm-studio-area-btn {
  width: 100%;
  text-align: left;
  padding: 7px 9px;
  margin-bottom: 4px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: #f8fafc;
  color: #1e293b;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.hm-studio-area-btn:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.hm-studio-area-btn.is-active {
  background: #1d4ed8;
  border-color: #1e40af;
  color: #ffffff;
}

.hm-studio-canvas-bg {
  flex: 1;
  min-height: 0;
  background: radial-gradient(circle at top, #dbeafe 0%, #cbd5e1 100%);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 14px;
  overflow: auto;
}

.hm-studio-device {
  background: #f8fafc;
  border: 6px solid #0f172a;
  border-radius: 26px;
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.28);
  width: 390px;
  max-width: 100%;
  min-height: 640px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: width 0.18s ease;
}

.hm-studio-device--desktop {
  width: 100%;
  max-width: 780px;
  border-width: 3px;
  border-radius: 14px;
}

.hm-studio-device__bar {
  background: #0f172a;
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 700;
  padding: 5px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hm-studio-device__viewport {
  flex: 1;
  padding: 14px;
  background: #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hm-studio-selectable {
  position: relative;
  cursor: pointer;
  transition: outline 0.12s ease;
}

.hm-studio-selectable:hover {
  outline: 2px dashed #3b82f6;
  outline-offset: 2px;
}

.hm-studio-selectable.is-studio-selected {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.hm-studio-monaco-box {
  height: 235px;
  min-height: 190px;
  border: 1px solid #334155;
  border-radius: 6px;
  overflow: hidden;
  background: #0f172a;
  position: relative;
}

.hm-studio-css-fallback {
  width: 100%;
  height: 100%;
  border: none;
  resize: none;
  background: #0f172a;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.45;
  padding: 8px 10px;
}

.hm-color-field {
  display: flex;
  align-items: center;
  gap: 5px;
}

.hm-color-field input[type="color"] {
  width: 28px;
  height: 28px;
  padding: 1px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #ffffff;
  cursor: pointer;
  flex-shrink: 0;
}

/* 4. Visual Director & Timeline ("Regia & Timeline Messaggi") */
.hm-director-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 10px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.hm-tl-track-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hm-tl-lane {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 155px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.hm-tl-lane__title {
  font-size: 11.5px;
  font-weight: 800;
  color: #0f172a;
}

.hm-tl-lane__sub {
  font-size: 10px;
  color: #64748b;
}

.hm-tl-lane__slots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 34px;
  align-items: center;
}

.hm-tl-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  cursor: pointer;
  max-width: 290px;
}

.hm-tl-chip--conflict {
  border-color: #ef4444;
  background: #fef2f2;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.14);
}

.hm-tl-chip--fullpage {
  border-color: #7c3aed;
  background: #f5f3ff;
}

@media (max-width: 1260px) {
  .hm-studio-grid {
    grid-template-columns: 190px minmax(300px, 1fr) 380px;
  }
  .hm-director-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
 * v2.12.0: MODAL SHELL TOP-RIGHT X + COMPACT ELLIPSIS TITLE + TABULATOR
 * OVERFLOW (...) POPOVER + CONSTANT MODAL TAB HEIGHT + MAPPA SISTEMA FIX
 * ========================================================================== */
.modal-card__head {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 7px 12px !important;
  border-bottom: 1px solid #b8cce6 !important;
  min-height: 0 !important;
}

.modal-card__head > :first-child {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.modal-card__head .eyebrow {
  display: block !important;
  font-size: 9.5px !important;
  line-height: 1.25 !important;
  margin: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
}

.modal-card__head h3 {
  display: block !important;
  font-size: 12.6px !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  margin: 1px 0 0 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
}

.modal-card__head [data-close-modal] {
  flex: 0 0 auto !important;
  align-self: flex-start !important;
  margin: -1px -3px 0 6px !important;
  width: 24px !important;
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 13px !important;
  line-height: 1 !important;
  border-radius: 5px !important;
}

.modal-card__tabbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: #f1f5f9;
  border-bottom: 1px solid #cbd5e1;
  min-width: 0;
  flex-shrink: 0;
  overflow: hidden;
}

.modal-card__tabbar > .seg-switch {
  display: inline-flex !important;
  align-items: center;
  flex-wrap: nowrap !important;
  gap: 2px;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  background: #e2e8f0;
  padding: 2px;
  border-radius: 7px;
}

.modal-card__tabbar .seg-switch__btn {
  font-size: 11px !important;
  padding: 3px 9px !important;
  white-space: nowrap !important;
  flex: 0 0 auto;
}

.is-tab-overflowed {
  display: none !important;
}

.hm-tabs-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 23px;
  padding: 0 7px;
  border-radius: 5px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
  margin-left: 2px;
}

.hm-tabs-more-btn:hover {
  background: #f8fafc;
  border-color: #64748b;
  color: #0f172a;
}

.hm-tabs-more-btn.has-active {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1d4ed8;
}

.hm-tabs-more-btn.hidden {
  display: none !important;
}

/* Constant flex column fill for direct tab-pane children in modals */
.modal-card > .zip-tab-pane:not(.hidden),
.modal-card > .mf-imp-tab-pane:not(.hidden),
.modal-card > .fl-imp-tab-pane:not(.hidden) {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  padding: 10px 14px 0 !important;
  overflow-y: auto;
}

.modal-card > form > .pwd-tab-pane {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

#modalUserBusinessDossier .modal-card {
  height: min(600px, calc(100dvh - 36px)) !important;
  min-height: min(600px, calc(100dvh - 36px)) !important;
  max-height: min(600px, calc(100dvh - 36px)) !important;
}

/* Unified AI Prompt & Download Toolbar in Import Modals */
.hm-ai-prompt-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 5px 8px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  margin-bottom: 6px;
  flex-shrink: 0;
}

.hm-ai-prompt-bar__grp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.hm-ai-prompt-textarea {
  flex: 1 1 auto;
  width: 100%;
  min-height: 220px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
  font-size: 11px !important;
  line-height: 1.42 !important;
  background: #0f172a !important;
  color: #e2e8f0 !important;
  border: 1px solid #334155 !important;
  border-radius: 6px !important;
  padding: 9px 10px !important;
  resize: none;
}

/* Responsive fix for 99 · Mappa Sistema (#techArchitectureCanvas & Group) */
.hm-arch-svg-wrap {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

.hm-arch-svg {
  min-width: 680px;
}

.hm-arch-insight-bar {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 6px 12px !important;
}

.hm-arch-insight-bar__main {
  flex: 1 1 300px !important;
  min-width: 0 !important;
  display: flex !important;
  align-items: flex-start !important;
  gap: 8px !important;
}

.hm-arch-insight-bar__main .pill {
  flex: 0 0 auto;
}

.hm-arch-insight-bar__txt {
  flex: 1 1 auto;
  min-width: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.hm-arch-insight-bar__hint {
  flex: 0 1 auto;
  max-width: 100%;
  font-size: 11px;
  color: #94a3b8;
  white-space: normal !important;
  line-height: 1.3;
}

@media (max-width: 980px) {
  .actors-strip {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)) !important;
    gap: 8px !important;
  }
  .blueprint-board__head {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
  }
}

/* ==========================================================================
 * v2.17.0 — PUSH LAB COMPACT DELIVERY CARDS, MODAL USER PICKER, ICON CATALOG
 * & 3-STEP WEEKLY SERVICE SLOTS / SHARED ROOM AGENDA
 * ========================================================================== */
.hm-pushlab-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

@media (max-width: 960px) {
  .hm-pushlab-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.hm-pushlab-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

@media (max-width: 640px) {
  .hm-pushlab-mode-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.hm-pushlab-mode-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 3px;
  min-width: 0;
  width: 100%;
  height: 78px;
  min-height: 78px;
  max-height: 78px;
  padding: 7px 9px;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-sizing: border-box;
  overflow: hidden;
  transition: border-color 0.14s ease, background-color 0.14s ease, box-shadow 0.14s ease;
}

.hm-pushlab-mode-card:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.hm-pushlab-mode-card.is-active {
  background: #f0fdfa;
  border: 2px solid #0d9488;
  padding: 6px 8px;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.12);
}

.hm-pushlab-mode-card__title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 800;
  font-size: 11.5px;
  line-height: 1.2;
  color: #0f172a;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hm-pushlab-mode-card__desc {
  font-size: 10.5px;
  line-height: 1.28;
  color: #475569;
  min-width: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.hm-pushlab-user-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  height: 31px;
  padding: 0 10px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #94a3b8;
  color: #0f172a;
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.hm-pushlab-user-bar:hover {
  border-color: #0284c7;
  background: #f8fafc;
}

.hm-pushlab-user-bar__name {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

.hm-pushlab-user-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 360px;
  overflow-y: auto;
  padding: 2px;
}

.hm-pushlab-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}

.hm-pushlab-user-row:hover {
  border-color: #38bdf8;
  background: #f0f9ff;
}

.hm-pushlab-user-row.is-selected {
  border: 1.5px solid #0d9488;
  background: #f0fdfa;
}

.hm-pushlab-media-variants {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 8px;
  margin-top: 8px;
}

@media (max-width: 640px) {
  .hm-pushlab-media-variants {
    grid-template-columns: minmax(0, 1fr);
  }
}

.hm-icon-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(98px, 1fr));
  gap: 6px;
  margin-top: 6px;
}

.hm-icon-picker-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 5px;
  min-height: 64px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}

.hm-icon-picker-tile:hover {
  border-color: #0284c7;
  background: #f8fafc;
}

.hm-icon-picker-tile.is-selected {
  border: 2px solid #0d9488;
  background: #f0fdfa;
}

.hm-icon-picker-tile img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.hm-icon-picker-tile__lbl {
  font-size: 10px;
  font-weight: 700;
  line-height: 1.15;
  color: #334155;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hm-srv-fill-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
}

.hm-srv-weekly-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
}

.hm-srv-day-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.hm-closed-dates-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

/* =========================================================================
 * v2.18.0 — Grid Pagination, Bulk Log Delete, Monotonic Workflow Stepper &
 *           User-Profile Sync Verification Banner
 * ========================================================================= */
.hm-grid-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  padding: 8px 12px;
  margin-top: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 11.5px;
  color: #334155;
}

.hm-grid-pager__left,
.hm-grid-pager__right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.hm-grid-pager__range {
  font-size: 11.5px;
  color: #475569;
}

.hm-grid-pager__info {
  font-size: 11.5px;
  color: #334155;
  padding: 0 4px;
  white-space: nowrap;
}

.hm-grid-pager__size-lbl {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 5px !important;
  margin: 0 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #475569 !important;
  white-space: nowrap;
}

select.hm-grid-pager__size-sel {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 64px !important;
  min-width: 64px !important;
  max-width: 72px !important;
  height: 26px !important;
  min-height: 26px !important;
  max-height: 26px !important;
  line-height: 24px !important;
  padding: 0 22px 0 8px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  border-radius: 5px;
  border: 1px solid #cbd5e1;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 11px 11px;
  cursor: pointer;
}

.hm-grid-pager__nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border-radius: 5px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.hm-grid-pager__nav-btn:hover:not(:disabled) {
  background: #eff6ff;
  border-color: #60a5fa;
  color: #1d4ed8;
}

.hm-grid-pager__nav-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.hm-btn-danger-outline {
  border-color: #fca5a5 !important;
  color: #b91c1c !important;
  background: #fff5f5 !important;
}

.hm-btn-danger-outline:hover:not(:disabled) {
  background: #fee2e2 !important;
  border-color: #ef4444 !important;
}

input.hm-row-check {
  width: 15px !important;
  height: 15px !important;
  min-height: 15px !important;
  margin: 0 !important;
  padding: 0 !important;
  cursor: pointer;
  accent-color: #0284c7;
  vertical-align: middle;
}

.hm-workflow-stepper {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 6px;
}

.hm-workflow-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 9px;
  border-radius: 7px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  font-size: 11.5px;
}

.hm-workflow-step.is-done {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #64748b;
}

.hm-workflow-step.is-current {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #1e3a8a;
  font-weight: 700;
}

.hm-workflow-step.is-locked {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.hm-profile-sync-banner {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #86efac;
  background: #f0fdf4;
  color: #14532d;
  font-size: 11.5px;
  line-height: 1.38;
}

.hm-profile-sync-banner--warn {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #78350f;
}

.hm-user-cancel-lock-box {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #fca5a5;
  background: #fef2f2;
  color: #991b1b;
  font-size: 11.5px;
  line-height: 1.38;
}

.hm-slot-occ-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  font-size: 11px;
  margin-bottom: 4px;
}

.hm-slot-occ-row.is-occupied {
  background: #fff1f2;
  border-color: #fecdd3;
}

.hm-slot-occ-row.is-partial {
  background: #fffbeb;
  border-color: #fde68a;
}
