/* HappyM brand */
.auth-brand-logo {
    max-width: min(100%, 320px);
    width: 100%;
    height: auto;
    display: block;
    margin-inline: auto;
}

.home-brand-logo {
    max-width: min(100%, 400px);
    width: 100%;
    height: auto;
    display: block;
    margin-inline: auto;
}

.home-brand-slogan {
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.auth-brand-logo--login {
    max-width: min(100%, 440px);
}

.auth-brand-slogan--login {
    color: #07315f;
    font-size: 1rem;
    font-weight: 600;
    font-style: italic;
    letter-spacing: 0.01em;
    line-height: 1.4;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}

.auth-brand-version {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.auth-brand-slogan__quote {
    font-style: normal;
    font-weight: 700;
    opacity: 0.85;
}

.auth-brand-slogan__quote:first-child {
    margin-right: 0.2em;
}

.auth-brand-slogan__quote:last-child {
    margin-left: 0.15em;
}

.auth-brand-link--enter {
    animation: auth-brand-logo-enter 0.95s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes auth-brand-logo-enter {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-brand-link--enter {
        animation: none;
    }
}

.auth-brand-link {
    line-height: 0;
}

.navbar-brand-logo {
    max-width: 140px;
    width: 100%;
    height: auto;
    display: block;
}

/* Top toolbar compatta: recupera spazio utile sotto. */
.adminheader.navbar-top {
    min-height: 2.65rem;
    padding-top: 0.2rem !important;
    padding-bottom: 0.2rem !important;
    align-items: center;
}

.adminheader.navbar-top .navbar-nav-icons .btn-sm {
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
    font-size: 0.8rem;
}

.adminheader.navbar-top .navbar-nav-icons .nav-link {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.pharma-header-brand {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    height: 2.1rem;
    max-width: min(220px, 40vw);
    margin-right: 0.6rem;
    padding: 0.1rem 0;
    overflow: hidden;
    text-decoration: none;
    flex: 0 1 auto;
}

.pharma-header-brand__img {
    display: block;
    height: 1.7rem;
    width: auto;
    max-width: 100%;
    max-height: 1.7rem;
    object-fit: contain;
    object-position: left center;
}

@media (max-width: 576px) {
    .pharma-header-brand {
        max-width: min(150px, 46vw);
        height: 1.9rem;
    }
    .pharma-header-brand__img {
        height: 1.5rem;
        max-height: 1.5rem;
    }
}

/* Titoli elenco più compatti; niente sottotitoli/help inline (Aiuto è in toolbar). */
.page-list-title {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.25;
}

/* -------------------------------------------------------------------------- */
/* Content shell: evita overflow-y “fantasma” su form che non lo richiedono   */
/* Theme Falcon: .content { min-height:100vh; padding-bottom: 6.375rem }      */
/* Footer HappyM è fixed → basta lo spazio footer, non min-height+padding.    */
/* -------------------------------------------------------------------------- */
html {
    overflow-x: hidden;
}

.content {
    background-color: #ffffff !important;
    min-height: 0 !important;
    height: auto !important;
    /* Solo lo spazio del footer NetForges, non il padding Falcon legacy. */
    padding-bottom: var(--happym-footer-height, 42px) !important;
    box-sizing: border-box;
    overflow-x: hidden;
}

.content .content-wrapper {
    background: #ffffff !important;
    min-height: 0 !important;
    /* Lo spazio footer è già su .content: evita doppio padding (50px !important in __css). */
    padding-bottom: 0 !important;
}

/* Pagine full-bleed (liste / organigramma): riempiono senza spingere scrollbar */
.pharmacy-list-page:not(.hm-list-page),
.pharmacy-orgchart-page,
.social-archive:not(.hm-list-page) {
    display: flex;
    flex-direction: column;
    min-height: 0;
    /* Usa quasi tutto il viewport sotto topbar/footer */
    height: calc(100dvh - var(--falcon-top-nav-height, 4.3125rem) - var(--happym-footer-height, 42px) - 0.5rem);
    max-height: calc(100dvh - var(--falcon-top-nav-height, 4.3125rem) - var(--happym-footer-height, 42px) - 0.5rem);
    overflow: hidden;
}

/* Organigramma: riduce padding content e allunga la viewport */
.content:has(.pharmacy-orgchart-page),
.card-body:has(.pharmacy-orgchart-page),
#content:has(.pharmacy-orgchart-page) {
    padding-top: 0.35rem !important;
    padding-bottom: 0.25rem !important;
}

.pharmacy-orgchart-page {
    height: calc(100dvh - var(--falcon-top-nav-height, 4.3125rem) - var(--happym-footer-height, 42px) - 0.15rem);
    max-height: calc(100dvh - var(--falcon-top-nav-height, 4.3125rem) - var(--happym-footer-height, 42px) - 0.15rem);
}

.pharmacy-list-page > .row:last-child,
.social-archive > .hm-archive-grid-row {
    flex: 1 1 auto;
    min-height: 0;
}

.pharmacy-list-page .grid-container,
.social-archive .grid-container {
    min-height: 0;
    height: 100%;
}

/* Canon list chrome — one card, pager inside the card, not on the page footer */
html.hm-list-fit,
body.hm-list-fit {
    overflow-x: hidden;
}

.content:has(.hm-list-page) {
    height: auto !important;
    max-height: none !important;
    padding: 0 2px 0 2px !important;
    overflow: visible !important;
    display: block;
}

.content:has(.hm-list-page) .content-with-sidebar,
.content:has(.hm-list-page) .content-wrapper {
    display: block;
    height: auto;
    max-height: none;
    overflow: visible;
    padding: 0 !important;
    margin: 0;
}

body .content-wrapper > #app.hm-list-page,
#app.hm-list-page,
.hm-list-page.pharmacy-list-page,
.hm-list-page.social-archive,
.hm-list-page {
    display: flex !important;
    flex-direction: column !important;
    min-height: var(--hm-list-fit, calc(100vh - 85px)) !important;
    max-height: var(--hm-list-fit, calc(100vh - 85px)) !important;
    height: var(--hm-list-fit, calc(100vh - 85px)) !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0;
    box-sizing: border-box !important;
}

/* Uncompiled Vue must stay hidden even when #app.hm-list-page forces display:flex */
#app.hm-list-page[v-cloak],
[v-cloak] {
    display: none !important;
}

.hm-list-page > .modal {
    position: fixed !important;
}

.hm-list-page > .alert { flex-shrink: 0; }

.hm-list-page__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-shrink: 0;
    margin: 0 0 2px;
    padding: 5px;
    min-height: 0;
}

.hm-list-page__header .page-list-title {
    margin: 0;
    line-height: 1.2;
    font-size: 1.15rem;
    flex: 0 0 auto;
}
.hm-list-title-filter {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    flex: 0 0 auto;
    margin-right: auto;
    height: 1.35rem;
    padding: 0 0.5rem;
    border: 0;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    max-width: 12rem;
}
.hm-list-title-filter[hidden] { display: none !important; }
.hm-list-title-filter i { font-size: 0.68rem; }
.hm-list-title-filter span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 8ch;
}

.hm-list-page__title-actions {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0;
}

.hm-list-icon-btn {
    width: 1.85rem;
    height: 1.85rem;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #c5d0dc;
    border-radius: 0.4rem;
    background: linear-gradient(180deg, #ffffff 0%, #e8eef4 100%);
    box-shadow: inset 0 1px 0 #fff, 0 2px 4px rgba(15, 23, 42, 0.14);
    color: #334155;
    cursor: pointer;
}

.hm-list-icon-btn:hover {
    filter: brightness(0.98);
    box-shadow: inset 0 1px 0 #fff, 0 3px 6px rgba(15, 23, 42, 0.18);
}

.hm-list-icon-btn:active {
    background: linear-gradient(180deg, #e8eef4 0%, #d5dde6 100%);
    box-shadow: inset 0 2px 3px rgba(15, 23, 42, 0.16);
}

.hm-list-icon-btn--excel { color: #1d6f42; }
.hm-list-icon-btn--excel i { color: #217346; }
.hm-list-icon-btn--filter { color: #1d4ed8; }
.hm-list-icon-btn--filter i { color: #2563eb; }

.hm-list-page__card {
    flex: 1 1 0% !important;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #dce3eb;
    border-radius: 0.75rem;
    padding: 8px;
    overflow: hidden;
}

.hm-list-toolbar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    flex-wrap: nowrap;
    background: #eef2f6;
    border-radius: 0.5rem;
    padding: 0 5px;
    margin: 0;
    overflow: hidden;
}

.hm-list-page--expanded-toolbar .hm-list-toolbar {
    padding: 5px 10px;
}

.hm-list-toolbar .hm-archive-action {
    min-width: 2.7rem;
}

.hm-list-toolbar .hm-archive-action__icon {
    width: 2.05rem;
    height: 2.05rem;
}

.hm-list-toolbar .hm-archive-action__label {
    margin-top: 2px;
}

.hm-list-toolbar__actions,
.hm-list-toolbar__search {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: nowrap;
    min-width: 0;
}

.hm-list-toolbar__search { margin-left: auto; }

.hm-list-toolbar__search .form-control,
.hm-list-toolbar__search .form-select {
    min-width: 8rem;
    max-width: 14rem;
}

.hm-list-page__grid {
    flex: 1 1 0%;
    height: 0;
    min-height: 0 !important;
    margin-top: 8px;
    background: #fff;
    border: 2px solid #b7c2ce;
    border-radius: 0.45rem;
    overflow: hidden;
}

.hm-list-page__grid .e-gridtoolbar,
.hm-list-page__grid .e-toolbar {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

.hm-list-page .e-grid .e-row.e-altrow .e-rowcell,
.hm-list-page .e-grid .e-altrow {
    background-color: var(--hm-list-alt, #f3f1ec) !important;
}

.hm-list-page--compact-pager .e-gridpager,
.hm-list-page--compact-pager .e-pager {
    padding: 2px 6px !important;
    min-height: 0 !important;
    font-size: 0.75rem;
}

.hm-list-page--compact-toolbar .hm-archive-action__icon {
    width: 1.85rem;
    height: 1.85rem;
}

.hm-list-page--compact-toolbar .hm-archive-action__label { font-size: 0.62rem; }

.hm-list-page--compact-rows .e-rowcell { padding-top: 2px !important; padding-bottom: 2px !important; }

.hm-list-icon-btn--settings i { color: #7c3aed; }

.hm-list-settings .form-shell-legend { display: none !important; }
.hm-list-settings__dlg { max-width: 34rem !important; width: calc(100% - 1.5rem); }
.hm-list-settings__panel {
    background: #e6e8ec;
    border: 1px solid #fff;
    border-radius: 2px;
    color: #1f2937;
    box-shadow: none;
    font-size: 0.75rem;
}
.hm-list-settings__head {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 6px 10px;
    background: #d4d8de;
    border-bottom: 1px solid #fff;
    color: #111827;
}
.hm-list-settings__head .modal-title {
    margin: 0;
    flex: 1 1 auto;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.hm-list-settings__head > i { width: 1rem; text-align: center; }
.hm-list-settings__head .btn-close { margin: 0; opacity: 1; }
.hm-list-settings__body { padding: 6px 8px 8px; }
.hm-list-settings .form-shell-tabs-scroll,
.hm-list-settings .form-shell-tabs-nav-prev,
.hm-list-settings .form-shell-tabs-nav-next { display: none !important; }
.hm-list-settings .form-shell-tabs-nav { overflow: visible; }
.hm-list-settings .form-shell-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 2px;
    width: 100%;
    margin: 0;
}
.hm-list-settings .form-shell-tab-button {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 3.6rem;
    padding: 4px 8px 5px;
    line-height: 1.1;
    font-weight: 600;
}
.hm-list-settings .form-shell-tab-button i { font-size: 0.95rem; line-height: 1; }
.hm-list-settings .form-shell-tab-button span { font-size: 0.62rem; letter-spacing: 0.01em; }
.hm-list-settings .form-shell-tabs-body {
    display: grid;
    grid-template-areas: "tab";
}
.hm-list-settings .form-shell-section {
    grid-area: tab;
    min-height: 16.5rem;
    overflow: hidden;
    box-sizing: border-box;
}
.hm-list-settings .form-shell-inactive {
    visibility: hidden;
    pointer-events: none;
}
.hm-list-settings__opts {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2px 8px;
}
.hm-list-settings__chk {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    min-height: 1.25rem;
    white-space: nowrap;
}
.hm-list-settings__chk input { margin: 0; }
.hm-list-settings__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 10px;
    margin-top: 6px;
}
.hm-list-settings__fld {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin: 0;
}
.hm-list-settings__fld select,
.hm-list-settings__fld input[type="number"],
.hm-list-settings__fld input[type="date"],
.hm-list-settings__fld input[type="text"] {
    width: 4.5rem;
    max-width: 100%;
    height: 1.4rem;
    padding: 0 4px;
    border: 1px solid #9aa3ad;
    background: #fff;
    color: #111827;
    font-size: 0.72rem;
}
.hm-list-settings__fld--color {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    min-height: 1.25rem;
}
.hm-list-settings__fld--color span {
    line-height: 1.15rem;
    display: flex;
    align-items: center;
}
.hm-list-settings__fld--color input[type="color"] {
    -webkit-appearance: none;
    appearance: none;
    width: 1.15rem;
    height: 1.15rem;
    padding: 0;
    margin: 0;
    border: 1px solid #9aa3ad;
    background: transparent;
    flex: 0 0 1.15rem;
    display: block;
}
.hm-list-settings__fld--color input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.hm-list-settings__fld--color input[type="color"]::-webkit-color-swatch { border: 0; }
.hm-list-settings__fld--color input[type="color"]::-moz-color-swatch { border: 0; }
.hm-list-settings__foot {
    padding: 6px 10px;
    background: #d4d8de;
    border-top: 1px solid #fff;
}
.hm-list-colcfg-wrap {
    max-height: 13.5rem;
    overflow: auto;
    border: 1px solid #b7c2ce;
    background: #fff;
    box-sizing: border-box;
}
.hm-list-colcfg-grid {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    background: #fff;
    font-size: 0.72rem;
}
.hm-list-colcfg-grid th,
.hm-list-colcfg-grid td {
    padding: 2px 6px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    height: 1.35rem;
    box-sizing: border-box;
}
.hm-list-colcfg-grid th {
    background: #dce3eb;
    font-weight: 600;
    border-bottom: 1px solid #b7c2ce;
    position: sticky;
    top: 0;
}
.hm-list-colcfg-grid th i { font-size: 0.75rem; color: #334155; }
.hm-list-colcfg-bar { display: flex; justify-content: flex-end; margin-bottom: 4px; }
.hm-list-colcfg-grid th:first-child,
.hm-list-colcfg-grid td:first-child,
.hm-list-colcfg-grid th:nth-child(3),
.hm-list-colcfg-grid td:nth-child(3),
.hm-list-colcfg-grid th:nth-child(4),
.hm-list-colcfg-grid td:nth-child(4),
.hm-list-colcfg-grid th:nth-child(6),
.hm-list-colcfg-grid td:nth-child(6) { width: 2.1rem; text-align: center; }
.hm-list-colcfg-grid th:nth-child(5),
.hm-list-colcfg-grid td:nth-child(5) { width: 4.4rem; }
.hm-list-colcfg-grid td select { width: 100%; height: 1.25rem; font-size: 0.65rem; }
.hm-list-colcfg__combo {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex: 0 0 auto;
    height: 1.2rem;
    padding: 0 4px;
    border: 1px solid #9aa3ad;
    background: #fff;
    cursor: pointer;
}
.hm-list-colcfg__dots { display: inline-flex; align-items: center; gap: 1px; }
.hm-list-colcfg__dots i {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    display: inline-block;
}
.hm-list-colcfg__hid {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}
.hm-list-colcfg-pick { z-index: 1100; }
.hm-list-colcfg-pick input[type="color"] {
    width: 0.85rem;
    height: 0.85rem;
    padding: 0;
    border: 1px solid #9aa3ad;
    background: transparent;
    cursor: pointer;
}
.hm-list-colcfg-pick input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.hm-list-colcfg-pick input[type="color"]::-webkit-color-swatch { border: 0; }
.hm-list-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    background: color-mix(in srgb, var(--hm-st, #64748b) 22%, #fff);
    color: var(--hm-st, #334155);
}
.hm-list-st-click { cursor: pointer; }
.hm-list-bool { font-size: 0.85rem; }
.hm-list-status-pick {
    position: fixed;
    z-index: 1090;
    min-width: 8rem;
    padding: 4px 0;
    background: #e6e8ec;
    border: 1px solid #fff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
}
.hm-list-status-pick button {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    border: 0;
    background: transparent;
    padding: 3px 8px;
    font-size: 0.72rem;
    cursor: pointer;
}
.hm-list-status-pick button:hover { background: #d4d8de; }
.hm-list-status-pick i { width: 0.7rem; height: 0.7rem; border-radius: 50%; }
.hm-list-colcfg__name {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    position: relative;
}
.hm-list-colcfg__label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hm-list-filter-chip { display: none !important; }
.hm-list-filter-more {
    width: 2.1rem;
    height: 2.1rem;
    border: 1px solid #c5d0dc;
    border-radius: 0.3rem;
    background: #fff;
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
}
.hm-list-filter-more.is-on {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1d4ed8;
}
.hm-list-filter-pick {
    position: fixed;
    z-index: 1080;
    min-width: 10rem;
    padding: 4px 0;
    background: #e6e8ec;
    border: 1px solid #fff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
}
.hm-list-filter-pick__item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    border: 0;
    background: transparent;
    padding: 4px 10px;
    font-size: 0.75rem;
    text-align: left;
    color: #111827;
    cursor: pointer;
}
.hm-list-filter-pick__item:hover,
.hm-list-filter-pick__item.is-on { background: #d4d8de; }
.hm-list-ff-query { overflow-y: auto; max-height: 14rem; padding-right: 2px; }
.hm-list-ff-query .hm-list-settings__fld { margin-top: 6px; }
.hm-list-ff-query .hm-list-settings__fld select,
.hm-list-ff-query .hm-list-settings__fld input[type="date"],
.hm-list-ff-query .hm-list-settings__fld input[type="text"] { width: 100%; max-width: 11rem; }
.hm-list-ff-msg { margin: 6px 0 0; color: #b45309; font-size: 0.72rem; }
.hm-list-ff-saved { overflow-y: auto; max-height: 14rem; }
.hm-list-ff-row { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid #d1d5db; }
.hm-list-ff-row.is-on { background: #dce3eb; }
.hm-list-ff-use {
    flex: 1;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 4px 6px;
    font-size: 0.75rem;
    cursor: pointer;
}
.hm-list-ff-del { border: 0; background: transparent; color: #64748b; cursor: pointer; }
.hm-list-row-menu { min-width: 11rem; padding: 4px 0; }
.hm-list-row-menu .dropdown-item,
.hm-list-row-menu .dropdown-item.text-danger,
.hm-archive-row-menu .dropdown-item,
.hm-archive-row-menu .dropdown-item.text-danger {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    padding: 0.28rem 0.7rem !important;
    margin: 0;
    box-sizing: border-box;
}
.hm-list-row-menu .dropdown-item i,
.hm-list-row-menu .dropdown-item.text-danger i,
.hm-archive-row-menu .dropdown-item i,
.hm-archive-row-menu .dropdown-item.text-danger i {
    flex: 0 0 0.95rem;
    width: 0.95rem;
    text-align: center;
    color: #475569;
}
.hm-list-row-menu .dropdown-item.text-danger i,
.hm-archive-row-menu .dropdown-item.text-danger i { color: inherit; }

.hm-list-page__grid .e-grid {
    border: 0;
    height: 100% !important;
    max-height: 100% !important;
}

.hm-list-page__grid .e-gridheader,
.hm-list-page__grid .e-grid .e-gridheader {
    overflow: hidden !important;
}

.hm-list-page__grid .e-grid .e-columnheader .e-headercell {
    padding: 0.18rem 0.45rem !important;
    height: 1.85rem !important;
    box-sizing: border-box;
}

.hm-list-page__grid .e-grid .e-headercell .e-headercelldiv {
    height: 1.25rem !important;
    min-height: 1.25rem !important;
    max-height: 1.25rem !important;
    line-height: 1.25rem !important;
    padding: 0 1.4rem 0 0 !important;
    margin: 0 !important;
    box-sizing: border-box;
}

.hm-list-page__grid .e-gridcontent {
    min-height: 0 !important;
    overflow: auto !important;
}

.hm-list-page__grid .e-gridpager,
.hm-list-page__grid .e-pager {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center !important;
    visibility: visible !important;
    border-top: 1px solid #e2e8f0;
    min-height: 2rem !important;
    height: auto !important;
    padding: 4px 8px !important;
    box-sizing: border-box;
    gap: 0 0.45rem;
}
.hm-list-page__grid .e-pager .e-pagercontainer,
.hm-list-page__grid .e-pager .e-parentmsgbar,
.hm-list-page__grid .e-pager .e-pagesizes,
.hm-list-page__grid .e-pager .e-pagerdropdown {
    display: inline-flex !important;
    align-items: center !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
    vertical-align: middle;
}
.hm-list-page__grid .e-pager .e-parentmsgbar {
    margin-left: auto !important;
    gap: 0.4rem;
}
.hm-list-page__grid .e-pager .e-numericitem,
.hm-list-page__grid .e-pager .e-firstpage,
.hm-list-page__grid .e-pager .e-prevpage,
.hm-list-page__grid .e-pager .e-nextpage,
.hm-list-page__grid .e-pager .e-lastpage,
.hm-list-page__grid .e-pager .e-currentitem,
.hm-list-page__grid .e-pager .e-first,
.hm-list-page__grid .e-pager .e-prev,
.hm-list-page__grid .e-pager .e-next,
.hm-list-page__grid .e-pager .e-last {
    height: 1.65rem !important;
    min-height: 1.65rem !important;
    max-height: 1.65rem !important;
    line-height: 1.65rem !important;
    box-sizing: border-box;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    vertical-align: middle;
}
.hm-list-page__grid .e-pager .e-pagenomsg,
.hm-list-page__grid .e-pager .e-pagecountmsg,
.hm-list-page__grid .e-pager .e-pagerconstant {
    display: inline-flex !important;
    align-items: center !important;
    float: none !important;
    height: 1.65rem !important;
    line-height: 1.65rem !important;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: middle;
}
.hm-list-page__grid .e-pager .e-pagerconstant {
    margin-left: 0.55rem !important;
}
.hm-list-page__grid .e-pager .e-ddl,
.hm-list-page__grid .e-pager .e-input-group,
.hm-list-page__grid .e-pager .e-control-wrapper {
    height: 1.65rem !important;
    min-height: 1.65rem !important;
    max-height: 1.65rem !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
}
.hm-list-page__grid .e-pager .e-input-group .e-input,
.hm-list-page__grid .e-pager input.e-input {
    height: 1.65rem !important;
    min-height: 0 !important;
    padding: 0 0.35rem !important;
    line-height: 1.65rem !important;
    box-sizing: border-box !important;
}
.hm-list-page__grid .e-pager .e-input-group-icon,
.hm-list-page__grid .e-pager .e-ddl-icon {
    height: 1.65rem !important;
    min-height: 0 !important;
    width: 1.35rem !important;
    line-height: 1.65rem !important;
    margin: 0 !important;
    padding: 0 !important;
}
.hm-list-page__grid .e-pager .e-alldrop.e-input-group,
.hm-list-page__grid .e-pager .e-alldrop.e-ddl,
.hm-list-page__grid .e-pager .e-alldrop.e-control-wrapper {
    min-height: 27px !important;
    height: 27px !important;
    max-height: 27px !important;
}

.hm-list-row-act {
    width: 1.85rem;
    height: 1.85rem;
    border: 0;
    border-radius: 0.4rem;
    background: #e2e8f0;
    color: #334155;
    cursor: pointer;
}

.hm-list-row-act:hover { background: #cbd5e1; color: #0f172a; }
.hm-list-row-act--ok { background: #dcfce7; color: #15803d; }
.hm-list-row-act--warn { background: #ffedd5; color: #c2410c; }

.hm-list-page.social-archive .grid-container {
    min-height: 0;
}

.social-archive .hm-archive-fallback-wrap {
    height: 100%;
    min-height: 20rem;
    overflow: auto;
    background: #fff;
}

.grid-container {
    margin-bottom: 0;
}

/* -------------------------------------------------------------------------- */
/* Organigramma — tree HTML moderno                                            */
/* -------------------------------------------------------------------------- */
.pharmacy-orgchart-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
    flex: 0 0 auto;
    margin-bottom: 0.4rem;
}

.pharmacy-orgchart-filter {
    width: auto;
    min-width: 220px;
    max-width: 320px;
}

.pharmacy-orgchart-viewport {
    flex: 1 1 auto;
    /* Toolbar + alert ~3.5rem; il resto va alla vista */
    min-height: calc(100dvh - var(--falcon-top-nav-height, 4.3125rem) - var(--happym-footer-height, 42px) - 3.75rem);
    height: 100%;
    position: relative;
    border: 1px solid #dbe3ef;
    border-radius: 0.75rem;
    background:
        radial-gradient(circle at 12% 8%, rgba(14, 116, 144, 0.08), transparent 42%),
        radial-gradient(circle at 88% 12%, rgba(15, 118, 110, 0.07), transparent 40%),
        linear-gradient(180deg, #f4f7fb 0%, #eef3f8 100%);
    overflow: hidden;
    cursor: grab;
    user-select: none;
}

.pharmacy-orgchart-viewport.is-panning {
    cursor: grabbing;
}

.pharmacy-orgchart-viewport.is-loading,
.pharmacy-orgchart-viewport.is-empty {
    opacity: 0.55;
    pointer-events: none;
}

.pharmacy-orgchart-stage {
    position: absolute;
    left: 0;
    top: 0;
    will-change: transform;
    transition: transform 160ms ease;
    padding: 0.5rem;
    min-width: 280px;
    min-height: 200px;
}

/* Fallback: se transform non applica ancora, il contenuto resta nel flusso visibile */
.pharmacy-orgchart-viewport:not(.is-loading):not(.is-empty) .org-tree {
    min-height: 120px;
}

/* Tree connectors */
.org-tree {
    display: flex;
    justify-content: center;
    padding-top: 1.25rem;
    position: relative;
    margin: 0;
    list-style: none;
}

.org-tree__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 1.25rem 0.75rem 0;
    text-align: center;
}

.org-tree__item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    border-left: 2px solid #94a3b8;
    height: 1.25rem;
    transform: translateX(-50%);
}

.org-tree > .org-tree__item::before {
    display: none;
}

.org-tree--branch {
    display: flex;
    justify-content: center;
    padding-top: 1.25rem;
    position: relative;
    margin: 0;
    list-style: none;
}

.org-tree--branch::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    border-left: 2px solid #94a3b8;
    height: 1.25rem;
    transform: translateX(-50%);
}

.org-tree--branch > .org-tree__item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    border-top: 2px solid #94a3b8;
    width: 100%;
}

.org-tree--branch > .org-tree__item:first-child::after {
    left: 50%;
    width: 50%;
}

.org-tree--branch > .org-tree__item:last-child::after {
    left: 0;
    width: 50%;
}

.org-tree--branch > .org-tree__item:only-child::after {
    display: none;
}

/* Cards */
.org-card {
    position: relative;
    width: 220px;
    text-align: left;
    border-radius: 0.85rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    transition: transform 140ms ease, box-shadow 140ms ease;
}

.org-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
}

.org-card__accent {
    height: 4px;
    width: 100%;
}

.org-card--group {
    width: 260px;
    border-color: #bfdbfe;
    background: linear-gradient(180deg, #eff6ff 0%, #ffffff 55%);
}
.org-card--group .org-card__accent { background: linear-gradient(90deg, #1d4ed8, #0ea5e9); }

.org-card--pharmacy {
    border-color: #99f6e4;
    background: linear-gradient(180deg, #f0fdfa 0%, #ffffff 55%);
}
.org-card--pharmacy .org-card__accent { background: linear-gradient(90deg, #0f766e, #14b8a6); }

.org-card--person {
    width: 200px;
    border-color: #e2e8f0;
}
.org-card--person .org-card__accent { background: linear-gradient(90deg, #475569, #94a3b8); }

.org-card__body {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.75rem 0.75rem 0.4rem;
}

.org-card__photo {
    flex: 0 0 auto;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    object-fit: cover;
    background: #e2e8f0;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #e2e8f0;
}

.org-card__link {
    font-size: 0.7rem;
    font-weight: 600;
    color: #1d4ed8;
    text-decoration: none;
}
.org-card__link:hover { text-decoration: underline; }

.org-roles-plus {
    display: inline-flex;
    align-items: center;
    margin-left: 0.25rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: #e0e7ff;
    color: #3730a3;
    font-size: 0.65rem;
    font-weight: 700;
    cursor: help;
}

.org-card__text {
    flex: 1 1 auto;
    min-width: 0;
}

.org-card__title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
    margin-bottom: 0.15rem;
}

.org-card__meta {
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.3;
    word-break: break-word;
}

.org-card__toggle {
    flex: 0 0 auto;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
    display: inline-grid;
    place-items: center;
    font-size: 0.7rem;
    line-height: 1;
    cursor: pointer;
    transition: background 120ms ease, border-color 120ms ease;
}

.org-card__toggle:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.org-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0 0.75rem 0.7rem;
}

.org-chip {
    display: inline-flex;
    align-items: center;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
}

.org-chip--code { background: #e2e8f0; color: #334155; }
.org-chip--ok { background: #dcfce7; color: #166534; }
.org-chip--warn { background: #ffedd5; color: #9a3412; }
.org-chip--muted { background: #f1f5f9; color: #64748b; }

.grid-container .e-grid {
    border: 1px solid #e3e6ed;
    border-radius: 0.35rem;
    background: #fff !important;
}

.grid-container .e-gridheader,
.grid-container .e-gridcontent,
.grid-container .e-content,
.grid-container .e-gridpager,
.grid-container .e-pager,
.grid-container .e-toolbar,
.grid-container .e-gridtoolbar {
    background: #fff !important;
    margin: 0 !important;
}

/* Header griglia: mai a capo, niente clip verticale, tooltip = headerText (HmGrid). */
.grid-container .e-grid .e-gridheader {
    overflow: visible !important;
}

.grid-container .e-grid .e-headercontent {
    overflow: visible !important;
}

.grid-container .e-grid .e-columnheader .e-headercell {
    padding: 0.45rem 0.65rem 0.45rem 0.55rem !important;
    height: 2.35rem !important;
    vertical-align: middle;
    overflow: visible !important;
    box-sizing: border-box;
}

/* Spazio per menu colonna (⋮) così il testo non finisce sotto / non viene tagliato. */
.grid-container .e-grid.e-default .e-headercell .e-headercelldiv,
.grid-container .e-grid .e-headercell .e-headercelldiv {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis;
    height: 1.5rem !important;
    min-height: 1.5rem !important;
    max-height: 1.5rem !important;
    line-height: 1.5rem !important;
    padding: 0 1.6rem 0 0 !important;
    margin: 0 !important;
    box-sizing: border-box;
    display: block !important;
}

.grid-container .e-grid .e-headercell .e-headertext {
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.5rem !important;
    height: 1.5rem !important;
    display: inline-block;
    max-width: 100%;
    vertical-align: top;
    padding: 0 !important;
    margin: 0 !important;
}

.grid-container .e-grid .e-headercell.e-centeralign .e-headercelldiv {
    padding-right: 1.35rem !important;
    text-align: center;
}

.grid-bool-header,
.grid-col-icon-header {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    font-size: 0.9rem;
    color: #475569;
    line-height: 1;
    vertical-align: middle;
    cursor: default;
}

.grid-bool-header i,
.grid-col-icon-header i {
    line-height: 1;
    pointer-events: none;
}

.user-grid-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0.15rem 0;
}

.user-grid-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: #e2e8f0;
    border: 1px solid #e2e8f0;
    display: block;
}

.change-role-modal__dialog {
    height: min(80vh, 36rem);
    max-height: 80vh;
    margin: 1.75rem auto;
    display: flex;
}

.change-role-modal__content {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
}

.change-role-modal__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0.75rem !important;
}

.change-role-modal__grid {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.change-role-modal__grid > div {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
}

.change-role-modal__grid .e-grid {
    height: 100% !important;
}

/* Sync highlight Dipendente ↔ Account (ADR-044) */
.hm-field-from-employee {
    background: #fff7ed;
    border-radius: 0.4rem;
    padding: 0.45rem 0.55rem;
    border: 1px solid #fed7aa;
}

.hm-field-from-employee .form-control,
.hm-field-from-employee .form-control-color,
.hm-field-from-employee .e-input-group,
.hm-field-from-employee .e-control-wrapper,
.hm-field-from-employee .e-float-input {
    background-color: #fffbeb !important;
}

.hm-field-from-account {
    background: #eff6ff;
    border-radius: 0.4rem;
    padding: 0.45rem 0.55rem;
    border: 1px solid #bfdbfe;
}

.hm-field-from-account .form-control,
.hm-field-from-account .e-input-group,
.hm-field-from-account .e-control-wrapper {
    background-color: #f8fbff !important;
}

.hm-field-sync-hint {
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 0.2rem;
    margin-bottom: 0;
}

.grid-container .e-gridpager,
.grid-container .e-pager {
    border-top: 1px solid #e3e6ed !important;
    border-bottom: 0 !important;
    padding-top: 0.4rem !important;
    padding-bottom: 0.45rem !important;
    flex-shrink: 0;
}

/* Cella logo: poco padding, thumb più grande. */
.pharmacy-thumb-cell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    cursor: default;
}

.pharmacy-thumb-image {
    width: 56px;
    height: 28px;
    object-fit: contain;
    object-position: center;
    border-radius: 0.25rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: block;
}

/* Popover hover (ancorato a body via JS — non clipato dalla griglia). */
.pharmacy-hover-popover {
    position: fixed;
    z-index: 2000;
    width: 300px;
    padding: 0.75rem;
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 0.5rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
    text-align: left;
    pointer-events: none;
}

.pharmacy-hover-popover[hidden] {
    display: none !important;
}

.pharmacy-hover-popover__banner {
    position: relative;
    width: 100%;
    margin-bottom: 0.55rem;
}

/* Anteprima logo: banda rettangolare a tutta larghezza (formato login/header). */
.pharmacy-hover-popover__logo {
    display: block;
    width: 100%;
    height: 52px;
    object-fit: contain;
    object-position: center;
    border-radius: 0.35rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.pharmacy-hover-popover__name {
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
    margin-bottom: 0.15rem;
}

.pharmacy-hover-popover__legal {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.3;
    margin-bottom: 0.35rem;
}

.pharmacy-hover-popover__row {
    font-size: 0.78rem;
    color: #475569;
    line-height: 1.35;
    margin-bottom: 0.15rem;
}

.pharmacy-hover-popover__ids {
    margin-top: 0.4rem;
    padding-top: 0.35rem;
    border-top: 1px solid #e2e8f0;
}

.pharmacy-hover-popover__ids .pharmacy-hover-popover__row {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}

/* Badge stato sovrapposto in alto a destra sul logo. */
.pharmacy-hover-popover__status {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 2;
    display: inline-block;
    margin: 0;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.2;
    background: #e2e8f0;
    color: #334155;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
    max-width: calc(100% - 12px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pharmacy-hover-popover__status.is-active {
    background: #dcfce7;
    color: #166534;
}

.pharmacy-hover-popover__status.is-suspended {
    background: #ffedd5;
    color: #9a3412;
}

.pharmacy-hover-popover__status.is-off {
    background: #fee2e2;
    color: #991b1b;
}

.pharmacy-person-photo {
    width: 4.5rem;
    text-align: center;
}
.pharmacy-person-photo img {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    display: block;
    margin: 0 auto;
}

/* Contatti farmacia/gruppo — griglia compatta */
.contact-people-grid {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.contact-people-row {
    display: grid;
    grid-template-columns: 4.25rem minmax(0, 1fr) auto auto;
    gap: 0.55rem 0.65rem;
    align-items: center;
    padding: 0.5rem 0.6rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    background: #fff;
}

.contact-people-photo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.contact-people-photo img {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.contact-people-photo__upload {
    font-size: 0.65rem;
    padding: 0.05rem 0.35rem;
    line-height: 1.2;
}

.contact-people-body {
    min-width: 0;
}

.contact-people-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.contact-people-line--primary {
    margin-bottom: 0.25rem;
}

.contact-people-input {
    flex: 1 1 8rem;
    min-width: 0;
}

.contact-people-input--name {
    flex: 1.4 1 10rem;
    font-weight: 600;
}

.contact-people-input--role {
    flex: 1 1 7rem;
}

.contact-people-input--phone {
    flex: 0.8 1 6rem;
}

.contact-people-meta {
    margin-top: 0.2rem;
}

.contact-people-row--readonly {
    cursor: default;
}

.contact-people-row--readonly .contact-people-line--secondary {
    gap: 0.65rem;
    font-size: 0.78rem;
}

.contact-people-row--readonly .contact-people-line--secondary > span + span::before {
    content: "·";
    margin-right: 0.65rem;
    color: #94a3b8;
}

.contact-people-row.is-selected {
    border-color: #93c5fd;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.25);
}

.contact-people-name {
    font-size: 0.92rem;
    color: #0f172a;
}

.contact-people-role {
    font-size: 0.78rem;
    color: #475569;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
}

.contact-people-initials {
    font-size: 0.62rem;
    color: #64748b;
    letter-spacing: 0.04em;
}

.contact-form-photo-preview {
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 999px;
    object-fit: cover;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

/* Badge Account/Semplice (anche se person-form-tabs.css non carica) */
.person-form-modal .person-form-modal__header-aside {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-left: auto;
    flex-shrink: 0;
}
.person-form-modal .person-account-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 650;
    line-height: 1.2;
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
    white-space: nowrap;
    cursor: pointer;
    appearance: none;
    font-family: inherit;
}
.person-form-modal .person-account-status-badge.is-simple .person-account-status-badge__icon {
    opacity: 0.35;
}
.person-form-modal .person-account-status-badge.is-linked .person-account-status-badge__icon {
    opacity: 1;
    color: #15803d;
}

.person-form-modal {
    z-index: 1065;
}

.person-account-linked-meta dt {
    font-weight: 500;
}

.person-account-linked-meta dd {
    margin-bottom: 0.35rem;
}

.person-account-modal .e-input-group,
.person-account-modal .e-ddl {
    width: 100%;
}

.contact-people-status {
    justify-self: end;
}

.contact-people-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0.01em;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    white-space: nowrap;
}

.contact-people-badge.is-linked {
    background: #dcfce7;
    color: #166534;
}

.contact-people-badge.is-unlinked {
    background: #f1f5f9;
    color: #64748b;
}

.contact-people-actions {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    justify-self: end;
}

.person-account-modal {
    z-index: 1065;
}

.modal-backdrop.show + .modal-backdrop {
    z-index: 1060;
}

@media (max-width: 768px) {
    .contact-people-row {
        grid-template-columns: 3.5rem minmax(0, 1fr);
    }
    .contact-people-status,
    .contact-people-actions {
        grid-column: 2;
        justify-self: start;
    }
}

.pharmacy-logo-preview-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 72px;
    padding: 0.35rem 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.4rem;
    background: #f8fafc;
}

.pharmacy-logo-preview-img {
    display: block;
    width: 100%;
    height: 56px;
    object-fit: contain;
    object-position: center;
}

.pharmacy-logo-guide {
    margin-top: 0.35rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid #dbe3ef;
    border-radius: 0.4rem;
    background: #f8fafc;
    font-size: 0.78rem;
    color: #334155;
    line-height: 1.4;
}

.pharmacy-logo-guide ul {
    padding-left: 1.1rem;
}

.pharmacy-logo-guide li + li {
    margin-top: 0.2rem;
}

/* Scrollbar orizzontale Syncfusion = striscia grigia tra body griglia e pager. */
.grid-container .e-gridcontent .e-content {
    overflow-x: hidden !important;
}

.grid-container .e-grid .e-scrollbar,
.grid-container .e-gridcontent > .e-scrollbar {
    display: none !important;
    height: 0 !important;
    max-height: 0 !important;
}

/* Modal anagrafica farmacia: densità verticale (meno overflow-Y) su Kit FormShell */
#PharmacyAnagraficaModal .pharmacy-ana-tabs-body {
    --ui-control-tab-body-padding-top: 0.4rem;
    --ui-control-tab-body-padding-right: 0.5rem;
    --ui-control-tab-body-padding-bottom: 0.4rem;
    --ui-control-tab-body-padding-left: 0.5rem;
    display: grid;
    grid-template-areas: "tab";
    align-items: stretch;
}
#PharmacyAnagraficaModal .pharmacy-ana-form {
    display: contents;
}
#PharmacyAnagraficaModal .pharmacy-ana-tabs-body .form-shell-section {
    grid-area: tab;
    min-height: 0;
}

#PharmacyAnagraficaModal .row.g-2,
#PharmacyAnagraficaModal .pharmacy-ana-grid {
    --bs-gutter-y: 0.35rem;
    --bs-gutter-x: 0.55rem;
}

#PharmacyAnagraficaModal .form-label:not(.form-check-label) {
    margin-bottom: 0.08rem;
    font-size: 0.78rem;
}

#PharmacyAnagraficaModal .form-control,
#PharmacyAnagraficaModal .form-select {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    min-height: calc(1.3em + 0.5rem + 2px);
    font-size: 0.875rem;
}

#PharmacyAnagraficaModal textarea.form-control {
    min-height: 0;
}

/* Evita che i campi corti (SDI, anno, N.) si allarghino inutilmente */
#PharmacyAnagraficaModal .pharmacy-ana-grid > [class*="col-md-1"] .form-control,
#PharmacyAnagraficaModal .pharmacy-ana-grid > [class*="col-md-2"] .form-control {
    max-width: 100%;
}

/* Modal canale / Postiz provider sopra modal config farmacia */
#PharmacyChannelModal,
#PostizProviderModal {
    z-index: 1065;
}
body.modal-open .modal-backdrop.show:nth-of-type(2) {
    z-index: 1060;
}
.hm-sm-connect-wait-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.45);
}
.hm-sm-connect-wait-overlay.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
}
.hm-sm-connect-wait-card {
    width: min(22rem, 100%);
    text-align: center;
    padding: 1.5rem 1.25rem;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.28);
}
.hm-sm-connect-wait-card .spinner-border {
    width: 2.25rem;
    height: 2.25rem;
}

/* SweetAlert sopra i modal Bootstrap annidati (config + canale social) */
.swal2-container {
    z-index: 20000 !important;
}

/* Date native: evita testo placeholder tagliato (Kit-Style / line-height stretta). */
.form-control.form-control-date,
input.form-control[type="date"] {
    min-height: 2.5rem;
    height: 2.5rem;
    line-height: 1.4;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
    padding-right: 0.65rem;
    box-sizing: border-box;
    overflow: visible;
}

.form-control.form-control-date::-webkit-datetime-edit,
input.form-control[type="date"]::-webkit-datetime-edit {
    padding: 0;
    line-height: 1.4;
    display: inline-flex;
    align-items: center;
    min-height: 1.35rem;
}

.form-control.form-control-date::-webkit-datetime-edit-fields-wrapper,
input.form-control[type="date"]::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
}

.install-brand-logo {
    max-width: 220px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.footer-brand-logo {
    max-width: 168px;
    width: 100%;
    height: auto;
    display: block;
}

/* -------------------------------------------------------------------------- */
/* Compact / balanced form layout (modals + page forms)                        */
/* Note: form-shell-enhanced body padding is owned by __css.cshtml (specificity). */
/* -------------------------------------------------------------------------- */
.modal-body:not(.form-shell-single-body) {
    --falcon-modal-form-pad-x: 1.35rem;
    --falcon-modal-form-pad-y: 1rem;
    --falcon-modal-form-gutter-x: 1.15rem;
    padding: var(--falcon-modal-form-pad-y) var(--falcon-modal-form-pad-x) !important;
}

/* Keep row gutters from eating modal inset. */
.modal-body > .row,
.modal-body form > .row,
.modal-body .form-shell-tabs-body > .row,
.modal-body .form-shell-section > .row,
.modal-body [data-form-panel] > .row {
    --falcon-gutter-x: var(--falcon-modal-form-gutter-x, 1.15rem);
}

.modal-body > .mb-2,
.modal-body > .mb-3,
.modal-body form > .mb-2,
.modal-body form > .mb-3,
.modal-body .row.mb-2,
.modal-body .row.mb-3 {
    margin-bottom: 0.55rem !important;
}

/* Labels closer to their control (skip checkboxes / error labels / buttons). */
.modal-body > label:not(.form-check-label):not(.text-danger):not(.btn),
.modal-body form > label:not(.form-check-label):not(.text-danger):not(.btn),
.modal-body .row > [class*="col"] > label:not(.form-check-label):not(.text-danger):not(.btn),
.modal-body .mb-2 > label:not(.form-check-label):not(.text-danger):not(.btn),
.modal-body .mb-3 > label:not(.form-check-label):not(.text-danger):not(.btn),
.modal-body .form-label:not(.form-check-label),
.form-card label:not(.form-check-label):not(.text-danger):not(.btn),
.form-card .form-label:not(.form-check-label) {
    display: block;
    margin-top: 0;
    margin-bottom: 0.2rem;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.25;
    color: var(--ui-label-color, #334155);
}

.modal-body .form-control,
.modal-body .form-select,
.modal-body textarea.form-control {
    width: 100%;
    max-width: 100%;
}

.modal-body .form-check {
    margin-top: 0.15rem;
    margin-bottom: 0.15rem;
}

.modal-footer:not(.form-shell-footer-stack) {
    padding-left: var(--falcon-modal-form-pad-x, 1.35rem);
    padding-right: var(--falcon-modal-form-pad-x, 1.35rem);
}

/* Page forms outside modals: same compact label rhythm */
.form-card .row.mb-2,
.form-card .mb-2 {
    margin-bottom: 0.55rem !important;
}

/* prettier-ignore */
/*# sourceMappingURL=user.css.map */

/* Syncfusion DropDownList - Fix selected item text color */
.e-dropdownbase .e-list-item.e-item-focused,
.e-dropdownbase .e-list-item:not(.e-hide-focus):focus,
.e-dropdownbase .e-list-item:hover {
    background-color: rgba(0, 0, 0, 0.075) !important;
}

.e-dropdownbase .e-list-item {
    color: #0f1115 !important;
}

.e-dropdownbase .e-list-item span {
    color: #0f1115 !important;
}

.e-ddl.e-input-group .e-input-value,
.e-ddl.e-input-group input.e-input {
    color: #0f1115 !important;
}

/* Dropdown selected value in form */
.e-control.e-dropdownlist,
.e-ddl {
    color: #0f1115 !important;
}

/* Ensure dropdown popup items have visible text */
.e-dropdownlist .e-list-item {
    color: #212529 !important;
}

.e-dropdownlist .e-list-item .e-list-text {
    color: #212529 !important;
}

/* Validation Banner - fixed toast at top */
.validation-banner {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    padding: 10px 24px;
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    border-radius: 6px;
    color: #842029;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideDown 0.3s ease-out;
}

.validation-banner i {
    color: #dc3545;
    margin-right: 8px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* -------------------------------------------------------------------------- */
/* HappyM.Pharma — dark serious sidebar + fluid layout fixes                   */
/* -------------------------------------------------------------------------- */
:root {
    --happym-navy: #07315F;
    --happym-blue: #0878F8;
    --happym-sidebar-bg: #0b1628;
    --happym-sidebar-width: 14.625rem;
    --happym-sidebar-collapsed-width: 4.125rem;
    --falcon-navbar-vertical-inverted-bg-color: #0b1628;
    --falcon-navbar-vertical-inverted-link-color: rgba(255, 255, 255, 0.78);
    --falcon-navbar-vertical-inverted-link-hover-color: #ffffff;
    --falcon-navbar-vertical-inverted-link-active-color: #7ec4ff;
    --falcon-navbar-vertical-inverted-link-disable-color: rgba(255, 255, 255, 0.35);
    --falcon-navbar-vertical-inverted-hr-color: rgba(255, 255, 255, 0.12);
    --falcon-navbar-vertical-inverted-label-color: rgba(255, 255, 255, 0.55);
    --falcon-navbar-vertical-inverted-scrollbar-color: rgba(182, 193, 210, 0.45);
}

.navbar-vertical > .d-flex.align-items-center {
    align-items: flex-start !important;
    overflow: visible;
    padding-top: 0.35rem;
    padding-bottom: 0.25rem;
    min-height: auto;
}

.navbar-vertical > .d-flex.align-items-center .toggle-icon-wrapper {
    margin-top: 0.15rem;
}

.navbar-brand-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    min-width: 0;
    padding-right: 0.25rem;
    line-height: 1;
    overflow: visible;
}

.navbar-brand-block .navbar-brand {
    margin-right: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 0;
}

.navbar-brand-logo--on-dark {
    max-width: 132px;
    height: auto;
    display: block;
}

.navbar-brand-version {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.15;
    white-space: nowrap;
    margin: -0.05rem 0 0 0.05rem;
    padding: 0;
    align-self: flex-start;
    overflow: visible;
}

.navbar-vertical .navbar-nav .nav-link .nav-link-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 11.5rem;
}

.navbar-vertical .navbar-nav .nav-link {
    white-space: nowrap;
}

.navbar-vertical.navbar-inverted,
.navbar-vertical.navbar-inverted .navbar-collapse,
.navbar-vertical.navbar-vibrant,
.navbar-vertical.navbar-vibrant .navbar-collapse {
    background-color: var(--happym-sidebar-bg) !important;
    background-image: none !important;
}

.navbar-vertical .footer-brand-logo {
    max-width: 168px;
}

.happym-sidebar-brand .footer-brand-logo {
    margin-bottom: 0.25rem;
}

.happym-sidebar-version {
    color: #0f172a !important;
    font-size: 0.8rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.03em;
    margin-top: 0.15rem !important;
    margin-bottom: 0.65rem;
}

/* Expanded sidebar: fixed product width (do NOT stretch to container). */
@media (min-width: 1200px) {
    .navbar-vertical.navbar-expand-xl.navbar-inverted,
    .navbar-vertical.navbar-expand-xl.navbar-vibrant,
    .navbar-vertical.navbar-expand-xl.navbar-card {
        width: var(--happym-sidebar-width);
        max-width: var(--happym-sidebar-width) !important;
    }

    /* Collapsed only — exclude hover-expand or the menu is cut in half. */
    html.navbar-vertical-collapsed:not(.navbar-vertical-collapsed-hover) .navbar-vertical.navbar-expand-xl.navbar-inverted,
    html.navbar-vertical-collapsed:not(.navbar-vertical-collapsed-hover) .navbar-vertical.navbar-expand-xl.navbar-vibrant,
    html.navbar-vertical-collapsed:not(.navbar-vertical-collapsed-hover) .navbar-vertical.navbar-expand-xl.navbar-card {
        width: var(--happym-sidebar-collapsed-width) !important;
        max-width: var(--happym-sidebar-collapsed-width) !important;
        min-width: var(--happym-sidebar-collapsed-width) !important;
    }

    html.navbar-vertical-collapsed:not(.navbar-vertical-collapsed-hover) .navbar-vertical.navbar-expand-xl.navbar-inverted .navbar-collapse,
    html.navbar-vertical-collapsed:not(.navbar-vertical-collapsed-hover) .navbar-vertical.navbar-expand-xl.navbar-vibrant .navbar-collapse,
    html.navbar-vertical-collapsed:not(.navbar-vertical-collapsed-hover) .navbar-vertical.navbar-expand-xl.navbar-card .navbar-collapse {
        width: var(--happym-sidebar-collapsed-width) !important;
        margin-left: 0 !important;
        overflow: hidden;
        background-color: var(--happym-sidebar-bg) !important;
        background-image: none !important;
    }

    html.navbar-vertical-collapsed:not(.navbar-vertical-collapsed-hover) .navbar-vertical.navbar-expand-xl.navbar-inverted + .content,
    html.navbar-vertical-collapsed:not(.navbar-vertical-collapsed-hover) .navbar-vertical.navbar-expand-xl.navbar-vibrant + .content,
    html.navbar-vertical-collapsed:not(.navbar-vertical-collapsed-hover) .navbar-vertical.navbar-expand-xl.navbar-card + .content {
        margin-left: var(--happym-sidebar-collapsed-width) !important;
    }

    /* Hover expand from collapsed: full width again. */
    html.navbar-vertical-collapsed-hover .navbar-vertical.navbar-expand-xl.navbar-inverted,
    html.navbar-vertical-collapsed-hover .navbar-vertical.navbar-expand-xl.navbar-vibrant,
    html.navbar-vertical-collapsed-hover .navbar-vertical.navbar-expand-xl.navbar-card {
        width: var(--happym-sidebar-width) !important;
        max-width: var(--happym-sidebar-width) !important;
        min-width: var(--happym-sidebar-width) !important;
    }

    html.navbar-vertical-collapsed-hover .navbar-vertical.navbar-expand-xl.navbar-inverted .navbar-collapse,
    html.navbar-vertical-collapsed-hover .navbar-vertical.navbar-expand-xl.navbar-vibrant .navbar-collapse,
    html.navbar-vertical-collapsed-hover .navbar-vertical.navbar-expand-xl.navbar-card .navbar-collapse,
    html.navbar-vertical-collapsed-hover .navbar-vertical.navbar-expand-xl.navbar-inverted .navbar-vertical-content,
    html.navbar-vertical-collapsed-hover .navbar-vertical.navbar-expand-xl.navbar-vibrant .navbar-vertical-content,
    html.navbar-vertical-collapsed-hover .navbar-vertical.navbar-expand-xl.navbar-card .navbar-vertical-content {
        width: var(--happym-sidebar-width) !important;
        overflow: visible;
    }

    html.navbar-vertical-collapsed:not(.navbar-vertical-collapsed-hover) .navbar-brand-version {
        display: none;
    }
}

@media (max-width: 1199.98px) {
    .navbar-vertical.navbar-expand-xl {
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
    }
}

/* ---- Image upload (Browse + drop zone) ---- */
.hm-image-upload {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.hm-image-upload__preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 96px;
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #f8fafc;
}

.hm-image-upload__preview img {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
}

.hm-image-upload__preview img.is-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
}

.hm-image-upload__drop {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 0.85rem;
    padding: 0.85rem 1rem;
    border: 1.5px dashed #94a3b8;
    border-radius: 0.55rem;
    background: #f8fafc;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.hm-image-upload__drop.is-dragover {
    border-color: #3b82f6;
    background: #eff6ff;
    box-shadow: inset 0 0 0 1px #93c5fd;
}

.hm-image-upload__drop.is-disabled {
    opacity: 0.55;
    pointer-events: none;
}

.hm-image-upload__hint {
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.35;
}

.hm-image-upload__file {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.hm-image-upload__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

/* Person / User form: solo layout contenuto (geometria tab = kit-tabs.css). */
.person-form-modal .form-shell-tabs-body,
#MainModal .form-shell-tabs-body {
    max-height: none;
    /* Padding destro minimo: scrollbar quasi sul bordo del pannello */
    padding-top: 0.65rem !important;
    padding-bottom: 0.65rem !important;
    padding-left: 0.7rem !important;
    padding-right: 0.15rem !important;
}

.person-form-modal.form-shell-enhanced .form-shell-tabs-body > .form-shell-section:not(.form-shell-inactive),
.person-form-modal .form-shell-tabs-body > .form-shell-section,
#MainModal.form-shell-enhanced .form-shell-tabs-body > .form-shell-section:not(.form-shell-inactive),
#MainModal .form-shell-tabs-body > .form-shell-section {
    max-height: min(42vh, 360px);
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: auto;
    /* Solo un filo tra campi e scrollbar; niente “corridoio” bianco a destra */
    padding: 0 0.2rem 0 0 !important;
    box-sizing: border-box;
}

.person-form-modal .modal-body,
#MainModal .modal-body {
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
    overflow: visible;
}

#MainModal .form-shell-legend,
.person-form-modal .form-shell-legend {
    display: none !important;
}

#MainModal .modal-footer,
.person-form-modal .modal-footer {
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

.user-info-tab {
    display: flex;
    flex-direction: column;
    min-height: 0;
    gap: 0;
}

.user-info-status-row {
    margin-top: 0.15rem;
}

.user-sync-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    max-width: 100%;
}

.user-sync-chip {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.3rem 0.4rem;
    max-width: min(100%, 18rem);
    padding: 0.2rem 0.5rem;
    border: 1px solid #bfdbfe;
    border-radius: 0.35rem;
    background: #eff6ff;
    font-size: 0.7rem;
    line-height: 1.2;
    color: #1e3a5f;
    cursor: pointer;
}

.user-sync-chip:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

.user-sync-chip:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 1px;
}

.user-sync-chip__label {
    font-weight: 650;
    white-space: nowrap;
}

.user-sync-chip__id {
    font-size: 0.65rem;
    color: #be185d;
    background: transparent;
    padding: 0;
    white-space: nowrap;
}

.user-sync-open {
    white-space: nowrap;
    font-size: 0.72rem;
    padding: 0.15rem 0.55rem;
}

.user-social-evidence {
    padding: 0.45rem 0.6rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.4rem;
    background: #f8fafc;
}

.user-social-evidence__title {
    font-size: 0.78rem;
    font-weight: 650;
    color: #334155;
    margin-bottom: 0.15rem;
}

/* Contatto / account: colore + orari */
.person-color-swatch {
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.2);
    padding: 0;
    cursor: pointer;
}

.person-color-swatch.is-active {
    outline: 2px solid #2563eb;
    outline-offset: 1px;
}

.person-schedule-grid {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.person-schedule-row {
    display: grid;
    grid-template-columns: minmax(7rem, 9.5rem) 1fr;
    gap: 0.5rem;
    align-items: center;
    padding: 0.35rem 0.4rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.4rem;
    background: #f8fafc;
}

.person-schedule-day {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.person-schedule-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.75rem;
}

.person-schedule-slots.is-disabled {
    opacity: 0.45;
}

.person-schedule-slot {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.person-schedule-slot .form-control {
    width: 6.2rem;
}

.pharmacy-hours-days {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.pharmacy-hours-day {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.55rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.4rem;
    background: #f8fafc;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0;
    cursor: pointer;
}

.pharmacy-hours-cal-head,
.pharmacy-hours-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.25rem;
}

.pharmacy-hours-cal-head span {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}

.pharmacy-hours-cal-cell {
    aspect-ratio: 1;
    border: 1px solid #e2e8f0;
    border-radius: 0.35rem;
    background: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f172a;
    padding: 0;
}

.pharmacy-hours-cal-cell.is-empty {
    border-color: transparent;
    background: transparent;
    pointer-events: none;
}

.pharmacy-hours-cal-cell.is-selected {
    background: #f59e0b;
    border-color: #d97706;
    color: #fff;
}

.pharmacy-hours-cal-cell:not(.is-empty):hover {
    border-color: #94a3b8;
}

.pharmacy-addr-subtabs .nav-link {
    font-size: 0.85rem;
    padding: 0.35rem 0.75rem;
}

/* Person form: un po’ più alto in scroll */
.person-form-modal.form-shell-enhanced .form-shell-tabs-body > .form-shell-section:not(.form-shell-inactive),
.person-form-modal .form-shell-tabs-body > .form-shell-section {
    max-height: min(52vh, 440px);
}

.person-contacts-group {
    margin-top: 0.9rem;
    padding: 0.85rem 0.9rem 0.75rem;
    border: 1px dashed #94a3b8;
    border-radius: 0.5rem;
}

.person-contacts-group__title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
    margin: -0.15rem 0 0.65rem;
}

.person-lang-host {
    max-width: 22rem;
    width: 100%;
}

.person-lang-add.e-input-group,
.e-input-group.person-lang-add {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    max-width: 22rem;
    width: 100%;
}

.person-lang-add .e-input-group-icon {
    cursor: pointer;
}

/* —— Pharmacy config hub —— */
.pharmacy-config-modal .modal-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.pharmacy-config-modal__header-main {
    flex: 1 1 auto;
    min-width: 0;
}

.pharmacy-config-modal__header-aside {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-left: auto;
    flex-shrink: 0;
}

.pharmacy-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    border: 0;
    cursor: pointer;
    appearance: none;
    font-family: inherit;
    white-space: nowrap;
}

.pharmacy-status-badge.is-active {
    background: #16a34a;
}

.pharmacy-status-badge.is-suspended {
    background: #dc2626;
}

.pharmacy-status-badge.is-other {
    background: #64748b;
}

.pharmacy-status-badge:hover:not(:disabled) {
    filter: brightness(0.95);
}

.pharmacy-status-badge:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.pharmacy-channel-card {
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 0.55rem 0.7rem 0.5rem;
    min-height: 5.25rem;
    height: 100%;
}

.pharmacy-channel-card__top {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 0.55rem;
    align-items: start;
    /* spazio fisso a destra per badge (stessa posizione su ogni card) */
    padding-right: 6.1rem;
    flex: 1 1 auto;
}

.pharmacy-channel-card__icon {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 0.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    font-size: 0.95rem;
}

.pharmacy-channel-card__title {
    font-size: 0.9rem;
    font-weight: 650;
    line-height: 1.2;
}

.pharmacy-channel-card__hint {
    font-size: 0.72rem;
    line-height: 1.25;
    margin-top: 0.1rem;
}

.pharmacy-channel-card__status {
    position: absolute;
    top: 0.5rem;
    right: 0.55rem;
    min-width: 5.5rem;
    text-align: center;
    font-size: 0.65rem;
    font-weight: 650;
    padding: 0.28em 0.45em;
    line-height: 1.2;
}

.pharmacy-channel-card__actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 0.35rem;
    min-height: 1.75rem;
}

.pharmacy-channel-card__actions .btn {
    min-width: 5.5rem;
}

.hm-social-provider-modal .modal-header {
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}

.hm-social-provider-modal .modal-body {
    padding: 1rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hm-social-provider-modal .modal-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid #e2e8f0;
}

.hm-social-provider__icon {
    flex: 0 0 auto;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: #1877f2;
}

.hm-social-provider__icon.is-instagram { background: #e1306c; }
.hm-social-provider__icon.is-linkedin { background: #0a66c2; }
.hm-social-provider__icon.is-x,
.hm-social-provider__icon.is-twitter { background: #111827; }
.hm-social-provider__icon.is-tiktok { background: #111827; }
.hm-social-provider__icon.is-youtube { background: #ff0000; }
.hm-social-provider__icon.is-facebook { background: #1877f2; }

.hm-social-provider__subtitle {
    margin-top: 0.2rem;
    font-size: 0.8125rem;
    line-height: 1.35;
    color: #64748b;
}

.hm-social-provider__enable {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    background: #f8fafc;
    margin: 0;
}

.hm-social-provider__switch {
    flex: 0 0 auto;
    padding-left: 0 !important;
    min-height: 1.5rem !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
}

.hm-social-provider__switch .form-check-input {
    float: none !important;
    position: static !important;
    margin: 0 !important;
    width: 2.5em;
    height: 1.25em;
    cursor: pointer;
}

.hm-social-provider__switch--row {
    padding-top: 0.15rem;
    align-self: flex-start;
}

.hm-social-provider__enable-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin: 0;
    min-width: 0;
    cursor: pointer;
}

.hm-social-provider__hint {
    font-size: 0.78rem;
    line-height: 1.35;
    color: #64748b;
    font-weight: 400;
}

.hm-social-provider__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hm-social-provider__actions .btn {
    min-height: 2.25rem;
}

.hm-social-provider__actions .btn:disabled {
    cursor: not-allowed;
}

.hm-social-provider__section {
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    background: #fff;
    overflow: hidden;
}

.hm-social-provider__section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.9rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.hm-social-provider__section-head h6 {
    font-size: 0.875rem;
    font-weight: 650;
    color: #334155;
}

.hm-social-provider__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.hm-social-provider__badge.is-muted {
    color: #64748b;
    background: #e2e8f0;
}

.hm-social-provider__badge.is-ok {
    color: #0f766e;
    background: #ccfbf1;
}

.hm-social-provider__empty {
    padding: 1rem 0.9rem;
    font-size: 0.84rem;
    line-height: 1.4;
    color: #64748b;
}

.hm-social-provider__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hm-social-provider__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 0.9rem;
    border-top: 1px solid #eef2f7;
}

.hm-social-provider__row:first-child {
    border-top: 0;
}

.hm-social-provider__meta {
    margin-top: 0.2rem;
    font-size: 0.75rem;
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.hm-social-provider__meta code {
    font-size: 0.72rem;
    color: #475569;
}

.hm-social-oauth-meta .hm-hint-field__popup.hm-social-oauth-schema {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    max-width: 36rem;
    margin: 0 0 0.75rem;
}

.hm-sm-settings {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.hm-sm-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.45rem;
}

.hm-sm-status .badge {
    font-weight: 600;
    font-size: 0.72rem;
}

.hm-sm-status__ver {
    margin-left: 0.15rem;
    font-size: 0.75rem;
    color: #64748b;
}

.hm-sm-panel {
    border: 1px solid #e2e8f0;
    border-radius: 0.45rem;
    background: #fff;
    padding: 0.65rem 0.75rem 0.7rem;
}

.hm-sm-panel__head {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.2rem;
}

.hm-sm-panel__head h6 {
    font-size: 0.88rem;
    font-weight: 650;
    color: #1e293b;
}

.hm-sm-panel__hint {
    margin: 0 0 0.55rem;
    font-size: 0.75rem;
    line-height: 1.35;
    color: #64748b;
}

.hm-sm-panel__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.hm-sm-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}
.hm-sm-logo {
    --hm-sm-logo-size: 1.05rem;
    width: var(--hm-sm-logo-size);
    height: var(--hm-sm-logo-size);
    border-radius: 0.28rem;
    background:
        radial-gradient(circle at 30% 30%, #38bdf8 0 28%, transparent 30%),
        radial-gradient(circle at 70% 35%, #a78bfa 0 24%, transparent 26%),
        radial-gradient(circle at 50% 72%, #34d399 0 26%, transparent 28%),
        linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
    flex: 0 0 auto;
}
.hm-sm-how {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 0.5rem;
    padding: 0.55rem 0.75rem;
    background: #f8fafc;
}
.hm-sm-how__summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    color: #334155;
}
.hm-sm-how__body {
    margin-top: 0.55rem;
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.45;
}
.hm-sm-token-note {
    color: #64748b;
}
.hm-social-provider__icon.is-threads { background: #111827; }
.hm-social-provider__icon.is-pinterest { background: #e60023; }
.hm-social-provider__icon.is-reddit { background: #ff4500; }
.hm-social-provider__icon.is-discord { background: #5865f2; }
.hm-social-provider__icon.is-slack { background: #4a154b; }
.hm-social-provider__icon.is-mastodon { background: #6364ff; }
.hm-social-provider__icon.is-gmb { background: #4285f4; }

.hm-sm-app-banner {
    display: none;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65rem;
    padding: 0.55rem 1rem;
    background: linear-gradient(90deg, #b45309, #dc2626);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 1035;
}
.hm-sm-app-banner.is-visible {
    display: flex;
}
.hm-sm-app-banner__icon {
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 0.28rem;
    background:
        radial-gradient(circle at 30% 30%, #fde68a 0 28%, transparent 30%),
        radial-gradient(circle at 70% 35%, #fecaca 0 24%, transparent 26%),
        linear-gradient(135deg, #7f1d1d 0%, #9a3412 100%);
    flex: 0 0 auto;
}
.hm-sm-app-banner__text {
    flex: 1 1 12rem;
}
.hm-sm-app-banner__retry {
    font-weight: 700;
    white-space: nowrap;
}
.hm-sm-app-banner__link {
    color: #fff;
    text-decoration: underline;
    font-weight: 700;
    margin-left: auto;
}
.hm-sm-app-banner a {
    color: #fff;
    text-decoration: underline;
    font-weight: 700;
}

.pharmacy-channel-card.is-alarm {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.35);
    opacity: 0.9;
}
.pharmacy-channel-card.is-alarm .pharmacy-channel-card__top {
    align-items: center;
}

.hm-sm-oauth-table-wrap {
    margin-bottom: 0.35rem;
    /* Allow black ? tooltip to escape the Bootstrap .table-responsive clip. */
    overflow: visible;
}
.hm-sm-oauth-table-wrap.is-engine-offline {
    opacity: 0.78;
}

.hm-sm-oauth-table {
    --bs-table-bg: transparent;
    font-size: 0.8125rem;
}

.hm-sm-oauth-table thead th {
    font-size: 0.72rem;
    font-weight: 650;
    color: #64748b;
    text-transform: none;
    border-bottom-width: 1px;
    white-space: nowrap;
}

.hm-sm-oauth-table td {
    vertical-align: middle;
}

.hm-sm-oauth-table .form-control-sm {
    min-width: 8.5rem;
}

.hm-sm-oauth-network {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
}

.hm-sm-oauth-network .hm-social-provider__icon {
    width: 1.35rem;
    height: 1.35rem;
    font-size: 0.7rem;
}

.hm-sm-oauth-network .hm-hint-field__q {
    flex: 0 0 auto;
}

.hm-sm-oauth-help {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.hm-sm-oauth-help__popup {
    white-space: normal;
    left: 0;
    right: auto;
    width: min(22rem, 78vw);
    text-align: left;
    font-weight: 400;
}

.hm-sm-oauth-help__link {
    color: #93c5fd;
    text-decoration: underline;
}

.hm-sm-oauth-help__link:hover {
    color: #dbeafe;
}

.hm-sm-oauth-status {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.hm-sm-oauth-signal-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.hm-sm-oauth-signal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    line-height: 1;
}

.hm-sm-oauth-signal__shape {
    display: block;
    width: 0.72rem;
    height: 0.72rem;
}

.hm-sm-oauth-signal.is-ok .hm-sm-oauth-signal__shape {
    border-radius: 50%;
    background: #16a34a;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.25);
}

.hm-sm-oauth-signal.is-error .hm-sm-oauth-signal__shape {
    border-radius: 2px;
    background: #dc2626;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.22);
}

.hm-sm-oauth-signal.is-warning .hm-sm-oauth-signal__shape {
    width: 0;
    height: 0;
    border-left: 0.42rem solid transparent;
    border-right: 0.42rem solid transparent;
    border-bottom: 0.72rem solid #d97706;
    background: transparent;
    box-shadow: none;
    filter: drop-shadow(0 0 1px rgba(217, 119, 6, 0.45));
}

.hm-sm-oauth-signal__popup {
    white-space: normal;
    left: 0;
    right: auto;
    width: min(22rem, 78vw);
    text-align: left;
    font-weight: 400;
}

.hm-sm-oauth-signal__popup ol {
    color: #e2e8f0;
}

.hm-sm-oauth-appname {
    display: inline-block;
    max-width: 12rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.8125rem;
    color: #0f172a;
}

.hm-sm-oauth-appname-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 14rem;
}

.hm-sm-oauth-appname.is-empty {
    color: #94a3b8;
    font-style: italic;
}

.hm-sm-token-note {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.35;
    max-width: 42rem;
}

.hm-social-oauth-schema__diagram {
    margin: 0.5rem 0 0;
    padding: 0.55rem 0.65rem;
    border-radius: 0.35rem;
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.72rem;
    line-height: 1.35;
    white-space: pre;
    overflow-x: auto;
}

.pharmacy-capability-group + .pharmacy-capability-group {
    margin-top: 0.5rem;
}

.pharmacy-capability-group__title {
    font-size: 0.8rem;
    font-weight: 650;
    color: #334155;
    margin-bottom: 0;
    text-transform: none;
    letter-spacing: normal;
}

.pharmacy-capability-accordion .pharmacy-capability-group {
    border: 1px solid #e2e8f0;
    border-radius: 0.45rem;
    overflow: hidden;
    background: #fff;
}

.pharmacy-capability-accordion .pharmacy-capability-group.is-expanded {
    border-color: #94a3b8;
    box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.2);
}

.pharmacy-capability-group__toggle {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    margin: 0;
    padding: 0.55rem 0.75rem;
    border: 0;
    background: #f8fafc;
    text-align: left;
    cursor: pointer;
}

.pharmacy-capability-group.is-expanded .pharmacy-capability-group__toggle {
    background: #eef2f7;
    border-bottom: 1px solid #e2e8f0;
}

.pharmacy-capability-group__sign {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 0.25rem;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    flex: 0 0 auto;
}

.pharmacy-capability-group__body {
    padding: 0.75rem;
}

.pharmacy-capability-item {
    border: 1px solid #e2e8f0;
    border-radius: 0.45rem;
    padding: 0.55rem 0.7rem;
    height: 100%;
}

.pharmacy-capability-item__hint {
    font-size: 0.72rem;
    color: #64748b;
    margin: 0.15rem 0 0 1.5rem;
}

.pharmacy-config-readonly-banner {
    font-size: 0.8rem;
}

/* Impostazioni generali: un gruppo per strumento, banda verticale con il nome */
.settings-group {
    display: flex;
    align-items: stretch;
    /* La pagina e' un flex column: senza questo il gruppo si allunga a tutta l'altezza. */
    flex: 0 0 auto;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 1rem;
    background: #fff;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}

.settings-group__label {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 1.9rem;
    padding: 0.5rem 0;
    background: #f1f5f9;
    border-right: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    overflow: hidden;
}

.settings-group__label span {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
    text-align: center;
}

.settings-group__body {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.9rem 1rem;
}

.settings-group--active {
    border-color: #2c7be5;
    background: #f8fbff;
    box-shadow: 0 0 0 1px rgba(44, 123, 229, 0.12);
}

.settings-group--active .settings-group__label {
    background: #2c7be5;
    border-right-color: #2c7be5;
    color: #fff;
}

/* Catalogo LeadFlow di gruppo: righe riepilogative in sola lettura */
.lf-catalog-grid__head,
.lf-catalog-grid__row {
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr) 7rem 8rem 6rem 6rem;
    gap: 0.75rem;
    align-items: start;
}

.lf-catalog-grid__head {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
    padding: 0 0.7rem 0.35rem;
}

.lf-catalog-grid__row {
    border: 1px solid #e2e8f0;
    border-radius: 0.45rem;
    padding: 0.6rem 0.7rem;
    font-size: 0.82rem;
}

.lf-catalog-grid__row + .lf-catalog-grid__row {
    margin-top: 0.4rem;
}

.lf-catalog-grid__type {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #475569;
}

.lf-catalog-grid__icon {
    width: 1.1rem;
    text-align: center;
    color: #2c7be5;
}

.lf-catalog-grid__desc {
    display: block;
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 0.15rem;
}

@media (max-width: 991.98px) {
    .lf-catalog-grid__head {
        display: none;
    }

    .lf-catalog-grid__row {
        grid-template-columns: minmax(0, 1fr) auto;
    }
}

/* Albero LeadFlow farmacia: Canale → Sorgenti/Varianti (compatto) */
.lf-scope-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.35rem;
}

.lf-scope-toolbar__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.85rem;
    min-width: 0;
}

.lf-scope-switch {
    display: inline-flex;
    flex-shrink: 0;
    margin-left: auto;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 2px;
    background: #f8fafc;
}

.lf-scope-switch__btn {
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 0.28rem 0.75rem;
    border-radius: 999px;
    cursor: pointer;
}

.lf-scope-switch__btn.is-active {
    background: #2c7be5;
    color: #fff;
}

.lf-scope-hint {
    margin-bottom: 0.4rem !important;
    line-height: 1.25;
}

.lf-scope-panel {
    border: 0;
    border-radius: 0;
    background: transparent;
    max-height: min(68vh, 36rem);
    overflow-y: auto;
    padding: 0.15rem 0.1rem 0.35rem;
}

.lf-scope-tree {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.lf-scope-tree__channel {
    border: 1px solid #e8edf3;
    border-radius: 0.3rem;
    padding: 0.3rem 0.4rem;
    background: #fff;
}

.lf-scope-tree__channel:nth-child(even) {
    background: #f3f5f8;
}

.lf-scope-tree__channel:nth-child(odd) {
    background: #fff;
}

.lf-scope-tree__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem 0.4rem;
    line-height: 1.2;
}

.lf-scope-tree__row .badge,
.lf-scope-badge {
    font-size: 0.6rem;
    font-weight: 600;
    line-height: 1.15;
    padding: 0.12em 0.4em;
    letter-spacing: 0.01em;
}

.lf-scope-badge--type {
    background: #eef2ff;
    color: #3730a3;
}

.lf-scope-badge--code {
    background: #f1f5f9;
    color: #64748b;
}

.lf-scope-badge--global {
    background: #2c7be5;
    color: #fff;
}

.lf-scope-badge--ok {
    background: #d1fae5;
    color: #065f46;
}

.lf-scope-badge--off {
    background: #fef3c7;
    color: #92400e;
}

.lf-scope-badge--warn {
    background: #fef3c7;
    color: #92400e;
}

.lf-scope-badge--count {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.lf-scope-tree__sources-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
    margin: 0.15rem 0 0.1rem 1.7rem;
}

.lf-scope-tree__queue {
    font-size: 0.7rem;
}

.lf-scope-tree__channel.is-ghost,
.lf-scope-tree__row.is-ghost {
    opacity: 0.42;
}

.lf-scope-tree__channel.is-ghost {
    border-style: dashed;
}

.lf-scope-tree__row .form-check {
    min-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.lf-scope-tree__row .form-check-input {
    margin-top: 0.15rem;
}

.lf-scope-tree__row .form-check-label {
    line-height: 1.2;
}

.lf-scope-tree__toggle {
    flex: 0 0 1.35rem;
    width: 1.35rem;
    height: 1.35rem;
    padding: 0;
    margin: 0;
    border: 1px solid #cbd5e1;
    border-radius: 0.25rem;
    background: #f8fafc;
    color: #334155;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.lf-scope-tree__toggle:hover {
    background: #e2e8f0;
}

.lf-scope-tree__toggle--leaf {
    border-color: transparent;
    background: transparent;
    cursor: default;
    pointer-events: none;
}

.lf-scope-tree__toggle--leaf:hover {
    background: transparent;
}

.lf-scope-tree__leaf-dot {
    display: block;
    width: 0.55rem;
    height: 0.55rem;
    border: 1.5px solid #94a3b8;
    border-radius: 50%;
    background: transparent;
    box-sizing: border-box;
}

.lf-scope-tree__count {
    font-weight: 600;
}

.lf-scope-tree__row--source {
    padding: 0.1rem 0 0.1rem 0.85rem;
    border-left: 2px solid #e2e8f0;
    margin-left: 0.25rem;
}

.lf-scope-tree__row--muted {
    opacity: 0.55;
}

.lf-scope-tree__icon {
    margin-right: 0.2rem;
    color: #2c7be5;
    font-size: 0.85em;
}

.lf-scope-tree__children {
    margin-top: 0.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
}

.lf-scope-tree__cascade {
    margin: 0.1rem 0 0.1rem 1.7rem;
    line-height: 1.2;
}

.pharmacy-config-nested-tabs {
    margin-top: 0.35rem;
}

.pharmacy-omni-config-host {
    min-height: 0;
}

/* Nested channel config: compact, no overflow outside tab */
#PharmacyChannelModal.pharmacy-channel-modal .modal-dialog {
    max-width: 42rem;
}

#PharmacyChannelModal.pharmacy-channel-modal .modal-body {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: min(70vh, 36rem);
    padding-bottom: 0.75rem !important;
}

#PharmacyChannelModal .form-shell-tabs-shell {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
}

#PharmacyChannelModal .pharmacy-channel-tabs-body.form-shell-tabs-body,
#PharmacyChannelModal .form-shell-tabs-body.pharmacy-channel-tabs-body {
    overflow: auto !important;
    max-height: min(52vh, 28rem);
    min-height: 0;
}

.pharmacy-channel-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem 0.75rem;
    align-items: start;
}

.pharmacy-channel-form--stack {
    grid-template-columns: 1fr;
}

.social-net-header-status {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.15rem;
}

.social-net-brand-icon {
    font-size: 1.35rem;
    line-height: 1;
    color: #9ca3af;
    transition: color 0.15s ease;
}

.social-net-brand-icon.is-connected { color: #1877f2; }
.social-net-brand-icon.is-connected.fa-instagram { color: #e1306c; }
.social-net-brand-icon.is-connected.fa-linkedin { color: #0a66c2; }
.social-net-brand-icon.is-connected.fa-tiktok { color: #111; }
.social-net-brand-icon.is-connected.fa-youtube { color: #ff0000; }
.social-net-brand-icon.is-connected.fa-x-twitter { color: #111; }
.social-net-brand-icon.is-connected.fa-pinterest { color: #e60023; }

.social-net-brand-icon.is-muted,
.social-net-brand-icon--btn.is-muted {
    color: #9ca3af !important;
}

.social-net-connect-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.social-net-brand-icon--btn { font-size: 1rem; }

.social-net-resource-list .social-net-resource {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    border-color: rgba(0, 0, 0, 0.06);
}

.social-net-resource__icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.45rem;
    background: #f3f4f6;
    color: #4b5563;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.social-net-resource__body { flex: 1; min-width: 0; }

.social-net-resource__name {
    font-weight: 600;
    font-size: 0.9rem;
}

.pharmacy-channel-form .hm-hint-field--full {
    grid-column: 1 / -1;
}

.pharmacy-channel-panel {
    min-width: 0;
}

.pharmacy-channel-audit li {
    margin-bottom: 0.25rem;
}

/* Field hint + [?] (LeadFlow LfHintField pattern) */
.hm-hint-field {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
}

.hm-hint-field__label-row {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.hm-hint-field__label {
    font-size: 0.72rem;
    font-weight: 650;
    color: #64748b;
    line-height: 1.2;
}

.hm-hint-field__hint-row {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.3rem;
    min-height: 0.95rem;
}

.hm-hint-field__tip {
    margin: 0;
    flex: 1 1 auto;
    font-size: 0.68rem;
    line-height: 1.25;
    color: #94a3b8;
}

.hm-hint-field__q {
    width: 0.95rem;
    height: 0.95rem;
    margin-top: 0.02rem;
    padding: 0;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #94a3b8;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.hm-hint-field__q:hover,
.hm-hint-field__q[aria-expanded='true'] {
    color: #64748b;
    background: #f1f5f9;
}

.hm-hint-field__popup {
    position: absolute;
    z-index: 50;
    top: calc(100% + 0.25rem);
    right: 0;
    width: min(20rem, 78vw);
    padding: 0.5rem 0.65rem;
    border: 1px solid #1e293b;
    border-radius: 8px;
    background: #0f172a;
    color: #fff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    font-size: 0.75rem;
    line-height: 1.4;
}

.hm-hint-field__popup strong {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.78rem;
    color: #fff;
}

.hm-hint-field__popup p {
    margin: 0 1.2rem 0 0;
    color: #e2e8f0;
}

.hm-hint-field__close {
    position: absolute;
    top: 0.35rem;
    right: 0.45rem;
    border: 0;
    background: transparent;
    color: #94a3b8;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.hm-hint-field__close:hover {
    color: #fff;
}

@media (max-width: 575.98px) {
    .pharmacy-channel-form {
        grid-template-columns: 1fr;
    }
}



/* Social — Postiz library table + composer overlay (ADR-049: Mixpost removed) */
.social-posts__table thead th {
  white-space: nowrap;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #5a6a7a;
}
/* Classic CRM dialog: centered card; iframe must consume all remaining height. */
.social-postiz-overlay {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(0.75rem, 2vh) max(1rem, 2vw);
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.45);
}
.social-postiz-overlay > .happym-postiz-modal,
.social-postiz-overlay > section.happym-postiz-modal {
  /* Flex column > grid+height%: iframe % height is unreliable as replaced element. */
  display: flex !important;
  flex-direction: column !important;
  grid-template-rows: unset !important;
  width: min(96vw, 1180px) !important;
  max-width: min(96vw, 1180px);
  height: min(92vh, 900px) !important;
  max-height: min(92vh, 900px);
  margin: 0 !important;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
  overflow: hidden;
  background: #fff;
}
.social-postiz-overlay .happym-postiz-modal__header {
  display: flex;
  flex: 0 0 auto;
  background: #fff;
}
.social-postiz-overlay .happym-postiz-modal__frame {
  display: block;
  flex: 1 1 auto;
  width: 100% !important;
  height: auto !important; /* let flex assign height; avoid % of indefinite CB */
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  border: 0 !important;
  background: #f8fafc;
  align-self: stretch;
}
.social-posts__row { cursor: pointer; }
.social-posts__row:hover { background: rgba(13, 148, 136, 0.06); }

/* Social Manager children: white like other sidebar items */
#navbarVerticalNav .nav-item--social > .nav-link,
#navbarVerticalNav .nav-item--social > .nav-link .nav-link-icon,
#navbarVerticalNav .nav-item--social > .nav-link .nav-link-text {
  color: #fff;
}
#navbarVerticalNav .nav-item--social > .nav-link:hover,
#navbarVerticalNav .nav-item--social > .nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
/* Coming-soon Social items: slightly off-white */
#navbarVerticalNav .nav-item--social-soon > .nav-link,
#navbarVerticalNav .nav-item--social-soon > .nav-link .nav-link-icon,
#navbarVerticalNav .nav-item--social-soon > .nav-link .nav-link-text {
  color: #94a3b8;
}
#navbarVerticalNav .nav-item--social-soon > .nav-link:hover,
#navbarVerticalNav .nav-item--social-soon > .nav-link.active {
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.12);
}

.social-cal__dow,
.social-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
}
.social-cal__cell {
  min-height: 6.5rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.35rem;
  padding: 0.35rem;
  background: var(--bs-body-bg);
  cursor: pointer;
}
.social-cal__cell--empty {
  background: transparent;
  border-color: transparent;
  cursor: default;
}
.social-cal__cell--today {
  outline: 2px solid var(--bs-primary);
}
.social-cal__num {
  font-size: 0.8rem;
  font-weight: 600;
}
.social-cal__post {
  display: block;
  max-width: 100%;
  font-size: 0.75rem;
}
.social-cal__chrome { min-height: 28rem; }
.social-cal__schedule { min-height: 40rem; }
.social-cal__expired { opacity: 0.55; filter: grayscale(0.25); }
.social-cal__empty { min-height: 16rem; }

.social-chat__log { max-height: 22rem; overflow: auto; }
.social-chat__msg--user .social-chat__bubble { background: var(--bs-body-tertiary); }
.social-chat__msg--assistant .social-chat__bubble { background: rgba(13, 148, 136, 0.08); }

.social-post-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 20rem);
  gap: 1rem;
  align-items: stretch;
}
.social-post-preview {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  background: #fff;
  overflow: hidden;
  min-height: 18rem;
}
.social-post-preview__chrome {
  padding: 0.55rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  background: #0d9488;
}
.social-post-preview--fb .social-post-preview__chrome { background: #1877f2; }
.social-post-preview--ig .social-post-preview__chrome { background: #e1306c; }
.social-post-preview--li .social-post-preview__chrome { background: #0a66c2; }
.social-post-preview--tt .social-post-preview__chrome { background: #111; }
.social-post-preview__body { padding: 0.75rem; }
.social-post-preview__img { width: 100%; max-height: 12rem; object-fit: cover; border-radius: 0.35rem; margin-bottom: 0.5rem; }
.social-post-preview__text { white-space: pre-wrap; font-size: 0.9rem; margin-bottom: 0; }

.social-media__thumb {
  width: 3.5rem;
  height: 3.5rem;
  background: var(--bs-body-tertiary);
  overflow: hidden;
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.social-media__thumb img { width: 100%; height: 100%; object-fit: cover; }

.hm-media-studio {
  position: fixed; inset: 0; z-index: 1090;
  background: rgba(15, 23, 42, 0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 1.25rem;
}
.hm-media-studio[hidden] { display: none !important; }
.hm-ms {
  display: flex; flex-direction: column;
  width: min(92vw, 1280px);
  height: min(88vh, 860px);
  min-height: 0;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.28);
  overflow: hidden;
  position: relative;
}
.hm-media-studio--expanded { padding: 0; background: #111827; }
.hm-media-studio--expanded .hm-ms {
  width: 100%; height: 100%; border-radius: 0; box-shadow: none;
}
.hm-ms__chrome {
  display: flex; align-items: center; gap: 0.35rem;
  padding: 0.45rem 0.7rem;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
  flex: 0 0 auto;
}
.hm-ms__title { flex: 1; margin: 0; font-size: 0.95rem; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-media-studio--postbind .hm-ms__title, .hm-ms--postbind .hm-ms__title { font-size: 0.78rem; font-weight: 600; }
.hm-media-studio--postbind .hm-ms__title i, .hm-ms--postbind .hm-ms__title i { margin-right: 0.35rem; color: #2563eb; }
.hm-ms__wiz-title--post { display: flex; align-items: center; gap: 0.4rem; font-size: 0.9rem !important; }
.hm-ms__wiz-ch { color: #2563eb; font-size: 1.05rem; }
.hm-ms__post-chip {
  display: block; margin: 0 0 0.65rem; padding: 0.4rem 0.65rem;
  border: 1px solid #d1d5db; border-radius: 0.4rem; background: #f9fafb;
  font-size: 0.85rem; font-weight: 600; color: #111827;
}
.hm-ms__bind-meta {
  display: flex; flex-direction: column; align-items: stretch; gap: 0.5rem;
  margin: 0 0 0.65rem; padding: 0.5rem 0.55rem;
  border: 1px solid #e5e7eb; border-radius: 0.4rem; background: #f9fafb;
}
.hm-ms__bind-ph { display: flex; align-items: center; gap: 0.4rem; width: 100%; }
.hm-ms__ph-lab { flex: 1 1 auto; min-width: 0; }
.hm-ms__ph-edit { margin-left: auto; flex: 0 0 auto; white-space: nowrap; font-size: 0.72rem; font-weight: 650; padding: 0.15rem 0.55rem; }
.hm-ms__ph-lab { font-size: 0.78rem; font-weight: 650; color: #111827; }
.hm-ms__ds-pick { display: flex; flex-direction: column; gap: 0.35rem; }
.hm-ms__ds-lab { font-size: 0.72rem; font-weight: 700; color: #374151; }
.hm-ms__ds-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; }
.hm-ms__ds-choice {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.12rem;
  text-align: left; padding: 0.45rem 0.5rem;
  border: 1px solid #d1d5db; border-radius: 0.35rem; background: #fff;
  color: #111827;
}
.hm-ms__ds-choice:hover { border-color: #2563eb; background: #eff6ff; }
.hm-ms__ds-choice i { color: #2563eb; font-size: 0.95rem; margin-bottom: 0.1rem; }
.hm-ms__ds-choice-t { font-size: 0.75rem; font-weight: 700; }
.hm-ms__ds-choice-h { font-size: 0.68rem; color: #6b7280; line-height: 1.3; font-weight: 400; }
.hm-ms__ds-status { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-ms__ph-custom { display: flex; flex-direction: column; gap: 0.25rem; margin-top: 0.25rem; }
.hm-ms__ph-row { display: grid; grid-template-columns: minmax(5rem, 8rem) minmax(0, 1fr); gap: 0.3rem; margin-bottom: 0.25rem; }
.hm-ms__save-card--cph { width: min(28rem, 96vw); }
.hm-ms__cph-rows.is-overflow { max-height: calc(5 * (1.875rem + 0.25rem)); overflow-y: auto; margin-bottom: 0.35rem; }
.hm-ms__ph-sec { font-size: 0.68rem; font-weight: 700; color: #374151; margin: 0.45rem 0 0.2rem; }
.hm-ms__chip.is-ds { background: #d1fae5; color: #065f46; border-color: #6ee7b7; }
.hm-ms__chip.is-env { background: #e0e7ff; color: #3730a3; border-color: #a5b4fc; }
.hm-ms__chip.is-custom { background: #ffedd5; color: #9a3412; border-color: #fdba74; }
[data-panel="text"]:not([hidden]) {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
[data-text-pane="line"]:not([hidden]),
[data-text-pane="blocks"]:not([hidden]),
[data-text-pane="placeholders"]:not([hidden]) {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.hm-ms__ph-fold { margin: 0 0 0.4rem; }
.hm-ms__ph-fold > summary.hm-ms__ph-sec {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0.15rem 0 0.25rem;
  user-select: none;
}
.hm-ms__ph-fold > summary.hm-ms__ph-sec::-webkit-details-marker { display: none; }
.hm-ms__ph-fold > summary.hm-ms__ph-sec::before {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 4px 0 4px 6px;
  border-color: transparent transparent transparent #6b7280;
  flex: 0 0 auto;
}
.hm-ms__ph-fold[open] > summary.hm-ms__ph-sec::before { transform: rotate(90deg); }
.hm-ms__ph-n { font-weight: 600; color: #9ca3af; font-size: 0.62rem; margin-left: auto; }
.hm-ms__ph-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.16rem 0.2rem;
}
.hm-ms__ph-grid .hm-ms__chip {
  display: block;
  width: auto;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.58rem;
  line-height: 1.2;
  padding: 0.1rem 0.28rem;
  text-align: left;
  border-radius: 0.22rem;
}

[data-panel="text"] > .hm-ms__panel-title,
[data-panel="text"] > select { flex: 0 0 auto; }
.hm-ms__save[data-dataset-dlg] { z-index: 12; }
.hm-ms__fmt-row.is-req {
  border: 2px solid #2563eb; border-radius: 0.45rem; padding: 0.4rem;
  background: #eff6ff;
}
.hm-ms__off2 { gap: 0.28rem; }
.hm-ms__off2 .hm-ms__num { width: 4.4rem; min-width: 4.4rem; }
.hm-ms__off2 i { color: #6b7280; font-size: 0.78rem; }
.hm-ms__menu-wrap { position: relative; }
.hm-ms__menu {
  position: absolute; top: 100%; left: 0; z-index: 8;
  min-width: 16rem; max-width: 22rem;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 0.45rem;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16); padding: 0.3rem 0;
}
.hm-ms__menu-item {
  display: flex; align-items: center; gap: 0.5rem; width: 100%;
  border: 0; background: transparent; text-align: left;
  padding: 0.4rem 0.75rem; font-size: 0.82rem; color: #111827;
}
.hm-ms__menu-item:hover { background: #f3f4f6; }
.hm-ms__menu-item i { width: 1rem; color: #6b7280; }
.hm-ms__menu-item--pri { font-weight: 600; }
.hm-ms__menu-item--pri i { color: #2563eb; }
.hm-ms__menu-sep { height: 1px; background: #e5e7eb; margin: 0.25rem 0; }
.hm-ms__side { position: relative; }
.hm-ms__side-tab {
  position: absolute; right: -1.15rem; top: 40%;
  width: 1.15rem; height: 3.4rem; padding: 0;
  border: 1px solid #e5e7eb; border-left: 0;
  border-radius: 0 0.7rem 0.7rem 0;
  background: #fff; color: #6b7280; font-size: 0.85rem;
  z-index: 3;
}
.hm-ms__side-tab i { display: block; transition: transform 0.15s ease; }
.hm-ms--side-off .hm-ms__side { width: 4.5rem; flex: 0 0 4.5rem; overflow: visible; }
.hm-ms--side-off .hm-ms__panel { display: none; }
.hm-ms--side-off .hm-ms__rail { display: flex; }
.hm-ms--side-off .hm-ms__side-tab { right: -1.15rem; }
.hm-ms--side-off .hm-ms__side-tab i { transform: scaleX(-1); }
.hm-ms__canvas--pan { cursor: grab; }
.hm-ms__save-card--wide { width: min(42rem, 96vw); max-height: 86vh; overflow: auto; }
.hm-ms__save-card--wizard { width: min(76rem, 96vw); max-height: none; overflow: visible; }
.hm-ms__save-card--tpl { width: min(56rem, 96vw); max-height: 86vh; overflow: auto; }
.hm-ms__save[data-tpl-browse], .hm-ms__save[data-tpl-peek] { z-index: 8; }
.hm-ms__wiz-h { display: flex; align-items: center; gap: 0.3rem; margin-bottom: 0.45rem; position: relative; }
.hm-ms__wiz-h h6 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.95rem; }
.hm-ms__tip-wrap { position: relative; flex: 0 0 auto; }
.hm-ms__tip {
  position: absolute; right: 0; top: calc(100% + 0.35rem); z-index: 20;
  background: #111827; color: #fff; font-size: 0.75rem; line-height: 1.45;
  padding: 0.5rem 0.65rem; border-radius: 0.35rem; white-space: pre-line;
  min-width: 16rem; max-width: 24rem; box-shadow: 0 8px 20px rgba(15, 23, 42, 0.35);
}
.hm-ms__tip::before {
  content: ""; position: absolute; right: 0.55rem; top: -0.35rem;
  border: 0.35rem solid transparent; border-bottom-color: #111827;
}
.hm-ms__type-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(3.45rem, 1fr)); gap: 0.28rem; margin-bottom: 0.5rem;
}
.hm-ms__type-grid.is-locked { pointer-events: none; opacity: 0.55; }
.hm-ms__ph-tog:disabled { opacity: 0.45; pointer-events: none; }
.hm-ms__pad4 {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.25rem; margin-bottom: 0.5rem;
}
.hm-ms__pad4 .hm-ms__num-lbl { margin: 0; }
.hm-ms__pad4 .hm-ms__num { width: 100%; min-width: 0; }
.hm-ms__tedit-tb .hm-ms__pad4 { min-width: 12rem; }
.hm-ms__fmt-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.4rem; margin-bottom: 0.75rem;
}
.hm-ms__type, .hm-ms__fmt {
  border: 1px solid #e5e7eb; background: #fff; border-radius: 0.35rem;
  text-align: center; line-height: 1.15; color: #111827;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  white-space: nowrap;
}
.hm-ms__type {
  min-height: 2.15rem; padding: 0.15rem 0.08rem; gap: 0.1rem; font-size: 0.58rem;
}
.hm-ms__fmt {
  min-height: 3.1rem; padding: 0.4rem 0.2rem; gap: 0.3rem; font-size: 0.68rem;
}
.hm-ms__type.is-on, .hm-ms__fmt.is-on, .hm-ms__tpl-open.is-on, .hm-ms__combo-opt.is-on, .hm-ms__tpl-row.is-on, .hm-ms__tpl-scope.is-on {
  border-color: #2563eb; background: #eff6ff; color: #1d4ed8;
}
.hm-ms__type i { display: block; font-size: 0.82rem; margin: 0; }
.hm-ms__type span, .hm-ms__fmt span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.hm-ms__fmt small { display: block; color: #6b7280; font-size: 0.62rem; }
.hm-ms__src { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-bottom: 0.45rem; }
.hm-ms__src-opt { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.82rem; margin: 0; cursor: pointer; }
.hm-ms__size-ro { font-size: 0.85rem; color: #374151; margin: 0 0 0.5rem; }
.hm-ms__size-edit { display: flex; align-items: center; gap: 0.4rem; margin: 0.35rem 0; }
.hm-ms__size-edit input { max-width: 6.5rem; }
.hm-ms__fmt-exists { font-size: 0.75rem; color: #b45309; margin: 0 0 0.4rem; }
.hm-ms__combo { position: relative; margin: 0; flex: 1; min-width: 0; }
.hm-ms__fmt-row { display: flex; align-items: stretch; gap: 0.4rem; margin-bottom: 0.35rem; }
.hm-ms__fmt-combo { flex: 1; min-width: 0; }
.hm-ms__fmt-row > .btn { flex: 0 0 auto; white-space: nowrap; }
.hm-ms__tpl-badge {
  display: flex; align-items: center; gap: 0.25rem; margin: 0 0 0.45rem;
}
.hm-ms__badge {
  display: inline-block; max-width: 18rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 0.68rem; line-height: 1.2; padding: 0.12rem 0.45rem;
  border-radius: 999px; background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe;
}
.hm-ms__combo-btn, .hm-ms__combo-opt {
  display: flex; align-items: center; gap: 0.5rem; width: 100%;
  text-align: left; padding: 0.32rem 0.5rem; border: 1px solid #e5e7eb; background: #fff; color: #111827;
}
.hm-ms__combo-btn { border-radius: 0.35rem; }
.hm-ms__combo-chev { margin-left: auto; font-size: 0.7rem; color: #6b7280; }
.hm-ms__combo-list {
  position: fixed; z-index: 40; max-height: 16rem; overflow: auto; background: #fff;
  border: 1px solid #e5e7eb; box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}
.hm-ms__combo-opt { border: 0; border-bottom: 1px solid #f3f4f6; border-radius: 0; padding-right: 0.65rem; }
.hm-ms__combo-opt.is-on { padding-right: 1.4rem; }
.hm-ms__combo-opt:last-child { border-bottom: 0; }
.hm-ms__combo-btn { min-width: 0; overflow: hidden; padding-right: 0.4rem; }
.hm-ms__combo-bits {
  display: grid; grid-template-columns: 1.15rem minmax(0, 0.42fr) minmax(4.8rem, auto);
  align-items: center; gap: 0.3rem 0.4rem; flex: 1 1 auto; min-width: 0;
}
.hm-ms__combo-dims {
  font-variant-numeric: tabular-nums; font-weight: 600; font-size: 0.68rem;
  white-space: nowrap; color: #374151; justify-self: end; flex-shrink: 0;
}
.hm-ms__combo-lab {
  min-width: 0; font-size: 0.72rem; font-weight: 600; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hm-ms__combo-list .hm-ms__combo-bits {
  grid-template-columns: 1.15rem minmax(0, 1fr) minmax(4.8rem, auto);
  padding-right: 0.15rem;
}
.hm-ms__combo-list .hm-ms__combo-lab { white-space: nowrap; font-size: 0.72rem; }
.hm-ms__combo-list .hm-ms__combo-dims { font-size: 0.68rem; padding-right: 0.1rem; }
.hm-ms__combo-btn .hm-ms__combo-bits { grid-template-columns: 1.15rem minmax(0, 0.38fr) minmax(4.5rem, auto); }
.hm-ms__combo-btn .hm-ms__combo-lab { max-width: 100%; }
.hm-ms__combo-btn .hm-ms__combo-dims { font-size: 0.66rem; }
.hm-ms__combo-chev { flex: 0 0 auto; margin-left: 0.35rem; }
.hm-ms__combo .hm-ms__fk, .hm-ms__tpl-row .hm-ms__fk, .hm-ms__tpl-preview .hm-ms__fk { margin: 0; flex: 0 0 auto; }
.hm-ms__tpl-scopes { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-bottom: 0.3rem; }
.hm-ms__tpl-scope {
  border: 1px solid #e5e7eb; background: #fff; border-radius: 0.3rem;
  font-size: 0.72rem; padding: 0.12rem 0.45rem; color: #374151;
}
.hm-ms__tpl-browser {
  display: grid; grid-template-columns: minmax(0, 1fr) 10.5rem; gap: 0.45rem;
  min-height: 8.2rem; max-height: 10.5rem; margin-bottom: 0.35rem;
}
.hm-ms__tpl-browser--dlg {
  grid-template-columns: minmax(0, 1fr) 16rem;
  min-height: 16rem; max-height: 22rem;
}
.hm-ms__tpl-peek { text-align: center; }
.hm-ms__tpl-peek img { max-width: 100%; max-height: 22rem; object-fit: contain; background: #fff; }
.hm-ms__tpl-nav { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.hm-ms__tpl-crumb { display: flex; align-items: center; gap: 0.25rem; margin-bottom: 0.2rem; min-height: 1.6rem; }
.hm-ms__tpl-crumb span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-ms__tpl-files {
  flex: 1; min-height: 0; overflow: auto; border: 1px solid #e5e7eb; border-radius: 0.35rem; background: #fff;
}
.hm-ms__tpl-row {
  display: flex; align-items: center; gap: 0.4rem; width: 100%;
  padding: 0.22rem 0.4rem; border: 0; border-bottom: 1px solid #f3f4f6;
  background: #fff; text-align: left; color: #111827; font-size: 0.75rem;
}
.hm-ms__tpl-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-ms__tpl-row small { color: #6b7280; }
.hm-ms__tpl-thumb { width: 1.55rem; height: 1.55rem; object-fit: cover; flex: 0 0 auto; border: 1px solid #e5e7eb; border-radius: 0.2rem; }
.hm-ms__tpl-preview {
  border: 1px solid #e5e7eb; border-radius: 0.35rem; background: #f8fafc;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.3rem; padding: 0.4rem; text-align: center; overflow: hidden; min-height: 0;
}
.hm-ms__tpl-preview img { max-width: 100%; max-height: 14rem; object-fit: contain; background: #fff; }
.hm-ms__fk {
  display: block; margin: 0 auto 0.25rem; border: 2px solid currentColor; background: transparent;
}
.hm-ms__fk--square { width: 1.15rem; height: 1.15rem; }
.hm-ms__fk--portrait { width: 0.85rem; height: 1.25rem; }
.hm-ms__fk--land { width: 1.35rem; height: 0.8rem; }
.hm-ms__fk--story { width: 0.7rem; height: 1.3rem; border-radius: 0.25rem; }
.hm-ms__fk--reel { width: 0.7rem; height: 1.3rem; border-radius: 0.45rem; position: relative; }
.hm-ms__fk--reel::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 0; height: 0; margin: -0.18rem 0 0 -0.1rem;
  border-style: solid; border-width: 0.2rem 0 0.2rem 0.32rem;
  border-color: transparent transparent transparent currentColor;
}
.hm-ms__fk--cover { width: 1.4rem; height: 0.55rem; }
.hm-ms__fk--print { width: 0.95rem; height: 1.25rem; }
.hm-ms__fk--banner { width: 1.55rem; height: 0.38rem; }
.hm-ms__radii { display: inline-flex; gap: 0.15rem; }
.hm-ms__work { position: relative; }
.hm-ms__idle {
  position: absolute; left: 0; right: 0; top: 2.7rem; bottom: 2.3rem;
  display: flex; align-items: center; justify-content: center;
  background: rgba(232, 234, 237, 0.94); z-index: 4;
  font-size: 1rem; color: #374151; text-align: center; padding: 2rem;
}
.hm-ms__idle[hidden] { display: none !important; }
.hm-ms__preview-img { display: block; max-width: 100%; max-height: 60vh; margin: 0 auto; border: 1px solid #e5e7eb; }
.hm-ms__num-lbl { display: flex; align-items: center; gap: 0.25rem; font-size: 0.72rem; margin: 0; }
.hm-ms__body { display: flex; flex: 1 1 auto; min-height: 0; }
.hm-ms__side { display: flex; width: 22rem; flex: 0 0 22rem; border-right: 1px solid #e5e7eb; background: #fff; min-height: 0; }
.hm-ms__rail {
  width: 4.5rem;
  flex: 0 0 4.5rem;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0.35rem 0;
  overflow: auto;
  background: #fafafa;
}
.hm-ms__tab {
  border: 0;
  background: transparent;
  color: #4b5563;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.55rem 0.2rem;
  font-size: 0.65rem;
  line-height: 1.1;
  border-radius: 0.4rem;
  margin: 0 0.3rem 0.15rem;
}
.hm-ms__tab i { font-size: 1.05rem; }
.hm-ms__tab.is-on { color: #2563eb; background: #eff6ff; }
.hm-ms__panel {
  flex: 1 1 auto; min-width: 0; min-height: 0;
  overflow: auto; padding: 0.75rem;
  display: flex; flex-direction: column;
}
.hm-ms__panel:has([data-img-pane="gallery"]:not([hidden])),
.hm-ms__panel:has([data-img-pane="media"]:not([hidden])),
.hm-ms__panel:has([data-bg-pane="gallery"]:not([hidden])),
.hm-ms__panel:has([data-bg-pane="media"]:not([hidden])) {
  overflow: hidden;
}
[data-panel="images"]:not([hidden]),
[data-panel="background"]:not([hidden]) {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column; overflow: hidden;
}
[data-img-pane]:not([hidden]),
[data-bg-pane]:not([hidden]) {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column; overflow: hidden;
}
.hm-ms__gallery {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column; overflow: hidden;
}
.hm-ms__gallery .hm-ms__kinds,
.hm-ms__gallery .hm-ms__chips,
.hm-ms__gallery [data-u-credit],
.hm-ms__gallery .hm-ms__swatches,
.hm-ms__gallery .hm-ms__search,
.hm-ms__gallery [data-u-hint],
.hm-ms__gallery .hm-ms__pager { flex: 0 0 auto; }
.hm-ms__gallery > .hm-ms__panel-title,
.hm-ms__gallery > .d-flex,
[data-panel="images"] > .hm-ms__panel-title,
[data-panel="images"] > .form-select,
[data-panel="background"] > .hm-ms__panel-title,
[data-panel="background"] > .form-select { flex: 0 0 auto; }
.hm-ms__panel-title { font-weight: 600; margin-bottom: 0.6rem; }
.hm-ms__panel-title--target {
  background: #111827; color: #fff; padding: 0.4rem 0.6rem; border-radius: 0.3rem;
  font-weight: 700; letter-spacing: 0.01em;
}
.hm-ms__tab:disabled { opacity: 0.38; pointer-events: none; }
.hm-ms__tools--bool { margin-top: 0.65rem; padding-top: 0.55rem; border-top: 1px dashed #d1d5db; }
.hm-ms__tools--vec-nodes { margin-top: 0.55rem; padding-top: 0.55rem; border-top: 1px solid #d1d5db; }
.hm-ms__tools--conn { margin-bottom: 0.55rem; }
.hm-ms__vshapes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.35rem; margin-bottom: 0.15rem; }
.hm-ms__vshape {
  height: 2.4rem; border: 1px solid #e5e7eb; background: #fff; border-radius: 0.35rem;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.hm-ms__vshape:hover { border-color: #2563eb; }
.hm-ms__vshape-ico { display: block; background: #111827; }
.hm-ms__vshape-ico--square { width: 1.05rem; height: 1.05rem; }
.hm-ms__vshape-ico--rect { width: 1.35rem; height: 0.85rem; }
.hm-ms__vshape-ico--circle { width: 1.1rem; height: 1.1rem; border-radius: 50%; }
.hm-ms__vshape-ico--hex {
  width: 1.15rem; height: 1rem; background: transparent;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); background: #111827;
}
.hm-ms__vshape-ico--pentagon {
  width: 1.1rem; height: 1.05rem; background: #111827;
  clip-path: polygon(50% 0, 100% 38%, 82% 100%, 18% 100%, 0 38%);
}
.hm-ms__vshape-ico--pyramid {
  width: 1.15rem; height: 1rem; background: #111827;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.hm-ms__vshape-ico--diamond {
  width: 1rem; height: 1rem; background: #111827;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.hm-ms__vshape-ico--ellipse { width: 1.35rem; height: 0.85rem; border-radius: 50%; }
.hm-ms__vshape-ico--star {
  width: 1.15rem; height: 1.15rem; background: #111827;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.hm-ms__vshape-ico--spiral {
  width: 1.1rem; height: 1.1rem; background: transparent;
  border: 2px solid #111827; border-radius: 50%;
  border-top-color: transparent; border-right-color: transparent;
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 5px #111827;
}
.hm-ms__icon-togs { display: flex; gap: 0.3rem; margin: 0 0 0.55rem; }
.hm-ms__icon-togs .hm-ms__tb.is-on { background: #111827; color: #fff; border-color: #111827; }
.hm-ms__pair--3 { grid-template-columns: auto 1fr 1fr; }
.hm-ms__cap-sel { margin-bottom: 0.4rem; }
.hm-ms__tool:disabled { opacity: 0.38; pointer-events: none; }
.hm-ms__preset {
  display: block; width: 100%; text-align: left; border: 1px solid #e5e7eb;
  background: #f9fafb; border-radius: 0.4rem; padding: 0.65rem 0.75rem; margin-bottom: 0.45rem;
}
.hm-ms__preset--h { font-size: 1.35rem; font-weight: 700; }
.hm-ms__preset--s { font-size: 1.05rem; font-weight: 600; }
.hm-ms__shapes { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; }
.hm-ms__shape, .hm-ms__size, .hm-ms__layer {
  border: 1px solid #e5e7eb; background: #fff; border-radius: 0.35rem; padding: 0.5rem 0.6rem; text-align: left;
}
.hm-ms__size { display: flex; justify-content: space-between; width: 100%; margin-bottom: 0.4rem; }
.hm-ms__layer { display: block; width: 100%; margin-bottom: 0.3rem; }
.hm-ms__layer--on { border-color: #2563eb; background: #eff6ff; }
.hm-ms__swatches { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.hm-ms__swatch { width: 1.75rem; height: 1.75rem; border: 1px solid #d1d5db; border-radius: 0.25rem; padding: 0; }
.hm-ms__work { position: relative; flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 0.55rem; padding: 0.65rem 0.75rem 0.7rem; background: #d8dce3; }
.hm-ms__toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem;
  padding: 0.45rem 0.7rem; background: #fff;
  border: 1px solid #d1d5db; border-radius: 0.55rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.hm-ms__group {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.2rem;
  background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 0.45rem; padding: 0.15rem 0.25rem;
}
.hm-ms__ctx { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; }
.hm-ms__tb {
  border: 1px solid transparent; background: #fff; border-radius: 0.3rem;
  width: 2rem; height: 2rem; display: inline-flex; align-items: center; justify-content: center; color: #374151;
}
.hm-ms__group .hm-ms__tb { border-color: transparent; }
.hm-ms__tb:hover { border-color: #d1d5db; background: #fff; }
.hm-ms__tb--danger { color: #dc2626; }
.hm-ms__sep { width: 1px; height: 1.5rem; background: #d1d5db; margin: 0 0.1rem; }
.hm-ms__font { width: 8.5rem; }
.hm-ms__num { width: 4.2rem; }
.hm-ms__color, .hm-ms__op { display: flex; align-items: center; gap: 0.3rem; font-size: 0.75rem; margin: 0; }
.hm-ms__color input[type="color"] { width: 1.7rem; height: 1.5rem; padding: 0; border: 1px solid #d1d5db; }
.hm-ms__op input[type="range"] { width: 5rem; }
.hm-ms__canvas { flex: 1 1 auto; min-height: 0; border-radius: 0.45rem; overflow: hidden; background: #c9cdd4; }
.hm-ms__dsbar {
  position: absolute; right: 1rem; top: 50%; transform: translateY(-50%);
  z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 0.55rem; padding: 0.35rem;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}
.hm-ms__dsbar[hidden] { display: none !important; }
.hm-ms__dsbar-idx { font-size: 0.72rem; color: #4b5563; min-width: 2.4rem; text-align: center; }
.hm-ms__page-sq-wrap { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; margin: 0.4rem 0 0.55rem; }
.hm-ms__page-sq { border: 1px solid #94a3b8; background: #fff; box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12); }
.hm-ms__info {
  position: relative;
  border: 1px solid #e5e7eb; border-radius: 0.45rem; background: #f9fafb;
  padding: 0.45rem 2.1rem 0.45rem 0.55rem; margin-bottom: 0.35rem;
}
.hm-ms__info-h {
  position: absolute; top: 0.28rem; right: 0.28rem; margin: 0;
}
.hm-ms__info-h .hm-ms__tb { width: 1.55rem; height: 1.55rem; font-size: 0.68rem; border: 1px solid #d1d5db; }
.hm-ms__kv { display: grid; gap: 0.18rem; }
.hm-ms__kv-row {
  display: grid; grid-template-columns: 5.6rem minmax(0, 1fr); gap: 0.3rem; align-items: start;
  font-size: 0.72rem; line-height: 1.3;
}
.hm-ms__kv-k { color: #6b7280; }
.hm-ms__kv-k::after { content: ":"; }
.hm-ms__kv-v {
  color: #111827; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.hm-ms__grid-togs { display: flex; align-items: center; gap: 0.7rem; margin: 0.1rem 0 0.55rem; }
.hm-ms__grid-togs .hm-ms__tb { width: 2.15rem; height: 2.15rem; border: 1px solid #d1d5db; }
.hm-ms__save-card--wide {
  width: min(44rem, 96vw); max-width: 96vw; max-height: 90vh;
  display: flex; flex-direction: column; overflow: hidden;
}
.hm-ms__save-card--meta { width: min(22rem, 96vw); }
.hm-ms__ds-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  margin-bottom: 0.5rem; flex: 0 0 auto;
}
.hm-ms__ds-head h6 { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-ms__ds-tools { display: flex; align-items: center; gap: 0.4rem; flex: 0 0 auto; }
.hm-ms__ds-tools[hidden] { display: none !important; }
.hm-ms__ds-tools .hm-ms__tb { width: 1.85rem; height: 1.85rem; border: 1px solid #d1d5db; }
.hm-ms__ds-foot { flex: 0 0 auto; }
.hm-ms__ds-grid { overflow: auto; flex: 1 1 auto; min-height: 8rem; max-height: 22rem; }
.hm-ms__ds-table { border-collapse: collapse; width: max-content; min-width: 100%; font-size: 0.8rem; }
.hm-ms__ds-table th, .hm-ms__ds-table td { border: 1px solid #e5e7eb; padding: 0.15rem; }
.hm-ms__ds-table input { width: 100%; min-width: 6.5rem; border: 0; padding: 0.2rem 0.3rem; }
.hm-ms__ds-th { display: flex; align-items: center; gap: 0.15rem; }
.hm-ms__ds-th input { flex: 1; min-width: 5.5rem; }
.hm-ms__ds-grid .hm-ms__chk { display: flex; align-items: center; gap: 0.4rem; margin: 0 0 0.4rem; }
.hm-ms__align-tip {
  position: absolute; z-index: 4; pointer-events: auto;
}
.hm-ms__align-tip[hidden] { display: none !important; }
.hm-ms__align-tip .hm-ms__tb {
  background: #111827; color: #fff; border-color: #111827;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.35);
}
.hm-ms__save-card--align { width: min(22rem, 96vw); }
.hm-ms__place-grid {
  display: grid; grid-template-columns: repeat(3, 1.85rem); gap: 0.22rem; width: max-content;
}
.hm-ms__place-b {
  width: 1.85rem; height: 1.85rem; padding: 0; border: 1px solid #d1d5db; background: #fff;
  border-radius: 0.25rem; position: relative;
}
.hm-ms__place-b::after {
  content: ""; position: absolute; width: 0.38rem; height: 0.38rem; border-radius: 1px; background: #6b7280;
}
.hm-ms__place-b[data-place="tl"]::after { top: 0.2rem; left: 0.2rem; }
.hm-ms__place-b[data-place="tc"]::after { top: 0.2rem; left: 50%; transform: translateX(-50%); }
.hm-ms__place-b[data-place="tr"]::after { top: 0.2rem; right: 0.2rem; }
.hm-ms__place-b[data-place="ml"]::after { top: 50%; left: 0.2rem; transform: translateY(-50%); }
.hm-ms__place-b[data-place="cc"]::after { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.hm-ms__place-b[data-place="mr"]::after { top: 50%; right: 0.2rem; transform: translateY(-50%); }
.hm-ms__place-b[data-place="bl"]::after { bottom: 0.2rem; left: 0.2rem; }
.hm-ms__place-b[data-place="bc"]::after { bottom: 0.2rem; left: 50%; transform: translateX(-50%); }
.hm-ms__place-b[data-place="br"]::after { bottom: 0.2rem; right: 0.2rem; }
.hm-ms__place-b.is-on { border-color: #2563eb; background: #eff6ff; }
.hm-ms__place-b.is-on::after { background: #2563eb; }
.hm-ms__canvas--draw { cursor: crosshair; }
.hm-ms__zoom {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  padding: 0.15rem 0.55rem; min-height: 1.55rem; background: #fff;
  border: 1px solid #d1d5db; border-radius: 0.4rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.hm-ms__zoom-val { min-width: 2.6rem; text-align: center; font-size: 0.72rem; }
.hm-ms__foot-kind { font-size: 0.72rem; color: #374151; font-weight: 600; max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-ms__foot-meta { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.72rem; color: #4b5563; }
.hm-ms__foot-meta i { font-size: 0.85rem; }
.hm-ms__vpop {
  position: absolute; z-index: 4; display: flex; gap: 0.12rem; pointer-events: auto;
}
.hm-ms__vpop[hidden] { display: none !important; }
.hm-ms__vpop .hm-ms__tb {
  width: 1.4rem; height: 1.4rem; font-size: 0.65rem; padding: 0;
  background: #111827; color: #fff; border-color: #111827;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.35);
}
.hm-ms__vpop .hm-ms__tb.is-on { background: #2563eb; border-color: #2563eb; }
.hm-ms__gpop { padding: 0.18rem; background: #111827; border-radius: 0.4rem; }
.hm-ms__polar {
  flex-wrap: wrap; align-items: center; width: 11.4rem;
  padding: 0.22rem; background: #111827; border-radius: 0.4rem;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.35);
}
.hm-ms__polar-ang {
  width: 2.55rem; height: 1.4rem; margin: 0; padding: 0;
  border: 0; border-radius: 0.25rem; text-align: center;
  font-size: 0.68rem; font-weight: 600; color: #111827; background: #fff;
}
.hm-ms__polar-copy {
  width: auto !important; min-width: 1.85rem; padding: 0 0.22rem !important;
  font-size: 0.62rem; font-weight: 700; letter-spacing: -0.03em;
}
.hm-ms__nf {
  position: absolute; right: 0.9rem; bottom: 3.15rem; z-index: 3;
  display: inline-flex; align-items: center; gap: 0.28rem;
  padding: 0.14rem 0.4rem; border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.42); color: #6b7280;
  font-size: 0.62rem; font-weight: 600; letter-spacing: 0.01em;
  pointer-events: none; user-select: none;
}
.hm-ms__nf img { height: 11px; width: auto; opacity: 0.48; }
.hm-ms__save-card--info { width: min(22rem, 94vw); text-align: center; }
.hm-ms__info-logo { display: block; height: 1.35rem; width: auto; margin: 0 auto 0.75rem; }
.hm-ms__conn-extra { margin: 0.45rem 0 0.65rem; display: flex; flex-direction: column; gap: 0.35rem; }
.hm-ms__tb.is-on { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; }
.hm-ms__prop-sec { margin: 0 0 0.75rem; padding: 0 0 0.65rem; border-bottom: 1px solid #e5e7eb; }
.hm-ms__prop-sec:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.hm-ms__spin2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; }
.hm-ms__name-row { display: flex; align-items: flex-end; gap: 0.4rem; margin-bottom: 0.55rem; }
.hm-ms__name-grow { flex: 1; min-width: 0; }
.hm-ms__name-grow .form-label { margin-bottom: 0.15rem; }
.hm-ms__ph-tog, .hm-ms__lock, .hm-ms__trans {
  flex: 0 0 auto; border: 1px solid #d1d5db; background: #fff; border-radius: 0.3rem; color: #6b7280;
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.hm-ms__ph-tog { width: 2rem; height: 2rem; margin-bottom: 0; }
.hm-ms__lock { width: 1.7rem; height: 1.7rem; }
.hm-ms__ph-tog.is-on, .hm-ms__lock.is-on, .hm-ms__trans.is-on, .hm-ms__seg-b.is-on {
  border-color: #2563eb; background: #eff6ff; color: #1d4ed8;
}
.hm-ms__pair {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem; align-items: end; margin-bottom: 0.4rem;
}
.hm-ms__pair--lock { grid-template-columns: 1fr 1fr auto; }
.hm-ms__pair label {
  display: flex; flex-direction: column; gap: 0.08rem; margin: 0; font-size: 0.62rem; color: #6b7280; min-width: 0;
}
.hm-ms__pair input[type="number"], .hm-ms__pair input[type="text"], .hm-ms__pair select, .hm-ms__pair input[type="color"], .hm-ms__brow input[type="number"] {
  width: 100%; height: 1.65rem; font-size: 0.75rem; padding: 0.1rem 0.28rem;
  border: 1px solid #d1d5db; border-radius: 0.25rem; background: #fff;
}
.hm-ms__acc { border-bottom: 1px solid #e5e7eb; }
.hm-ms__acc-h {
  display: flex; align-items: center; gap: 0.35rem; width: 100%; border: 0; background: transparent;
  padding: 0.42rem 0; font-size: 0.78rem; font-weight: 600; color: #111827; text-align: left;
}
.hm-ms__acc-h i { font-size: 0.62rem; width: 0.7rem; transition: transform 0.12s; }
.hm-ms__acc.is-open .hm-ms__acc-h i { transform: rotate(90deg); }
.hm-ms__acc-b { display: none; padding: 0 0 0.5rem; }
.hm-ms__acc.is-open .hm-ms__acc-b { display: block; }
.hm-ms__color-row { display: flex; align-items: center; gap: 0.35rem; margin-bottom: 0.4rem; font-size: 0.72rem; }
.hm-ms__trans, .hm-ms__swatch--none {
  width: 1.5rem; height: 1.5rem;
  background: repeating-conic-gradient(#d1d5db 0% 25%, #fff 0% 50%) 50% / 0.5rem 0.5rem;
  border: 1px solid #d1d5db; border-radius: 0.2rem;
}
.hm-ms__seg { display: flex; gap: 0.25rem; margin-bottom: 0.4rem; }
.hm-ms__seg-b {
  flex: 1; border: 1px solid #d1d5db; background: #fff; border-radius: 0.25rem;
  font-size: 0.68rem; padding: 0.2rem 0.3rem; color: #374151;
}
.hm-ms__seg-b--ico {
  flex: 0 0 2.1rem; width: 2.1rem; height: 2.1rem; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; font-size: 0.78rem;
}
.hm-ms__brow {
  display: grid; grid-template-columns: 3.2rem 1.7rem 3.2rem 1fr; gap: 0.25rem;
  align-items: center; margin-bottom: 0.28rem; font-size: 0.65rem; color: #6b7280;
}
.hm-ms__brow input[type="color"] { width: 1.5rem; height: 1.4rem; padding: 0; border: 1px solid #d1d5db; }
.hm-ms__chk { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.72rem; margin: 0 0 0.35rem; }
.hm-ms__search { display: flex; align-items: center; gap: 0.35rem; flex-wrap: nowrap; }
.hm-ms__search input { flex: 1 1 auto; min-width: 0; }
.hm-ms__search .hm-ms__tb { flex: 0 0 auto; }
.hm-ms__swatches--row { display: flex; flex-wrap: nowrap; gap: 0.3rem; overflow-x: auto; }
.hm-ms__save[data-tedit] { overflow: hidden; align-items: center; }
.hm-ms__save[data-tedit].is-label { padding: 0; align-items: stretch; justify-content: stretch; }
.hm-ms__save[data-tedit] { z-index: 6; }
.hm-ms__save[data-label-style-pop] { z-index: 7; }
.hm-ms__save[data-fill-dlg] { z-index: 8; }
.hm-ms__save-card.hm-ms__tedit-card {
  width: min(52rem, 96%);
  max-height: calc(100% - 0.5rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.hm-ms__tedit-card > h6,
.hm-ms__tedit-card > p,
.hm-ms__tedit-tb,
.hm-ms__tedit-card > .d-flex { flex: 0 0 auto; }
.hm-ms__tedit-field {
  flex: 1 1 auto; min-height: 0; overflow: hidden;
  display: flex; flex-direction: column;
}
.hm-ms__tedit-tb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem 0.4rem;
  margin-bottom: 0.5rem;
}
.hm-ms__te-g { display: inline-flex; align-items: center; gap: 0.12rem; flex: 0 0 auto; }
.hm-ms__te-place-pop {
  position: fixed; z-index: 1080; padding: 0.4rem;
  background: #fff; border: 1px solid #d1d5db; border-radius: 0.35rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}
.hm-ms__te-place-pop[hidden] { display: none !important; }
.hm-ms__tedit-tb .hm-ms__tb { width: 1.7rem; height: 1.7rem; font-size: 0.75rem; }
.hm-ms__tedit-tb .hm-ms__tb--edit { width: 1.95rem; height: 1.95rem; font-size: 0.88rem; }
.hm-ms__tedit-tb .hm-ms__font { width: 7rem; }
.hm-ms__tedit-tb .hm-ms__num { width: 5.6rem; min-width: 5.6rem; }
.hm-ms__tedit-tb .hm-ms__off2 .hm-ms__num { width: 4.4rem; min-width: 4.4rem; }
.hm-ms__tedit-tb .form-select,
.hm-ms__tedit-tb .form-control {
  padding: 0.08rem 0.28rem; min-height: 1.45rem; height: 1.45rem; font-size: 0.75rem;
}
.hm-ms__tedit-tb .hm-ms__chk { margin: 0; white-space: nowrap; }
.hm-ms__te-pair {
  display: inline-flex; align-items: center; gap: 0.15rem;
  border: 1px solid #e5e7eb; border-radius: 0.3rem; padding: 0.05rem 0.22rem;
  color: #4b5563; font-size: 0.72rem; height: 1.45rem;
}
.hm-ms__te-pair input[type="color"] { width: 1.4rem; height: 1.25rem; padding: 0; border: 1px solid #d1d5db; }
.hm-ms__tedit-tb input[type="color"] { width: 1.4rem; height: 1.25rem; padding: 0; border: 1px solid #d1d5db; }
.hm-ms__tedit-stage {
  flex: 1 1 auto; width: 100%; min-height: 14rem; max-height: 22rem;
  overflow: auto; position: relative;
  display: flex; align-items: center; justify-content: center;
  background: repeating-conic-gradient(#e5e7eb 0% 25%, #f9fafb 0% 50%) 50% / 0.7rem 0.7rem;
  border: 1px solid #d1d5db; border-radius: 0.4rem;
}
.hm-ms__tedit-card--block .hm-ms__tedit-stage,
.hm-ms__tedit-card--line .hm-ms__tedit-stage { min-height: 14rem; max-height: 22rem; }
.hm-ms__tedit-card--label {
  width: 100%; max-width: none; height: 100%; max-height: none;
  border-radius: 0; overflow: hidden;
}
.hm-ms__tedit-card--label .hm-ms__tedit-stage {
  max-height: none; min-height: 12rem;
  display: flex; align-items: center; justify-content: center;
}
.hm-ms__tedit-card--label .hm-ms__tedit-world { overflow: hidden; }
.hm-ms__tedit-tb .hm-ms__place-grid { grid-template-columns: repeat(3, 1.35rem); gap: 0.15rem; }
.hm-ms__tedit-tb .hm-ms__place-b { width: 1.35rem; height: 1.35rem; }
.hm-ms__tedit-tb .hm-ms__seg { margin: 0; }
.hm-ms__label-style-body { max-height: 70vh; overflow: auto; }
.hm-ms__gplus {
  position: absolute; inset: 0; pointer-events: none; z-index: 5; overflow: visible;
}
.hm-ms__gplus[hidden] { display: none !important; }
.hm-ms__gplus-b {
  position: absolute; pointer-events: auto;
  width: 1.75rem; height: 1.75rem; padding: 0; margin: 0;
  border-radius: 50%;
  border: 1px dashed rgba(37, 99, 235, 0.45);
  background: rgba(255, 255, 255, 0.42);
  color: rgba(37, 99, 235, 0.5);
  font-size: 1.2rem; line-height: 1; font-weight: 400;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.hm-ms__gplus-b:hover {
  background: #fff; color: #2563eb; border-style: solid; border-color: #2563eb;
}
.hm-ms__tedit-sizer { position: relative; }
.hm-ms__tedit-world {
  position: absolute; top: 0; left: 0;
  transform-origin: top left; overflow: hidden;
  outline: none; box-sizing: border-box;
}
.hm-ms__tedit-ed {
  border: 1px solid #d1d5db; border-radius: 0.4rem; padding: 0.55rem 0.7rem;
  background: #fff; min-height: 2.5rem; outline: none;
}
.hm-ms__tedit-ed--line { white-space: nowrap; overflow-x: auto; min-height: 3.2rem; }
.hm-ms__tedit-ed--block { min-height: 16rem; max-height: 56vh; overflow: auto; resize: vertical; width: 100%; white-space: pre-wrap; }
.hm-ms__tedit-world .hm-ms__tedit-ed {
  min-height: 0; max-height: none; overflow: visible; resize: none;
  border: 0; padding: 0; background: transparent; border-radius: 0;
}
.hm-ms__tedit-world .hm-ms__tedit-ed--empty {
  min-width: 1ch; min-height: 1em; caret-color: #111827;
}
.hm-ms__tedit-ed--locked {
  pointer-events: none; opacity: 0.4; caret-color: transparent;
}
.hm-ms__tedit-ghost {
  position: fixed; z-index: 1075; pointer-events: none;
  background: rgba(37, 99, 235, 0.35);
}
.hm-ms__textedit {
  position: fixed; z-index: 1100; margin: 0; border: 1px dashed rgba(100, 116, 139, 0.45);
  outline: none; overflow: hidden; background: transparent; box-sizing: border-box;
  transform-origin: top left; white-space: pre-wrap;
  font-synthesis: none; -webkit-font-smoothing: antialiased;
}
.hm-ms__tedit-tb [data-te-whole].is-on { background: #eff6ff; color: #1d4ed8; }
.hm-ms__tb[data-text-guides].is-on { background: #eff6ff; color: #1d4ed8; }

.hm-ms__textedit--line { white-space: nowrap; overflow: visible; }
.hm-ms__corners { display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem; }
.hm-ms__corners .hm-ms__num-lbl { margin: 0; }
.hm-ms__fill-pick { max-height: 12rem; overflow: auto; }
.hm-ms__chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.hm-ms__chip {
  border: 1px solid #dbeafe; background: #eff6ff; color: #1d4ed8;
  border-radius: 999px; padding: 0.2rem 0.55rem; font-size: 0.72rem; font-family: ui-monospace, monospace;
}
.hm-ms__tpl-list { display: flex; flex-direction: column; gap: 0.35rem; }
.hm-ms__tpl { display: flex; gap: 0.3rem; align-items: center; }
.hm-ms__tpl-open {
  flex: 1; text-align: left; border: 1px solid #e5e7eb; background: #fff;
  border-radius: 0.35rem; padding: 0.45rem 0.55rem; font-size: 0.85rem;
}
.hm-ms__save {
  position: absolute; inset: 0; z-index: 5;
  background: rgba(15, 23, 42, 0.4);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.hm-ms__save[hidden] { display: none !important; }
.hm-ms__save-card {
  width: min(24rem, 100%);
  background: #fff; border-radius: 0.6rem; padding: 1rem 1.1rem;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.25);
}
.hm-ms__cap { width: 6.5rem; }
.hm-ms__catalog {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.3rem;
  flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto;
}
.hm-ms__cat {
  border: 1px solid #e5e7eb; background: #fff; border-radius: 0.4rem;
  padding: 0.15rem; display: flex; flex-direction: column; align-items: center; gap: 0;
  font-size: 0.7rem; min-width: 0; min-height: 0;
}
.hm-ms__cat img { width: 100%; height: 3.15rem; object-fit: cover; border-radius: 0.25rem; display: block; }
.hm-ms__cat--dir { justify-content: center; color: #2563eb; }
.hm-ms__cat span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-ms__cat { position: relative; }
.hm-ms__credit {
  position: absolute; left: 0.3rem; bottom: 0.25rem;
  background: rgba(15, 23, 42, 0.55); color: #fff;
  font-size: 0.58rem; padding: 0 0.25rem; border-radius: 0.15rem;
  max-width: calc(100% - 0.6rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hm-ms__search { position: relative; }
.hm-ms__search i {
  position: absolute; left: 0.5rem; top: 50%; transform: translateY(-50%);
  color: #9ca3af; font-size: 0.75rem; pointer-events: none;
}
.hm-ms__search input { padding-left: 1.65rem; }
.hm-ms__swatch.is-on { outline: 2px solid #2563eb; outline-offset: 1px; }
.hm-ms__swatch--all {
  display: flex; align-items: center; justify-content: center;
  background: #f3f4f6; color: #6b7280; font-size: 0.75rem;
}
.hm-ms__tb.is-on { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; }
.hm-ms__tool-head {
  font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: #6b7280; font-weight: 600; margin-bottom: 0.4rem;
}
.hm-ms__tools { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.7rem; }
.hm-ms__tool {
  flex: 1 1 30%; min-width: 4.4rem;
  border: 1px solid #e5e7eb; background: #fff; border-radius: 0.4rem;
  padding: 0.4rem 0.25rem; font-size: 0.68rem; color: #374151;
  display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
}
.hm-ms__tool i { font-size: 0.95rem; }
.hm-ms__tool.is-on { background: #e8eef8; border-color: #93c5fd; color: #1d4ed8; }
.hm-ms__slider { display: flex; align-items: center; gap: 0.4rem; }
.hm-ms__slider input[type="range"] { flex: 1 1 auto; min-width: 0; }
.hm-ms__slider input[type="number"] { width: 3.6rem; }
.hm-ms__shape {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.3rem; min-height: 4.4rem;
}
.hm-ms__shape-lbl { font-size: 0.65rem; color: #6b7280; }
.hm-ms__ico { width: 2.1rem; height: 1.45rem; background: #9ca3af; display: block; }
.hm-ms__ico--rect { border-radius: 0.15rem; }
.hm-ms__ico--circle { width: 1.45rem; height: 1.45rem; border-radius: 50%; }
.hm-ms__ico--ellipse { width: 2.1rem; height: 1.2rem; border-radius: 50%; }
.hm-ms__ico--triangle {
  width: 0; height: 0; background: none;
  border-left: 0.8rem solid transparent; border-right: 0.8rem solid transparent;
  border-bottom: 1.4rem solid #9ca3af;
}
.hm-ms__ico--diamond { width: 1.15rem; height: 1.15rem; transform: rotate(45deg); }
.hm-ms__ico--hex { clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }
.hm-ms__ico--star { clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.hm-ms__ico--line { height: 0.18rem; width: 2rem; margin-top: 0.55rem; }
.hm-ms__ico--arrow {
  height: 0.18rem; width: 1.7rem; margin-top: 0.55rem; position: relative;
}
.hm-ms__ico--arrow::after {
  content: ""; position: absolute; right: -3px; top: -4px;
  border: 5px solid transparent; border-left-color: #9ca3af;
}
.hm-ms__gallery .hm-ms__catalog--unsplash {
  grid-template-columns: 1fr 1fr;
  align-content: start;
  max-height: 21rem;
}
.hm-ms__catalog--unsplash .hm-ms__cat img { height: 4.6rem; }
.hm-ms__pager {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.35rem; margin-top: 0.45rem;
}
.hm-ms__kinds { display: flex; gap: 0.25rem; }
.hm-ms__kind {
  flex: 1 1 0; min-width: 0;
  border: 1px solid #e5e7eb; background: #f3f4f6; color: #374151;
  border-radius: 0.3rem; padding: 0.28rem 0.2rem; font-size: 0.68rem;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em;
}
.hm-ms__kind.is-on { background: #fff; color: #111827; border-color: #111827; }
.hm-ms__dur {
  position: absolute; right: 0.3rem; top: 0.25rem;
  background: rgba(15, 23, 42, 0.7); color: #fff;
  font-size: 0.58rem; padding: 0 0.28rem; border-radius: 999px;
}
.hm-ms__cat--icon { background: #f8fafc; }
.hm-ms__cat--icon img { object-fit: contain; background: #fff; padding: 0.35rem; }
.hm-ms--idle .hm-ms__rail,
.hm-ms--idle .hm-ms__toolbar,
.hm-ms--idle .hm-ms__zoom,
.hm-ms--idle .hm-ms__side-tab {
  pointer-events: none;
  opacity: 0.42;
}
.hm-ms--idle .hm-ms__menu-wrap,
.hm-ms--idle [data-close-x],
.hm-ms--idle [data-expand] { pointer-events: auto; opacity: 1; }
.hm-ms__tb:disabled { opacity: 0.4; pointer-events: none; }
.hm-ms__shapes--3 { grid-template-columns: 1fr 1fr 1fr; }
.hm-ms__shape { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; padding: 0.4rem 0.2rem; }
.hm-ms__shape-lbl { font-size: 0.62rem; text-align: center; }
.hm-ms__chip.is-on { background: #1d4ed8; color: #fff; border-color: #1d4ed8; }
.hm-ms__pat-tune { margin-top: 0.55rem; }
.hm-ms__pat-tune .hm-ms__pair { margin-bottom: 0.45rem; }
.hm-ms__pats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.35rem; }
.hm-ms__pat { border: 1px solid #e5e7eb; background: #fff; border-radius: 0.35rem; padding: 0.2rem; }
.hm-ms__pat-preview { display: block; height: 2.2rem; background-size: 12px 12px; border-radius: 0.2rem; }
.hm-ms__gbar { position: relative; height: 1.4rem; margin: 0.4rem 0 0.8rem; }
.hm-ms__gbar-track { height: 0.7rem; border-radius: 999px; border: 1px solid #d1d5db; }
.hm-ms__gstop {
  position: absolute; top: 0.55rem; width: 0.85rem; height: 0.85rem; margin-left: -0.42rem;
  border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px #64748b; padding: 0;
}
.hm-ms__drop {
  border: 1px dashed #94a3b8; border-radius: 0.5rem; padding: 1.1rem 0.6rem;
  text-align: center; color: #64748b; font-size: 0.8rem; display: flex; flex-direction: column; gap: 0.35rem;
}
.hm-ms__drop.is-on { border-color: #2563eb; background: #eff6ff; }
.hm-ms__layer-row { display: flex; align-items: center; gap: 0.2rem; margin-bottom: 0.25rem; }
.hm-ms__layer-row .hm-ms__layer { flex: 1; margin: 0; }
.hm-ms__layer-row .hm-ms__tb { flex: 0 0 auto; width: 1.55rem; height: 1.55rem; padding: 0; }
.hm-ms__layer-row--nest { border-left: 2px solid #cbd5e1; margin-left: 0.2rem; }
.hm-ms__layer-row.hm-ms__layer--on .hm-ms__layer { border-color: #2563eb; background: #eff6ff; }
.hm-ms__chart-icos { display: flex; gap: 0.5rem; }
.hm-ms__cico {
  width: 3.4rem; height: 2.6rem; border: 1px solid #e5e7eb; background: #fff; border-radius: 0.4rem;
  display: flex; align-items: center; justify-content: center;
}
.hm-ms__cico-bar, .hm-ms__cico-bar::before, .hm-ms__cico-bar::after {
  display: inline-block; width: 0.35rem; background: #2563eb; border-radius: 1px;
}
.hm-ms__cico-bar { height: 0.7rem; position: relative; }
.hm-ms__cico-bar::before { content: ""; height: 1.1rem; position: absolute; left: -0.5rem; bottom: 0; }
.hm-ms__cico-bar::after { content: ""; height: 0.45rem; position: absolute; left: 0.5rem; bottom: 0; }
.hm-ms__cico-line {
  width: 1.6rem; height: 0.9rem;
  background: linear-gradient(135deg, transparent 45%, #0d9488 45%, #0d9488 55%, transparent 55%),
    linear-gradient(45deg, transparent 45%, #0d9488 45%, #0d9488 55%, transparent 55%);
}
.hm-ms__cico-pie {
  width: 1.15rem; height: 1.15rem; border-radius: 50%;
  background: conic-gradient(#2563eb 0 40%, #0d9488 40% 70%, #f59e0b 70% 100%);
}
.hm-ms__chart-head, .hm-ms__chart-row { display: grid; grid-template-columns: 1fr 4.2rem 1.7rem 1.3rem 4.2rem 1.8rem; gap: 0.28rem; margin-bottom: 0; align-items: center; }
.hm-ms__chart-head { font-size: 0.72rem; color: #6b7280; }
.hm-ms__chart-card { border: 1px solid #e5e7eb; border-radius: 0.4rem; padding: 0.4rem; margin-bottom: 0.4rem; }
.hm-ms__chart-row2 { display: grid; grid-template-columns: 1fr 8rem 7rem 4.2rem 4.2rem; gap: 0.28rem; margin-top: 0.3rem; }
.hm-ms__save-card--chart { width: min(48rem, 96vw); max-height: 86vh; overflow: auto; }
.hm-ms__chart-gap { max-width: 10rem; }
.hm-ms__ico--roundrect { border-radius: 0.45rem; }
.hm-ms__ico--octagon { clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); }
.hm-ms__ico--heart { clip-path: path("M12 21 C12 21 2 14 2 8 C2 5 4 3 7 3 C9 3 11 4 12 6 C13 4 15 3 17 3 C20 3 22 5 22 8 C22 14 12 21 12 21 Z"); width: 1.4rem; height: 1.3rem; }
.hm-ms__ico--plus { width: 1.2rem; height: 1.2rem; clip-path: polygon(35% 0, 65% 0, 65% 35%, 100% 35%, 100% 65%, 65% 65%, 65% 100%, 35% 100%, 35% 65%, 0 65%, 0 35%, 35% 35%); }
.hm-ms__ico--burst { clip-path: polygon(50% 0, 61% 28%, 95% 20%, 72% 48%, 100% 65%, 68% 68%, 70% 100%, 50% 78%, 30% 100%, 32% 68%, 0 65%, 28% 48%, 5% 20%, 39% 28%); }
.hm-ms__ico--arrow-block { clip-path: polygon(0 30%, 60% 30%, 60% 0, 100% 50%, 60% 100%, 60% 70%, 0 70%); }
.hm-ms__ico--chevron { clip-path: polygon(10% 0, 55% 50%, 10% 100%, 30% 100%, 75% 50%, 30% 0); }
.hm-ms__ico--banner { clip-path: polygon(0 0, 100% 0, 88% 50%, 100% 100%, 0 100%, 12% 50%); height: 1.1rem; }
.hm-ms__ico--ribbon { clip-path: polygon(10% 0, 100% 0, 88% 40%, 100% 40%, 100% 100%, 10% 100%, 0 20%); }
.hm-ms__ico--tag { clip-path: polygon(30% 0, 100% 0, 100% 100%, 30% 100%, 0 50%); }
.hm-ms__ico--pill { height: 0.85rem; border-radius: 999px; margin-top: 0.3rem; }
.hm-ms__ico--ring { width: 1.35rem; height: 1.35rem; border-radius: 50%; background: transparent; box-shadow: inset 0 0 0 0.32rem #9ca3af; }
.hm-ms__ico--pentagon { clip-path: polygon(50% 0, 100% 38%, 82% 100%, 18% 100%, 0 38%); }
.hm-ms__ico--trapezoid { clip-path: polygon(20% 0, 80% 0, 100% 100%, 0 100%); height: 1.15rem; }
.hm-ms__ico--parallelogram { clip-path: polygon(25% 0, 100% 0, 75% 100%, 0 100%); }
.hm-ms__ico--star6 { clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); transform: rotate(30deg); }
.hm-ms__ico--shield { clip-path: polygon(50% 0, 100% 18%, 100% 55%, 50% 100%, 0 55%, 0 18%); }
.hm-ms__ico--bookmark { clip-path: polygon(15% 0, 85% 0, 85% 100%, 50% 72%, 15% 100%); }
.hm-ms__ico--flag { clip-path: polygon(8% 0, 100% 0, 78% 38%, 100% 72%, 8% 72%, 8% 100%, 0 100%, 0 0); }
.hm-ms__ico--arrow-up { clip-path: polygon(50% 0, 100% 48%, 68% 48%, 68% 100%, 32% 100%, 32% 48%, 0 48%); }
.hm-ms__ico--arrow-down { clip-path: polygon(32% 0, 68% 0, 68% 52%, 100% 52%, 50% 100%, 0 52%, 32% 52%); }
.hm-ms__ico--arrow-left { clip-path: polygon(0 50%, 48% 0, 48% 32%, 100% 32%, 100% 68%, 48% 68%, 48% 100%); }
.hm-ms__ico--arrow-lr { clip-path: polygon(0 50%, 28% 18%, 28% 38%, 72% 38%, 72% 18%, 100% 50%, 72% 82%, 72% 62%, 28% 62%, 28% 82%); height: 1.1rem; }
.hm-ms__ico--cloud { clip-path: ellipse(45% 35% at 50% 58%); border-radius: 50%; }
.hm-ms__ico--speech { clip-path: polygon(8% 8%, 92% 8%, 92% 62%, 38% 62%, 18% 100%, 22% 62%, 8% 62%); }
.hm-ms__ico--lightning { clip-path: polygon(58% 0, 18% 55%, 46% 55%, 32% 100%, 82% 42%, 54% 42%); }
.hm-ms__ico--moon { width: 1.3rem; height: 1.3rem; border-radius: 50%; box-shadow: inset -0.4rem 0 0 0 #9ca3af; background: transparent; }
.hm-ms__ico--droplet { clip-path: polygon(50% 0, 100% 62%, 50% 100%, 0 62%); border-radius: 0 50% 50% 50%; }
.hm-ms__ico--flower { clip-path: polygon(50% 8%, 62% 32%, 92% 32%, 70% 52%, 80% 82%, 50% 66%, 20% 82%, 30% 52%, 8% 32%, 38% 32%); }
.hm-ms__ico--clover { clip-path: circle(42% at 50% 50%); }
.hm-ms__ico--grid, .hm-ms__ico--grid3, .hm-ms__ico--gridrow, .hm-ms__ico--gridcol,
.hm-ms__ico--gridnum, .hm-ms__ico--gridcal {
  background-color: transparent;
  background-image: linear-gradient(#9ca3af,#9ca3af), linear-gradient(#9ca3af,#9ca3af),
    linear-gradient(#9ca3af,#9ca3af), linear-gradient(#9ca3af,#9ca3af);
  background-size: 42% 42%;
  background-repeat: no-repeat;
  background-position: 0 0, 100% 0, 0 100%, 100% 100%;
}
.hm-ms__ico--grid3 {
  background-image: repeating-linear-gradient(#9ca3af 0 28%, transparent 28% 38%),
    repeating-linear-gradient(90deg, #9ca3af 0 28%, transparent 28% 38%);
  background-size: 100% 100%;
}
.hm-ms__ico--gridrow {
  background-image: linear-gradient(#9ca3af,#9ca3af), linear-gradient(#9ca3af,#9ca3af), linear-gradient(#9ca3af,#9ca3af);
  background-size: 28% 70%;
  background-position: 0 50%, 50% 50%, 100% 50%;
}
.hm-ms__ico--gridcol {
  background-image: linear-gradient(#9ca3af,#9ca3af), linear-gradient(#9ca3af,#9ca3af), linear-gradient(#9ca3af,#9ca3af);
  background-size: 70% 28%;
  background-position: 50% 0, 50% 50%, 50% 100%;
}
.hm-ms__ico--gridnum {
  background-image: repeating-linear-gradient(#9ca3af 0 28%, transparent 28% 38%),
    repeating-linear-gradient(90deg, #9ca3af 0 28%, transparent 28% 38%);
  background-size: 100% 100%;
}
.hm-ms__ico--gridcal {
  background-image: linear-gradient(#0d9488,#0d9488),
    repeating-linear-gradient(#9ca3af 0 22%, transparent 22% 32%),
    repeating-linear-gradient(90deg, #9ca3af 0 22%, transparent 22% 32%);
  background-size: 100% 22%, 100% 78%, 100% 78%;
  background-position: 0 0, 0 100%, 0 100%;
}
.hm-ms__wire {
  width: 7.4rem; height: 2rem; font-size: 0.72rem; padding: 0 0.35rem;
  border: 1px solid #d1d5db; border-radius: 0.3rem; background: #fff; color: #374151;
}
.hm-ms__save-card--cal { width: min(72rem, 96vw); }
.hm-ms__save-card--style { width: min(72rem, 96vw); max-height: 86vh; overflow: auto; }
.hm-ms__style-form {
  display: grid; grid-template-columns: minmax(18rem, 1fr) minmax(24rem, 1.25fr); gap: 1.25rem 2rem; align-items: start;
}
.hm-ms__style-h { font-size: 0.8rem; font-weight: 600; margin: 0 0 0.45rem; }
.hm-ms__style-fields {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem 0.7rem;
}
.hm-ms__style-fields label {
  display: flex; flex-direction: column; gap: 0.15rem; font-size: 0.72rem; color: #4b5563;
}
.hm-ms__style-fields .hm-ms__style-chk {
  flex-direction: row; align-items: center; gap: 0.35rem; margin-top: 1.15rem;
}
.hm-ms__paint-head, .hm-ms__paint-row {
  display: grid;
  grid-template-columns: 6.2rem 1.7rem 1.7rem 2.8rem 1.7rem minmax(5.5rem, 1fr) 3rem;
  gap: 0.3rem; align-items: center;
  margin-bottom: 0.3rem; font-size: 0.72rem; color: #4b5563;
}
.hm-ms__paint-head { font-weight: 600; }
.hm-ms__paint-row input[type="color"] { width: 1.7rem; height: 1.5rem; padding: 0; border: 1px solid #d1d5db; }
@media (max-width: 720px) {
  .hm-ms__style-form { grid-template-columns: 1fr; }
}
.hm-ms__day-names {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.25rem;
}
.hm-ms__day-names label { display: flex; flex-direction: column; gap: 0.15rem; font-size: 0.68rem; color: #4b5563; }
.hm-ms__chk-row { display: flex; flex-wrap: wrap; gap: 0.35rem 0.7rem; margin-bottom: 0.4rem; }
.hm-ms__step {
  display: flex; align-items: center; gap: 0.3rem; margin-bottom: 0.4rem;
}
.hm-ms__step > span { flex: 1 1 auto; font-size: 0.75rem; color: #4b5563; }
.hm-ms__step input { width: 3.2rem; text-align: center; }
.hm-ms__idle { top: 4.1rem; bottom: 3.4rem; left: 0.75rem; right: 0.75rem; border-radius: 0.45rem; }

.social-media--catalog { display: flex; flex-direction: column; min-height: 0; }
.social-media__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16rem;
  gap: 0.75rem;
  min-height: 28rem;
  height: calc(100vh - var(--happym-footer-height, 2.5rem) - 11rem);
}
.social-media__finder { min-height: 0; overflow: hidden; }
.social-media__finder-host { height: 100%; min-height: 24rem; }
.social-media__meta { min-height: 0; }
@media (max-width: 900px) {
  .social-media__layout { grid-template-columns: 1fr; height: auto; }
}

@media (max-width: 900px) {
  .social-post-editor { grid-template-columns: 1fr; }
}

.social-archive .hm-archive-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    flex: 0 0 auto;
    margin-bottom: 0.5rem;
}
.social-archive .hm-archive-toolbar__left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1 1 28rem;
    min-width: 0;
}
.social-archive .hm-archive-toolbar__left > .form-select:first-child {
    width: auto;
    min-width: 10rem;
    max-width: 13rem;
    flex: 0 0 auto;
}
.social-archive .hm-archive-search-input {
    flex: 1 1 14rem;
    min-width: 10rem;
}
.social-archive .hm-archive-view {
    width: auto;
    min-width: 13rem;
    max-width: 18rem;
    flex: 0 0 auto;
}
.social-archive .hm-archive-toolbar__actions {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-left: auto;
}
.hm-list-toolbar .hm-archive-action,
.social-archive .hm-archive-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    border: 0;
    background: transparent;
    padding: 6px 8px;
    min-width: 3.1rem;
    color: #475569;
}
.hm-list-toolbar .hm-archive-action:disabled,
.social-archive .hm-archive-action:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.hm-list-toolbar .hm-archive-action__icon,
.social-archive .hm-archive-action__icon {
    width: 2.05rem;
    height: 2.05rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #dbe4f0;
    color: var(--primary, #2C7BE5);
    box-shadow: 0 0.125rem 0.25rem rgba(15, 23, 42, 0.06);
}
.hm-list-toolbar .hm-archive-action--primary .hm-archive-action__icon,
.social-archive .hm-archive-action--primary .hm-archive-action__icon {
    background: var(--primary, #2C7BE5);
    border-color: var(--primary, #2C7BE5);
    color: #fff;
}
.hm-list-toolbar .hm-archive-action:not(:disabled):hover .hm-archive-action__icon,
.social-archive .hm-archive-action:not(:disabled):hover .hm-archive-action__icon {
    filter: brightness(0.96);
}
.hm-list-toolbar .hm-archive-action__label,
.social-archive .hm-archive-action__label {
    font-size: 0.68rem;
    line-height: 1;
    color: #64748b;
    white-space: nowrap;
}
.social-archive .hm-archive-filters {
    flex: 0 0 auto;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.5rem;
}
.social-archive .hm-archive-filters__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.65rem;
}
.social-archive .hm-archive-filters .form-select {
    min-width: 10rem;
    width: auto;
}
.social-archive .hm-archive-post {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    line-height: 1.2;
    padding: 0.15rem 0;
}
.social-archive .hm-archive-post__title {
    font-weight: 650;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.social-archive .hm-archive-post__sub {
    font-size: 0.75rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.social-archive .hm-archive-thumb {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    color: #4338ca;
    overflow: hidden;
}
.social-archive .hm-archive-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.social-archive .hm-archive-pills {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}
.social-archive .hm-archive-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.12rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
}
.social-archive .hm-archive-pill--draft { background: #e2e8f0; color: #334155; }
.social-archive .hm-archive-pill--progress { background: #dbeafe; color: #1d4ed8; }
.social-archive .hm-archive-pill--review { background: #ede9fe; color: #6d28d9; }
.social-archive .hm-archive-pill--approval { background: #fae8ff; color: #a21caf; }
.social-archive .hm-archive-pill--approved { background: #dcfce7; color: #15803d; }
.social-archive .hm-archive-pill--archived { background: #f1f5f9; color: #64748b; }
.social-archive .hm-archive-pill--error { background: #fee2e2; color: #b91c1c; }
.social-archive .hm-archive-pill--scheduled { background: #e0f2fe; color: #0369a1; }
.social-archive .hm-archive-pill--unscheduled { background: #f1f5f9; color: #64748b; }
.social-archive .hm-archive-pill--done { background: #dcfce7; color: #166534; }
.social-archive .hm-archive-pill--retry { background: #ffedd5; color: #c2410c; }
.social-archive .hm-archive-channels {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--primary, #2C7BE5);
    font-size: 0.95rem;
}
.social-archive .hm-archive-date { color: #334155; white-space: nowrap; }
.social-archive .hm-archive-kebab {
    border: 0;
    background: transparent;
    color: #64748b;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
}
.social-archive .hm-archive-kebab:hover { background: #f1f5f9; color: #0f172a; }
.social-archive .hm-archive-row-menu {
    min-width: 12rem;
    z-index: 1080;
}
.social-archive .hm-archive-empty {
    padding: 1.25rem;
    color: #64748b;
    text-align: center;
}
.social-archive .e-grid .e-rowcell { vertical-align: middle; }
.hm-list-page.social-archive .e-gridcontent { min-height: 0 !important; }
.hm-list-page.social-archive .e-grid .e-gridpager,
.hm-list-page.social-archive .e-grid .e-pager {
    visibility: visible !important;
}
.hm-post-scope-badge { font-weight: 650; }
.hm-post-scope-badge--pharmacy { background: #dbeafe; color: #1d4ed8; }
.hm-post-scope-badge--group { background: #e0e7ff; color: #3730a3; }
.hm-post-scope-badge--shared { background: #dcfce7; color: #15803d; }
