/* Tokens :root vêm de hypergestor-design-system.css (CRM). */

.hg-app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: var(--hg-font-sans);
    color: var(--hg-foreground);
    background: var(--hg-background);
}

/* ===== Shell com a altura da janela =====
 * Só com min-height o .hg-app crescia junto com o conteúdo: o documento inteiro rolava e
 * levava o sidebar junto (visível no Dashboard, 22/09: 1304px de página numa janela de 961px).
 * Com a altura travada, quem rola é o .hg-main-content, que já tem overflow: auto.
 * O embed fica de fora: roda dentro de iframe e rola pelo próprio documento. */
.hg-app:not(.hg-app--embed) {
    height: 100vh;
    height: 100dvh;
}

.hg-shell {
    display: flex;
    flex: 1;
    min-height: 0;
    background: var(--hg-background);
}

.hg-sidebar {
    --hg-sidebar-width: 17rem;
    --hg-sidebar-width-collapsed: 4.25rem;
    width: var(--hg-sidebar-width);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--hg-sidebar-border);
    background: var(--hg-sidebar);
    color: var(--hg-sidebar-foreground);
    transition: width 0.2s ease;
    overflow: visible;
    position: relative;
    z-index: 25;
}

.hg-sidebar.is-collapsed {
    width: var(--hg-sidebar-width-collapsed);
}

.hg-sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--hg-sidebar-border);
    min-height: 4.25rem;
    overflow: hidden;
}

.hg-sidebar-brand-link {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    flex: 0 1 auto;
    border-radius: var(--hg-radius-sm);
    padding: 0.15rem 0.25rem;
}

.hg-sidebar-brand-link:hover {
    background: transparent;
}

.hg-sidebar-brand-logo {
    display: block;
    height: 2.5rem;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.hg-sidebar-brand-logo--icon {
    display: none;
    height: 1.85rem;
    width: auto;
    max-width: none;
    flex-shrink: 0;
}

.hg-sidebar-toggle {
    position: absolute;
    top: 1.35rem;
    right: 0;
    transform: translateX(50%);
    z-index: 40;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    flex-shrink: 0;
    border: 1px solid rgb(255 255 255 / 0.4);
    border-radius: 9999px;
    background: var(--hg-sidebar);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 1px 4px rgb(0 0 0 / 0.28);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.hg-sidebar-toggle:hover,
.hg-sidebar-toggle:focus-visible {
    background: color-mix(in srgb, var(--hg-sidebar) 85%, white);
    border-color: rgb(255 255 255 / 0.65);
    color: #fff;
}

.hg-sidebar.is-collapsed .hg-sidebar-brand {
    justify-content: center;
    padding: 1rem 0.5rem;
    overflow: visible;
}

.hg-sidebar.is-collapsed .hg-sidebar-brand-link {
    flex: 0 0 auto;
    justify-content: center;
    width: auto;
    max-width: 100%;
    padding: 0.25rem;
}

.hg-sidebar.is-collapsed .hg-sidebar-brand-logo--full {
    display: none !important;
}

.hg-sidebar.is-collapsed .hg-sidebar-brand-logo--icon {
    display: block !important;
    height: 1.85rem;
    width: auto;
    max-width: none;
}

.hg-sidebar.is-collapsed .hg-nav-link span,
.hg-sidebar.is-collapsed .hg-nav-group-label,
.hg-sidebar.is-collapsed .hg-nav-chevron,
.hg-sidebar.is-collapsed .hg-sidebar-footer-version {
    display: none;
}

.hg-sidebar.is-collapsed .hg-nav {
    padding-inline: 0.5rem;
    align-items: stretch;
    overflow: visible;
}

.hg-sidebar.is-collapsed .hg-nav-link-top,
.hg-sidebar.is-collapsed .hg-nav-group-btn,
.hg-sidebar.is-collapsed .hg-nav-sub-link,
.hg-sidebar.is-collapsed .hg-nav-collapsed-link {
    justify-content: center;
    padding-inline: 0.5rem;
    gap: 0;
}

.hg-sidebar.is-collapsed .hg-sidebar-footer {
    padding: 0.5rem;
}

.hg-nav-collapsed {
    display: flex;
    flex-direction: column;
    gap: 0.1875rem;
    margin-top: 0.25rem;
}

.hg-nav-collapsed-link {
    position: relative;
}

/* Tooltip do menu recolhido */
.hg-sidebar.is-collapsed .hg-nav-link[data-tooltip] {
    position: relative;
}

.hg-sidebar.is-collapsed .hg-nav-link[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 0.75rem);
    top: 50%;
    transform: translateY(-50%) translateX(-0.15rem);
    padding: 0.35rem 0.65rem;
    border-radius: 0.375rem;
    background: #111827;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.25;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgb(0 0 0 / 0.22);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
    z-index: 80;
}

.hg-sidebar.is-collapsed .hg-nav-link[data-tooltip]::before {
    content: '';
    position: absolute;
    left: calc(100% + 0.4rem);
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: #111827;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.12s ease, visibility 0.12s ease;
    z-index: 81;
}

.hg-sidebar.is-collapsed .hg-nav-link[data-tooltip]:hover::after,
.hg-sidebar.is-collapsed .hg-nav-link[data-tooltip]:focus-visible::after,
.hg-sidebar.is-collapsed .hg-nav-link[data-tooltip]:hover::before,
.hg-sidebar.is-collapsed .hg-nav-link[data-tooltip]:focus-visible::before {
    opacity: 1;
    visibility: visible;
}

.hg-sidebar.is-collapsed .hg-nav-link[data-tooltip]:hover::after,
.hg-sidebar.is-collapsed .hg-nav-link[data-tooltip]:focus-visible::after {
    transform: translateY(-50%) translateX(0);
}

.hg-sidebar > .hg-nav,
.hg-sidebar > .hg-sidebar-footer {
    overflow-x: hidden;
}

.hg-sidebar-brand-icon {
    border-radius: var(--hg-radius-sm);
    background: var(--hg-sidebar-accent-strong);
    padding: 0.375rem;
    color: var(--hg-sidebar-primary);
}

.hg-sidebar-brand-text {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--hg-sidebar-foreground);
}

.hg-nav {
    flex: 1;
    padding: 0.875rem 0.625rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.hg-nav-group {
    display: flex;
    flex-direction: column;
    gap: 0.1875rem;
}

.hg-nav-group-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    border: none;
    background: transparent;
    border-radius: 0.5rem;
    padding: 0.5625rem 0.75rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25;
    color: hsl(0 0% 100% / 0.88);
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease, color 0.15s ease;
}

.hg-nav-group-btn > svg:first-child {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    color: hsl(0 0% 100% / 0.75);
}

.hg-nav-group-label {
    flex: 1;
    min-width: 0;
    text-align: left;
    color: inherit;
}

.hg-nav-chevron {
    width: 0.875rem;
    height: 0.875rem;
    flex-shrink: 0;
    color: hsl(0 0% 100% / 0.45);
}

.hg-nav-group-btn:hover,
.hg-nav-group-btn:focus-visible,
.hg-nav-group-btn:active,
.hg-nav-link:hover,
.hg-nav-link:focus-visible,
.hg-nav-link:active {
    background: hsl(0 0% 100% / 0.1);
    color: #fff;
}

.hg-nav-group-btn:hover > svg:first-child,
.hg-nav-group-btn:hover .hg-nav-chevron,
.hg-nav-link-top:hover svg {
    color: #fff;
}

.hg-nav-sub {
    display: flex;
    flex-direction: column;
    gap: 0.1875rem;
    margin: 0;
    /* Recuo leve sob o grupo + respiro vertical */
    padding: 0.25rem 0.25rem 0.375rem 0.875rem;
    border-left: none;
}

.hg-nav-link {
    display: block;
    border-radius: 0.5rem;
    padding: 0.5625rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25;
    color: hsl(0 0% 100% / 0.82);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

/* Subitens com ícone + texto completo */
.hg-nav-sub-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    box-sizing: border-box;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0;
    color: hsl(0 0% 100% / 0.72);
    padding: 0.5rem 0.75rem;
    line-height: 1.3;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
}

.hg-nav-sub-link > span {
    flex: 1;
    min-width: 0;
}

.hg-nav-sub-link > svg {
    width: 0.875rem;
    height: 0.875rem;
    flex-shrink: 0;
    color: hsl(0 0% 100% / 0.55);
}

.hg-nav-sub-link:hover,
.hg-nav-sub-link:focus-visible,
.hg-nav-sub-link:active {
    color: #fff;
    background: hsl(0 0% 100% / 0.14);
}

.hg-nav-sub-link:hover > svg,
.hg-nav-sub-link:focus-visible > svg,
.hg-nav-sub-link:active > svg {
    color: #fff;
}

.hg-nav-sub-link.is-active > svg,
.hg-nav-sub-link.is-active:hover > svg {
    color: var(--hg-sidebar-primary);
}

.hg-nav-link-top {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.125rem;
    padding: 0.5625rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.hg-nav-link-top svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    color: hsl(0 0% 100% / 0.75);
}

.hg-nav-link.is-active,
.hg-nav-link.is-active:hover,
.hg-nav-link.is-active:focus-visible,
.hg-nav-link.is-active:active,
.hg-nav-sub-link.is-active,
.hg-nav-sub-link.is-active:hover {
    background: hsl(var(--hg-hsl-brand) / 0.18);
    color: var(--hg-sidebar-primary);
    font-weight: 600;
}

.hg-nav-link.is-active svg,
.hg-nav-link-top.is-active svg {
    color: var(--hg-sidebar-primary);
}

.hg-nav-tools {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0.15rem 0 0.55rem;
}

.hg-nav-link--tool {
    background: rgb(244 129 32 / 0.22);
    border: 1px solid rgb(244 129 32 / 0.45);
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08);
}

.hg-nav-link--tool:hover,
.hg-nav-link--tool:focus-visible {
    background: rgb(244 129 32 / 0.34);
}

.hg-nav-link--tool.is-active,
.hg-nav-link--tool.is-active:hover {
    background: rgb(244 129 32 / 0.4);
    border-color: rgb(244 129 32 / 0.7);
}

.hg-sidebar-footer {
    border-top: 1px solid var(--hg-sidebar-border);
    padding: 0.75rem;
    font-size: 11px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0.5rem;
}

.hg-sidebar.is-collapsed .hg-sidebar-viewas {
    display: none;
}

.hg-sidebar-viewas {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    width: 100%;
}

.hg-sidebar-viewas__label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgb(255 255 255 / 0.82);
}

.hg-sidebar-viewas__search,
.hg-sidebar-viewas__select {
    width: 100%;
    border: 1px solid rgb(255 255 255 / 0.18);
    border-radius: 0.45rem;
    background: rgb(0 0 0 / 0.22);
    color: #fff;
    font-size: 11px;
    padding: 0.35rem 0.45rem;
}

.hg-sidebar-viewas__search::placeholder {
    color: rgb(255 255 255 / 0.45);
}

.hg-sidebar-viewas__select option {
    color: #0f172a;
    background: #fff;
}

.hg-sidebar-viewas__btn {
    width: 100%;
    border: 0;
    border-radius: 0.45rem;
    background: rgb(244 129 32 / 0.92);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 0.4rem 0.55rem;
    cursor: pointer;
}

.hg-sidebar-viewas__btn:hover:not(:disabled) {
    background: rgb(244 129 32 / 1);
}

.hg-sidebar-viewas__btn:disabled {
    opacity: 0.65;
    cursor: wait;
}

.hg-sidebar-viewas__erro {
    margin: 0;
    font-size: 10px;
    line-height: 1.35;
    color: #fecaca;
}

.hg-sidebar-footer-version {
    color: #FFF;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgb(0 0 0 / 0.35);
    align-self: center;
    text-align: center;
}

.hg-app a:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--hg-primary) 55%, transparent);
    outline-offset: 2px;
}

.hg-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.hg-main-content {
    flex: 1;
    min-height: 0;
    overflow: auto;
    position: relative;
    z-index: 1;
    background: var(--hg-background);
}

.hg-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--hg-border);
    background: var(--hg-card);
    position: sticky;
    top: 0;
    z-index: 20;
}

/*
 * Overlay/drawer vivem dentro de .hg-main-content (irmão do .hg-topbar).
 * Com z-index no topbar, o header fica sempre por cima da modal.
 * Solução: ao abrir overlay, o conteúdo sobe e o topbar desce no stacking.
 */
body:has(.hg-drawer-overlay) .hg-topbar,
body:has(.hg-sheet-root) .hg-topbar,
body:has(.cv-sheet) .hg-topbar,
body:has(.hg-modal-overlay) .hg-topbar,
body:has(.hg-whatsapp-fullscreen) .hg-topbar,
.hg-app:has(.hg-drawer-overlay) .hg-topbar,
.hg-app:has(.hg-sheet-root) .hg-topbar,
.hg-app:has(.cv-sheet) .hg-topbar,
.hg-app:has(.hg-modal-overlay) .hg-topbar,
.hg-app:has(.hg-whatsapp-fullscreen) .hg-topbar {
    z-index: 0 !important;
}

body:has(.hg-drawer-overlay) .hg-main-content,
body:has(.hg-sheet-root) .hg-main-content,
body:has(.cv-sheet) .hg-main-content,
body:has(.hg-modal-overlay) .hg-main-content,
body:has(.hg-whatsapp-fullscreen) .hg-main-content,
.hg-app:has(.hg-drawer-overlay) .hg-main-content,
.hg-app:has(.hg-sheet-root) .hg-main-content,
.hg-app:has(.cv-sheet) .hg-main-content,
.hg-app:has(.hg-modal-overlay) .hg-main-content,
.hg-app:has(.hg-whatsapp-fullscreen) .hg-main-content {
    z-index: 40 !important;
}

.hg-topbar-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    max-width: 28rem;
    min-width: 0;
    position: relative;
}

.hg-topbar-search-label {
    display: flex;
    color: var(--hg-muted-foreground);
    flex-shrink: 0;
}

.hg-topbar-search-field {
    position: relative;
    flex: 1;
    min-width: 0;
}

.hg-topbar-search-input {
    flex: 1;
    min-width: 0;
    width: 100%;
    border: none;
    background: var(--hg-muted);
    box-shadow: none;
    padding-right: 2rem;
}

.hg-topbar-search-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--hg-primary) 25%, transparent);
}

.hg-topbar-search-clear {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border: none;
    border-radius: 9999px;
    background: transparent;
    color: var(--hg-muted-foreground);
    cursor: pointer;
}

.hg-topbar-search-clear:hover {
    background: color-mix(in srgb, var(--hg-muted-foreground) 12%, transparent);
    color: var(--hg-foreground);
}

.hg-topbar-search-panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    min-width: min(28rem, calc(100vw - 2rem));
    border: 1px solid var(--hg-border);
    border-radius: calc(var(--hg-radius) - 2px);
    background: var(--hg-card);
    box-shadow: 0 12px 32px rgb(0 0 0 / 0.12);
    z-index: 40;
    overflow: hidden;
}

.hg-topbar-search-panel.is-loading {
    opacity: 0.85;
}

.hg-topbar-search-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    border-bottom: 1px solid var(--hg-border);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--hg-foreground);
}

.hg-topbar-search-panel-hint {
    font-weight: 500;
    color: var(--hg-muted-foreground);
}

.hg-topbar-search-empty {
    padding: 1rem 0.875rem;
    font-size: 0.8125rem;
    color: var(--hg-muted-foreground);
}

.hg-topbar-search-list {
    list-style: none;
    margin: 0;
    padding: 0.375rem;
    max-height: 20rem;
    overflow-y: auto;
}

.hg-topbar-search-group {
    margin: 0;
    padding: 0.5rem 0.875rem 0.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--hg-muted-foreground);
}

.hg-topbar-search-group + .hg-topbar-search-list {
    padding-top: 0.125rem;
}

.hg-topbar-search-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border: none;
    background: transparent;
    border-radius: calc(var(--hg-radius) - 4px);
    padding: 0.625rem 0.625rem;
    text-align: left;
    cursor: pointer;
    color: inherit;
}

.hg-topbar-search-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.375rem;
    background: color-mix(in srgb, var(--hg-primary) 10%, transparent);
    color: var(--hg-primary);
}

.hg-topbar-search-item-lead {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
}

.hg-topbar-search-item:hover,
.hg-topbar-search-item:focus-visible {
    background: var(--hg-muted);
    outline: none;
}

.hg-topbar-search-item-main {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.hg-topbar-search-item-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--hg-foreground);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hg-topbar-search-item-sub {
    font-size: 0.75rem;
    color: var(--hg-muted-foreground);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hg-topbar-search-item-badge {
    flex-shrink: 0;
}

.hg-topbar-search-footer {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    border: none;
    border-top: 1px solid var(--hg-border);
    background: color-mix(in srgb, var(--hg-muted) 50%, transparent);
    padding: 0.625rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--hg-primary);
    cursor: pointer;
}

.hg-topbar-search-footer:hover {
    background: color-mix(in srgb, var(--hg-primary) 8%, transparent);
}

.hg-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.hg-topbar-editar-cadastro {
    display: contents;
}

.hg-topbar-dropdown {
    position: relative;
}

.hg-topbar-icon-btn,
.hg-topbar-user-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    background: transparent;
    color: var(--hg-foreground);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.hg-topbar-icon-btn {
    padding: 0.5rem;
    position: relative;
}

.hg-topbar-icon-btn:hover,
.hg-topbar-user-btn:hover {
    background: var(--hg-muted);
    border-color: var(--hg-border);
}

.hg-topbar-user-btn {
    padding: 0.375rem 0.5rem 0.375rem 0.375rem;
    max-width: 16rem;
}

.hg-topbar-user-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    text-align: left;
}

.hg-topbar-user-name {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 10rem;
}

.hg-topbar-user-email,
.hg-topbar-user-meta {
    font-size: 0.6875rem;
    color: var(--hg-muted-foreground);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 10rem;
}

.hg-topbar-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background: color-mix(in srgb, var(--hg-primary) 15%, transparent);
    color: var(--hg-primary);
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.hg-topbar-avatar-lg {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 0.875rem;
}

.hg-topbar-panel {
    position: absolute;
    top: calc(100% + 0.375rem);
    right: 0;
    width: min(20rem, calc(100vw - 2rem));
    border: 1px solid var(--hg-border);
    border-radius: calc(var(--hg-radius) - 2px);
    background: var(--hg-card);
    box-shadow: 0 8px 24px rgb(0 0 0 / 0.08);
    padding: 0.75rem;
    z-index: 30;
}

.hg-topbar-panel-title {
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.hg-topbar-panel-empty {
    font-size: 0.8125rem;
    color: var(--hg-muted-foreground);
    padding: 0.5rem 0;
}

.hg-topbar-notify-badge {
    position: absolute;
    top: 0.15rem;
    right: 0.15rem;
    min-width: 1rem;
    height: 1rem;
    padding: 0 0.2rem;
    border-radius: 9999px;
    background: var(--hg-primary);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1rem;
    text-align: center;
}

.hg-topbar-notify-panel {
    width: min(26.25rem, calc(100vw - 2rem));
    max-height: min(35rem, calc(100vh - 5rem));
    overflow: hidden;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.hg-topbar-notify-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.25rem 0.75rem;
}

.hg-topbar-notify-panel .hg-topbar-panel-title {
    margin-bottom: 0;
}

.hg-topbar-notify-clear {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    padding: 0.35rem 0.5rem;
    border: none;
    border-radius: 0.5rem;
    background: transparent;
    color: var(--hg-primary);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.hg-topbar-notify-clear:hover:not(:disabled) {
    background: color-mix(in srgb, var(--hg-primary) 10%, transparent);
}

.hg-topbar-notify-clear:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.hg-topbar-notify-empty {
    padding: 3rem 1.5rem 2.5rem;
    text-align: center;
    color: var(--hg-muted-foreground);
}

.hg-topbar-notify-empty svg {
    display: block;
    margin: 0 auto 0.75rem;
    stroke: #d6d3d1;
}

.hg-topbar-notify-empty p {
    margin: 0;
    font-size: 0.875rem;
}

.hg-topbar-notify-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    overflow-y: auto;
    min-height: 0;
    padding: 0 0.75rem 0.75rem;
}

.hg-topbar-notify-item {
    --hg-interesse: var(--hg-primary);
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-height: 4.75rem;
    padding: 0.875rem 2.5rem 0.875rem 1rem;
    border: 1px solid var(--hg-border);
    border-left: 3px solid var(--hg-interesse);
    border-radius: 0.625rem;
    background: #fff;
    color: inherit;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    box-sizing: border-box;
    transition: background 0.15s ease, transform 0.15s ease, opacity 0.2s ease, max-height 0.25s ease, margin 0.25s ease, padding 0.25s ease;
}

.hg-topbar-notify-item:hover {
    background: #fafaf9;
}

.hg-topbar-notify-item.is-read {
    opacity: 0.72;
}

.hg-topbar-notify-item.is-removing {
    opacity: 0;
    transform: translateX(12px);
}

.hg-topbar-notify-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.375rem;
    height: 2.375rem;
    border-radius: 0.625rem;
    background: color-mix(in srgb, var(--hg-interesse) 14%, #fff);
    color: var(--hg-interesse);
}

.hg-topbar-notify-body {
    min-width: 0;
    flex: 1;
}

.hg-topbar-notify-tag {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--hg-interesse);
    line-height: 1.2;
    margin-bottom: 0.125rem;
}

.hg-topbar-notify-name {
    font-size: 0.90625rem;
    font-weight: 700;
    color: #1c1917;
    line-height: 1.25;
    margin-bottom: 0.25rem;
    word-break: break-word;
}

.hg-topbar-notify-phone {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: #78716c;
    margin-bottom: 0.25rem;
}

.hg-topbar-notify-phone svg {
    flex-shrink: 0;
}

.hg-topbar-notify-preview {
    font-size: 0.75rem;
    color: #57534e;
    line-height: 1.35;
    margin-bottom: 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hg-topbar-notify-time {
    font-size: 0.75rem;
    color: #a8a29e;
}

.hg-topbar-notify-trash {
    position: absolute;
    top: 0.625rem;
    right: 0.625rem;
    width: 1.875rem;
    height: 1.875rem;
    padding: 0;
    border: none;
    border-radius: 0.5rem;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.hg-topbar-notify-item:hover .hg-topbar-notify-trash,
.hg-topbar-notify-item:focus-within .hg-topbar-notify-trash {
    opacity: 1;
    transform: scale(1);
}

.hg-topbar-notify-trash:hover {
    background: #fee2e2;
}

.hg-topbar-notify-trash svg {
    stroke: #dc2626;
}

.hg-interesse-toasts {
    position: fixed;
    top: 4.75rem;
    right: 1.25rem;
    z-index: 80;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.hg-interesse-toast {
    --hg-interesse: var(--hg-primary);
    position: relative;
    pointer-events: auto;
    width: 22.5rem;
    max-width: calc(100vw - 2rem);
    cursor: pointer;
}

.hg-interesse-toast__ttl {
    position: absolute;
    left: 4px;
    right: 0;
    bottom: 0;
    height: 3px;
    overflow: hidden;
    border-radius: 0 0 0.75rem 0.75rem;
    background: color-mix(in srgb, var(--hg-interesse) 18%, #fff);
    pointer-events: none;
}

.hg-interesse-toast__ttl-bar {
    display: block;
    height: 100%;
    width: 100%;
    transform-origin: left center;
    background: var(--hg-interesse);
    animation: hg-interesse-toast-ttl var(--hg-toast-ms, 12s) linear forwards;
}

@keyframes hg-interesse-toast-ttl {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

.hg-interesse-card {
    --hg-interesse: var(--hg-primary);
    --hg-interesse-soft: color-mix(in srgb, var(--hg-interesse) 16%, #fff);
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 0.75rem;
    align-items: start;
    padding: 0.85rem 2rem 0.7rem 0.95rem;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 14px 36px rgb(15 23 42 / 0.14);
    overflow: hidden;
}

.hg-interesse-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--hg-interesse);
}

.hg-interesse-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    background: var(--hg-interesse-soft);
    color: var(--hg-interesse);
    flex-shrink: 0;
}

.hg-interesse-card__body {
    min-width: 0;
    padding-bottom: 1.1rem;
}

.hg-interesse-card__kicker {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--hg-interesse);
    line-height: 1.2;
    margin-bottom: 0.2rem;
}

.hg-interesse-card__nome {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.25;
    margin-bottom: 0.2rem;
}

.hg-interesse-card__phone {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8125rem;
    color: #6b7280;
}

.hg-interesse-card__phone svg {
    flex-shrink: 0;
    color: #9ca3af;
}

.hg-interesse-card__when {
    position: absolute;
    right: 0.85rem;
    bottom: 0.55rem;
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    font-size: 0.6875rem;
    color: #9ca3af;
}

.hg-interesse-card__close {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: none;
    border-radius: 9999px;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
}

.hg-interesse-card__close:hover {
    background: #f3f4f6;
    color: #4b5563;
}

.hg-topbar-user-panel-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--hg-border);
}

.hg-topbar-logout-form {
    margin: 0;
}

.hg-topbar-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.625rem;
    margin-bottom: 0.25rem;
    border: none;
    border-radius: 0.375rem;
    background: transparent;
    color: var(--hg-foreground);
    font-size: 0.875rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
}

.hg-topbar-menu-btn svg {
    flex-shrink: 0;
    color: var(--hg-muted-foreground);
}

.hg-topbar-menu-btn:hover {
    background: color-mix(in srgb, var(--hg-foreground) 6%, transparent);
}

.hg-topbar-logout-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.625rem;
    border: none;
    border-radius: 0.375rem;
    background: transparent;
    color: var(--hg-destructive);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.hg-topbar-logout-btn:hover {
    background: color-mix(in srgb, var(--hg-destructive) 8%, transparent);
}

.hg-topbar-logout-form--inline {
    display: none;
}

.hg-topbar-logout-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    border: 1px solid var(--hg-border);
    background: var(--hg-card);
    color: var(--hg-foreground);
}

.hg-topbar-logout-inline:hover {
    background: var(--hg-muted);
}

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

@media (min-width: 900px) {
    .hg-topbar-logout-form--inline {
        display: block;
    }

    .hg-topbar-user-panel .hg-topbar-logout-form {
        display: none;
    }
}

@media (max-width: 640px) {
    .hg-topbar {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
    }

    .hg-topbar-search {
        order: 3;
        flex-basis: 100%;
        max-width: none;
    }

    .hg-topbar-user-text {
        display: none;
    }
}

.hg-page {
    margin: 0 auto;
    max-width: 1600px;
    padding: 1.5rem;
}

.hg-app .hg-main .fi-page:has(.hg-meta-embed-full),
.hg-app--v2 .hg-main .fi-page:has(.hg-meta-embed-full) {
    padding: 0;
}

.hg-app .hg-main .fi-page:has(.hg-meta-embed-full) .fi-section,
.hg-app--v2 .hg-main .fi-page:has(.hg-meta-embed-full) .fi-section,
.hg-app .hg-main .fi-page:has(.hg-meta-embed-full) .fi-page-content,
.hg-app--v2 .hg-main .fi-page:has(.hg-meta-embed-full) .fi-page-content {
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.hg-app .fi-page:has(.hg-meta-embed-full) .fi-header,
.hg-app--v2 .fi-page:has(.hg-meta-embed-full) .fi-header,
.hg-app .fi-page:has(.hg-meta-embed-full) .fi-page-header,
.hg-app--v2 .fi-page:has(.hg-meta-embed-full) .fi-page-header {
    display: none;
}

.hg-meta-embed-full {
    width: 100%;
    max-width: 1600px;
    height: auto;
    min-height: calc(100dvh - 7rem);
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.hg-meta-embed-full iframe {
    display: block;
    width: 100%;
    height: auto;
    min-height: calc(100dvh - 10rem);
    flex: 1 1 auto;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.hg-meta-embed-full--in-page {
    max-width: none;
    min-height: calc(100dvh - 16rem);
    padding: 0;
}

.hg-meta-embed-full--in-page iframe {
    min-height: calc(100dvh - 16rem);
}

.hg-page--dashboard {
    padding-bottom: 0.75rem;
}

.hg-page-stack > * + * {
    margin-top: 1rem;
}

.hg-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.hg-page-header-left {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.hg-page-icon {
    border-radius: var(--hg-radius);
    background: color-mix(in srgb, var(--hg-primary) 10%, transparent);
    padding: 0.625rem;
    color: var(--hg-primary);
}

.hg-page-title {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.hg-page-subtitle {
    margin-top: 0.125rem;
    font-size: 0.875rem;
    color: var(--hg-muted-foreground);
}

.hg-card {
    border-radius: var(--hg-radius);
    border: 1px solid var(--hg-border);
    background: var(--hg-card);
}

.hg-card-padded {
    padding: 1rem 1.25rem;
}

.hg-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
}

.hg-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.hg-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--hg-muted-foreground);
}

.hg-input,
.hg-select {
    height: 2.25rem;
    border-radius: calc(var(--hg-radius) - 2px);
    border: 1px solid var(--hg-input);
    background: var(--hg-card);
    padding: 0 0.75rem;
    font-size: 0.875rem;
    color: var(--hg-foreground);
}

.hg-input:focus,
.hg-select:focus {
    outline: 2px solid color-mix(in srgb, var(--hg-primary) 30%, transparent);
    outline-offset: 1px;
}

.hg-input-date {
    width: 10rem;
}

.hg-input-search {
    width: 100%;
    min-width: 220px;
}

.hg-select {
    min-width: 15rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
}

.hg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    height: 2.25rem;
    border-radius: calc(var(--hg-radius) - 2px);
    border: 1px solid var(--hg-border);
    background: var(--hg-card);
    padding: 0 0.75rem;
    font-size: 0.875rem;
    color: var(--hg-foreground);
    cursor: pointer;
}

.hg-btn:hover,
.hg-btn:focus,
.hg-btn:focus-visible,
.hg-btn:active {
    background: var(--hg-muted);
    color: var(--hg-foreground);
}

.hg-btn-primary,
.hg-btn-primary:hover,
.hg-btn-primary:focus,
.hg-btn-primary:focus-visible,
.hg-btn-primary:active,
.hg-btn.hg-btn-primary,
.hg-btn.hg-btn-primary:hover,
.hg-btn.hg-btn-primary:focus,
.hg-btn.hg-btn-primary:focus-visible,
.hg-btn.hg-btn-primary:active {
    background: var(--hg-primary) !important;
    border-color: var(--hg-primary) !important;
    color: var(--hg-primary-foreground) !important;
    color: #ffffff !important;
    filter: none !important;
}

.hg-btn-primary:hover,
.hg-btn-primary:focus,
.hg-btn-primary:focus-visible,
.hg-btn-primary:active,
.hg-btn.hg-btn-primary:hover,
.hg-btn.hg-btn-primary:focus,
.hg-btn.hg-btn-primary:focus-visible,
.hg-btn.hg-btn-primary:active {
    background: var(--hg-primary-hover) !important;
    border-color: var(--hg-primary-hover) !important;
    color: #ffffff !important;
}

.hg-btn-icon {
    width: 2.25rem;
    padding: 0;
}

.hg-btn-sm {
    height: 1.75rem;
    padding: 0 0.5rem;
    font-size: 0.75rem;
}

.hg-tabs {
    display: inline-flex;
    border-radius: calc(var(--hg-radius) - 2px);
    border: 1px solid var(--hg-border);
    padding: 0.125rem;
    background: var(--hg-muted);
}

.hg-tab {
    border: none;
    background: transparent;
    border-radius: calc(var(--hg-radius) - 4px);
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    color: var(--hg-muted-foreground);
    cursor: pointer;
}

.hg-tab.is-active {
    background: var(--hg-card);
    color: var(--hg-foreground);
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
}

.hg-totalizers {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .hg-totalizers {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .hg-totalizers {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

/* 7 cards numa linha só (Eventos no modo LINX, que tem Retornos a mais).
   Modificador em vez de mudar a base: a view mock de Eventos também usa
   .hg-totalizers e tem 6 cards. */
@media (min-width: 1024px) {
    .hg-totalizers--7 {
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }
}

.hg-totalizer {
    position: relative;
    border-radius: var(--hg-radius);
    border: 1px solid var(--hg-border);
    background: var(--hg-card);
    padding: 0.75rem 1rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
}

.hg-totalizer:hover {
    background: color-mix(in oklch, var(--hg-muted) 40%, transparent);
}

.hg-totalizer.is-active {
    border-color: color-mix(in oklch, var(--hg-primary) 40%, transparent);
    box-shadow: 0 0 0 2px color-mix(in oklch, var(--hg-primary) 50%, transparent);
}

.hg-totalizer-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Ícone de ajuda: fica na ponta direita do cabeçalho do card. O balão é
   absoluto e escapa do card, então .hg-totalizer precisa de position: relative. */
.hg-totalizer-info {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    color: var(--hg-muted-foreground);
    line-height: 0;
}

.hg-totalizer-info:hover {
    color: var(--hg-foreground);
}

.hg-totalizer-tip {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    z-index: 30;
    width: max-content;
    max-width: 22rem;
    border-radius: calc(var(--hg-radius) - 2px);
    background: var(--hg-primary);
    color: #fff;
    padding: 0.625rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.35;
    text-align: left;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.12s;
    pointer-events: none;
}

/* Nos últimos cards o balão sairia da tela pela direita: ancora pela direita. */
.hg-totalizer-tip--fim {
    left: auto;
    right: 0;
}

.hg-totalizer-info:hover .hg-totalizer-tip {
    opacity: 1;
    visibility: visible;
}

.hg-totalizer-count {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1;
}

.hg-totalizer-label {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--hg-muted-foreground);
}

/* =============================================================================
   Mensagens não lidas do WhatsApp na aba Retornos de campanhas
   Contadores vêm de /api/whatsapp/conversations; ausência de conversa = zero, e
   badge zerado não é desenhado.
   ============================================================================= */

/* Badge no canto do card de status. O .hg-totalizer já é position:relative. */
.hg-totalizer-unread {
    position: absolute;
    top: -0.375rem;
    right: -0.375rem;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.3125rem;
    border-radius: 9999px;
    background: var(--hg-status-nao-compareceu, #dc2626);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 0 0 2px var(--hg-card);
}

/* Barra "Mensagens: Não lidas | Lidas | Todas" */
.hg-msg-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.625rem 0.875rem;
    margin-bottom: 0.25rem;
    border: 1px solid var(--hg-border);
    border-radius: var(--hg-radius);
    background: var(--hg-card);
}

.hg-msg-filter-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--hg-muted-foreground);
    margin-right: 0.25rem;
}

.hg-msg-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--hg-border);
    border-radius: 9999px;
    background: transparent;
    color: var(--hg-foreground);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.hg-msg-filter-chip:hover {
    background: color-mix(in oklch, var(--hg-muted) 40%, transparent);
}

.hg-msg-filter-chip.is-active {
    border-color: var(--hg-primary);
    background: color-mix(in srgb, var(--hg-primary) 12%, white);
    color: color-mix(in srgb, var(--hg-primary) 85%, #0f172a);
}

.hg-msg-filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.125rem;
    height: 1.125rem;
    padding: 0 0.25rem;
    border-radius: 9999px;
    background: var(--hg-status-nao-compareceu, #dc2626);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1;
}

/* Contador sobre o ícone do WhatsApp, na linha do evento. */
.hg-event-whatsapp--unread {
    position: relative;
}

.hg-event-unread-badge {
    position: absolute;
    top: -0.375rem;
    right: -0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.125rem;
    height: 1.125rem;
    padding: 0 0.25rem;
    border-radius: 9999px;
    background: var(--hg-status-nao-compareceu, #dc2626);
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 0 0 2px var(--hg-card);
}

.hg-totalizer-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    flex-shrink: 0;
}

.hg-totalizer-todos .hg-totalizer-dot {
    background: var(--hg-status-bloqueado);
}

.hg-filter-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hg-event-row {
    border-radius: var(--hg-radius);
    border: 1px solid var(--hg-border);
    background: var(--hg-card);
    overflow: hidden;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
}

.hg-event-row-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.35rem;
    cursor: pointer;
}

.hg-event-row-main:hover {
    background: color-mix(in srgb, var(--hg-muted) 40%, transparent);
}

.hg-event-expand {
    border: none;
    background: transparent;
    color: var(--hg-muted-foreground);
    cursor: pointer;
    padding: 0.375rem;
    flex-shrink: 0;
}

.hg-whatsapp-avatar {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: none;
    border-radius: 9999px;
    background: #d1fae5;
    color: #059669;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    font: inherit;
}

.hg-event-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 1.25rem;
    row-gap: 0.875rem;
    flex: 1;
    min-width: 0;
    font-size: 0.875rem;
}

/* Largura fixa da coluna de status. Sem isso o badge, que é inline-flex sem
   largura, deixa sobras diferentes para o grid conforme o texto ("Agendado" vs
   "Não compareceu") e as 12 colunas caem em x diferente em cada linha. */
.hg-event-status {
    flex: 0 0 8.75rem;
    display: flex;
    justify-content: flex-end;
    padding-left: 0.5rem;
}

/* Decorativo: marca o canal de contato. Fica FORA do grid para não consumir
   uma das 12 colunas e reintroduzir o desalinhamento. */
.hg-event-whatsapp {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: none;
    border-radius: 9999px;
    background: var(--hg-status-recebido-bg);
    color: var(--hg-status-recebido);
    line-height: 0;
    cursor: pointer;
    font: inherit;
}

.hg-col-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--hg-muted-foreground);
    line-height: 1.2;
    margin-bottom: 0.375rem;
}

.hg-col-value {
    font-weight: 500;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hg-col-span-4 { grid-column: span 4 / span 4; }
.hg-col-span-3 { grid-column: span 3 / span 3; }
.hg-col-span-2 { grid-column: span 2 / span 2; }
.hg-col-span-1 { grid-column: span 1 / span 1; }

.hg-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    border-radius: 9999px;
    border: 1px solid;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    flex-shrink: 0;
}

.hg-badge-dot {
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 9999px;
}

.hg-event-expanded {
    border-top: 1px solid var(--hg-border);
    background: color-mix(in srgb, var(--hg-muted) 30%, transparent);
    padding: 1rem;
}

.hg-detail-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem;
}

.hg-detail-sidebar {
    grid-column: span 12;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: calc(var(--hg-radius) - 2px);
    border: 1px solid var(--hg-border);
    background: var(--hg-card);
    padding: 0.75rem;
}

@media (min-width: 768px) {
    .hg-detail-sidebar {
        grid-column: span 2;
    }

    .hg-detail-content {
        grid-column: span 10;
    }
}

.hg-lead-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    width: 100%;
}

.hg-lead-status {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
}

.hg-lead-status-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--hg-muted-foreground);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.hg-lead-actions .hg-select {
    min-width: 0;
    width: 100%;
}

.hg-lead-actions .hg-btn {
    width: 100%;
    justify-content: center;
}

.hg-detail-table {
    border-radius: calc(var(--hg-radius) - 2px);
    border: 1px solid var(--hg-border);
    background: var(--hg-card);
    overflow: hidden;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 768px) {
    .hg-detail-table {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.hg-detail-cell {
    padding: 0.75rem;
    border-right: 1px solid var(--hg-border);
    border-bottom: 1px solid var(--hg-border);
}

.hg-detail-cell-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--hg-muted-foreground);
    margin-bottom: 0.25rem;
}

.hg-detail-cell-value {
    font-size: 0.875rem;
}

.hg-bot-history {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-top: 0.35rem;
    padding: 0.75rem;
    max-height: 22rem;
    overflow-y: auto;
    border-radius: 0.75rem;
    border: 1px solid var(--hg-border);
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.9), rgba(241, 245, 249, 0.95)),
        repeating-linear-gradient(
            -12deg,
            transparent,
            transparent 11px,
            rgba(148, 163, 184, 0.06) 11px,
            rgba(148, 163, 184, 0.06) 12px
        );
}

.hg-bot-history--empty {
    align-items: flex-start;
    gap: 0.35rem;
}

.hg-bot-history--empty p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--hg-foreground, #0f172a);
}

.hg-bot-history-hint {
    font-size: 0.75rem !important;
    line-height: 1.45;
    color: var(--hg-muted-foreground, #64748b) !important;
}

.hg-bot-history-hint code {
    font-size: 0.7rem;
}

.hg-bot-history-row {
    display: flex;
    width: 100%;
}

.hg-bot-history-row--cliente,
.hg-bot-history-row--sistema {
    justify-content: flex-end;
}

.hg-bot-history-row--bot {
    justify-content: flex-start;
}

.hg-bot-history-bubble {
    max-width: min(92%, 28rem);
    padding: 0.55rem 0.75rem 0.6rem;
    border-radius: 0.85rem;
    box-shadow: 0 1px 1px rgba(15, 23, 42, 0.06);
}

.hg-bot-history-bubble--cliente {
    background: #dcf8c6;
    border-radius: 0.85rem 0.25rem 0.85rem 0.85rem;
}

.hg-bot-history-bubble--bot {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.25rem 0.85rem 0.85rem 0.85rem;
}

.hg-bot-history-bubble--sistema {
    background: #e2e8f0;
    border-radius: 0.85rem;
}

.hg-bot-history-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 0.2rem;
}

.hg-bot-history-bubble--cliente .hg-bot-history-meta {
    color: #3f6212;
}

.hg-bot-history-body {
    font-size: 0.875rem;
    white-space: pre-wrap;
    line-height: 1.45;
    color: #0f172a;
    word-break: break-word;
}

.hg-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.hg-empty {
    border-radius: var(--hg-radius);
    border: 1px solid var(--hg-border);
    background: var(--hg-card);
    padding: 4rem 1rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--hg-muted-foreground);
}

.hg-empty p {
    margin: 0;
}

.hg-empty-hint {
    margin-top: 0.5rem !important;
    font-size: 0.8125rem !important;
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.45;
}

.hg-empty-action {
    margin-top: 0.75rem;
}

/* Label sem caixa alta — formulários curtos de modal, onde o protótipo usa o
   rótulo em texto normal e não a versão "etiqueta" de filtro. */
.hg-label--plain {
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: normal;
    color: var(--hg-foreground);
}

.hg-label-optional {
    font-weight: 400;
    color: var(--hg-muted-foreground);
}

.hg-date-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hg-date-range-sep {
    color: var(--hg-muted-foreground);
}

.hg-filters-period-hint {
    flex: 1 0 100%;
    margin: 0.15rem 0 0;
    font-size: 0.75rem;
    color: var(--hg-muted-foreground);
}

.hg-filters-alert {
    flex: 1 0 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.15rem 0 0;
    padding: 0.55rem 0.7rem;
    border: 1px solid color-mix(in srgb, var(--hg-destructive) 35%, transparent);
    background: color-mix(in srgb, var(--hg-destructive) 8%, var(--hg-card));
    color: var(--hg-destructive);
    border-radius: 0.5rem;
    font-size: 0.8rem;
    line-height: 1.25;
}

.hg-filters-alert svg {
    flex: 0 0 auto;
}

.hg-pagination {
    margin-top: 0.75rem;
    border-radius: var(--hg-radius);
    border: 1px solid var(--hg-border);
    background: var(--hg-card);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: var(--hg-muted-foreground);
}

.hg-pagination-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.hg-legend {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.75rem;
}

.hg-legend-title {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--hg-muted-foreground);
}

.hg-legend-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.hg-legend-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 9999px;
}

.hg-callout {
    border-radius: calc(var(--hg-radius) + 4px);
    border: 1px solid color-mix(in oklch, var(--hg-primary) 30%, transparent);
    background: color-mix(in oklch, var(--hg-primary) 5%, transparent);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}

.hg-agenda-wrap {
    border-radius: calc(var(--hg-radius) + 4px);
    border: 1px solid var(--hg-border);
    background: var(--hg-card);
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
    overflow: auto;
    max-height: calc(100vh - 280px);
}

.hg-agenda-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

.hg-agenda-table th,
.hg-agenda-table td {
    border-right: 1px solid var(--hg-border);
    border-bottom: 1px solid var(--hg-border);
}

.hg-agenda-consultor {
    position: sticky;
    left: 0;
    z-index: 2;
    min-width: 16rem;
    background: var(--hg-card);
    padding: 0.5rem 0.75rem;
    font-weight: 500;
}

.hg-agenda-consultor-inner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hg-agenda-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background: color-mix(in srgb, var(--hg-primary) 10%, transparent);
    color: var(--hg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 600;
}

.hg-agenda-slot-head {
    min-width: 110px;
    padding: 0.5rem;
    text-align: center;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--hg-muted-foreground);
    background: color-mix(in srgb, var(--hg-muted) 50%, transparent);
    position: sticky;
    top: 0;
    z-index: 1;
}

.hg-agenda-cell {
    width: 110px;
    height: 76px;
    padding: 0.125rem;
    vertical-align: top;
}

.hg-agenda-card {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: calc(var(--hg-radius) - 4px);
    border: 1px solid;
    padding: 0.25rem 0.375rem;
    text-align: left;
    cursor: pointer;
    font-size: 0.6875rem;
    line-height: 1.3;
}

.hg-agenda-card-placa {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 600;
}

.hg-agenda-block {
    height: 100%;
    border-radius: calc(var(--hg-radius) - 4px);
    border: 1px solid var(--hg-status-bloqueado-border);
    background: var(--hg-status-bloqueado-bg);
    color: var(--hg-status-bloqueado);
    padding: 0.25rem 0.375rem;
}

.hg-callout-split {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
    .hg-callout-split {
        flex-direction: row;
        align-items: center;
        gap: 1.5rem;
    }
}

.hg-callout-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.875rem;
    min-width: 0;
    flex: 1;
}

.hg-callout-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0.375rem;
    box-sizing: border-box;
    border-radius: 0.375rem;
    background: color-mix(in oklch, var(--hg-primary) 15%, transparent);
    color: var(--hg-primary);
}

.hg-callout-icon svg {
    display: block;
    width: 1rem;
    height: 1rem;
    stroke: currentColor;
    flex-shrink: 0;
}

.hg-callout-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
    line-height: 1.35;
}

.hg-callout-item strong,
.hg-callout-text strong {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--hg-foreground);
}

.hg-callout-item span,
.hg-callout-text span {
    color: var(--hg-muted-foreground);
    font-size: 0.75rem;
}

.hg-callout-divider {
    display: none;
    width: 1px;
    height: 2rem;
    background: var(--hg-border);
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .hg-callout-divider {
        display: block;
    }
}

.hg-agenda-interactive {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hg-agenda-shell {
    border-radius: calc(var(--hg-radius) + 4px);
    border: 1px solid var(--hg-border);
    background: var(--hg-card);
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
    overflow: hidden;
}

.hg-agenda-scroll {
    overflow: auto;
    max-height: calc(100vh - 280px);
}

.hg-agenda-grid {
    min-width: max-content;
}

/* Barra de controles logo acima da grade: visão Dia/Semana, navegação de data e zoom. */
.hg-agenda-viewport {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hg-agenda-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hg-agenda-toolbar-view {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hg-agenda-zoom {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.hg-agenda-zoom-label {
    margin-right: 0.125rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--hg-muted-foreground);
}

.hg-agenda-zoom-value {
    min-width: 3rem;
    font-variant-numeric: tabular-nums;
}

.hg-agenda-zoom .hg-btn-icon.hg-btn-sm {
    width: 1.75rem;
}

/* `zoom` (e não `transform: scale`) porque refaz o layout: o container de
   rolagem passa a medir a grade no tamanho reduzido e cabe mais horário na
   tela, em vez de só encolher a pintura e manter a barra de rolagem. */
.hg-agenda-grid,
.hg-agenda-week-grid {
    zoom: var(--hg-agenda-zoom, 1);
}

.hg-agenda-grid-head,
.hg-agenda-grid-row {
    display: flex;
    border-bottom: 1px solid var(--hg-border);
}

.hg-agenda-grid-head {
    position: sticky;
    top: 0;
    z-index: 20;
    background: color-mix(in srgb, var(--hg-card) 95%, transparent);
    backdrop-filter: blur(6px);
}

.hg-agenda-grid-consultor-head {
    position: sticky;
    left: 0;
    z-index: 30;
    width: 16rem;
    flex-shrink: 0;
    border-right: 1px solid var(--hg-border);
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--hg-muted-foreground);
    background: color-mix(in srgb, var(--hg-card) 95%, transparent);
}

.hg-agenda-grid-slot-head {
    flex-shrink: 0;
    border-right: 1px solid var(--hg-border);
    padding: 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--hg-muted-foreground);
}

.hg-agenda-grid-consultor {
    position: sticky;
    left: 0;
    z-index: 10;
    width: 16rem;
    flex-shrink: 0;
    border-right: 1px solid var(--hg-border);
    background: var(--hg-card);
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
}

.hg-agenda-grid-cell {
    flex-shrink: 0;
    border-right: 1px solid var(--hg-border);
    padding: 0.125rem;
}

.hg-agenda-grid-cell-empty {
    cursor: cell;
    transition: background-color 0.15s, box-shadow 0.15s;
}

.hg-agenda-grid-cell-empty:hover {
    background: color-mix(in srgb, var(--hg-primary) 5%, transparent);
}

.hg-agenda-grid-cell-empty.is-selected {
    background: color-mix(in srgb, var(--hg-primary) 15%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hg-primary) 50%, transparent);
}

.hg-agenda-grid-cell-empty.is-drop-ok {
    background: color-mix(in srgb, var(--hg-drop-ok) 14%, transparent);
    box-shadow: inset 0 0 0 2px var(--hg-drop-ok);
}

.hg-agenda-grid-cell-empty.is-drop-bad {
    background: color-mix(in srgb, var(--hg-drop-bad) 14%, transparent);
    box-shadow: inset 0 0 0 2px var(--hg-drop-bad);
}

.hg-agenda-card-draggable {
    cursor: grab;
    transition: opacity 0.15s, transform 0.15s, box-shadow 0.15s;
}

.hg-agenda-card-draggable:active {
    cursor: grabbing;
}

.hg-agenda-card-draggable.is-dragging {
    opacity: 0.45;
    box-shadow: 0 0 0 2px var(--hg-primary);
}

.hg-agenda-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.25rem;
}

/* Ícone da classificação, ao lado da placa no card. Herda a cor do texto do
   card (que já contrasta com o fundo do status). */
.hg-agenda-card-tipo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.hg-agenda-card-tipo svg {
    width: 15px;
    height: 15px;
}

/* Selo do Box Express — raio, um pouco mais forte que o ícone de tipo. */
.hg-agenda-card-box {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    color: #ff8205;
}

.hg-agenda-card-box svg {
    width: 16px;
    height: 16px;
}

.hg-agenda-card-honda {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.hg-agenda-card-honda svg {
    width: 16px;
    height: 16px;
}

.hg-agenda-card-top .hg-agenda-card-placa {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hg-agenda-grip {
    opacity: 0.4;
    font-size: 0.625rem;
    line-height: 1;
}

.hg-agenda-card-owner {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 500;
    text-align: left;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 2px;
    transition: text-decoration-color 0.15s ease;
}

.hg-agenda-card-owner:hover,
.hg-agenda-week-card-owner:hover {
    text-decoration-color: currentColor;
}

.hg-agenda-card-time {
    margin-top: 0.125rem;
    font-size: 0.625rem;
    opacity: 0.7;
}

.hg-agenda-block-indisponivel {
    border-color: var(--hg-border);
    background: var(--hg-status-indisponivel-bg);
    color: var(--hg-status-indisponivel);
}

.hg-agenda-selection-bar {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid var(--hg-border);
    background: var(--hg-card);
    box-shadow: 0 10px 40px rgb(0 0 0 / 0.15);
}

.hg-agenda-selection-bar > span {
    padding-right: 0.5rem;
    margin-right: 0.25rem;
    border-right: 1px solid var(--hg-border);
    font-size: 0.75rem;
    color: var(--hg-muted-foreground);
    white-space: nowrap;
}

[x-cloak] {
    display: none !important;
}

.hg-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    justify-content: flex-end;
    background: rgb(0 0 0 / 0.8);
    overscroll-behavior: contain;
}

body:has(.hg-drawer-overlay),
html:has(.hg-drawer-overlay),
body:has(.hg-sheet-root),
html:has(.hg-sheet-root),
body:has(.cv-sheet),
html:has(.cv-sheet) {
    overflow: hidden !important;
}

.hg-atendimento-drawer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--hg-card);
    border-left: 1px solid var(--hg-border);
    box-shadow: -12px 0 40px rgb(0 0 0 / 0.15);
    overflow: hidden;
    pointer-events: auto;
    will-change: transform;
    animation: hg-sheet-slide-in-from-right 500ms ease-in-out both;
}

.hg-sheet-root.is-closing .hg-atendimento-drawer {
    animation: hg-sheet-slide-out-to-right 300ms ease-in-out both;
}

@media (min-width: 768px) {
    .hg-atendimento-drawer {
        width: 85vw;
    }
}

@media (min-width: 1024px) {
    .hg-atendimento-drawer {
        width: 82vw;
    }
}

@media (min-width: 1280px) {
    .hg-atendimento-drawer {
        width: 80vw;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hg-atendimento-drawer,
    .hg-sheet-root.is-closing .hg-atendimento-drawer {
        animation: none;
    }
}

.hg-drawer-close-fab {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 9999px;
    background: var(--hg-muted);
    color: var(--hg-muted-foreground);
    line-height: 0;
    cursor: pointer;
}

.hg-drawer-close-fab:hover {
    background: var(--hg-border);
    color: var(--hg-foreground);
}

.hg-atendimento-header {
    border-bottom: 1px solid var(--hg-border);
    background: var(--hg-card);
    flex-shrink: 0;
    padding: 0;
    position: relative;
}

.hg-atendimento-header-inner {
    padding: 1rem 3.5rem 1rem 1.5rem;
}

.hg-atendimento-header-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.hg-atendimento-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0.5rem;
    border-radius: 9999px;
    background: color-mix(in srgb, var(--hg-primary) 10%, transparent);
    color: var(--hg-primary);
    line-height: 0;
}

.hg-atendimento-name {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.hg-atendimento-id {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--hg-muted-foreground);
    background: var(--hg-muted);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
}

.hg-atendimento-header .hg-badge--status {
    border-radius: 0.375rem;
    padding: 0.125rem 0.625rem;
    font-size: 11px;
    font-weight: 600;
    gap: 0;
}

.hg-atendimento-body {
    flex: 1;
    min-height: 0;
    display: flex;
    background: color-mix(in srgb, var(--hg-muted) 30%, transparent);
}

.hg-atendimento-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    overflow: hidden;
}

.hg-atendimento-split {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    align-items: stretch;
}

.hg-atendimento-split-whatsapp {
    min-height: 320px;
    display: flex;
    flex-direction: column;
}

@media (min-width: 1024px) {
    .hg-atendimento-split {
        grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr);
    }

    .hg-atendimento-split-whatsapp {
        min-height: 0;
    }
}

.hg-atendimento-nav {
    width: 3.5rem;
    flex-shrink: 0;
    border-left: 1px solid var(--hg-border);
    background: var(--hg-card);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 0;
    gap: 0.25rem;
}

.hg-atendimento-nav-btn {
    position: relative;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 0.5rem;
    background: transparent;
    color: var(--hg-muted-foreground);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hg-atendimento-nav-btn:hover {
    background: var(--hg-muted);
    color: var(--hg-foreground);
}

.hg-atendimento-nav-btn.is-active {
    background: color-mix(in srgb, var(--hg-primary) 10%, transparent);
    color: var(--hg-primary);
}

.hg-atendimento-nav-btn.is-active::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 1.5rem;
    border-radius: 3px 0 0 3px;
    background: var(--hg-primary);
}

/* Rótulo da seção no hover, à esquerda do ícone (protótipo). Vem do
   data-label do botão: sem markup extra e sem depender do tooltip nativo,
   que aparece atrasado, embaixo do cursor e sem a cor da marca. */
.hg-atendimento-nav-btn::before {
    content: attr(data-label);
    position: absolute;
    right: calc(100% + 0.375rem);
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    padding: 0.3125rem 0.625rem;
    border-radius: 999px;
    background: var(--hg-primary);
    color: #ffffff;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgb(0 0 0 / 0.15);
    opacity: 0;
    visibility: hidden;
    transition: opacity 120ms ease-out;
    pointer-events: none;
}

.hg-atendimento-nav-btn:hover::before,
.hg-atendimento-nav-btn:focus-visible::before {
    opacity: 1;
    visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
    .hg-atendimento-nav-btn::before {
        transition: none;
    }
}

.hg-quadrant {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    border-radius: calc(var(--hg-radius) + 4px);
    border: 1px solid var(--hg-border);
    background: var(--hg-card);
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
    overflow: hidden;
}

.hg-quadrant-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    border-bottom: 1px solid var(--hg-border);
    background: color-mix(in srgb, var(--hg-muted) 30%, transparent);
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    flex-shrink: 0;
}

.hg-quadrant-icon,
.hg-solicitacoes-card-icon {
    color: var(--hg-primary);
    flex-shrink: 0;
}

.hg-quadrant-head:has(.hg-quadrant-icon) {
    justify-content: flex-start;
}

/* Ação no cabeçalho do card (ex.: "+" de nova anotação). O head com ícone é
   flex-start para o título colar no ícone, então a ação precisa do empurrão. */
.hg-quadrant-head-action {
    margin-left: auto;
}

.hg-quadrant-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem;
}

.hg-section-card {
    border-radius: calc(var(--hg-radius) + 4px);
    border: 1px solid var(--hg-border);
    background: var(--hg-card);
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.hg-section-card-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--hg-border);
    background: color-mix(in srgb, var(--hg-muted) 30%, transparent);
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.hg-section-card-body {
    padding: 0.25rem 1rem;
}

.hg-field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--hg-border);
    font-size: 0.875rem;
}

.hg-field-row:last-child {
    border-bottom: none;
}

/* `flex-shrink: 0` pareia com o label do cabeçalho: com valor longo, quem
   trunca é o valor — antes o label é que encolhia e quebrava em duas linhas. */
.hg-field-row-label {
    flex-shrink: 0;
    color: var(--hg-muted-foreground);
}

.hg-field-row-value {
    min-width: 0;
    font-weight: 500;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Linha cheia: label acima, valor abaixo ocupando a largura toda. É o formato
   para texto que não cabe numa linha (observação, link longo) — as classes
   `--full` eram usadas no markup sem existir no CSS, então esses campos
   herdavam o `nowrap` das linhas curtas e apareciam cortados. */
.hg-field-row--full {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
}

.hg-field-row--full .hg-field-row-value {
    text-align: left;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
}

/* Valor com quebras de linha próprias (nl2br). */
.hg-field-row-value--multiline {
    text-align: left;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
}

.hg-resumo-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: auto auto;
    gap: 0.75rem;
    flex: 1;
    min-height: 0;
}

.hg-resumo-agendamento { grid-column: span 12; min-height: 0; }
.hg-resumo-os { grid-column: span 12; min-height: 0; }
.hg-resumo-anotacoes { grid-column: span 12; min-height: 0; }
.hg-resumo-obs { grid-column: span 12; min-height: 0; }

@media (min-width: 1024px) {
    .hg-resumo-agendamento { grid-column: span 7; grid-row: span 1; }
    .hg-resumo-os { grid-column: span 5; grid-row: span 2; }
    .hg-resumo-anotacoes { grid-column: span 4; grid-row: span 1; }
    .hg-resumo-obs { grid-column: span 3; grid-row: span 1; }
}

/* Resumo LINX — Dados 7 + OS 5 rowspan / Observações 7 / Anotação Interna 7 */
.hg-resumo-solicitacoes { grid-column: span 12; min-height: 8rem; overflow: visible; }

@media (min-width: 1024px) {
    .hg-resumo-grid--linx .hg-resumo-agendamento { grid-column: span 7; grid-row: span 1; }
    .hg-resumo-grid--linx .hg-resumo-os { grid-column: span 5; grid-row: span 3; }
    .hg-resumo-grid--linx .hg-resumo-solicitacoes { grid-column: span 7; grid-row: span 1; }
    .hg-resumo-grid--linx .hg-resumo-anotacoes { grid-column: span 7; grid-row: span 1; }
}

.hg-solicitacoes {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: 100%;
    min-width: 0;
}

.hg-solicitacoes-erro {
    border-radius: calc(var(--hg-radius) - 2px);
    border: 1px solid color-mix(in srgb, var(--hg-destructive) 40%, transparent);
    background: color-mix(in srgb, var(--hg-destructive) 6%, transparent);
    color: var(--hg-destructive);
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
}

.hg-solicitacoes-empty-card {
    border-radius: calc(var(--hg-radius) + 4px);
    border: 1px solid var(--hg-border);
    background: var(--hg-card);
    padding: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--hg-muted-foreground);
}

.hg-solicitacoes-card,
.hg-solicitacoes-add {
    border-radius: calc(var(--hg-radius) + 4px);
    border: 1px solid var(--hg-border);
    background: var(--hg-card);
    overflow: visible;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.hg-solicitacoes-card-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-bottom: 1px solid var(--hg-border);
    background: color-mix(in srgb, var(--hg-muted) 30%, transparent);
    font-size: 0.875rem;
    font-weight: 600;
}

.hg-solicitacoes-card-icon {
    color: var(--hg-primary);
    flex-shrink: 0;
}

.hg-solicitacoes-empty {
    padding: 2rem 1rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--hg-muted-foreground);
}

.hg-solicitacoes-rows {
    display: flex;
    flex-direction: column;
}

.hg-solicitacoes-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--hg-border);
    font-size: 0.875rem;
}

.hg-solicitacoes-row:last-child {
    border-bottom: none;
}

.hg-solicitacoes-row-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hg-solicitacoes-nro {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.625rem;
    color: var(--hg-muted-foreground);
    margin-right: 0.35rem;
}

.hg-solicitacoes-desc {
    font-weight: 500;
}

.hg-solicitacoes-tipo {
    color: var(--hg-muted-foreground);
}

.hg-solicitacoes-trash {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: calc(var(--hg-radius) - 4px);
    border: 0;
    background: transparent;
    color: var(--hg-muted-foreground);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
}

.hg-solicitacoes-trash:hover {
    background: color-mix(in srgb, var(--hg-destructive) 10%, transparent);
    color: var(--hg-destructive);
}

.hg-solicitacoes-add {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hg-solicitacoes-add-title {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--hg-primary);
}

.hg-solicitacoes-label {
    display: block;
    font-size: 0.625rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--hg-muted-foreground);
    margin-bottom: 0.25rem;
}

.hg-solicitacoes-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.hg-solicitacoes-add-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.5rem;
}

.hg-solicitacoes-field--grow {
    flex: 1 1 180px;
}

.hg-solicitacoes-field--tipo {
    flex: 0 0 190px;
}

.hg-solicitacoes-field--classif {
    flex: 0 0 180px;
}

.hg-solicitacoes-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    height: 2.25rem;
    flex-shrink: 0;
}

.hg-whatsapp-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
    min-height: 280px;
    border-radius: calc(var(--hg-radius) + 4px);
    border: 1px solid var(--hg-border);
    background: var(--hg-card);
    overflow: hidden;
}

.hg-whatsapp-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.hg-whatsapp-expand-btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 1px solid var(--hg-border);
    border-radius: 0.375rem;
    background: var(--hg-muted);
    color: var(--hg-muted-foreground);
    cursor: pointer;
}

.hg-whatsapp-expand-btn:hover {
    background: var(--hg-border);
    color: var(--hg-foreground);
}

.hg-whatsapp-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--hg-border);
    background: color-mix(in srgb, var(--hg-muted) 40%, transparent);
    flex-shrink: 0;
}

.hg-whatsapp-toolbar--fullscreen {
    border-bottom: 1px solid var(--hg-border);
}

.hg-whatsapp-toolbar-hint-only {
    padding-block: 0.375rem;
}

.hg-whatsapp-toolbar-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--hg-muted-foreground);
    white-space: nowrap;
}

.hg-whatsapp-modelo-select {
    flex: 1;
    min-width: 0;
    font-size: 0.8125rem;
}

.hg-whatsapp-modelo-list {
    display: flex;
    gap: 0.375rem;
    overflow-x: auto;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--hg-border);
    background: var(--hg-card);
    flex-shrink: 0;
}

.hg-whatsapp-modelo-list--fullscreen {
    flex-wrap: wrap;
    overflow-x: visible;
    max-height: 7rem;
    overflow-y: auto;
}

.hg-whatsapp-modelo-chip {
    border: 1px solid var(--hg-border);
    border-radius: 9999px;
    background: var(--hg-muted);
    color: var(--hg-foreground);
    cursor: pointer;
    flex: 0 0 auto;
    font-size: 0.75rem;
    line-height: 1.2;
    max-width: 16rem;
    overflow: hidden;
    padding: 0.375rem 0.625rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hg-whatsapp-modelo-chip:hover,
.hg-whatsapp-modelo-chip.is-active {
    border-color: #059669;
    background: color-mix(in srgb, #059669 12%, white);
    color: #047857;
}

.hg-whatsapp-toolbar-hint {
    font-size: 0.75rem;
    color: var(--hg-muted-foreground);
    line-height: 1.35;
}

.hg-whatsapp-modelo-preview {
    flex-shrink: 0;
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid var(--hg-border);
    background: #efeae2;
}

.hg-whatsapp-modelo-preview--fullscreen {
    max-height: 8rem;
    overflow: auto;
}

.hg-whatsapp-modelo-preview-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--hg-muted-foreground);
    margin-bottom: 0.375rem;
}

.hg-whatsapp-modelo-preview-body {
    font-size: 0.8125rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.hg-whatsapp-modelo-use {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
}

.hg-whatsapp-modelo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.hg-whatsapp-modelo-send {
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
}

.hg-whatsapp-title {
    color: #059669;
}

/* Classe própria em vez de .hg-quadrant-icon: o ícone do WhatsApp acompanha o
   verde do título, não o laranja primário das outras seções. */
.hg-whatsapp-icon {
    color: #059669;
    flex-shrink: 0;
}

.hg-whatsapp-subtitle {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--hg-muted-foreground);
    font-weight: 400;
}

.hg-whatsapp-iframe-wrap {
    flex: 1;
    min-height: 0;
    position: relative;
    background: #f6f7f9;
}

.hg-whatsapp-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.hg-whatsapp-loading,
.hg-whatsapp-unavailable {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    background: #efeae2;
}

.hg-whatsapp-loading p,
.hg-whatsapp-unavailable p {
    font-size: 0.875rem;
    color: var(--hg-muted-foreground);
    margin: 0;
}

.hg-whatsapp-loading-lead {
    font-size: 0.6875rem !important;
    opacity: 0.7;
}

.hg-whatsapp-loading-dots {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.hg-whatsapp-loading-dots span {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background: #9ca3af;
    animation: hg-whatsapp-bounce 0.8s infinite ease-in-out;
}

.hg-whatsapp-loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.hg-whatsapp-loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes hg-whatsapp-bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-4px); }
}

.hg-whatsapp-unavailable svg {
    width: 5rem;
    height: 5rem;
    opacity: 0.2;
    color: var(--hg-muted-foreground);
}

.hg-whatsapp-unavailable-hint {
    font-size: 0.75rem;
    color: var(--hg-muted-foreground);
    opacity: 0.7;
    max-width: 16rem;
}

.hg-whatsapp-empty {
    font-size: 0.75rem;
    color: var(--hg-muted-foreground);
    text-align: center;
    padding: 2rem 1rem;
}

.hg-whatsapp-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem 1.5rem;
    background: #efe6dc;
}

.hg-whatsapp-bubble {
    max-width: 70%;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    box-shadow: 0 1px 1px rgb(0 0 0 / 0.06);
    margin-bottom: 0.5rem;
}

.hg-whatsapp-bubble.me {
    margin-left: auto;
    background: #d9fdd3;
}

.hg-whatsapp-bubble.them {
    background: white;
}

.hg-whatsapp-time {
    font-size: 10px;
    color: var(--hg-muted-foreground);
    text-align: right;
    margin-top: 0.125rem;
}

.hg-whatsapp-input-bar {
    border-top: 1px solid var(--hg-border);
    padding: 0.5rem 0.75rem;
    display: flex;
    gap: 0.5rem;
    background: var(--hg-card);
}

.hg-whatsapp-input-bar input {
    flex: 1;
    min-width: 0;
}

.hg-whatsapp-iframe-wrap--fullscreen {
    flex: 1;
    min-height: 0;
}

.hg-whatsapp-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: rgb(0 0 0 / 0.65);
}

.hg-whatsapp-fullscreen-inner {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border-radius: calc(var(--hg-radius) + 4px);
    border: 1px solid var(--hg-border);
    background: var(--hg-card);
    overflow: hidden;
    box-shadow: 0 24px 48px rgb(0 0 0 / 0.25);
}

.hg-whatsapp-fullscreen-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--hg-border);
    background: var(--hg-card);
    flex-shrink: 0;
}

.hg-whatsapp-fullscreen-lead {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--hg-muted-foreground);
}

/* Dropdowns do chat legado (select2/bootstrap) acima do drawer */
body:has(.hg-drawer-overlay) .select2-container--open,
body:has(.hg-drawer-overlay) .select2-dropdown,
body:has(.hg-drawer-overlay) .select2-container--open .select2-dropdown,
body:has(.hg-drawer-overlay) .modal,
body:has(.hg-drawer-overlay) .modal-backdrop,
body:has(.hg-drawer-overlay) .dropdown-menu.show,
body:has(.hg-sheet-root) .select2-container--open,
body:has(.hg-sheet-root) .select2-dropdown,
body:has(.hg-sheet-root) .select2-container--open .select2-dropdown,
body:has(.hg-sheet-root) .modal,
body:has(.hg-sheet-root) .modal-backdrop,
body:has(.hg-sheet-root) .dropdown-menu.show {
    z-index: 100 !important;
}

body:has(.hg-whatsapp-fullscreen) .select2-container--open,
body:has(.hg-whatsapp-fullscreen) .select2-dropdown,
body:has(.hg-whatsapp-fullscreen) .modal,
body:has(.hg-whatsapp-fullscreen) .modal-backdrop,
body:has(.hg-whatsapp-fullscreen) .dropdown-menu.show {
    z-index: 130 !important;
}

.hg-btn-emerald,
.hg-btn-emerald:hover,
.hg-btn-emerald:focus,
.hg-btn-emerald:focus-visible,
.hg-btn-emerald:active,
.hg-btn.hg-btn-emerald,
.hg-btn.hg-btn-emerald:hover,
.hg-btn.hg-btn-emerald:focus,
.hg-btn.hg-btn-emerald:focus-visible,
.hg-btn.hg-btn-emerald:active {
    background: #34d399 !important;
    border-color: #34d399 !important;
    color: #ffffff !important;
    filter: none !important;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
}

.hg-btn-emerald:hover,
.hg-btn-emerald:focus,
.hg-btn-emerald:focus-visible,
.hg-btn-emerald:active,
.hg-btn.hg-btn-emerald:hover,
.hg-btn.hg-btn-emerald:focus,
.hg-btn.hg-btn-emerald:focus-visible,
.hg-btn.hg-btn-emerald:active {
    background: #10b981 !important;
    border-color: #10b981 !important;
    color: #ffffff !important;
}

.hg-btn-danger-outline,
.hg-btn-danger-outline:hover,
.hg-btn-danger-outline:focus,
.hg-btn-danger-outline:focus-visible,
.hg-btn-danger-outline:active {
    border: 2px solid color-mix(in srgb, var(--hg-destructive) 60%, transparent) !important;
    color: var(--hg-destructive) !important;
    background: transparent !important;
    filter: none !important;
}

.hg-btn-danger-outline:hover,
.hg-btn-danger-outline:focus,
.hg-btn-danger-outline:focus-visible,
.hg-btn-danger-outline:active {
    background: color-mix(in srgb, var(--hg-destructive) 10%, transparent) !important;
    color: var(--hg-destructive) !important;
}

/* Ação destrutiva confirmada (ex.: "Marcar como Perdido"): preenchida, como a
   primária. Desabilitada, o opacity 0.5 de .hg-btn dá o vermelho claro do protótipo. */
.hg-btn-danger,
.hg-btn-danger:hover,
.hg-btn-danger:focus,
.hg-btn-danger:focus-visible,
.hg-btn-danger:active,
.hg-btn.hg-btn-danger,
.hg-btn.hg-btn-danger:hover,
.hg-btn.hg-btn-danger:focus,
.hg-btn.hg-btn-danger:focus-visible,
.hg-btn.hg-btn-danger:active {
    background: var(--hg-destructive) !important;
    border-color: var(--hg-destructive) !important;
    color: #ffffff !important;
    filter: none !important;
}

.hg-btn-danger:hover:not(:disabled),
.hg-btn-danger:focus-visible:not(:disabled) {
    background: color-mix(in srgb, var(--hg-destructive) 88%, #000) !important;
    border-color: color-mix(in srgb, var(--hg-destructive) 88%, #000) !important;
}

/* Links do app: contraste legível em hover/focus/active (exceto botões e menu lateral) */
.hg-app a:not(.hg-btn):not(.hg-quick-link-card):not(.hg-nav-link):not(.hg-sidebar-brand-link):not(.hg-sidebar-footer a):hover,
.hg-app a:not(.hg-btn):not(.hg-quick-link-card):not(.hg-nav-link):not(.hg-sidebar-brand-link):not(.hg-sidebar-footer a):focus,
.hg-app a:not(.hg-btn):not(.hg-quick-link-card):not(.hg-nav-link):not(.hg-sidebar-brand-link):not(.hg-sidebar-footer a):focus-visible,
.hg-app a:not(.hg-btn):not(.hg-quick-link-card):not(.hg-nav-link):not(.hg-sidebar-brand-link):not(.hg-sidebar-footer a):active {
    color: #1f2937;
}

.hg-app a.hg-btn-primary:hover,
.hg-app a.hg-btn-primary:focus,
.hg-app a.hg-btn-primary:focus-visible,
.hg-app a.hg-btn-primary:active,
.hg-app a.hg-btn-emerald:hover,
.hg-app a.hg-btn-emerald:focus,
.hg-app a.hg-btn-emerald:focus-visible,
.hg-app a.hg-btn-emerald:active {
    color: #ffffff !important;
}

.hg-sidebar a.hg-nav-link,
.hg-sidebar a.hg-nav-sub-link {
    color: hsl(0 0% 100% / 0.78) !important;
}

.hg-sidebar a.hg-nav-sub-link {
    color: hsl(0 0% 100% / 0.7) !important;
}

.hg-sidebar a.hg-nav-link:hover,
.hg-sidebar a.hg-nav-link:focus-visible,
.hg-sidebar a.hg-nav-link:active,
.hg-sidebar a.hg-nav-sub-link:hover,
.hg-sidebar a.hg-nav-sub-link:focus-visible,
.hg-sidebar a.hg-nav-sub-link:active {
    color: #fff !important;
    background: hsl(0 0% 100% / 0.12);
}

.hg-sidebar a.hg-nav-link.is-active,
.hg-sidebar a.hg-nav-link.is-active:hover,
.hg-sidebar a.hg-nav-link.is-active:focus-visible,
.hg-sidebar a.hg-nav-link.is-active:active,
.hg-sidebar a.hg-nav-sub-link.is-active,
.hg-sidebar a.hg-nav-sub-link.is-active:hover {
    color: var(--hg-sidebar-primary) !important;
    background: hsl(var(--hg-hsl-brand) / 0.18);
    font-weight: 600;
}

.hg-sidebar a.hg-nav-sub-link:hover > svg,
.hg-sidebar a.hg-nav-sub-link:focus-visible > svg,
.hg-sidebar a.hg-nav-sub-link:active > svg {
    color: #fff !important;
}

.hg-sidebar a.hg-nav-sub-link.is-active > svg,
.hg-sidebar a.hg-nav-sub-link.is-active:hover > svg {
    color: var(--hg-sidebar-primary) !important;
}

.hg-anotacao-card {
    border-radius: 0.5rem;
    border: 1px solid var(--hg-border);
    background: var(--hg-card);
    padding: 0.625rem 0.75rem;
    margin-bottom: 0.5rem;
}

.hg-timeline {
    position: relative;
    padding-left: 1.25rem;
}

.hg-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0.25rem;
    bottom: 0.25rem;
    width: 1px;
    background: var(--hg-border);
}

.hg-timeline-item {
    position: relative;
    margin-bottom: 1rem;
}

.hg-timeline-dot {
    position: absolute;
    left: -1.125rem;
    top: 0.375rem;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 9999px;
    border: 2px solid var(--hg-card);
}

.hg-os-item-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    border: none;
    border-bottom: 1px solid var(--hg-border);
    background: transparent;
    text-align: left;
    cursor: pointer;
    font-size: 0.75rem;
}

.hg-os-item-btn:hover {
    background: color-mix(in srgb, var(--hg-muted) 40%, transparent);
}

.hg-agendamento-ativo {
    border-left: 4px solid var(--hg-status-agendado);
    border-radius: 0.5rem;
    border: 1px solid var(--hg-border);
    border-left: 4px solid var(--hg-status-agendado);
    background: var(--hg-card);
    padding: 0.75rem 1rem;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
}

/* Rótulos de quem é quem quando a seção passa a listar mais de um agendamento:
   o do evento aberto fica destacado (borda lateral, sombra), os do cliente vêm
   depois em cartões planos, para o operador não confundir contexto com ação. */
.hg-agendamento-ativo-label,
.hg-agendamento-outros-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.375rem;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--hg-muted-foreground);
}

.hg-agendamento-outros-head {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--hg-border);
}

.hg-agendamento-outros {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hg-agendamento-outro {
    border: 1px solid var(--hg-border);
    border-radius: 0.5rem;
    background: color-mix(in srgb, var(--hg-muted) 30%, transparent);
    padding: 0.625rem 0.75rem;
    font-size: 0.8125rem;
}

/* Sumiu do DMS: fica visível para consulta, mas apagado — tracejado e sem cor de
   status, para não competir com o que ainda é operável. */
.hg-agendamento-outro.is-fora-do-dms {
    border-style: dashed;
    background: transparent;
    opacity: 0.7;
}

.hg-badge--fora-do-dms {
    background: color-mix(in srgb, var(--hg-muted-foreground) 12%, transparent);
    color: var(--hg-muted-foreground);
    border-color: color-mix(in srgb, var(--hg-muted-foreground) 30%, transparent);
    cursor: help;
}

.hg-agendamento-outro-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.hg-agendamento-outro-data {
    font-weight: 600;
}

.hg-agendamento-outro-linha {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.25rem;
}

.hg-agendamento-outro-rodape {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--hg-muted-foreground);
}

.hg-textarea {
    width: 100%;
    border-radius: calc(var(--hg-radius) - 2px);
    border: 1px solid var(--hg-input);
    background: color-mix(in srgb, var(--hg-muted) 40%, transparent);
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    resize: vertical;
    min-height: 4.5rem;
}

@keyframes hg-modal-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes hg-modal-fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes hg-modal-zoom-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes hg-modal-zoom-out {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

.hg-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 210;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgb(0 0 0 / 0.8);
    padding: 1rem;
    animation: hg-modal-fade-in 150ms ease-out both;
}

/* Overlay teleportado ao body — acima de topbar, sidebar e grades */
.hg-modal-overlay--top {
    z-index: 100000;
}

.hg-modal-overlay--confirm {
    z-index: 100001;
}

/* Toasts Filament acima dos modais teleportados (senão o erro fica invisível). */
.fi-no {
    z-index: 100050 !important;
}

.hg-agendar-erro {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
    font-size: 0.875rem;
    line-height: 1.4;
}

.hg-email-suggest {
    position: relative;
    width: 100%;
}

.hg-email-suggest--full,
.hg-input--full {
    width: 100%;
}

.hg-field--full {
    grid-column: 1 / -1;
    width: 100%;
}

.hg-email-domain-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.5rem;
}

.hg-email-domain-pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--hg-border);
    background: var(--hg-muted);
    color: var(--hg-foreground);
    border-radius: 9999px;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    line-height: 1.3;
}

.hg-email-domain-pill:hover,
.hg-email-domain-pill.is-active {
    background: color-mix(in srgb, var(--hg-primary) 12%, transparent);
    border-color: color-mix(in srgb, var(--hg-primary) 35%, transparent);
    color: var(--hg-primary);
}

.hg-email-suggest-list {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.25rem);
    z-index: 30;
    margin: 0;
    padding: 0.25rem;
    list-style: none;
    border: 1px solid var(--hg-border);
    border-radius: calc(var(--hg-radius) - 2px);
    background: var(--hg-popover, var(--hg-card));
    box-shadow: 0 12px 28px rgb(0 0 0 / 0.14);
    max-height: 16rem;
    overflow: auto;
    width: 100%;
}

.hg-email-suggest-item {
    display: block;
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    padding: 0.55rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: var(--hg-foreground);
    cursor: pointer;
}

.hg-email-suggest-item:hover,
.hg-email-suggest-item.is-active {
    background: color-mix(in oklch, var(--hg-muted) 70%, transparent);
}

.hg-email-suggest-item strong {
    font-weight: 600;
    color: var(--hg-primary);
}

.hg-modal-overlay.is-closing {
    animation: hg-modal-fade-out 150ms ease-in both;
}

.hg-modal {
    width: 100%;
    max-width: 28rem;
    border-radius: var(--hg-radius);
    border: 1px solid var(--hg-border);
    background: var(--hg-card);
    padding: 0;
    box-shadow: 0 20px 40px rgb(0 0 0 / 0.15);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    will-change: transform, opacity;
    animation: hg-modal-zoom-in 200ms ease-out both;
}

.hg-modal-overlay.is-closing .hg-modal {
    animation: hg-modal-zoom-out 150ms ease-in both;
}

@media (prefers-reduced-motion: reduce) {
    .hg-modal-overlay,
    .hg-modal,
    .hg-modal-overlay.is-closing,
    .hg-modal-overlay.is-closing .hg-modal {
        animation: none;
    }
}

.hg-modal-lg {
    max-width: 40rem;
}

.hg-modal-xl {
    max-width: 52rem;
}

/* Checkbox com aparência de círculo (ex.: "cliente ainda possui o veículo") */
.hg-check-round input[type='checkbox'] {
    width: 1.05rem;
    height: 1.05rem;
    border-radius: 50%;
    flex-shrink: 0;
    accent-color: var(--hg-primary, #ff8205);
}

.hg-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--hg-border);
}

.hg-modal-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.hg-modal-title--lg {
    font-size: 1.125rem;
}

.hg-modal-body {
    padding: 1.25rem;
    overflow-y: auto;
    overflow-x: visible;
}

.hg-modal-lg .hg-email-suggest-list {
    /* evita clip pelo scroll do body: lista sobe se necessário no fim do form */
    z-index: 40;
}

.hg-modal-lg .hg-email-suggest--full {
    overflow: visible;
}

.hg-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--hg-border);
}

.hg-modal-section-title {
    margin: 0 0 0.75rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--hg-muted-foreground);
}

.hg-form-grid {
    display: grid;
    gap: 0.75rem;
}

.hg-form-grid-2 {
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 640px) {
    .hg-form-grid-2 {
        grid-template-columns: 1fr;
    }
}

.hg-section-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.hg-atendimento-header-grid {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 0.75rem;
}

@media (min-width: 768px) {
    .hg-atendimento-header-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hg-atendimento-header-col {
        padding-right: 1.5rem;
    }

    .hg-atendimento-header-col-right {
        border-left: 1px solid var(--hg-border);
        padding-left: 1.5rem;
        padding-right: 0;
    }
}

.hg-atendimento-block-title {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--hg-muted-foreground);
    margin-bottom: 0.5rem;
}

.hg-atendimento-fields-grid {
    display: grid;
    gap: 0.375rem 1rem;
}

.hg-atendimento-fields-grid-2 {
    grid-template-columns: 1fr;
}

.hg-atendimento-fields-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 640px) {
    .hg-atendimento-fields-grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hg-atendimento-fields-grid-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* O tamanho do valor mora na CÉLULA, não só no span `-value`: conteúdo que
   entra sem esse wrapper (o botão de copiar e-mail, o link do MyHonda) herdava
   o tamanho base do documento e ficava maior que Nome/Documento/Telefone. */
.hg-atendimento-kv {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 0.875rem;
}

/* Campo que ocupa a linha inteira do grid (observação, link) — aqui o valor
   pode quebrar em várias linhas, ao contrário dos campos curtos. */
.hg-atendimento-kv--full {
    grid-column: 1 / -1;
}

.hg-atendimento-kv--full .hg-atendimento-kv-value {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
}

.hg-atendimento-kv-label {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--hg-muted-foreground);
}

/* Título do bloco ("Dados informados", "Informações do Lead"): mesmo corpo do
   label de campo, mas peso e cor de título — sem isso o título e o label da
   linha de baixo ficavam visualmente no mesmo nível. */
.hg-atendimento-kv-label--block {
    display: block;
    margin-bottom: 0.375rem;
    font-weight: 700;
    color: var(--hg-foreground);
}

.hg-atendimento-kv-value {
    min-width: 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--hg-foreground);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hg-atendimento-kv-value--placa {
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* Botão de copiar e-mail: elemento de interface vestindo um valor de campo.
   `font: inherit` já traz tamanho, peso e família da célula — fixar peso ou
   alinhamento aqui é o que fazia o e-mail sair do padrão dos demais dados
   (à esquerda numa linha alinhada à direita, e podendo quebrar). */
.hg-copy-email {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    min-width: 0;
    max-width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    color: inherit;
    text-align: inherit;
    cursor: pointer;
}

/* Trunca igual a qualquer outro valor curto, em vez de empurrar a linha. */
.hg-copy-email-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hg-copy-email:hover .hg-copy-email-text {
    text-decoration: underline;
}

.hg-copy-email-hint {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--hg-status-recebido);
}

.hg-atendimento-header-divider {
    height: 1px;
    background: var(--hg-border);
    margin: 1rem 0;
}

.hg-btn-atendimento-action {
    height: 2.5rem;
    padding: 0 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Status badges — eventos */
.hg-status-pendente,
.hg-status-nao_compareceu {
    background: var(--hg-status-nao-compareceu-bg);
    color: var(--hg-status-nao-compareceu);
    border-color: var(--hg-status-nao-compareceu-border);
}

.hg-status-pendente .hg-badge-dot,
.hg-status-nao_compareceu .hg-badge-dot {
    background: var(--hg-status-nao-compareceu);
}

.hg-status-agendado {
    background: var(--hg-status-agendado-bg);
    color: var(--hg-status-agendado);
    border-color: var(--hg-status-agendado-border);
}

.hg-status-agendado .hg-badge-dot {
    background: var(--hg-status-agendado);
}

.hg-status-compareceu {
    background: var(--hg-status-compareceu-bg);
    color: var(--hg-status-compareceu);
    border-color: var(--hg-status-compareceu-border);
}

.hg-status-compareceu .hg-badge-dot {
    background: var(--hg-status-compareceu);
}

/* Status de entrega de mensagem — aba Campanhas Meta (sem interação). */
.hg-status-entregue {
    background: var(--hg-status-confirmado-bg);
    color: var(--hg-status-confirmado);
    border-color: var(--hg-status-confirmado-border);
}

.hg-status-entregue .hg-badge-dot {
    background: var(--hg-status-confirmado);
}

.hg-status-lido {
    background: var(--hg-status-compareceu-bg);
    color: var(--hg-status-compareceu);
    border-color: var(--hg-status-compareceu-border);
}

.hg-status-lido .hg-badge-dot {
    background: var(--hg-status-compareceu);
}

.hg-status-enviado {
    background: var(--hg-status-pendente-bg, #f1f5f9);
    color: var(--hg-status-pendente, #64748b);
    border-color: var(--hg-status-pendente-border, #cbd5e1);
}

.hg-status-enviado .hg-badge-dot {
    background: var(--hg-status-pendente, #64748b);
}

.hg-status-falha {
    background: var(--hg-status-perdido-bg, #fef2f2);
    color: var(--hg-status-perdido, #b91c1c);
    border-color: var(--hg-status-perdido-border, #fecaca);
}

.hg-status-falha .hg-badge-dot {
    background: var(--hg-status-perdido, #b91c1c);
}

.hg-event-row-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

/* Temperatura da anotação — mesma estrutura dos badges de status. */
.hg-temp-quente {
    background: var(--hg-temp-quente-bg);
    color: var(--hg-temp-quente);
    border-color: var(--hg-temp-quente-border);
}

.hg-temp-morno {
    background: var(--hg-temp-morno-bg);
    color: var(--hg-temp-morno);
    border-color: var(--hg-temp-morno-border);
}

.hg-temp-frio {
    background: var(--hg-temp-frio-bg);
    color: var(--hg-temp-frio);
    border-color: var(--hg-temp-frio-border);
}

.hg-status-perdido {
    background: var(--hg-status-bloqueado-bg);
    color: var(--hg-status-bloqueado);
    border-color: var(--hg-status-bloqueado-border);
}

.hg-status-perdido .hg-badge-dot {
    background: var(--hg-status-bloqueado);
}

/* Agenda cards — tokens do prototipo-rafaela */
.hg-agenda-agendado {
    background: var(--hg-status-agendado-bg);
    color: var(--hg-status-agendado);
    border-color: var(--hg-status-agendado-border);
}

.hg-agenda-confirmado {
    background: var(--hg-status-confirmado-bg);
    color: var(--hg-status-confirmado);
    border-color: var(--hg-status-confirmado-border);
}

.hg-agenda-compareceu,
.hg-agenda-recebido {
    background: var(--hg-status-recebido-bg);
    color: var(--hg-status-recebido);
    border-color: var(--hg-status-recebido-border);
}

.hg-agenda-os-aberta {
    background: var(--hg-status-os-aberta-bg);
    color: var(--hg-status-os-aberta);
    border-color: var(--hg-status-os-aberta-border);
}

.hg-agenda-entrega {
    background: var(--hg-status-entrega-bg);
    color: var(--hg-status-entrega);
    border-color: var(--hg-status-entrega-border);
}

.hg-agenda-nao_compareceu {
    background: var(--hg-status-nao-compareceu-bg);
    color: var(--hg-status-nao-compareceu);
    border-color: var(--hg-status-nao-compareceu-border);
}

.hg-agenda-bloqueado {
    background: var(--hg-status-bloqueado-bg);
    color: var(--hg-status-bloqueado);
    border-color: var(--hg-status-bloqueado-border);
}

.hg-agenda-fora-expediente {
    background: var(--hg-status-fora-expediente-bg);
    color: var(--hg-status-fora-expediente);
    border-color: var(--hg-status-fora-expediente-border);
}

.hg-totalizer-pendente .hg-totalizer-dot { background: var(--hg-status-nao-compareceu); }
.hg-totalizer-agendado .hg-totalizer-dot { background: var(--hg-status-agendado); }
.hg-totalizer-compareceu .hg-totalizer-dot { background: var(--hg-status-recebido); }
.hg-totalizer-nao_compareceu .hg-totalizer-dot { background: var(--hg-status-nao-compareceu); }
.hg-totalizer-retorno .hg-totalizer-dot { background: var(--hg-primary); }
.hg-totalizer-perdido .hg-totalizer-dot { background: var(--hg-status-bloqueado); }

.hg-legend-agendado { background: var(--hg-status-agendado); }
.hg-legend-confirmado { background: var(--hg-status-confirmado); }
.hg-legend-compareceu,
.hg-legend-recebido { background: var(--hg-status-recebido); }
.hg-legend-os-aberta { background: var(--hg-status-os-aberta); }
.hg-legend-entrega { background: var(--hg-status-entrega); }
.hg-legend-nao_compareceu { background: var(--hg-status-nao-compareceu); }
.hg-legend-bloqueado { background: var(--hg-status-bloqueado); }
.hg-legend-fora-expediente,
.hg-legend-indisponivel { background: var(--hg-status-fora-expediente); border: 1px solid var(--hg-border); }

.hg-main .fi-page {
    padding: 1.5rem;
}

.hg-main .fi-section,
.hg-main .fi-ta-ctn {
    border-radius: calc(var(--hg-radius) + 4px);
    border: 1px solid var(--hg-border);
    background: var(--hg-card);
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
}

.hg-main .fi-header-heading {
    font-size: 1.5rem;
    font-weight: 600;
}

.hg-impersonation-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: oklch(0.55 0.18 150);
    color: oklch(0.98 0.02 150);
    border-bottom: 1px solid oklch(0.52 0.14 150);
    box-shadow: 0 4px 12px rgb(0 0 0 / 0.12);
}

.hg-impersonation-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 100%;
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
}

.hg-impersonation-banner-text {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    min-width: 0;
}

.hg-impersonation-banner-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    background: oklch(0.45 0.14 150);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.hg-impersonation-banner-content strong {
    font-weight: 700;
}

.hg-impersonation-banner-email {
    opacity: 0.9;
}

.hg-impersonation-banner-btn {
    background: oklch(0.99 0.01 150);
    color: oklch(0.32 0.12 150);
    border: 1px solid oklch(0.88 0.04 150);
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.hg-impersonation-banner-btn:hover {
    background: oklch(1 0 0);
}

body:has(.hg-impersonation-banner) .hg-app {
    padding-top: 3.25rem;
}

.hg-debug-info {
    padding: 1rem;
}

.hg-debug-info-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.hg-debug-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    gap: 0.75rem;
}

.hg-debug-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
    padding: 0.5rem 0.75rem;
    border-radius: calc(var(--hg-radius) - 2px);
    border: 1px solid var(--hg-border);
    background: color-mix(in srgb, var(--hg-muted) 35%, transparent);
}

.hg-debug-info-key {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--hg-muted-foreground);
}

.hg-debug-info-value {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8125rem;
    word-break: break-word;
}

.hg-debug-info-value--ok {
    color: oklch(0.52 0.14 145);
}

.hg-debug-info-value--bad {
    color: oklch(0.52 0.18 27);
}

.hg-debug-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
    gap: 0.75rem;
}

.hg-log-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
    gap: 0.75rem;
}

.hg-log-metric {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--hg-border);
    border-radius: var(--hg-radius);
    background: var(--hg-card, #fff);
    text-align: left;
    cursor: default;
}

button.hg-log-metric {
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

button.hg-log-metric:hover,
button.hg-log-metric.is-active {
    border-color: var(--hg-primary);
    transform: translateY(-1px);
}

.hg-log-metric-label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--hg-muted-foreground);
}

.hg-log-metric-value {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.hg-log-metric-hint {
    font-size: 0.6875rem;
    color: var(--hg-muted-foreground);
}

.hg-log-metric--ERROR .hg-log-metric-value,
.hg-log-metric--EXCEPTION .hg-log-metric-value {
    color: oklch(0.55 0.2 27);
}

.hg-log-metric--WARNING .hg-log-metric-value {
    color: oklch(0.58 0.14 75);
}

.hg-log-metric--INFO .hg-log-metric-value {
    color: oklch(0.5 0.14 250);
}

.hg-log-metric--DEBUG .hg-log-metric-value {
    color: oklch(0.45 0.03 260);
}

.hg-log-channel-bars {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hg-log-channel-bar {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    width: 100%;
    padding: 0.35rem 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.hg-log-channel-bar-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.8125rem;
}

.hg-log-channel-bar-track {
    display: block;
    height: 0.4rem;
    border-radius: 9999px;
    background: color-mix(in srgb, var(--hg-muted) 70%, transparent);
    overflow: hidden;
}

.hg-log-channel-bar-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--hg-primary);
}

.hg-filters--logs {
    align-items: flex-end;
}

.hg-filters--logs .hg-field--search {
    flex: 1 1 16rem;
    min-width: 16rem;
}

.hg-log-search-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.hg-log-search-row .hg-input {
    flex: 1;
}

.hg-log-viewer-wrap {
    overflow: hidden;
}

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

.hg-log-live {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    height: 1.75rem;
    padding: 0 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: oklch(0.32 0.06 145);
    color: oklch(0.92 0.05 145);
}

.hg-log-live--off {
    background: oklch(0.28 0.02 260);
    color: oklch(0.75 0.02 260);
}

.hg-log-live-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background: oklch(0.72 0.2 145);
}

.hg-log-live:not(.hg-log-live--off) .hg-log-live-dot {
    animation: hg-log-pulse 1.2s ease-in-out infinite;
}

@keyframes hg-log-pulse {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.45;
        transform: scale(0.85);
    }
}

.hg-log-viewer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--hg-border);
    font-size: 0.8125rem;
    color: var(--hg-muted-foreground);
}

.hg-log-viewer {
    max-height: calc(100vh - 280px);
    min-height: 22rem;
    overflow: auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: oklch(0.16 0.02 260);
}

.hg-log-entry {
    border-radius: calc(var(--hg-radius) - 4px);
    border: 1px solid oklch(0.28 0.02 260);
    background: oklch(0.2 0.02 260);
    overflow: hidden;
}

.hg-log-entry-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid oklch(0.28 0.02 260);
    background: oklch(0.22 0.02 260);
}

.hg-log-time {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
    color: oklch(0.75 0.02 260);
}

.hg-log-level-badge {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    background: oklch(0.35 0.03 260);
    color: oklch(0.92 0.02 260);
}

.hg-log-channel {
    font-size: 0.75rem;
    color: oklch(0.7 0.02 260);
}

.hg-log-exception {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    background: oklch(0.35 0.12 27);
    color: oklch(0.9 0.05 27);
}

.hg-log-lines {
    font-size: 0.6875rem;
    color: oklch(0.65 0.02 260);
    margin-left: auto;
}

.hg-log-toggle {
    border: 0;
    background: transparent;
    color: oklch(0.78 0.04 250);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.125rem 0.25rem;
}

.hg-log-toggle:hover {
    color: oklch(0.9 0.04 250);
}

.hg-log-preview {
    padding: 0.75rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
    line-height: 1.45;
    color: oklch(0.82 0.02 260);
}

.hg-log-message {
    margin: 0;
    padding: 0.75rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
    line-height: 1.5;
    color: oklch(0.9 0.02 260);
    white-space: pre-wrap;
    word-break: break-word;
}

.hg-log-message--context {
    background: oklch(0.14 0.02 260);
    border-top: 1px solid oklch(0.28 0.02 260);
}

.hg-log-context-title {
    padding: 0.5rem 0.75rem 0;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: oklch(0.7 0.04 250);
}

.hg-log-empty {
    padding: 2rem;
    text-align: center;
    color: oklch(0.7 0.02 260);
    font-size: 0.875rem;
}

.hg-log-level-error .hg-log-level-badge,
.hg-log-level-critical .hg-log-level-badge,
.hg-log-level-alert .hg-log-level-badge,
.hg-log-level-emergency .hg-log-level-badge {
    background: oklch(0.55 0.2 27);
}

.hg-log-level-warning .hg-log-level-badge,
.hg-log-level-notice .hg-log-level-badge {
    background: oklch(0.62 0.16 75);
    color: oklch(0.2 0.04 75);
}

.hg-log-level-info .hg-log-level-badge {
    background: oklch(0.5 0.14 250);
}

.hg-log-level-debug .hg-log-level-badge {
    background: oklch(0.45 0.03 260);
}

.hg-code-block {
    margin: 0;
    padding: 0.75rem;
    border-radius: calc(var(--hg-radius) - 4px);
    border: 1px solid oklch(0.28 0.02 260);
    background: oklch(0.16 0.02 260);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
    line-height: 1.5;
    color: oklch(0.9 0.02 260);
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: auto;
}

.hg-code-block-sm {
    max-height: 220px;
    overflow: auto;
}

.hg-api-test {
    border-radius: calc(var(--hg-radius) - 2px);
    border: 1px solid oklch(0.32 0.02 260);
    padding: 0.75rem;
    background: oklch(0.19 0.02 260);
}

.hg-api-test.is-ok {
    border-color: oklch(0.52 0.14 145);
}

.hg-api-test.is-fail {
    border-color: oklch(0.55 0.18 27);
}

.hg-api-test-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.hg-api-test-head code {
    font-size: 0.75rem;
    color: oklch(0.75 0.02 260);
}

.hg-api-test-msg {
    font-size: 0.8125rem;
    color: oklch(0.78 0.02 260);
    margin-bottom: 0.5rem;
}

.hg-badge-success {
    background: oklch(0.45 0.12 145);
    color: oklch(0.95 0.02 145);
    border-color: transparent;
}

.hg-badge-danger {
    background: oklch(0.52 0.18 27);
    color: oklch(0.98 0.02 27);
    border-color: transparent;
}

.hg-muted {
    color: oklch(0.7 0.02 260);
    font-size: 0.875rem;
}

.hg-eligibility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 0.75rem;
}

.hg-eligibility-card {
    padding: 0.875rem 1rem;
    border-radius: calc(var(--hg-radius) - 2px);
    border: 1px solid var(--hg-border);
    background: color-mix(in srgb, var(--hg-muted) 35%, transparent);
}

.hg-eligibility-card.is-ok {
    border-color: oklch(0.72 0.12 145);
}

.hg-eligibility-card.is-fail {
    border-color: oklch(0.72 0.14 27);
}

.hg-eligibility-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.375rem;
}

.hg-eligibility-card-title {
    font-size: 0.875rem;
    font-weight: 600;
}

.hg-eligibility-card-desc {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--hg-muted-foreground);
    line-height: 1.4;
}

.hg-card-section-lead {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    color: oklch(0.7 0.02 260);
    line-height: 1.45;
}

.hg-eligibility-summary {
    margin-top: 1rem;
}

.hg-eligibility-reasons {
    margin: 1rem 0 0 1rem;
    padding: 0;
    font-size: 0.875rem;
    color: oklch(0.7 0.02 260);
    line-height: 1.45;
}

.hg-quick-link-groups {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hg-quick-link-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hg-quick-link-group-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.hg-quick-link-group-title {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--hg-foreground);
}

.hg-quick-link-group-desc {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--hg-muted-foreground);
    line-height: 1.4;
}

.hg-quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: 0.75rem;
}

.hg-quick-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 10.5rem;
    padding: 1.25rem 1rem;
    border-radius: calc(var(--hg-radius) - 2px);
    border: 1px solid var(--hg-border);
    background: var(--hg-card);
    color: inherit;
    text-align: center;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.hg-quick-link-card:hover,
.hg-quick-link-card:focus-visible,
.hg-quick-link-card:active {
    border-color: color-mix(in srgb, var(--hg-primary) 45%, var(--hg-border));
    box-shadow: 0 4px 14px color-mix(in srgb, var(--hg-primary) 12%, transparent);
    transform: translateY(-1px);
    color: inherit;
}

.hg-quick-link-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    border-radius: calc(var(--hg-radius) - 4px);
    background: color-mix(in srgb, var(--hg-primary) 12%, var(--hg-muted));
    color: var(--hg-primary);
}

.hg-quick-link-card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.hg-quick-link-card-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    margin-bottom: 0.375rem;
}

.hg-quick-link-card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--hg-foreground);
}

.hg-quick-link-card-arrow {
    font-size: 1rem;
    color: var(--hg-muted-foreground);
    transition: transform 0.15s ease, color 0.15s ease;
}

.hg-quick-link-card:hover .hg-quick-link-card-arrow {
    color: var(--hg-primary);
    transform: translateX(2px);
}

.hg-quick-link-card-desc {
    margin: 0;
    max-width: 18rem;
    font-size: 0.8125rem;
    color: var(--hg-muted-foreground);
    line-height: 1.45;
    text-align: center;
}

.hg-agendamento-detalhes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.hg-agendamento-detalhes-span {
    grid-column: 1 / -1;
}

.hg-agendamento-status-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--hg-border);
}

.hg-agendamento-meta {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--hg-border);
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--hg-muted-foreground);
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* API LINX */
.hg-linx-page {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-bottom: 2.5rem;
}

.hg-linx-page-header {
    margin-bottom: 0;
}

.hg-linx-deprecation-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    border-radius: calc(var(--hg-radius) - 2px);
    border: 1px solid color-mix(in srgb, var(--hg-destructive) 45%, transparent);
    background: color-mix(in srgb, var(--hg-destructive) 12%, transparent);
    color: var(--hg-destructive);
}

.hg-linx-deprecation-alert-icon {
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.hg-linx-deprecation-alert-content {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    min-width: 0;
}

.hg-linx-deprecation-alert-content strong {
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.3;
}

.hg-linx-deprecation-alert-content p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.55;
    color: color-mix(in srgb, var(--hg-destructive) 85%, var(--hg-foreground));
}

.hg-linx-empresa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.hg-linx-empresa-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.hg-linx-empresa-item strong {
    font-size: 0.9375rem;
    color: var(--hg-foreground);
}

.hg-linx-empresa-alert {
    padding: 0.875rem 1rem;
    border-radius: calc(var(--hg-radius) - 2px);
    font-size: 0.8125rem;
    line-height: 1.55;
    margin-bottom: 1rem;
}

.hg-linx-empresa-alert--error {
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.hg-linx-empresa-alert--warning {
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.hg-linx-callout--warning {
    border-left-color: #f59e0b;
}

.hg-linx-var-example.is-configured {
    color: var(--hg-foreground);
    font-weight: 500;
}

.hg-linx-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hg-linx-section-head {
    margin-bottom: 0.25rem;
}

.hg-linx-section-head--standalone {
    padding: 0 0.125rem;
}

.hg-linx-section-title {
    font-size: 1.0625rem;
    font-weight: 600;
    margin: 0 0 0.375rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.625rem;
    line-height: 1.3;
}

.hg-linx-section-desc {
    margin: 0;
    font-size: 0.875rem;
    color: var(--hg-muted-foreground);
    line-height: 1.55;
    max-width: 72ch;
}

.hg-linx-card {
    padding: 1.25rem 1.5rem;
}

.hg-linx-card--section {
    padding: 1.5rem 1.75rem;
}

.hg-linx-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.hg-linx-info-label,
.hg-linx-meta-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--hg-muted-foreground);
    margin-bottom: 0.5rem;
}

.hg-linx-stat {
    display: block;
    font-size: 1.375rem;
    line-height: 1.2;
    margin-bottom: 0.125rem;
}

.hg-linx-stat-hint {
    font-size: 0.75rem;
    color: var(--hg-muted-foreground);
}

.hg-linx-code-block-inline {
    display: block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8125rem;
    line-height: 1.45;
    word-break: break-all;
    padding: 0.5rem 0.625rem;
    margin-top: 0.125rem;
    border-radius: calc(var(--hg-radius) - 2px);
    background: var(--hg-muted);
    border: 1px solid var(--hg-border);
}

.hg-linx-count {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--hg-muted-foreground);
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    background: var(--hg-muted);
    border: 1px solid var(--hg-border);
}

.hg-linx-table-wrap {
    overflow-x: auto;
    margin: 1.25rem 0 1rem;
    border: 1px solid var(--hg-border);
    border-radius: calc(var(--hg-radius) - 2px);
}

.hg-linx-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
    line-height: 1.45;
}

.hg-linx-table th,
.hg-linx-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--hg-border);
}

.hg-linx-table th {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--hg-muted-foreground);
    background: color-mix(in srgb, var(--hg-muted) 50%, transparent);
}

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

.hg-linx-table tbody tr:hover td {
    background: color-mix(in srgb, var(--hg-muted) 30%, transparent);
}

.hg-linx-var {
    font-family: ui-monospace, monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--hg-primary, #2563eb);
    white-space: nowrap;
}

.hg-linx-var-example {
    font-family: ui-monospace, monospace;
    font-size: 0.75rem;
    color: var(--hg-muted-foreground);
    word-break: break-all;
}

.hg-linx-callout {
    margin: 0;
    padding: 0.875rem 1rem;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--hg-muted-foreground);
    background: color-mix(in srgb, var(--hg-muted) 40%, transparent);
    border-left: 3px solid var(--hg-primary, #2563eb);
    border-radius: 0 calc(var(--hg-radius) - 2px) calc(var(--hg-radius) - 2px) 0;
}

.hg-linx-postman-steps {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.hg-linx-postman-step {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hg-linx-postman-step-title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.35;
}

.hg-linx-request-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    background: var(--hg-muted);
    border: 1px solid var(--hg-border);
    border-radius: calc(var(--hg-radius) - 2px);
}

.hg-linx-method {
    flex-shrink: 0;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.hg-linx-request-url {
    font-family: ui-monospace, monospace;
    font-size: 0.8125rem;
    line-height: 1.45;
    word-break: break-all;
    color: inherit;
}

.hg-linx-postman-block {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hg-linx-headers-table {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--hg-border);
    border-radius: calc(var(--hg-radius) - 2px);
    overflow: hidden;
}

.hg-linx-header-row {
    display: grid;
    grid-template-columns: minmax(140px, 220px) 1fr;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    font-size: 0.8125rem;
    border-bottom: 1px solid var(--hg-border);
    background: color-mix(in srgb, var(--hg-muted) 25%, transparent);
}

.hg-linx-header-row:last-child {
    border-bottom: 0;
}

.hg-linx-header-key {
    font-family: ui-monospace, monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--hg-primary, #2563eb);
}

.hg-linx-header-val {
    font-family: ui-monospace, monospace;
    font-size: 0.75rem;
    word-break: break-all;
}

.hg-linx-header-val--full {
    grid-column: 1 / -1;
}

.hg-linx-code-pre {
    margin: 0;
    max-height: 280px;
    overflow: auto;
}

.hg-linx-response-hint {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.25rem;
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--hg-muted-foreground);
    background: color-mix(in srgb, #059669 8%, var(--hg-muted));
    border: 1px solid color-mix(in srgb, #059669 20%, var(--hg-border));
    border-radius: calc(var(--hg-radius) - 2px);
}

.hg-linx-response-hint svg {
    flex-shrink: 0;
    margin-top: 0.125rem;
    color: #059669;
}

.hg-linx-search-bar {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 1rem 1.25rem;
}

.hg-linx-search-field {
    flex: 1;
    min-width: 240px;
    margin: 0;
}

.hg-linx-endpoints-card {
    padding: 0;
    overflow: hidden;
}

.hg-linx-endpoint {
    border-top: 1px solid var(--hg-border);
}

.hg-linx-endpoint:first-child {
    border-top: 0;
}

.hg-linx-endpoint.is-open {
    background: color-mix(in srgb, var(--hg-muted) 35%, transparent);
}

.hg-linx-endpoint-head {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease;
}

.hg-linx-endpoint-head:hover {
    background: color-mix(in srgb, var(--hg-muted) 25%, transparent);
}

.hg-linx-endpoint-head-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.hg-linx-endpoint-name {
    flex: 1;
    font-size: 0.9375rem;
    font-weight: 600;
}

.hg-linx-chevron {
    flex-shrink: 0;
    margin-left: auto;
    color: var(--hg-muted-foreground);
    transition: transform 0.2s ease;
}

.hg-linx-endpoint.is-open .hg-linx-chevron {
    transform: rotate(180deg);
}

.hg-linx-action {
    font-family: ui-monospace, monospace;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: var(--hg-muted);
    border: 1px solid var(--hg-border);
}

.hg-linx-path {
    font-family: ui-monospace, monospace;
    font-size: 0.75rem;
    color: var(--hg-muted-foreground);
    word-break: break-all;
    line-height: 1.45;
}

.hg-linx-endpoint-body {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.hg-linx-endpoint-desc {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--hg-foreground);
}

.hg-linx-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem 1.5rem;
}

.hg-linx-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    font-size: 0.8125rem;
    line-height: 1.45;
}

.hg-linx-empty {
    margin: 0;
    padding: 2rem 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--hg-muted-foreground);
}

.hg-linx-muted-inline {
    font-size: 0.8125rem;
    color: var(--hg-muted-foreground);
    font-style: italic;
}

.hg-linx-architecture-card {
    border-color: color-mix(in srgb, var(--hg-primary) 35%, var(--hg-border));
    background: color-mix(in srgb, var(--hg-primary) 6%, var(--hg-card));
}

.hg-linx-tabs-bar {
    margin-bottom: 1.25rem;
}

.hg-linx-tab-panel {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.hg-linx-db-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.hg-linx-db-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.hg-linx-impl-card .hg-linx-impl-motivo {
    margin: 0.35rem 0 0;
    font-size: 0.8125rem;
    color: var(--hg-muted-foreground);
    text-align: left;
    line-height: 1.45;
}

.hg-linx-impl-module {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--hg-muted-foreground);
    white-space: nowrap;
}

.hg-linx-impl-list {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.875rem;
    line-height: 1.55;
}

.hg-linx-impl-list li + li {
    margin-top: 0.35rem;
}

.hg-linx-access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.hg-linx-access-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    border: 1px solid var(--hg-border);
    border-radius: var(--hg-radius);
    background: var(--hg-muted);
}

.hg-linx-access-name {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
}

.hg-linx-access-auth,
.hg-linx-access-desc {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--hg-muted-foreground);
    line-height: 1.5;
}

.hg-linx-endpoint-head--static {
    cursor: default;
}

.hg-linx-endpoint-head--static:hover {
    background: transparent;
}

.hg-linx-endpoint-body--static {
    border-top: 1px solid var(--hg-border);
}

.hg-linx-field-grid {
    margin-top: 0.75rem;
}

.hg-linx-table--compact th,
.hg-linx-table--compact td {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
}

.hg-linx-response-list,
.hg-linx-limitations-list {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.875rem;
    color: var(--hg-foreground);
    line-height: 1.6;
}

.hg-linx-response-list li + li,
.hg-linx-limitations-list li + li {
    margin-top: 0.35rem;
}

@media (max-width: 640px) {
    .hg-linx-card,
    .hg-linx-card--section {
        padding: 1rem 1.125rem;
    }

    .hg-linx-endpoint-head,
    .hg-linx-endpoint-body {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hg-linx-header-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .hg-linx-table th,
    .hg-linx-table td {
        padding: 0.625rem 0.75rem;
    }
}


/* --- Layout helpers (sem CSS inline) --- */
:root {
    --hg-slot-width: 110px;
    --hg-row-height: 76px;
}

.hg-nav-group-label {
    flex: 1;
    text-align: left;
}

.hg-page-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hg-nav-date-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.hg-empty--compact {
    padding: 2rem;
}

.hg-empty-title {
    margin: 0 0 0.5rem;
    font-weight: 600;
    color: var(--hg-foreground);
}

.hg-empty-hint--spaced {
    margin: 0 0 1rem;
}

.hg-card--padded {
    padding: 1rem;
}

.hg-card--padded-sm {
    padding: 0.75rem;
}

.hg-card--padded-md {
    padding: 0.75rem 1rem;
}

.hg-card--flush {
    padding: 0;
    overflow: hidden;
}

.hg-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hg-stack--sm {
    gap: 0.875rem;
}

.hg-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.hg-row-between--wrap {
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hg-inline-actions {
    display: flex;
    gap: 0.25rem;
}

.hg-inline-actions--md {
    gap: 0.5rem;
}

.hg-text-muted {
    color: var(--hg-muted-foreground);
}

.hg-text-sm {
    font-size: 0.875rem;
}

.hg-text-xs {
    font-size: 0.8125rem;
}

.hg-text-caption {
    font-size: 0.75rem;
}

.hg-text-strong {
    font-weight: 600;
}

.hg-text-medium {
    font-weight: 500;
}

.hg-mb-sm {
    margin-bottom: 1rem;
}

.hg-mt-xs {
    margin-top: 0.35rem;
}

.hg-mt-sm {
    margin-top: 0.75rem;
}

.hg-m-0 {
    margin: 0;
}

.hg-required {
    color: var(--hg-destructive);
}

.hg-btn--danger-text {
    color: var(--hg-destructive);
}

.hg-btn--block-left {
    width: 100%;
    justify-content: flex-start;
    margin-bottom: 0.25rem;
    height: auto;
    padding: 0.5rem 0.75rem;
}

.hg-link-underline {
    text-decoration: underline;
}

.hg-link {
    color: var(--hg-primary, #FF8205);
    text-decoration: underline;
    font-weight: 500;
}

.hg-link:hover {
    opacity: 0.85;
}

.hg-file {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hg-file-native {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.hg-file-drop {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border: 1px dashed color-mix(in srgb, var(--hg-border) 80%, var(--hg-primary));
    border-radius: 0.5rem;
    background: color-mix(in srgb, var(--hg-card) 92%, var(--hg-primary));
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.hg-file-drop:hover,
.hg-file-drop:focus-within {
    border-color: var(--hg-primary);
    background: color-mix(in srgb, var(--hg-card) 85%, var(--hg-primary));
}

.hg-file-drop-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.45rem;
    background: hsl(var(--hg-hsl-brand) / 0.12);
    color: var(--hg-primary);
    flex-shrink: 0;
}

.hg-file-drop-body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.hg-file-drop-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--hg-foreground, #111);
}

.hg-file-drop-hint {
    font-size: 0.75rem;
    color: var(--hg-muted-foreground, #6b7280);
}

.hg-file-meta {
    min-height: 1.25rem;
}

.hg-file-meta-loading {
    font-size: 0.75rem;
    color: var(--hg-muted-foreground, #6b7280);
}

.hg-file-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: hsl(var(--hg-hsl-brand) / 0.12);
    color: var(--hg-foreground, #111);
    font-size: 0.75rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hg-field-hint {
    margin: 0.35rem 0 0;
    font-size: 0.75rem;
    color: var(--hg-muted-foreground);
}

.hg-field--span-2,
.hg-field--full {
    grid-column: 1 / -1;
    width: 100%;
}

.hg-input--uppercase {
    text-transform: uppercase;
}

.hg-modal-body--stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hg-modal-body--stack-sm {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hg-modal-footer--between {
    justify-content: space-between;
}

.hg-checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.hg-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.hg-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid var(--hg-border);
    border-radius: 0.5rem;
    padding: 0.35rem 0.5rem;
    font-size: 0.8125rem;
}

.hg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.hg-table thead tr {
    background: color-mix(in oklch, var(--hg-muted) 40%, transparent);
    text-align: left;
}

.hg-table th {
    height: 2.5rem;
    padding: 0.5rem;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--hg-muted-foreground);
    white-space: nowrap;
    border-bottom: 1px solid var(--hg-border);
}

.hg-table td {
    padding: 0.5rem;
    vertical-align: middle;
    color: var(--hg-foreground);
    font-size: 0.875rem;
}

.hg-table tbody tr {
    border-top: 1px solid var(--hg-border);
    transition: background 0.12s ease;
}

.hg-table tbody tr:hover {
    background: color-mix(in oklch, var(--hg-muted) 30%, transparent);
}

.hg-table-cell-name {
    font-weight: 500;
}

.hg-table-cell-actions {
    width: 2.75rem;
    white-space: nowrap;
    text-align: right;
    position: relative;
}

.hg-agenda-grid-slot-head,
.hg-agenda-grid-cell-empty {
    width: var(--hg-slot-width);
    min-height: var(--hg-row-height);
}

.hg-agenda-grid-consultor,
.hg-agenda-grid-cell-span {
    min-height: var(--hg-row-height);
}

/* Mais de um agendamento no mesmo horário do mesmo consultor — acontece quando o
   site da Honda cria direto no DMS sobre um horário já ocupado. Os cards ficam um
   sobre o outro e a célula cresce, em vez de o segundo desaparecer. `height: auto`
   nos cards derruba o `height: 100%`, que dividiria a altura entre eles. */
.hg-agenda-grid-cell-span.is-empilhado,
.hg-agenda-week-cell-span.is-empilhado {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    height: auto !important;
}

.hg-agenda-grid-cell-span.is-empilhado .hg-agenda-card,
.hg-agenda-week-cell-span.is-empilhado .hg-agenda-week-card {
    height: auto;
    flex: 0 0 auto;
}

.hg-agenda-span-1 { width: calc(var(--hg-slot-width) * 1); }
.hg-agenda-span-2 { width: calc(var(--hg-slot-width) * 2); }
.hg-agenda-span-3 { width: calc(var(--hg-slot-width) * 3); }
.hg-agenda-span-4 { width: calc(var(--hg-slot-width) * 4); }
.hg-agenda-span-5 { width: calc(var(--hg-slot-width) * 5); }
.hg-agenda-span-6 { width: calc(var(--hg-slot-width) * 6); }
.hg-agenda-span-7 { width: calc(var(--hg-slot-width) * 7); }
.hg-agenda-span-8 { width: calc(var(--hg-slot-width) * 8); }
.hg-agenda-span-9 { width: calc(var(--hg-slot-width) * 9); }
.hg-agenda-span-10 { width: calc(var(--hg-slot-width) * 10); }
.hg-agenda-span-11 { width: calc(var(--hg-slot-width) * 11); }
.hg-agenda-span-12 { width: calc(var(--hg-slot-width) * 12); }
.hg-agenda-span-13 { width: calc(var(--hg-slot-width) * 13); }
.hg-agenda-span-14 { width: calc(var(--hg-slot-width) * 14); }
.hg-agenda-span-15 { width: calc(var(--hg-slot-width) * 15); }
.hg-agenda-span-16 { width: calc(var(--hg-slot-width) * 16); }
.hg-agenda-span-17 { width: calc(var(--hg-slot-width) * 17); }
.hg-agenda-span-18 { width: calc(var(--hg-slot-width) * 18); }
.hg-agenda-span-19 { width: calc(var(--hg-slot-width) * 19); }
.hg-agenda-span-20 { width: calc(var(--hg-slot-width) * 20); }
.hg-agenda-span-21 { width: calc(var(--hg-slot-width) * 21); }
.hg-agenda-span-22 { width: calc(var(--hg-slot-width) * 22); }

.hg-agenda-block--clickable {
    cursor: pointer;
}

.hg-agenda-block-title {
    font-weight: 600;
}

.hg-agenda-block-hint {
    font-size: 0.7rem;
    margin-top: 0.15rem;
    opacity: 0.85;
}

.hg-divider {
    height: 1px;
    background: var(--hg-border);
    margin: 1rem 0;
}

.hg-btn-group-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hg-modal-heading {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.hg-modal-heading--spaced {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
}

.hg-modal-lead {
    font-size: 0.875rem;
    color: var(--hg-muted-foreground);
    margin: 0 0 1rem;
}

.hg-actions-end {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.hg-actions-end--spaced {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}

.hg-section-card-body--md {
    padding: 0.75rem 1rem;
}

.hg-mb-xs {
    margin-bottom: 0.5rem;
}

.hg-form-grid-3 {
    /* minmax(0,1fr) deixa a coluna encolher abaixo do min-content do <select>,
       senão o grid estoura a largura do modal (scroll horizontal). */
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 640px) {
    .hg-form-grid-3 {
        grid-template-columns: 1fr;
    }
}

.hg-text-foreground {
    color: var(--hg-foreground);
}

.hg-text-primary {
    color: var(--hg-primary);
}

.hg-reagendar-form {
    display: grid;
    gap: 0.75rem;
    border-top: 1px solid var(--hg-border);
    padding-top: 0.75rem;
}

.hg-info-panel {
    border-radius: calc(var(--hg-radius) + 4px);
    border: 1px solid var(--hg-border);
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.hg-info-panel-head {
    padding: 0.75rem 1rem;
    background: color-mix(in srgb, var(--hg-muted) 40%, transparent);
    text-align: center;
}

.hg-info-panel-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--hg-muted-foreground);
}

.hg-info-panel-value {
    margin-top: 0.25rem;
    font-size: 1rem;
    font-weight: 700;
}

.hg-info-panel-value--lg {
    margin-top: 0.25rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.hg-info-panel--rounded {
    border-radius: 0.5rem;
    border: 1px solid var(--hg-border);
    background: color-mix(in srgb, var(--hg-muted) 40%, transparent);
    padding: 1rem;
    text-align: center;
    margin-bottom: 1rem;
}

.hg-empty-inline {
    padding: 2rem 0;
    text-align: center;
    font-size: 0.75rem;
    color: var(--hg-muted-foreground);
}

.hg-empty-inline--lg {
    padding: 2.5rem 0;
    text-align: center;
    font-size: 0.75rem;
    color: var(--hg-muted-foreground);
}

.hg-os-list {
    border-radius: calc(var(--hg-radius) + 4px);
    border: 1px solid var(--hg-border);
    overflow: hidden;
}

.hg-os-list-item {
    border-bottom: 1px solid var(--hg-border);
}

.hg-os-detail {
    padding: 0.75rem 1rem;
    background: color-mix(in srgb, var(--hg-muted) 20%, transparent);
    font-size: 0.75rem;
}

.hg-os-detail-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: var(--hg-muted-foreground);
}

.hg-detail-list {
    border: 1px solid var(--hg-border);
    border-radius: 0.375rem;
    overflow: hidden;
    background: var(--hg-card);
    list-style: none;
    margin: 0;
    padding: 0;
}

.hg-detail-list-item {
    display: flex;
    justify-content: space-between;
    padding: 0.375rem 0.625rem;
    border-bottom: 1px solid var(--hg-border);
}

.hg-detail-list-item:last-child {
    border-bottom: none;
}

.hg-km-form-block {
    margin-bottom: 1rem;
}

.hg-km-form-label {
    margin-bottom: 0.375rem;
}

.hg-km-input-row {
    display: flex;
    gap: 0.5rem;
}

.hg-input--grow {
    flex: 1;
}

.hg-km-history {
    border-radius: 0.5rem;
    border: 1px solid var(--hg-border);
    overflow: hidden;
}

.hg-km-history-head {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--hg-border);
    font-size: 0.75rem;
    font-weight: 600;
}

.hg-km-history-item {
    padding: 0.75rem;
    font-size: 0.75rem;
    border-bottom: 1px solid var(--hg-border);
}

.hg-km-history-footer {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--hg-border);
    display: flex;
    justify-content: space-between;
    color: var(--hg-muted-foreground);
}

.hg-anotacao-card--flush {
    margin-bottom: 0;
}

.hg-anotacao-card-title {
    font-size: 0.875rem;
    font-weight: 600;
}

.hg-anotacao-card-subtitle {
    font-size: 0.75rem;
    color: var(--hg-muted-foreground);
}

.hg-anotacao-card-body {
    margin-top: 0.375rem;
    font-size: 0.75rem;
}

.hg-anotacao-card-header {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.hg-anotacao-card-main {
    min-width: 0;
    flex: 1;
}

.hg-anotacao-card-actions {
    display: flex;
    align-items: flex-start;
    gap: 0.375rem;
    flex-shrink: 0;
}

.hg-icon-btn-ghost {
    border: none;
    background: none;
    color: var(--hg-muted-foreground);
    cursor: pointer;
}

.hg-anotacao-meta {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--hg-border);
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--hg-muted-foreground);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hg-evento-card-footer {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--hg-border);
    font-size: 11px;
    color: var(--hg-muted-foreground);
}

.hg-evento-card-desc {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--hg-muted-foreground);
}

.hg-evento-card-time {
    font-size: 11px;
    color: var(--hg-muted-foreground);
}

.hg-resumo-kv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.hg-resumo-kv-grid--icons {
    gap: 0.75rem;
}

.hg-resumo-kv-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
}

.hg-resumo-kv-ico {
    color: var(--hg-muted-foreground);
    margin-top: 0.125rem;
    flex-shrink: 0;
    display: inline-flex;
}

.hg-resumo-kv-text {
    min-width: 0;
    flex: 1;
}

.hg-resumo-kv-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hg-resumo-kv-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--hg-muted-foreground);
}

.hg-badge--xs {
    font-size: 10px;
}

.hg-dms-obs-meta {
    margin-top: 0.25rem;
    font-size: 11px;
    color: var(--hg-muted-foreground);
}

.hg-field--search {
    flex: 1;
    min-width: 220px;
}

.hg-agenda-avatar--lg {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 0.75rem;
}

.hg-consultor-name {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.hg-week-hint {
    font-size: 0.875rem;
    color: var(--hg-muted-foreground);
    margin: 0 0 1rem;
}

/* --- Debug / helpers extras --- */
.hg-filters--wrap {
    flex-wrap: wrap;
}

.hg-input--code {
    font-family: ui-monospace, monospace;
    font-size: 12px;
}

.hg-debug-info-title--spaced {
    margin-bottom: 0.75rem;
}

.hg-debug-info-grid--spaced {
    margin-bottom: 1rem;
}

.hg-reasons-list {
    margin: 0 0 1rem 1rem;
}

.hg-page-stack--sm > * + * {
    margin-top: 0.75rem;
}

.hg-page-stack.hg-page-stack--sm > * + * {
    margin-top: 0.75rem;
}

.hg-eventos-bloco-meta {
    margin-top: 0.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--hg-border);
}

.hg-eventos-bloco-meta-title {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--hg-foreground, #0f172a);
}

.hg-eventos-bloco-meta-sub {
    margin: 0 0 1rem;
    font-size: 0.8125rem;
    color: var(--hg-muted-foreground, #64748b);
}

/* --- Controle Master (Usuários / Meta / Webhook de leads) --- */
.hg-users-page.fi-page,
.hg-master-page.fi-page {
    padding: 1.5rem;
    gap: 1.25rem;
    display: flex;
    flex-direction: column;
}

.hg-master-header,
.hg-users-page .hg-users-page-header {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 1rem;
    width: 100%;
}

.hg-master-header-top,
.hg-users-page-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
}

.hg-master-header .hg-page-subtitle {
    max-width: 42rem;
}

.hg-super-tabs.hg-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    height: auto;
    min-height: 2.625rem;
    margin-top: 0;
    padding: 0.375rem;
    gap: 0.5rem;
    border: 0;
    border-radius: var(--hg-radius-md);
    background: var(--hg-muted);
}

.hg-super-tabs .hg-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 1.875rem;
    min-height: 1.875rem;
    padding: 0.375rem 1.25rem;
    border: 0;
    border-radius: var(--hg-radius-sm);
    background: transparent;
    box-shadow: none;
    color: var(--hg-muted-foreground);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25;
    text-decoration: none;
    white-space: nowrap;
}

.hg-super-tabs .hg-tab:hover {
    background: transparent;
    color: var(--hg-foreground);
}

.hg-super-tabs .hg-tab.is-active {
    background: var(--hg-card);
    color: var(--hg-foreground);
    box-shadow: 0 1px 2px rgb(15 23 42 / 12%), 0 1px 1px rgb(15 23 42 / 6%);
}

.hg-super-tabs .hg-tab:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--hg-primary) 55%, transparent);
    outline-offset: 1px;
}

.hg-users-page .hg-master-header-actions .fi-ac,
.hg-users-page .hg-master-header-actions .fi-ac-btn-group,
.hg-users-page .hg-users-header-actions .fi-ac,
.hg-users-page .hg-users-header-actions .fi-ac-btn-group,
.hg-master-page .hg-master-header-actions .fi-ac,
.hg-master-page .hg-master-header-actions .fi-ac-btn-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hg-master-header-actions .hg-btn,
.hg-users-page .hg-master-header-actions .fi-btn,
.hg-users-page .hg-users-header-actions .fi-btn,
.hg-master-page .hg-master-header-actions .fi-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    height: 2.25rem;
    min-height: 2.25rem;
    padding: 0 0.875rem;
    border-radius: calc(var(--hg-radius) - 2px);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    box-shadow: none;
}

.hg-master-header-actions .hg-btn svg,
.hg-master-header-actions .fi-btn svg,
.hg-master-header-actions .fi-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.hg-users-page .hg-master-header-actions .fi-btn.hg-btn-primary,
.hg-users-page .hg-master-header-actions .fi-btn-color-primary,
.hg-users-page .hg-users-header-actions .fi-btn.hg-btn-primary,
.hg-users-page .hg-users-header-actions .fi-btn-color-primary,
.hg-master-page .hg-master-header-actions .fi-btn.hg-btn-primary,
.hg-master-page .hg-master-header-actions .fi-btn-color-primary {
    background: var(--hg-primary);
    color: #fff;
    border-color: transparent;
}

.hg-users-page .hg-master-header-actions .fi-btn.hg-btn-primary:hover,
.hg-users-page .hg-master-header-actions .fi-btn-color-primary:hover,
.hg-users-page .hg-users-header-actions .fi-btn.hg-btn-primary:hover,
.hg-users-page .hg-users-header-actions .fi-btn-color-primary:hover,
.hg-master-page .hg-master-header-actions .fi-btn.hg-btn-primary:hover,
.hg-master-page .hg-master-header-actions .fi-btn-color-primary:hover {
    filter: brightness(0.95);
}

.hg-users-page .fi-header,
.hg-master-page .fi-header {
    display: none; /* header custom hg-page-header */
}

.hg-users-page .fi-page-main,
.hg-users-page .fi-page-content,
.hg-master-page .fi-page-main,
.hg-master-page .fi-page-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.hg-users-page .fi-page-content > .fi-sc,
.hg-users-page .fi-page-content > form > .fi-sc,
.hg-master-page .fi-page-content > .fi-sc,
.hg-master-page .fi-page-content > form > .fi-sc {
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.hg-users-page .fi-ta-ctn {
    border-radius: calc(var(--hg-radius) + 4px);
    border: 1px solid var(--hg-border);
    background: var(--hg-card);
    box-shadow: none;
    overflow: hidden;
}

.hg-users-page .fi-ta-header,
.hg-users-page .fi-ta-header-toolbar {
    background: color-mix(in oklch, var(--hg-muted) 35%, transparent);
    border-bottom: 1px solid var(--hg-border);
    padding: 0.75rem 1rem;
}

.hg-users-page .fi-ta-header:has(.smeta-toolbar) {
    padding: 0;
    background: transparent;
    border-bottom: 0;
}

.hg-users-page .fi-ta-search-field {
    display: none;
}

.hg-users-page .fi-ta-search-field input,
.hg-users-page .fi-input {
    border-radius: 0.5rem;
    border-color: var(--hg-border);
    background: var(--hg-background, #fff);
}

.hg-users-page .fi-ta-table {
    font-size: 0.875rem;
}

.hg-users-page .fi-ta-table thead th {
    background: var(--hg-muted);
    color: var(--hg-muted-foreground);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--hg-border);
}

.hg-users-page .fi-ta-table tbody tr {
    border-top: 1px solid var(--hg-border);
}

.hg-users-page .fi-ta-table tbody tr:hover {
    background: color-mix(in oklch, var(--hg-muted) 40%, transparent);
}

.hg-users-page .fi-ta-table td,
.hg-users-page .fi-ta-table th {
    padding: 0.85rem 1rem;
}

.hg-users-page .fi-ta-actions .fi-btn,
.hg-users-page .fi-ac-btn-group .fi-btn {
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
}

.hg-users-page .fi-section {
    border-radius: calc(var(--hg-radius) + 4px);
    border: 1px solid var(--hg-border);
    background: var(--hg-card);
    box-shadow: none;
}

.hg-users-page .fi-section-header {
    border-bottom: 1px solid var(--hg-border);
    background: color-mix(in oklch, var(--hg-muted) 30%, transparent);
}

.hg-users-page .fi-fo-field-wrp input,
.hg-users-page .fi-input,
.hg-users-page .fi-select-input {
    border-radius: 0.5rem;
}

.hg-users-page .fi-form-actions,
.hg-users-page .fi-form-actions .fi-ac,
.hg-users-form-page .fi-sc-actions,
.hg-users-form-page .fi-sc-actions .fi-ac {
    gap: 0.5rem;
}

.hg-users-page .fi-form-actions .fi-btn-color-primary,
.hg-users-form-page .fi-sc-actions .fi-btn-color-primary {
    background: var(--hg-primary);
    color: #fff;
    border-color: transparent;
    border-radius: 0.5rem;
    font-weight: 600;
}

/* --- Formulário criar/editar usuário --- */
.hg-users-form-page.fi-page,
.hg-users-form-page .fi-page-header-main-ctn,
.hg-users-form-page .fi-page-main,
.hg-users-form-page .fi-page-content,
.hg-users-form-page .fi-sc-form,
.hg-users-form-page form,
.hg-users-form-page .fi-section,
.hg-users-form-page .fi-section-content-ctn,
.hg-users-form-page .fi-section-content,
.hg-users-form-page .fi-grid {
    width: 100%;
    max-width: none;
    margin-inline: 0;
    align-self: stretch;
}

.hg-users-form-page .fi-page-main,
.hg-users-form-page .fi-page-content,
.hg-users-form-page form.fi-sc-form,
.hg-users-form-page .fi-sc-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.hg-users-form-page .fi-sc-form,
.hg-users-form-page form {
    gap: 1rem;
}

.hg-users-form-page .fi-section-content-ctn > .fi-section-content {
    padding: 1.25rem 1.25rem 1.35rem;
}

.hg-users-form-page .fi-section-content > .fi-sc,
.hg-users-form-page .fi-section-content.fi-sc {
    gap: 1rem;
}

.hg-users-form-page .fi-fo-field {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
}

.hg-users-form-page .fi-fo-field-label-col,
.hg-users-form-page .fi-fo-field-content-col {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    text-align: left;
}

.hg-users-form-page .fi-fo-field-label,
.hg-users-form-page .fi-fo-field-label-content {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
}

.hg-users-form-page .fi-fo-field-label-required-mark {
    color: #e11d48;
    font-weight: 700;
}

.hg-users-form-page .fi-fo-field-content-col > .fi-sc,
.hg-users-form-page .fi-fo-field-content-col .fi-grid-col {
    display: block;
    width: 100%;
    max-width: 100%;
    text-align: left;
}

.hg-users-form-page .fi-sc-text,
.hg-users-form-page .fi-fo-field-content-col .fi-sc-text {
    display: block;
    width: 100%;
    margin: 0;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.45;
    color: #64748b;
}

.hg-users-form-page .fi-input-wrp {
    min-height: 2.5rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: none;
}

.hg-users-form-page .fi-input-wrp:focus-within {
    border-color: var(--hg-primary);
    box-shadow: 0 0 0 1px var(--hg-primary);
}

.hg-users-form-page .fi-input-wrp.fi-invalid,
.hg-users-form-page .fi-input-wrp:has(.fi-invalid) {
    border-color: #e11d48;
    box-shadow: 0 0 0 1px #e11d48;
}

.hg-users-form-page input.fi-input,
.hg-users-form-page .fi-input-wrp input {
    min-height: 2.5rem;
    height: 2.5rem;
    padding: 0.5rem 0.75rem;
    background: transparent;
    font-size: 0.875rem;
    color: #0f172a;
    -webkit-text-fill-color: #0f172a;
}

.hg-users-form-page input.fi-input:-webkit-autofill,
.hg-users-form-page input.fi-input:-webkit-autofill:hover,
.hg-users-form-page input.fi-input:-webkit-autofill:focus,
.hg-users-form-page .fi-input-wrp input:-webkit-autofill,
.hg-users-form-page .fi-input-wrp input:-webkit-autofill:hover,
.hg-users-form-page .fi-input-wrp input:-webkit-autofill:focus {
    -webkit-text-fill-color: #0f172a !important;
    caret-color: #0f172a;
    transition: background-color 9999s ease-in-out 0s;
    box-shadow: 0 0 0 1000px #fff inset;
}

.hg-users-form-page .fi-fo-field-has-inline-label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
}

.hg-users-form-page .fi-fo-field-label-ctn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hg-users-form-page .fi-form-actions,
.hg-users-form-page .fi-sc-actions {
    padding-top: 0.25rem;
}

.hg-users-form-page .fi-form-actions .fi-btn,
.hg-users-form-page .fi-sc-actions .fi-btn {
    min-height: 2.25rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.hg-users-page .fi-pagination {
    border-top: 1px solid var(--hg-border);
    padding: 0.75rem 1rem;
    background: color-mix(in oklch, var(--hg-muted) 20%, transparent);
}

.hg-master-page .smeta-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: color-mix(in oklch, var(--hg-muted) 35%, transparent);
    border-bottom: 1px solid var(--hg-border);
}

.hg-master-page .smeta-search {
    flex: 1;
    min-width: 16rem;
    max-width: 32rem;
}

.hg-master-page .smeta-toolbar-meta {
    margin-left: auto;
}

.hg-master-page .smeta-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--hg-muted-foreground);
    background: var(--hg-muted);
    border-radius: 999px;
    padding: 0.375rem 0.75rem;
}

.hg-master-page .smeta-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    padding: 3rem 1.5rem;
    border: 0;
    box-shadow: none;
}

.hg-master-page .smeta-table-card {
    border-radius: calc(var(--hg-radius) + 4px);
    border: 1px solid var(--hg-border);
    background: var(--hg-card);
    box-shadow: none;
    overflow: hidden;
}

.hg-master-page .smeta-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    background: color-mix(in srgb, var(--hg-primary) 10%, transparent);
    color: var(--hg-primary);
    margin-bottom: 0.25rem;
}

.hg-master-page .smeta-empty-text {
    margin: 0 0 0.5rem;
    max-width: 24rem;
    font-size: 0.8125rem;
    color: var(--hg-muted-foreground);
}

.hg-master-page .smeta-table-wrap {
    overflow-x: auto;
}

.hg-master-page .smeta-table th,
.hg-master-page .smeta-table td {
    padding: 0.85rem 1rem;
}

.hg-master-page .smeta-table th {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    background: var(--hg-muted);
}

.hg-master-page .smeta-table-card .hg-pagination,
.hg-master-page .hg-master-pagination {
    margin-top: 0;
    border: 0;
    border-top: 1px solid var(--hg-border);
    border-radius: 0;
    background: color-mix(in oklch, var(--hg-muted) 20%, transparent);
}

.hg-master-page .whk-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.hg-master-page .whk-metric {
    border-radius: calc(var(--hg-radius) + 4px);
    box-shadow: none;
}

/* --- Campanhas / Lixeira (protótipo) --- */
.hg-totalizers--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 768px) {
    .hg-totalizers--4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.hg-totalizer-dot--primary { background: var(--hg-primary); }
.hg-totalizer-dot--agendado { background: var(--hg-status-agendado); }
.hg-totalizer-dot--compareceu { background: var(--hg-status-compareceu); }

.hg-campanha-exec {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 8rem;
    font-size: 0.8125rem;
}

.hg-progress {
    height: 0.375rem;
    border-radius: 9999px;
    background: var(--hg-muted);
    overflow: hidden;
}

.hg-progress-bar {
    height: 100%;
    border-radius: 9999px;
    background: var(--hg-primary);
    width: 0;
}

.hg-progress-bar--0 { width: 0; }
.hg-progress-bar--10 { width: 10%; }
.hg-progress-bar--20 { width: 20%; }
.hg-progress-bar--30 { width: 30%; }
.hg-progress-bar--40 { width: 40%; }
.hg-progress-bar--50 { width: 50%; }
.hg-progress-bar--60 { width: 60%; }
.hg-progress-bar--70 { width: 70%; }
.hg-progress-bar--80 { width: 80%; }
.hg-progress-bar--90 { width: 90%; }
.hg-progress-bar--100 { width: 100%; }

.hg-table-cell-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.hg-table-cell-icon {
    width: 2.5rem;
}

.hg-table-cell-ellipsis {
    max-width: 20rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hg-table-row--clickable {
    cursor: pointer;
}

.hg-table-row--clickable:hover,
.hg-table-row--nested {
    background: color-mix(in oklch, var(--hg-muted) 35%, transparent);
}

.hg-badge--primary {
    background: color-mix(in oklch, var(--hg-primary) 10%, transparent);
    color: var(--hg-primary);
    border-color: color-mix(in oklch, var(--hg-primary) 30%, transparent);
}

.hg-badge--webhook {
    background: #eef2ff;
    color: #3730a3;
    border-color: #c7d2fe;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
}

.hg-badge--myhonda {
    background: color-mix(in srgb, var(--hg-primary) 12%, transparent);
    color: var(--hg-primary);
    border: 1px solid color-mix(in srgb, var(--hg-primary) 35%, transparent);
}

.hg-badge--myhonda-novo {
    background: color-mix(in srgb, var(--hg-status-agendado) 14%, transparent);
    color: var(--hg-status-agendado);
    border: 1px solid color-mix(in srgb, var(--hg-status-agendado) 35%, transparent);
}

.hg-badge--myhonda-negociacao {
    background: color-mix(in srgb, var(--hg-primary) 12%, transparent);
    color: var(--hg-primary);
    border: 1px solid color-mix(in srgb, var(--hg-primary) 35%, transparent);
}

.hg-badge--myhonda-concluido {
    background: color-mix(in srgb, var(--hg-status-recebido) 14%, transparent);
    color: var(--hg-status-recebido);
    border: 1px solid color-mix(in srgb, var(--hg-status-recebido) 35%, transparent);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
}

.hg-badge--myhonda,
.hg-badge--myhonda-novo,
.hg-badge--myhonda-negociacao {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
}

.hg-myhonda-tab-meta {
    margin: 0;
    font-size: 0.8125rem;
}

.hg-myhonda-tab .hg-toolbar--wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.hg-myhonda-tab .hg-totalizers {
    margin-bottom: 1rem;
}

.hg-totalizer-myhonda-novo .hg-totalizer-dot { background: var(--hg-status-agendado); }
.hg-totalizer-myhonda-negociacao .hg-totalizer-dot { background: var(--hg-primary); }
.hg-totalizer-myhonda-concluido .hg-totalizer-dot { background: var(--hg-status-recebido); }

.hg-badge-muted {
    background: var(--hg-muted);
    color: var(--hg-muted-foreground);
    border-color: var(--hg-border);
}

.hg-text-xs {
    font-size: 0.75rem;
}

.hg-filters-filtrar {
    align-self: flex-end;
    gap: 0.5rem;
}


/* --- Agenda week grid (prototipo AgendaWeekGrid) --- */
.hg-agenda-week {
    --hg-agenda-week-consultor: 200px;
    --hg-agenda-week-time: 64px;
    --hg-agenda-week-day: 170px;
    --hg-agenda-week-slot-h: 56px;
}

.hg-agenda-week-shell {
    border-radius: calc(var(--hg-radius) + 4px);
    border: 1px solid var(--hg-border);
    background: var(--hg-card);
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
    overflow: hidden;
}

.hg-agenda-week-scroll {
    overflow: auto;
    max-height: calc(100vh - 280px);
}

.hg-agenda-week-grid {
    min-width: max-content;
}

.hg-agenda-week-head {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    border-bottom: 1px solid var(--hg-border);
    background: color-mix(in srgb, var(--hg-card) 95%, transparent);
    backdrop-filter: blur(6px);
}

.hg-agenda-week-consultor-head {
    position: sticky;
    left: 0;
    z-index: 30;
    width: var(--hg-agenda-week-consultor);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-right: 1px solid var(--hg-border);
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--hg-muted-foreground);
    background: color-mix(in srgb, var(--hg-card) 95%, transparent);
}

.hg-agenda-week-time-head {
    position: sticky;
    left: var(--hg-agenda-week-consultor);
    z-index: 20;
    width: var(--hg-agenda-week-time);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--hg-border);
    padding: 0.5rem 0.25rem;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--hg-muted-foreground);
    text-align: center;
    background: color-mix(in srgb, var(--hg-card) 95%, transparent);
}

.hg-agenda-week-day-head {
    width: var(--hg-agenda-week-day);
    flex-shrink: 0;
    border-right: 1px solid var(--hg-border);
    padding: 0.5rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    text-transform: capitalize;
    color: var(--hg-foreground, inherit);
}

.hg-agenda-week-consultor-block {
    display: flex;
    border-bottom: 1px solid var(--hg-border);
}

.hg-agenda-week-consultor-block:last-child {
    border-bottom: none;
}

.hg-agenda-week-consultor {
    position: sticky;
    left: 0;
    z-index: 10;
    width: var(--hg-agenda-week-consultor);
    flex-shrink: 0;
    border-right: 1px solid var(--hg-border);
    background: var(--hg-card);
    padding: 0.75rem;
    align-self: stretch;
}

.hg-agenda-week-consultor-inner {
    position: sticky;
    top: 3rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.hg-agenda-week-consultor-name {
    min-width: 0;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1.2;
    word-break: break-word;
}

.hg-agenda-week-slots {
    flex: 1;
    min-width: 0;
}

.hg-agenda-week-slot-row {
    display: flex;
    height: var(--hg-agenda-week-slot-h);
    border-bottom: 1px solid var(--hg-border);
}

.hg-agenda-week-slot-row:last-child {
    border-bottom: none;
}

.hg-agenda-week-time-cell {
    width: var(--hg-agenda-week-time);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--hg-border);
    background: color-mix(in srgb, var(--hg-muted) 20%, transparent);
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--hg-muted-foreground);
    font-variant-numeric: tabular-nums;
}

.hg-agenda-week-cell {
    width: var(--hg-agenda-week-day);
    flex-shrink: 0;
    border-right: 1px solid var(--hg-border);
    box-sizing: border-box;
}

.hg-agenda-week-cell-span {
    position: relative;
    z-index: 2;
    padding: 0.25rem;
    overflow: visible;
}

.hg-agenda-week-cell-continuation {
    height: 0;
    border-right: 1px solid var(--hg-border);
    overflow: hidden;
    pointer-events: none;
}

.hg-agenda-week-cell-empty {
    height: var(--hg-agenda-week-slot-h);
    cursor: cell;
    user-select: none;
    transition: background-color 0.15s, box-shadow 0.15s;
}

.hg-agenda-week-cell-empty:hover {
    background: color-mix(in srgb, var(--hg-primary) 5%, transparent);
}

.hg-agenda-week-cell-empty.is-selected {
    background: color-mix(in srgb, var(--hg-primary) 15%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hg-primary) 50%, transparent);
}

.hg-agenda-week-cell-empty.is-drop-ok {
    background: color-mix(in srgb, var(--hg-drop-ok) 14%, transparent);
    box-shadow: inset 0 0 0 2px var(--hg-drop-ok);
}

.hg-agenda-week-cell-empty.is-drop-bad {
    background: color-mix(in srgb, var(--hg-drop-bad) 14%, transparent);
    box-shadow: inset 0 0 0 2px var(--hg-drop-bad);
}

.hg-agenda-week-card,
.hg-agenda-week-block {
    height: 100%;
    width: 100%;
    min-width: 0;
    border-radius: 0.375rem;
    border: 1px solid;
    font-size: 0.6875rem;
    line-height: 1.2;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.hg-agenda-week-card {
    padding: 0.375rem 0.5rem;
    gap: 0.125rem;
}

.hg-agenda-week-card--compact {
    padding: 0.125rem 0.375rem;
    gap: 0;
}

.hg-agenda-week-card-compact-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
    min-width: 0;
    line-height: 1;
}

.hg-agenda-week-card-placa {
    font-weight: 700;
    letter-spacing: 0.04em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hg-agenda-week-card-slot {
    flex-shrink: 0;
    font-size: 0.5625rem;
    opacity: 0.7;
    font-variant-numeric: tabular-nums;
}

.hg-agenda-week-card-owner {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 500;
    text-align: left;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0.9;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 2px;
}

.hg-agenda-week-card--compact .hg-agenda-week-card-owner {
    font-size: 0.625rem;
    font-weight: 400;
    text-transform: none;
}

.hg-agenda-week-card-time {
    font-size: 0.625rem;
    opacity: 0.7;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hg-agenda-week-block {
    padding: 0.375rem 0.5rem;
    text-align: left;
    background: var(--hg-status-bloqueado-bg, #fef2f2);
    color: var(--hg-status-bloqueado, #b91c1c);
    border-color: var(--hg-status-bloqueado-border, #fecaca);
}

/* --- Campanhas / Lixeira — drawers, totalizers com ícone, badges --- */
.hg-totalizer-with-icon {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.hg-totalizer-main {
    min-width: 0;
}

.hg-totalizer-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.375rem;
    background: var(--hg-muted);
    color: var(--hg-muted-foreground);
}

.hg-totalizer-icon--primary {
    background: color-mix(in oklch, var(--hg-primary) 12%, transparent);
    color: var(--hg-primary);
}

.hg-totalizer-icon--agendado {
    background: var(--hg-status-agendado-bg, color-mix(in oklch, var(--hg-status-agendado) 12%, transparent));
    color: var(--hg-status-agendado);
}

.hg-totalizer-icon--compareceu {
    background: var(--hg-status-compareceu-bg, color-mix(in oklch, var(--hg-status-compareceu) 12%, transparent));
    color: var(--hg-status-compareceu);
}

.hg-totalizer-icon--danger {
    background: color-mix(in oklch, var(--hg-destructive, #dc2626) 12%, transparent);
    color: var(--hg-destructive, #dc2626);
}

.hg-totalizer-dot--danger {
    background: var(--hg-destructive, #dc2626);
}

.hg-totalizers--3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .hg-totalizers--3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.hg-badge-tipo-revisao {
    background: var(--hg-status-agendado-bg, color-mix(in oklch, var(--hg-status-agendado) 12%, transparent));
    color: var(--hg-status-agendado);
    border-color: var(--hg-status-agendado-border, color-mix(in oklch, var(--hg-status-agendado) 30%, transparent));
}

.hg-badge-tipo-boasvindas,
.hg-badge-tipo-resgate {
    background: var(--hg-status-compareceu-bg, color-mix(in oklch, var(--hg-status-compareceu) 12%, transparent));
    color: var(--hg-status-compareceu);
    border-color: var(--hg-status-compareceu-border, color-mix(in oklch, var(--hg-status-compareceu) 30%, transparent));
}

.hg-badge-exec-agendada {
    background: var(--hg-status-agendado-bg, color-mix(in oklch, var(--hg-status-agendado) 12%, transparent));
    color: var(--hg-status-agendado);
    border-color: var(--hg-status-agendado-border, color-mix(in oklch, var(--hg-status-agendado) 30%, transparent));
}

.hg-badge-exec-processamento {
    background: color-mix(in oklch, var(--hg-primary) 10%, transparent);
    color: var(--hg-primary);
    border-color: color-mix(in oklch, var(--hg-primary) 30%, transparent);
}

.hg-badge-exec-concluida {
    background: var(--hg-status-compareceu-bg, color-mix(in oklch, var(--hg-status-compareceu) 12%, transparent));
    color: var(--hg-status-compareceu);
    border-color: var(--hg-status-compareceu-border, color-mix(in oklch, var(--hg-status-compareceu) 30%, transparent));
}

.hg-badge-exec-pausada {
    background: var(--hg-muted);
    color: var(--hg-muted-foreground);
    border-color: var(--hg-border);
}

.hg-badge-exec-erro {
    background: color-mix(in oklch, var(--hg-destructive, #dc2626) 10%, transparent);
    color: var(--hg-destructive, #dc2626);
    border-color: color-mix(in oklch, var(--hg-destructive, #dc2626) 30%, transparent);
}

.hg-badge-dot--success {
    background: var(--hg-status-compareceu);
}

.hg-badge-dot--muted {
    background: var(--hg-muted-foreground);
}

.hg-campanha-exec-meta {
    font-size: 0.6875rem;
    color: var(--hg-muted-foreground);
    font-variant-numeric: tabular-nums;
}

.hg-table-cell-actions {
    width: 2.75rem;
    text-align: right;
    position: relative;
}

.hg-dropdown {
    position: relative;
    display: inline-flex;
}

.hg-dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 0.25rem);
    z-index: 30;
    min-width: 13rem;
    padding: 0.25rem;
    border-radius: 0.5rem;
    border: 1px solid var(--hg-border);
    background: var(--hg-card);
    box-shadow: 0 8px 24px rgb(0 0 0 / 0.12);
}

.hg-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.625rem;
    border: none;
    border-radius: 0.375rem;
    background: transparent;
    color: var(--hg-foreground);
    font-size: 0.8125rem;
    text-align: left;
    cursor: pointer;
}

.hg-dropdown-item:hover {
    background: color-mix(in oklch, var(--hg-muted) 60%, transparent);
}

.hg-dropdown-item--danger {
    color: var(--hg-destructive, #dc2626);
}

.hg-dropdown-item--danger:hover {
    background: color-mix(in oklch, var(--hg-destructive, #dc2626) 8%, transparent);
}

/* Sheet (Campanhas) — fiel ao Radix Sheet + ScrollArea do protótipo */
@keyframes hg-sheet-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes hg-sheet-slide-in-from-right {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes hg-sheet-fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes hg-sheet-slide-out-to-right {
    from { transform: translateX(0); }
    to { transform: translateX(100%); }
}

.hg-sheet-root {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
}

/* Aberto por cima do modal de agendar (hg-modal-overlay--top = 100000). */
.hg-sheet-root--over-modal {
    z-index: 100002;
}

.hg-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgb(0 0 0 / 0.8);
    pointer-events: auto;
    animation: hg-sheet-fade-in 150ms ease-out both;
}

.hg-sheet-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(75vw, 100%);
    height: 100%;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    background: var(--hg-background);
    border-left: 1px solid var(--hg-border);
    box-shadow: -12px 0 40px rgb(0 0 0 / 0.18);
    pointer-events: auto;
    overflow: hidden;
    will-change: transform;
    animation: hg-sheet-slide-in-from-right 500ms ease-in-out both;
}

.hg-sheet-root.is-closing .hg-sheet-backdrop {
    animation: hg-sheet-fade-out 200ms ease-in both;
}

.hg-sheet-root.is-closing .hg-sheet-panel {
    animation: hg-sheet-slide-out-to-right 300ms ease-in-out both;
}

@media (prefers-reduced-motion: reduce) {
    .hg-sheet-backdrop,
    .hg-sheet-panel,
    .hg-sheet-root.is-closing .hg-sheet-backdrop,
    .hg-sheet-root.is-closing .hg-sheet-panel {
        animation: none;
    }
}

.hg-sheet-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: none;
    border-radius: 0.125rem;
    background: transparent;
    color: var(--hg-foreground);
    opacity: 0.7;
    cursor: pointer;
}

.hg-sheet-close:hover {
    opacity: 1;
}

.hg-sheet-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 3.5rem 1rem 1.5rem;
    border-bottom: 1px solid var(--hg-border);
    flex-shrink: 0;
    background: var(--hg-background);
}

.hg-sheet-header-icon {
    border-radius: 0.5rem;
    background: color-mix(in srgb, var(--hg-primary) 10%, transparent);
    padding: 0.5rem;
    color: var(--hg-primary);
    flex-shrink: 0;
    line-height: 0;
}

.hg-sheet-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hg-sheet-title--plain {
    letter-spacing: normal;
    text-transform: none;
}

.hg-sheet-subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.75rem;
    color: var(--hg-muted-foreground);
}

.hg-sheet-subtitle--meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 0.75rem;
    margin-top: 0.25rem;
}

.hg-sheet-meta-strong {
    color: var(--hg-foreground);
}

.hg-sheet-scroll {
    flex: 1 1 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.hg-sheet-scroll-inner {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hg-sheet-totalizers {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hg-sheet-block {
    border: 1px solid var(--hg-border);
    border-radius: 0.5rem;
    background: var(--hg-card);
    padding: 1.25rem;
}

.hg-sheet-block-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--hg-foreground);
}

.hg-sheet-block-title svg {
    color: var(--hg-primary, #ff8205);
    flex-shrink: 0;
}

/* --- Drawer de cadastro rápido (bloco 4) --- */
/* Modal "Adicionar veículo" abre por cima do drawer (hg-sheet-root--over-modal = 100002). */
.hg-modal-overlay--over-drawer {
    z-index: 100003;
}

.hg-cadastro-banner {
    display: flex;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--hg-border);
    border-radius: 0.5rem;
    background: color-mix(in oklch, var(--hg-primary, #ff8205) 8%, var(--hg-card));
}

.hg-cadastro-banner svg {
    color: var(--hg-primary, #ff8205);
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.hg-cadastro-banner-title {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 500;
}

.hg-cadastro-banner-sub {
    margin: 0.35rem 0 0;
    font-size: 0.75rem;
    color: var(--hg-muted-foreground);
}

.hg-cadastro-chip {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: 0.375rem;
    background: var(--hg-muted);
    font-size: 0.7rem;
    font-weight: 600;
}

.hg-badge-optional {
    padding: 0.1rem 0.4rem;
    border-radius: 0.375rem;
    background: var(--hg-muted);
    color: var(--hg-muted-foreground);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.hg-cadastro-veiculo-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hg-cadastro-veiculo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--hg-border);
    border-radius: 0.5rem;
    background: var(--hg-card);
}

.hg-cadastro-veiculo-info {
    font-size: 0.8rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hg-cadastro-veiculo-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

.hg-cadastro-add-veiculo {
    align-self: flex-start;
    border-style: dashed;
}

/* Caixa "Atendimento pelo Box Express" (modal de agendar) */
.hg-box-express-box {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--hg-border);
    border-radius: 0.5rem;
    background: var(--hg-card);
    cursor: pointer;
}

.hg-box-express-box input[type='checkbox'] {
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    flex-shrink: 0;
    accent-color: var(--hg-primary, #ff8205);
}

.hg-box-express-box.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Consentimentos do drawer — 2 colunas, indicador circular */
.hg-cadastro-consent-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem 1rem;
}

@media (min-width: 640px) {
    .hg-cadastro-consent-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.hg-consent-opt {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    cursor: pointer;
}

.hg-consent-opt input[type='checkbox'] {
    width: 1.05rem;
    height: 1.05rem;
    border-radius: 50%;
    flex-shrink: 0;
    accent-color: var(--hg-primary, #ff8205);
}

.hg-cadastro-rodape {
    margin: 0.25rem 0 0;
    font-size: 0.7rem;
    color: var(--hg-muted-foreground);
}

/* Reagendar no drawer (seção Agendamentos) */
.hg-reag-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hg-reag-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.hg-atendimento-header-actions {
    justify-content: flex-end;
}

/* Legenda do Monitor (status / tipos / características) */
.hg-legenda {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
}

.hg-legenda-linha {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 1rem;
}

.hg-legenda-titulo {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--hg-muted-foreground);
    min-width: 6.5rem;
}

.hg-legenda-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
}

/* Ícones da legenda maiores/legíveis (tipos + características), como no protótipo. */
.hg-legenda svg {
    width: 16px;
    height: 16px;
}

.hg-legenda-tipo-icone {
    display: inline-flex;
    align-items: center;
}

/* Ícone do tipo na legenda herda a cor do wrapper (cor por tipo) e vai cheio. */
.hg-legenda-item .hg-agenda-card-tipo {
    color: inherit;
    opacity: 1;
}

.hg-legenda-icone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hg-legenda-icone--box {
    color: var(--hg-primary, #ff8205);
}

.hg-legenda-icone--honda {
    color: #e2001a;
}

.hg-legenda-toggle {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border: 0;
    background: transparent;
    color: var(--hg-muted-foreground);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
}

.hg-legenda-toggle:hover {
    color: var(--hg-foreground);
}

.hg-legenda-extra {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-top: 1px solid var(--hg-border);
    padding-top: 0.6rem;
}

/* Campo de motivo no modal de excluir agendamento — respiro antes dos botões. */
.hg-modal-excluir-motivo {
    margin-bottom: 1.25rem;
}

.hg-sheet-fields {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hg-sheet-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .hg-sheet-grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.hg-sheet-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-top: 1px solid var(--hg-border);
    background: color-mix(in oklch, var(--hg-muted) 30%, transparent);
    flex-shrink: 0;
}

.hg-sheet-panel .hg-field {
    gap: 0.375rem;
}

.hg-sheet-panel .hg-required {
    color: var(--hg-destructive);
}

/* Alias legado (outros drawers / refs) */
.hg-drawer-campanha {
    position: relative;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: 100dvh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: var(--hg-background);
    box-shadow: -12px 0 40px rgb(0 0 0 / 0.15);
    overflow: hidden;
}

@media (min-width: 768px) {
    .hg-drawer-campanha {
        width: 75vw;
    }
}

.hg-drawer-campanha-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 3.5rem 1rem 1.5rem;
    border-bottom: 1px solid var(--hg-border);
    flex-shrink: 0;
}

.hg-drawer-campanha-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.25;
}

.hg-drawer-campanha-subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.75rem;
    color: var(--hg-muted-foreground);
}

.hg-drawer-campanha-body {
    flex: 1 1 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hg-drawer-campanha-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-top: 1px solid var(--hg-border);
    flex-shrink: 0;
    background: color-mix(in oklch, var(--hg-muted) 30%, transparent);
}

.hg-drawer-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border: 1px solid var(--hg-border);
    border-radius: 0.5rem;
    background: var(--hg-card);
    padding: 1.25rem;
}

.hg-drawer-section-title {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--hg-foreground);
}

.hg-drawer-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .hg-drawer-grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.hg-drawer-table-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--hg-border);
}

.hg-drawer-table-title {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
}

.hg-drawer-table-header .hg-text-xs {
    margin: 0.125rem 0 0;
}

.hg-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.hg-table-scroll .hg-table--campanhas {
    min-width: 68rem;
}

.hg-table-scroll .hg-table th.hg-table-cell-num,
.hg-table-scroll .hg-table td.hg-table-cell-num {
    text-align: right;
}

.hg-multi-checks {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 8rem;
    overflow: auto;
    padding: 0.5rem 0.65rem;
    border: 1px solid var(--hg-border);
    border-radius: 0.5rem;
    background: var(--hg-card);
}

.hg-inline-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.hg-switch-row {
    height: 2.5rem;
}

.hg-checkbox-row--start {
    align-items: flex-start;
}

.hg-mt-2 {
    margin-top: 0.5rem;
}

.hg-block {
    display: block;
}

.hg-text-danger {
    color: var(--hg-destructive, #dc2626);
    font-weight: 500;
}

.hg-btn-danger,
.hg-btn.hg-btn-danger {
    background: var(--hg-destructive, #dc2626);
    color: #fff;
    border-color: transparent;
}

.hg-btn-danger:hover,
.hg-btn.hg-btn-danger:hover,
.hg-btn-danger:focus,
.hg-btn.hg-btn-danger:focus {
    filter: brightness(0.92);
}

.hg-btn-danger:disabled,
.hg-btn.hg-btn-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hg-btn:disabled,
.hg-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.hg-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hg-ps-rselect-trigger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hg-modal-delete-campanha {
    max-width: 28rem;
}

/* Largura dos diálogos de confirmação. Mesma medida do de campanha, com nome
   que não amarra ao módulo — aquele pode migrar para cá quando for tocado. */
.hg-modal-confirm {
    max-width: 28rem;
}

.hg-modal-heading--danger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hg-modal-icon-danger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.375rem;
    background: color-mix(in oklch, var(--hg-destructive, #dc2626) 10%, transparent);
    color: var(--hg-destructive, #dc2626);
}
.hg-modal-icon-danger.is-neutral {
    background: color-mix(in oklch, var(--hg-primary) 10%, transparent);
    color: var(--hg-primary);
}
.hg-ps-confirm-modal { max-width: 26rem; }

.hg-delete-option-box {
    border: 1px solid var(--hg-border);
    border-radius: 0.5rem;
    background: color-mix(in oklch, var(--hg-muted) 30%, transparent);
    padding: 0.75rem;
}

.hg-delete-option-title {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.15rem;
}

/* ——— Protótipo: filtros com ícone + dialog Eventos ——— */
.hg-input-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.hg-input-icon-wrap--grow {
    display: flex;
    width: 100%;
    min-width: 220px;
}

.hg-input-icon-wrap--grow .hg-input {
    flex: 1;
    min-width: 0;
}

.hg-input-icon {
    position: absolute;
    left: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--hg-muted-foreground);
    pointer-events: none;
    z-index: 1;
}

.hg-input--icon,
.hg-select.hg-input--icon {
    padding-left: 2rem;
}

.hg-password {
    position: relative;
    display: block;
    width: 100%;
}

.hg-password [x-cloak] {
    display: none !important;
}

.hg-password__input {
    width: 100%;
    padding-right: 2.5rem;
}

.hg-password__toggle {
    position: absolute;
    top: 50%;
    right: 0.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 0;
    border-radius: 0.375rem;
    background: transparent;
    color: var(--hg-muted-foreground, #64748b);
    cursor: pointer;
    transform: translateY(-50%);
}

.hg-password__toggle:hover,
.hg-password__toggle:focus-visible {
    color: var(--hg-foreground, #0f172a);
}

.hg-password__toggle:focus-visible {
    outline: 2px solid var(--hg-primary, #F48120);
    outline-offset: 1px;
}

.hg-select--w64 {
    min-width: 16rem;
}

.hg-filters--monitor .hg-legend--end {
    margin-left: auto;
}

.hg-filters--monitor .hg-field--search {
    flex: 1 1 16rem;
    min-width: 16rem;
}

.hg-modal-title--icon {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.hg-modal-footer--between {
    justify-content: space-between;
}

.hg-modal-footer--end {
    justify-content: flex-end;
}

.hg-text-danger { color: #b91c1c !important; }

.hg-bloqueio-detail-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.15rem;
}

.hg-bloqueio-detail-row strong {
    font-size: 0.875rem;
    color: #0f172a;
}

.hg-bloqueio-detail-obs {
    border-radius: 0.5rem;
    background: #f8fafc;
    padding: 0.75rem;
}

.hg-bloqueio-detail-obs p {
    margin: 0;
    font-size: 0.875rem;
    color: #334155;
}

.hg-bloqueio-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.hg-legend-label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--hg-muted-foreground);
}

.hg-modal-filtros {
    width: min(42rem, calc(100vw - 2rem));
    /* Sem repetir a largura em max-width, o `max-width: 28rem` de .hg-modal
       clampa este modal e o width de 42rem acima nunca vale — os campos de duas
       colunas ficam cortados, com barra de rolagem horizontal. */
    max-width: min(42rem, calc(100vw - 2rem));
    max-height: min(90vh, 52rem);
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.hg-modal-body--scroll {
    overflow-y: auto;
    max-height: 70vh;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.hg-filter-block {
    border: 1px solid var(--hg-border);
    border-radius: var(--hg-radius);
    background: var(--hg-card);
    padding: 1rem;
}

.hg-filter-block-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
}

.hg-filter-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .hg-filter-grid-2 {
        grid-template-columns: 1fr 1fr;
    }
}

.hg-modal-footer--between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    border-top: 1px solid var(--hg-border);
    background: color-mix(in oklch, var(--hg-muted) 40%, transparent);
}

.hg-btn-link {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.875rem;
    cursor: pointer;
    color: var(--hg-foreground);
    text-decoration: underline;
}

.hg-btn-link--danger {
    color: var(--hg-destructive, #dc2626);
}

.hg-multiselect {
    position: relative;
}

.hg-multiselect-trigger {
    display: flex;
    width: 100%;
    height: 2.5rem;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    border-radius: calc(var(--hg-radius) - 2px);
    border: 1px solid var(--hg-input);
    background: var(--hg-background, var(--hg-card));
    padding: 0 0.75rem;
    font-size: 0.875rem;
    cursor: pointer;
}

.hg-multiselect-panel {
    position: absolute;
    z-index: 40;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 16rem;
    overflow-y: auto;
    border: 1px solid var(--hg-border);
    border-radius: calc(var(--hg-radius) - 2px);
    background: var(--hg-card);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.hg-multiselect-option {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    text-align: left;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--hg-foreground);
}

.hg-multiselect-option:hover,
.hg-multiselect-option.is-selected {
    background: color-mix(in oklch, var(--hg-primary) 6%, transparent);
}

.hg-text-muted {
    color: var(--hg-muted-foreground);
}

/* Status da Campanha — igual ao protótipo (soft compareceu / muted) */
.hg-badge-campanha-ativa {
    background: var(--hg-status-compareceu-bg);
    color: var(--hg-status-compareceu);
    border-color: var(--hg-status-compareceu-border);
}

.hg-badge-campanha-inativa {
    background: var(--hg-muted);
    color: var(--hg-muted-foreground);
    border-color: var(--hg-border);
}

.hg-badge-dot--compareceu {
    background: var(--hg-status-compareceu);
}

.hg-badge-dot--muted {
    background: var(--hg-muted-foreground);
}

/* Dashboard charts */
.hg-dash-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hg-dash-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.hg-dash-section-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 750;
    letter-spacing: -0.02em;
    color: var(--hg-foreground);
}

.hg-dash-section-lead {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: var(--hg-muted-foreground);
}

.hg-dash-indicators-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    min-height: 14rem;
    padding: 2rem 1.25rem;
    text-align: center;
}

.hg-dash-indicators-loading-text {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--hg-muted-foreground);
}

.hg-dash-charts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.hg-dash-chart-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.125rem;
    min-width: 0;
    padding: 1.35rem 1.35rem 1rem;
    border: 1px solid var(--hg-border) !important;
    border-radius: calc(var(--hg-radius) + 2px);
    background: var(--hg-card);
    box-shadow: 0 8px 24px rgb(15 23 42 / 0.06);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.hg-dash-chart-card:hover {
    border-color: var(--hg-border) !important;
    box-shadow: 0 14px 36px rgb(15 23 42 / 0.1);
    transform: translateY(-2px);
}

.hg-dash-chart-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.hg-dash-chart-head-text {
    min-width: 0;
}

.hg-dash-chart-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 750;
    letter-spacing: -0.02em;
    color: var(--hg-foreground);
}

.hg-dash-chart-subtitle {
    margin: 0.3rem 0 0;
    font-size: 0.78rem;
    line-height: 1.4;
    color: var(--hg-muted-foreground);
}

.hg-dash-chart-total {
    text-align: right;
    flex-shrink: 0;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--hg-border);
    border-radius: 0.75rem;
    background: var(--hg-muted);
}

.hg-dash-chart-total-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
    color: var(--hg-foreground);
}

.hg-dash-chart-total-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--hg-muted-foreground);
}

.hg-dash-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

.hg-dash-kpi {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.55rem 0.6rem;
    border: 1px solid var(--hg-border);
    border-radius: 0.65rem;
    background: #fff;
    min-width: 0;
}

.hg-dash-kpi-value {
    font-size: 0.95rem;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    color: var(--hg-foreground);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hg-dash-kpi-label {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--hg-muted-foreground);
}

.hg-dash-insights {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
}

.hg-dash-insight {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    padding: 0.5rem 0.55rem;
    border: 1px solid var(--hg-border);
    border-radius: 0.55rem;
    background: #fff;
}

.hg-dash-insight-label {
    font-size: 0.6rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--hg-muted-foreground);
}

.hg-dash-insight-value {
    font-size: 0.78rem;
    font-weight: 650;
    color: var(--hg-foreground);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hg-dash-chart-body {
    display: grid;
    grid-template-columns: 8.5rem 1fr;
    gap: 1.1rem;
    align-items: center;
    padding: 0.85rem;
    border: 1px solid var(--hg-border);
    border-radius: 0.85rem;
    background: color-mix(in srgb, var(--hg-muted) 55%, white);
}

.hg-dash-ring-wrap {
    position: relative;
    width: 8.5rem;
    height: 8.5rem;
}

.hg-dash-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    filter: drop-shadow(0 4px 10px rgb(15 23 42 / 0.08));
}

.hg-dash-ring-track,
.hg-dash-ring-slice {
    fill: none;
    stroke-width: 12;
    stroke-linecap: butt;
}

.hg-dash-ring-track {
    stroke: #e8eaef;
}

.hg-dash-ring-slice {
    transition: stroke-dasharray 0.45s ease;
}

.hg-dash-ring-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    text-align: center;
    padding: 0.85rem;
}

.hg-dash-ring-center-value {
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: var(--hg-foreground);
}

.hg-dash-ring-center-label {
    margin-top: 0.25rem;
    font-size: 0.68rem;
    line-height: 1.2;
    font-weight: 550;
    color: var(--hg-muted-foreground);
    max-width: 4.6rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hg-dash-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-width: 0;
}

.hg-dash-legend-item {
    display: grid;
    grid-template-columns: 0.55rem minmax(0, 1fr) 3.5rem auto;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.76rem;
    color: var(--hg-muted-foreground);
}

.hg-dash-legend-item.is-muted {
    opacity: 0.4;
}

.hg-dash-legend-item.is-top .hg-dash-legend-label {
    font-weight: 700;
}

.hg-dash-legend-swatch {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 9999px;
}

.hg-dash-legend-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--hg-foreground);
}

.hg-dash-legend-bar {
    height: 0.35rem;
    border-radius: 9999px;
    background: #e8eaef;
    overflow: hidden;
}

.hg-dash-legend-bar-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    min-width: 0;
}

.hg-dash-legend-value {
    font-weight: 750;
    color: var(--hg-foreground);
    font-variant-numeric: tabular-nums;
    text-align: right;
    min-width: 1.25rem;
}

.hg-dash-legend-empty {
    font-size: 0.75rem;
    color: var(--hg-muted-foreground);
}

.hg-dash-bars {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding-top: 0.35rem;
    border-top: 1px solid var(--hg-border);
}

.hg-dash-bars-title {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--hg-muted-foreground);
}

.hg-dash-bar-row {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.hg-dash-bar-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: var(--hg-muted-foreground);
}

.hg-dash-bar-meta strong {
    color: var(--hg-foreground);
    font-variant-numeric: tabular-nums;
}

.hg-dash-bar-track {
    height: 0.55rem;
    border-radius: 9999px;
    background: #e8eaef;
    border: 1px solid var(--hg-border);
    overflow: hidden;
}

.hg-dash-bar-fill {
    height: 100%;
    border-radius: inherit;
    min-width: 0;
    transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.hg-dash-chart-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: auto;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--hg-border);
    border-radius: 0.65rem;
    font-size: 0.8rem;
    font-weight: 650;
    text-decoration: none;
    color: var(--hg-foreground);
    background: #fff;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.hg-dash-chart-link:hover,
.hg-dash-chart-link:focus-visible {
    background: var(--hg-muted);
    border-color: var(--hg-border);
    color: var(--hg-foreground);
}

@media (max-width: 1100px) {
    .hg-dash-charts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .hg-dash-chart-body {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .hg-dash-legend {
        width: 100%;
    }

    .hg-dash-legend-item {
        grid-template-columns: 0.55rem minmax(0, 1fr) auto;
    }

    .hg-dash-legend-bar {
        display: none;
    }

    .hg-dash-footer {
        flex-direction: column;
        text-align: center;
    }
}

.hg-dash-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.25rem;
    margin-bottom: 0;
    padding: 0.75rem 0 0;
    border-top: 1px solid var(--hg-border);
}

.hg-dash-footer-copy {
    margin: 0;
    font-size: 0.75rem;
    color: var(--hg-muted-foreground);
}

.hg-dash-footer-top {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    border: 1px solid var(--hg-border);
    border-radius: 0.65rem;
    background: var(--hg-card);
    color: var(--hg-foreground);
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.hg-dash-footer-top:hover,
.hg-dash-footer-top:focus-visible {
    background: var(--hg-muted);
}


/* —— Grupos aninhados da sidebar (Meta, Pesquisa de Satisfação) —— */
.hg-nav-nested { display: flex; flex-direction: column; gap: 2px; }
/* `<button>` tem `text-align: center` no UA stylesheet padrão do navegador —
   sem sobrescrever aqui, o <span> flexível do rótulo (flex: 1) herda o
   center e o texto fica visualmente deslocado pro meio da linha, quebrando o
   alinhamento à esquerda que todo o resto do menu usa (<a>, sem esse
   default). Ficava mascarado em rótulos longos ("Pesquisa de Satisfação"
   preenche quase a largura toda, deslocamento pequeno em pixels) e evidente
   em rótulos curtos ("Meta") — achado em 22/08/2026 ao adicionar o grupo
   Meta. O hack antigo (`--heart { margin-left: -13px }`) tentava compensar
   isso só pro coração; com o text-align correto, nenhum hack por ícone é
   necessário. */
.hg-nav-nested-btn { width: 100%; justify-content: flex-start; text-align: left; font-family: inherit; border: none; background: transparent; box-sizing: border-box; cursor: pointer; }
.hg-nav-nested-chevron { margin-left: auto; transition: transform .15s ease; }
.hg-nav-nested-chevron.is-open { transform: rotate(90deg); }
.hg-nav-nested-sub { display: flex; flex-direction: column; gap: 2px; padding-left: 18px; margin-top: 2px; }
.hg-nav-nested-link { font-size: 12.5px; }

.hg-ps-page { gap: 20px; }
.hg-ps-header { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.hg-ps-header-with-icon { display: flex; gap: 12px; align-items: flex-start; }
.hg-ps-page-icon { width: 40px; height: 40px; border-radius: 10px; background: color-mix(in srgb, var(--hg-primary) 12%, white); color: var(--hg-primary); display: grid; place-items: center; font-size: 18px; }
.hg-ps-title { margin: 0; font-size: 24px; font-weight: 650; letter-spacing: -0.02em; color: #0f172a; }
.hg-ps-subtitle { margin: 4px 0 0; font-size: 13px; color: #64748b; }
.hg-ps-header-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hg-ps-btn-outline,
.hg-ps-header-actions .hg-btn,
.hg-ps-card-head .hg-btn {
    font-weight: 500 !important;
}
.hg-ps-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.hg-ps-kpis--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1000px) { .hg-ps-kpis, .hg-ps-kpis--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hg-ps-kpi { border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; padding: 16px; }
.hg-ps-kpi--accent { border-color: color-mix(in srgb, var(--hg-primary) 30%, #e2e8f0); background: color-mix(in srgb, var(--hg-primary) 5%, white); }
.hg-ps-kpi--danger { border-color: color-mix(in srgb, #ef4444 30%, #e2e8f0); }
.hg-ps-kpi--amber { border-color: #fde68a; }
.hg-ps-kpi--emerald { border-color: #a7f3d0; }
.hg-ps-kpi--row { display: flex; align-items: center; gap: 12px; }
.hg-ps-kpi-icon { width: 40px; height: 40px; border-radius: 10px; background: #f1f5f9; display: grid; place-items: center; color: #64748b; }
.hg-ps-kpi-icon.tone-red { background: #fef2f2; color: #dc2626; }
.hg-ps-kpi-icon.tone-amber { background: #fffbeb; color: #d97706; }
.hg-ps-kpi-icon.tone-emerald { background: #ecfdf5; color: #059669; }
.hg-ps-kpi-label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #64748b; }
.hg-ps-kpi--accent .hg-ps-kpi-label svg { color: var(--hg-primary); }
.hg-ps-kpi--danger .hg-ps-kpi-label svg { color: #dc2626; }
.hg-ps-kpi-value { font-size: 28px; font-weight: 650; margin-top: 4px; color: #0f172a; line-height: 1; }

.hg-ps-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .hg-ps-layout { grid-template-columns: 1fr; } }
.hg-ps-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.hg-ps-side { display: flex; flex-direction: column; gap: 12px; }
.hg-ps-card { border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; overflow: hidden; }
.hg-ps-card-head { display: flex; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid #e2e8f0; flex-wrap: wrap; }
.hg-ps-card-pad { padding: 16px 20px 8px; }
.hg-ps-filters-card { position: relative; z-index: 20; padding: 16px 20px; display: flex; flex-direction: column; gap: 16px; overflow: visible; }
.hg-ps-side-card { padding: 16px; }
.hg-ps-side-card h3, .hg-ps-section-title { margin: 0 0 4px; font-size: 14px; font-weight: 650; color: #0f172a; }
.hg-ps-muted { margin: 0 0 12px; font-size: 12px; color: #64748b; }

.hg-ps-search { position: relative; }
.hg-ps-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; }
.hg-ps-search input {
    width: 100%;
    height: 40px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0 14px 0 36px;
    font-size: 13px;
    line-height: 1.2;
    color: #0f172a;
    background: #fff;
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.06), 0 4px 12px rgb(15 23 42 / 0.06);
    -webkit-appearance: none;
    appearance: none;
}
.hg-ps-search input::placeholder { color: #94a3b8; }
.hg-ps-search input:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--hg-primary) 40%, #e2e8f0);
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.06), 0 0 0 3px color-mix(in srgb, var(--hg-primary) 18%, transparent);
}
.hg-ps-search input::-webkit-search-decoration,
.hg-ps-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.hg-ps-search--grow { flex: 1; min-width: 220px; }
.hg-ps-chip-filters { display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
.hg-ps-chip-row { display: flex; flex-wrap: nowrap; align-items: flex-end; gap: 12px 20px; width: 100%; }
.hg-ps-chip-group { position: relative; display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; min-width: 0; }
.hg-ps-chip-label { font-size: 11px; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: .04em; }
.hg-ps-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.hg-ps-chip { height: 28px; padding: 0 12px; border-radius: 999px; border: 1px solid #e2e8f0; background: #fff; font-size: 12px; color: #334155; cursor: pointer; }
.hg-ps-chip.is-on { background: var(--hg-primary); border-color: var(--hg-primary); color: #fff; }
.hg-ps-filters-card .hg-ps-chips { flex-wrap: nowrap; gap: 4px; }
.hg-ps-filters-card .hg-ps-chip {
    height: 32px;
    padding: 0 11px;
    border-color: #e5e7eb;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    color: #374151;
    white-space: nowrap;
}
.hg-ps-filters-card .hg-ps-chip.is-on { color: #fff; font-weight: 600; }
.hg-ps-builder-modal--page .hg-ps-chip,
.hg-ps-builder-modal--page label.hg-ps-option-card { position: relative; }
.hg-ps-builder-modal--page .hg-ps-chip input,
.hg-ps-builder-modal--page .hg-ps-option-card input {
    position: absolute;
    inset: 0;
    opacity: 0;
    margin: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}
.hg-ps-builder-modal--page .hg-ps-chip:has(input:checked) {
    background: var(--hg-primary);
    border-color: var(--hg-primary);
    color: #fff;
}
.hg-ps-builder-modal--page .hg-ps-option-card:has(input:checked) {
    border-color: var(--hg-primary);
    background: color-mix(in srgb, var(--hg-primary) 6%, white);
}
.hg-ps-filters-card .hg-ps-chip--outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    max-width: 240px;
    padding: 0 12px;
    border-radius: 10px;
    border-color: #e2e8f0;
    color: #334155;
    font-weight: 500;
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}
.hg-ps-filters-card .hg-ps-chip--outline svg { color: #64748b; flex-shrink: 0; }
.hg-ps-chip--outline { display: inline-flex; align-items: center; gap: 6px; max-width: 240px; }
.hg-ps-chip--outline span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hg-ps-chip-chevron { opacity: .7; flex-shrink: 0; transition: transform 150ms ease; }
.hg-ps-filters-card .hg-ps-chip--outline.is-open .hg-ps-chip-chevron { transform: rotate(180deg); }

.hg-ps-chip-group:has(.is-open) { z-index: 30; }
.hg-ps-branch-pop { position: absolute; z-index: 40; top: calc(100% + 6px); right: 0; left: auto; width: 248px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 12px 30px rgba(15,23,42,.12); padding: 8px; }
.hg-ps-branch-pop-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px 8px; font-size: 13px; font-weight: 600; color: #0f172a; }
.hg-ps-branch-pop-head button { border: 0; background: transparent; color: var(--hg-primary); font-size: 13px; font-weight: 500; cursor: pointer; }
.hg-ps-branch-option { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; background: transparent; border-radius: 8px; font-size: 14px; color: #0f172a; cursor: pointer; text-align: left; }
.hg-ps-branch-option + .hg-ps-branch-option { margin-top: 2px; }
.hg-ps-branch-option:hover { background: #f8fafc; }
.hg-ps-branch-option.is-on { background: #f8fafc; color: var(--hg-primary); font-weight: 600; }
.hg-ps-branch-radio { width: 16px; height: 16px; border-radius: 999px; border: 1.5px solid #cbd5e1; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 16px; color: #fff; background: #fff; }
.hg-ps-branch-radio svg, .hg-ps-branch-check { display: none; }
.hg-ps-branch-option.is-on .hg-ps-branch-radio { background: var(--hg-primary); border-color: var(--hg-primary); }
.hg-ps-branch-option.is-on .hg-ps-branch-radio svg, .hg-ps-branch-option.is-on .hg-ps-branch-check { display: block; }
.hg-ps-branch-name { flex: 1; min-width: 0; }
.hg-ps-branch-check { margin-left: auto; flex-shrink: 0; color: var(--hg-primary); }
.hg-ps-branch-empty { margin: 0; padding: 10px 10px 6px; font-size: 12px; color: #94a3b8; }

.hg-ps-date-range { display: flex; align-items: center; gap: 8px; }
.hg-ps-filters-card .hg-ps-date-input {
    width: 148px;
    height: 36px;
    margin: 0;
    padding: 0 10px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
    font-family: inherit;
    font-size: 13px;
    color: #94a3b8;
    color-scheme: light;
}
.hg-ps-filters-card .hg-ps-date-input.has-value { color: #0f172a; }
.hg-ps-filters-card .hg-ps-date-input:focus {
    outline: none;
    border-color: var(--hg-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--hg-primary) 18%, transparent);
}
.hg-ps-filters-card .hg-ps-date-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: .55;
}
.hg-ps-date-input { width: 150px; }
.hg-ps-date-sep { font-size: 13px; color: #94a3b8; }
.hg-ps-date-clear { border: 0; background: transparent; color: var(--hg-primary); font-size: 11px; cursor: pointer; padding: 0 4px; white-space: nowrap; }

.hg-ps-field-period { grid-column: span 2; min-width: 0; }
.hg-ps-date-range--report { width: 100%; }
.hg-ps-date-range--report .hg-ps-date-input {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    height: 36px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
    font-size: 13px;
}
.hg-ps-date-range--report .hg-ps-date-input:focus {
    outline: none;
    border-color: var(--hg-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--hg-primary) 18%, transparent);
}

/* Relatórios usa selects nativos (padrão próprio do protótipo p/ essa página, diferente dos
   chips do Gerir Pesquisas). .hg-ps-report-filters já define display:grid/gap/padding; a
   combinação de duas classes garante especificidade maior que a regra base — uma classe só
   perderia para a ordem do arquivo, foi esse bug que espremeu as caixas antes.
   O padding acompanha o do cabeçalho e o dos KPIs do mesmo card (16px 20px): zerado, como
   ficou por um tempo, a fileira de filtros encostava na borda do card e na divisória de cima. */
.hg-ps-report-filters.hg-ps-filter-grid { grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); padding: 16px 20px; border-bottom: 0; gap: 12px; }

.hg-ps-filter-grid .hg-label {
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
    font-size: 11px;
    margin-bottom: 4px;
    color: #64748b;
}
.hg-ps-filter-grid .hg-select {
    height: 36px;
    width: 100%;
    min-width: 0;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
    font-size: 13px;
    padding: 0 34px 0 12px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    appearance: none;
    -webkit-appearance: none;
}
.hg-ps-filter-grid select.hg-select::-ms-expand { display: none; }
.hg-ps-filter-grid .hg-select:focus {
    outline: none;
    border-color: var(--hg-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--hg-primary) 18%, transparent);
}

/* —— Dropdown estilizado (padrão Lovable) para os selects de filtro —— */
.hg-ps-select--inline { width: 180px; }
.hg-ps-rselect { position: relative; width: 100%; }
.hg-ps-rselect-trigger {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    min-width: 0 !important;
    background-image: none !important;
    cursor: pointer;
    text-align: left;
}
.hg-ps-rselect-trigger span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hg-ps-rselect-trigger svg { color: #94a3b8; flex-shrink: 0; transition: transform 150ms ease; }
.hg-ps-rselect-trigger.is-open svg { transform: rotate(180deg); }
.hg-ps-rselect-trigger.is-open {
    outline: none;
    border-color: var(--hg-primary) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--hg-primary) 18%, transparent);
}
.hg-ps-rselect-panel {
    position: absolute;
    z-index: 60;
    top: calc(100% + 4px);
    left: 0;
    min-width: 100%;
    max-height: 280px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.625rem;
    box-shadow: 0 10px 30px rgb(15 23 42 / 0.12), 0 2px 6px rgb(15 23 42 / 0.06);
    padding: 0.25rem;
}
/* Teleportado ao body (pesquisa-select): position/size vêm do :style inline. */
body > .hg-ps-rselect-panel {
    min-width: 0;
}
.hg-ps-rselect-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.625rem;
    border: 0;
    border-radius: 0.375rem;
    background: transparent;
    font-size: 0.8125rem;
    color: #0f172a;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
}
.hg-ps-rselect-option:hover { background: #f1f5f9; }
.hg-ps-rselect-option.is-selected { background: color-mix(in srgb, var(--hg-primary) 12%, white); color: var(--hg-primary); font-weight: 500; }
.hg-ps-rselect-option svg { color: var(--hg-primary); flex-shrink: 0; }
.hg-ps-rselect-option-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.125rem;
    min-width: 0;
}
.hg-ps-rselect-option-hint {
    font-size: 0.6875rem;
    font-weight: 500;
    color: #94a3b8;
    white-space: normal;
    line-height: 1.2;
}
.hg-ps-rselect-option.is-disabled,
.hg-ps-rselect-option.is-disabled:hover,
.hg-ps-rselect-option.is-disabled:disabled {
    background: transparent;
    color: #94a3b8;
    cursor: not-allowed;
    opacity: 1;
}

.hg-modal-xl { max-width: 56rem; }
@media (min-width: 1200px) { .hg-modal-xl { max-width: 78rem; } }
.hg-ps-builder-body { display: flex; gap: 28px; align-items: flex-start; }
.hg-ps-builder-form { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hg-ps-builder-preview { display: none; flex-shrink: 0; width: 300px; position: sticky; top: 0; }
@media (min-width: 1200px) { .hg-ps-builder-preview { display: block; } }
.hg-ps-builder-preview-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #64748b; margin-bottom: 10px; }
.hg-ps-builder-preview-hint { margin: 12px 0 0; font-size: 11px; color: #64748b; display: flex; align-items: center; gap: 6px; }
.hg-ps-builder-page .hg-ps-builder-modal--page {
    max-width: none;
    max-height: none;
    width: 100%;
    animation: none;
    box-shadow: none;
}
.hg-ps-builder-page .hg-ps-builder-modal--page .hg-modal-body {
    max-height: none;
}
#ps-campanha-salvar {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}
.hg-ps-builder-section { display: flex; flex-direction: column; gap: 12px; }
.hg-ps-step-title { display: flex; align-items: center; gap: 8px; }
.hg-ps-step-title--between { justify-content: space-between; }
.hg-ps-step-title h3 { margin: 0; font-size: 14px; font-weight: 650; color: #0f172a; }
.hg-ps-step-badge { width: 22px; height: 22px; border-radius: 999px; background: color-mix(in srgb, var(--hg-primary) 12%, white); color: var(--hg-primary); font-size: 11px; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }

.hg-ps-pill-group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.hg-ps-dest { position: relative; }
.hg-ps-dest-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 42px;
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    text-align: left;
    cursor: pointer;
}
.hg-ps-dest-trigger.is-open { border-color: var(--hg-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hg-primary) 18%, transparent); }
.hg-ps-dest-trigger > svg { margin-left: auto; color: #94a3b8; flex-shrink: 0; }
.hg-ps-dest-placeholder { color: #94a3b8; font-size: 13px; }
.hg-ps-dest-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.hg-ps-dest-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 4px 6px 4px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}
.hg-ps-dest-chip.is-invalid { border-color: #fca5a5; background: #fef2f2; color: #b91c1c; }
.hg-ps-dest-chip-copy { display: flex; flex-direction: column; min-width: 0; }
.hg-ps-dest-chip-name { font-size: 13px; font-weight: 600; line-height: 1.2; }
.hg-ps-dest-chip-meta { font-size: 11px; color: #64748b; line-height: 1.2; }
.hg-ps-dest-chip.is-invalid .hg-ps-dest-chip-meta { color: #b91c1c; }
.hg-ps-dest-chip-x { border: 0; background: transparent; color: #64748b; font-size: 16px; line-height: 1; cursor: pointer; padding: 0 2px; }
.hg-ps-dest-panel {
    position: absolute;
    z-index: 40;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 320px;
    overflow: auto;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .12);
}
.hg-ps-dest-search {
    width: 100%;
    height: 36px;
    margin-bottom: 8px;
    padding: 0 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
}
.hg-ps-dest-group { margin: 8px 6px 4px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #64748b; }
.hg-ps-dest-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    text-align: left;
    cursor: pointer;
}
.hg-ps-dest-option:hover, .hg-ps-dest-option.is-on { background: #f8fafc; }
.hg-ps-dest-option-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hg-ps-dest-option-name { font-size: 14px; font-weight: 600; color: #0f172a; }
.hg-ps-dest-option-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #64748b; }
.hg-ps-dest-tag { display: inline-flex; align-items: center; padding: 1px 6px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.hg-ps-dest-tag--diretoria { background: #e0e7ff; color: #3730a3; }
.hg-ps-dest-tag--gestao { background: #ffedd5; color: #c2410c; }
.hg-ps-dest-empty { margin: 8px 6px; font-size: 13px; color: #64748b; }
.hg-ps-dest-alert { margin-top: 10px; padding: 12px; border: 1px solid #fecaca; border-radius: 10px; background: #fef2f2; color: #991b1b; }
.hg-ps-dest-alert-title { margin: 0 0 6px; font-size: 13px; font-weight: 700; }
.hg-ps-dest-alert ul { margin: 0 0 10px; padding-left: 18px; font-size: 13px; }
.hg-ps-dest-alert-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hg-ps-pill-sep { width: 1px; height: 20px; background: #e2e8f0; margin: 0 2px; }
.hg-ps-hint { margin: 0; width: 100%; font-size: 11px; line-height: 1.45; color: #64748b; }

/* Espaçamento do bloco de notas: com `margin: 0` em todos, o texto que explica
   a grade colava nela e os dois avisos colavam entre si. Ritmo explícito. */
.hg-form-grid + .hg-ps-hint { margin-top: 10px; }
.hg-ps-hint + .hg-ps-hint { margin-top: 6px; }

/* Ícone na sarjeta, texto num bloco só. `align-items: center` centralizava o
   ícone contra um aviso de duas linhas, e o texto tem de ir num único <span>
   (ver componente pos-vendas.pesquisa-aviso): nó de texto solto vira item de
   flex, e um <strong> no meio partia o aviso em colunas. */
.hg-ps-hint--warning { color: #b45309; display: flex; align-items: flex-start; gap: 5px; }
.hg-ps-hint--warning > svg { flex: 0 0 auto; margin-top: 2px; }
.hg-ps-hint--warning > span { min-width: 0; }

.hg-ps-option-cards { display: grid; gap: 10px; }
.hg-ps-option-cards--2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.hg-ps-option-cards--3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
@media (max-width: 720px) { .hg-ps-option-cards--2, .hg-ps-option-cards--3 { grid-template-columns: 1fr; } }
.hg-ps-option-card { text-align: left; border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px; background: #fff; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.hg-ps-option-card strong { font-size: 13px; color: #0f172a; }
.hg-ps-option-card span { font-size: 11px; color: #64748b; }
.hg-ps-option-card.is-active { border-color: var(--hg-primary); background: color-mix(in srgb, var(--hg-primary) 6%, white); }
.hg-ps-option-card--channel { flex-direction: row; align-items: center; gap: 8px; }
.hg-ps-option-swatch { display: flex; align-items: center; gap: 3px; margin-top: 4px; }
.hg-ps-option-swatch--nps i { display: block; flex: 1; height: 8px; border-radius: 2px; background: color-mix(in srgb, var(--hg-primary) 20%, white); font-style: normal; }
.hg-ps-option-swatch--csat { color: #fbbf24; gap: 2px; }
.hg-ps-option-swatch svg.is-emerald { color: #10b981; }
.hg-ps-option-swatch svg.is-danger { color: #ef4444; }

/* Dois campos lado a lado (número + template) alinhados pelo topo: com
   align-items:center, um aviso sob o template desalinhava a coluna vizinha. */
.hg-ps-template-box { display: flex; align-items: flex-start; gap: 10px 14px; flex-wrap: wrap; border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px; background: #fafafa; }
.hg-ps-template-box .hg-field { flex: 1 1 220px; min-width: 0; }
.hg-ps-template-row { display: flex; align-items: center; gap: 8px; }
.hg-ps-template-row > .hg-ps-rselect { flex: 1; min-width: 0; }
/* Avisos ocupam a linha inteira, abaixo dos dois campos. */
.hg-ps-template-note { flex: 1 0 100%; margin: 0; }
.hg-ps-template-badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.hg-ps-template-badge--aprovado { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.hg-ps-template-badge--pendente { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.hg-ps-template-badge--rejeitado { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.hg-ps-template-badge--indisponivel { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.hg-ps-template-badge--neutro { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.hg-ps-template-badge-dot { position: relative; display: inline-flex; width: 6px; height: 6px; border-radius: 999px; background: currentColor; flex-shrink: 0; }
.hg-ps-template-badge-ping { position: absolute; inset: 0; border-radius: 999px; background: currentColor; opacity: .6; animation: hg-ps-badge-ping 1.6s cubic-bezier(0,0,0.2,1) infinite; }
@keyframes hg-ps-badge-ping { 75%, 100% { transform: scale(2.2); opacity: 0; } }

.hg-ps-question-list { display: flex; flex-direction: column; gap: 10px; }
.hg-ps-question-card { border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.hg-ps-question-row { display: flex; gap: 8px; align-items: center; }
.hg-ps-question-row .hg-input { flex: 1; }
.hg-ps-question-row .hg-ps-rselect { width: 170px; flex-shrink: 0; }
.hg-ps-question-options { display: flex; flex-direction: column; gap: 6px; padding-left: 12px; border-left: 2px solid #e2e8f0; }

.hg-ps-publico .hg-label { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 600; color: #334155; }
.hg-ps-publico-gatilho { display: flex; flex-direction: column; gap: 12px; }
.hg-ps-delay-row { display: flex; gap: 8px; align-items: center; }
.hg-ps-delay-row .hg-input { flex: 1; }
.hg-ps-delay-input { flex: 1; min-width: 0; display: flex; }
.hg-ps-delay-input .hg-input { width: 100%; }
.hg-ps-delay-row .hg-select { width: 132px; flex-shrink: 0; }
.hg-ps-delay-row .hg-ps-rselect { width: 132px; flex-shrink: 0; }

.hg-ps-import-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.hg-ps-import-template-link { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; color: var(--hg-primary); font-size: 11px; font-weight: 600; cursor: pointer; padding: 0; }
.hg-ps-import-template-link:hover { text-decoration: underline; }
.hg-ps-dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 2px dashed #e2e8f0; border-radius: 10px; padding: 24px 16px; text-align: center; cursor: pointer; background: #fafafa; }
.hg-ps-dropzone:hover { border-color: var(--hg-primary); }
.hg-ps-dropzone-title { font-size: 12px; font-weight: 600; color: #0f172a; }
.hg-ps-dropzone-hint { font-size: 11px; color: #94a3b8; }
.hg-ps-dropzone-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.hg-ps-import-file { display: flex; align-items: center; gap: 10px; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 12px; background: #fff; }
.hg-ps-import-file-icon { width: 32px; height: 32px; border-radius: 8px; background: #ecfdf5; color: #059669; display: grid; place-items: center; flex-shrink: 0; }
.hg-ps-import-file-info { flex: 1; min-width: 0; }
.hg-ps-import-file-name { font-size: 12px; font-weight: 600; color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.hg-ps-table-card { position: relative; z-index: 1; overflow: auto; }
.hg-ps-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.hg-ps-table th { text-align: left; padding: 10px 12px; color: #64748b; font-weight: 600; border-bottom: 1px solid #e2e8f0; white-space: nowrap; background: #fafafa; }
.hg-ps-table td { padding: 12px; border-bottom: 1px solid #f1f5f9; color: #334155; vertical-align: middle; }
.hg-ps-table .is-right { text-align: right; }
.hg-ps-table tr.is-clickable { cursor: pointer; }
.hg-ps-table tr.is-clickable:hover { background: #f8fafc; }
.hg-ps-camp-name { font-weight: 600; color: #0f172a; font-size: 13px; }
.hg-ps-camp-link { text-decoration: none; color: inherit; }
.hg-ps-camp-link:hover { text-decoration: underline; }
.hg-ps-camp-meta { font-size: 11px; color: #94a3b8; margin-top: 2px; }
.hg-ps-kind { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; }
.hg-ps-kind--like { gap: 2px; }
svg.is-emerald { color: #10b981; }
svg.is-danger { color: #ef4444; }
.hg-ps-kind-star { color: #fbbf24; }
.hg-ps-empty { text-align: center; color: #64748b; padding: 28px !important; }
.hg-ps-ellipsis { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hg-ps-resposta-list { display: flex; flex-direction: column; gap: 10px; }
.hg-ps-resposta-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    background: #fff;
    text-align: left;
}
.hg-ps-resposta-card.is-open,
.hg-ps-resposta-card:hover { border-color: color-mix(in srgb, var(--hg-primary) 35%, #e2e8f0); }
.hg-ps-resposta-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}
.hg-ps-resposta-card-head strong { display: block; font-size: 14px; color: #0f172a; }
.hg-ps-resposta-card-head > div > span { display: block; margin-top: 2px; font-size: 12px; color: #64748b; }
.hg-ps-resposta-card-tools { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; }
.hg-ps-resposta-card-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.hg-ps-resposta-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hg-ps-resposta-card-body { margin-top: 4px; padding-top: 12px; border-top: 1px solid #f1f5f9; }
.hg-ps-resposta-card-body .ps-resultado { max-width: 28rem; }
.hg-ps-resposta-shell { max-width: none; }
.hg-ps-resposta-page {
    width: 100%;
    max-width: 28rem;
    margin: 0 auto;
    padding: 4px 0 40px;
}
.hg-ps-resposta-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 16px;
    font-size: 13px;
    color: #64748b;
    text-decoration: none;
}
.hg-ps-resposta-back:hover { color: #0f172a; text-decoration: underline; }
.hg-ps-resposta-kicker {
    margin: 0 0 16px;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #64748b;
}
.ps-resultado-meta {
    margin: -8px 0 16px;
    font-size: 12px;
    line-height: 1.45;
    color: #64748b;
}
.ps-resultado {
    --hg-primary: #f97316;
    --border: #e2e8f0;
    --muted: #64748b;
    --fg: #0f172a;
    color: var(--fg);
}
.ps-resultado .ps-brand { margin-bottom: 16px; }
.ps-resultado .ps-brand strong { display: block; font-size: 14px; }
.ps-resultado .ps-brand span { display: block; font-size: 11px; color: var(--muted); }
.ps-resultado .ps-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 1px 2px rgb(15 23 42 / .04);
    padding: 20px 24px;
}
.ps-resultado.is-embedded .ps-card {
    border: 0;
    box-shadow: none;
    padding: 4px 0 0;
    border-radius: 0;
}
.ps-resultado .ps-card h1 { margin: 0; font-size: 20px; font-weight: 600; line-height: 1.35; }
.ps-resultado .ps-card .ps-sub { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.ps-resultado .ps-nps { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 6px; margin-top: 24px; }
.ps-resultado .ps-nps--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 10px; }
.ps-resultado .ps-nps .ps-opt {
    display: grid;
    place-items: center;
    height: 40px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: #fff;
    font-size: 14px;
    font-weight: 500;
    color: var(--fg);
}
.ps-resultado .ps-nps .ps-opt.is-bad { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.ps-resultado .ps-nps .ps-opt.is-mid { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.ps-resultado .ps-nps .ps-opt.is-good { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.ps-resultado .ps-nps .ps-opt.is-on { outline: 2px solid var(--hg-primary); outline-offset: 1px; }
.ps-resultado .ps-hint { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11px; color: var(--muted); }
.ps-resultado .ps-stars { display: flex; justify-content: center; gap: 10px; margin-top: 24px; }
.ps-resultado .ps-stars .ps-opt { padding: 6px; }
.ps-resultado .ps-stars svg { width: 44px; height: 44px; color: #cbd5e1; fill: none; }
.ps-resultado .ps-stars .ps-opt.is-on svg { color: #fbbf24; fill: #fbbf24; }
.ps-resultado .ps-thumbs { display: flex; justify-content: center; gap: 24px; margin-top: 24px; }
.ps-resultado .ps-thumbs .ps-opt {
    width: 80px;
    height: 80px;
    border-radius: 999px;
    border: 2px solid;
    display: grid;
    place-items: center;
    background: #fff;
}
.ps-resultado .ps-thumbs .up { background: #ecfdf5; border-color: #6ee7b7; color: #059669; }
.ps-resultado .ps-thumbs .down { background: #fef2f2; border-color: #fca5a5; color: #dc2626; }
.ps-resultado .ps-thumbs .up.is-on { background: #10b981; border-color: #10b981; color: #fff; }
.ps-resultado .ps-thumbs .down.is-on { background: #ef4444; border-color: #ef4444; color: #fff; }
.ps-resultado .ps-comment { margin-top: 24px; }
.ps-resultado .ps-comment label { display: block; font-size: 12px; font-weight: 600; }
.ps-resultado .ps-comment label span { font-weight: 400; color: var(--muted); }
.ps-resultado .ps-comment-value {
    margin-top: 6px;
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    background: #fff;
    white-space: pre-wrap;
}
.ps-resultado .ps-comment.is-empty .ps-comment-value { color: #94a3b8; }
.ps-resultado .ps-extra-options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ps-resultado .ps-extra-option {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    background: #fff;
    color: #334155;
    white-space: nowrap;
}
.ps-resultado .ps-extra-option.is-on {
    outline: 2px solid var(--hg-primary);
    outline-offset: 1px;
    font-weight: 600;
    color: var(--fg);
}

.hg-ps-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; border: 1px solid transparent; }
.hg-ps-badge--ativa { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.hg-ps-badge--pausada { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.hg-ps-badge--rascunho { background: #f8fafc; color: #64748b; border-color: #e2e8f0; }
.hg-ps-badge--encerrada, .hg-ps-badge--aberto { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.hg-ps-badge--resolvido { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }

.hg-ps-resultado { display: flex; align-items: center; gap: 8px; min-width: 140px; }
.hg-ps-resultado-score { font-size: 16px; font-weight: 700; color: #0f172a; }
.hg-ps-resultado-score.is-md { font-size: 28px; }
.hg-ps-resultado-body { flex: 1; min-width: 0; }
.hg-ps-resultado-bar { display: flex; height: 6px; border-radius: 99px; overflow: hidden; background: #e2e8f0; }
.hg-ps-resultado-bar span { display: block; height: 100%; }
.hg-ps-resultado-hint { font-size: 10px; color: #94a3b8; margin-top: 2px; }
.hg-ps-stars { display: flex; gap: 2px; color: #cbd5e1; }
.hg-ps-stars svg.is-on { color: #fbbf24; }
.hg-ps-score-cell { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.hg-ps-score-sub { font-size: 10px; color: #94a3b8; }
.hg-ps-badge--icon { display: inline-flex; align-items: center; gap: 4px; }
.hg-ps-resultado--like { gap: 12px; }
.hg-ps-resultado--like .is-pos { display: inline-flex; align-items: center; gap: 4px; color: #059669; font-weight: 700; font-size: 13px; }
.hg-ps-resultado--like .is-neg { display: inline-flex; align-items: center; gap: 4px; color: #64748b; font-size: 12px; }

.hg-ps-icon-actions { display: flex; justify-content: flex-end; gap: 2px; }
.hg-ps-alert-row-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; }
.hg-ps-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: #64748b; cursor: pointer; }
.hg-ps-icon-btn:hover { background: #f1f5f9; color: #334155; }
.hg-ps-icon-btn.is-danger { color: #dc2626; }

.hg-ps-attention-item { display: flex; gap: 8px; margin-top: 10px; font-size: 12px; }
.hg-ps-attention-icon { display: flex; margin-top: 1px; color: #f59e0b; flex-shrink: 0; }
.hg-ps-attention-name { font-weight: 600; color: #0f172a; }
.hg-ps-attention-meta { color: #64748b; }
.hg-ps-mix-row { display: flex; justify-content: space-between; font-size: 12px; margin-top: 8px; }
.hg-ps-mix-track { height: 6px; background: #e2e8f0; border-radius: 99px; overflow: hidden; margin-top: 4px; }
.hg-ps-mix-fill { height: 100%; background: var(--hg-primary); border-radius: 99px; }
.hg-ps-mix-fill.is-emerald { background: #10b981; }
.hg-ps-mix-fill.is-muted { background: #fdba74; }
.hg-ps-attention-item a { color: inherit; text-decoration: none; }
.hg-ps-attention-item a:hover .hg-ps-attention-name { text-decoration: underline; }

.hg-ps-detail-hero { padding: 20px; }
.hg-ps-detail-hero-top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.hg-ps-detail-identity { display: flex; gap: 12px; align-items: flex-start; }
.hg-ps-avatar { width: 48px; height: 48px; border-radius: 12px; background: color-mix(in srgb, var(--hg-primary) 12%, white); color: var(--hg-primary); display: grid; place-items: center; font-weight: 700; }
.hg-ps-detail-name { margin: 0; font-size: 20px; font-weight: 650; }
.hg-ps-detail-meta { margin-top: 4px; font-size: 12px; color: #64748b; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hg-ps-metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-top: 20px; }
@media (max-width: 900px) { .hg-ps-metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.hg-ps-metric { border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px; }
.hg-ps-metric--danger { border-color: color-mix(in srgb, #ef4444 30%, #e2e8f0); }
.hg-ps-metric-value { font-size: 24px; font-weight: 650; }
.hg-ps-metric-label { font-size: 12px; font-weight: 600; margin-top: 2px; }
.hg-ps-metric-hint { font-size: 11px; color: #94a3b8; margin-top: 2px; }
.hg-ps-detail-card { padding: 16px 20px; }
.hg-ps-detail-card .hg-ps-muted { margin-bottom: 12px; }
.hg-ps-info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 0; }
@media (max-width: 900px) { .hg-ps-info-grid { grid-template-columns: 1fr; } }
.hg-ps-info-box { display: flex; flex-direction: column; justify-content: center; min-width: 0; border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px 14px; background: #fafafa; }
.hg-ps-info-box--full { grid-column: 1 / -1; }
.hg-ps-info-box strong { display: block; font-size: 13px; font-weight: 600; color: #0f172a; overflow-wrap: anywhere; }
.hg-ps-info-box > span { display: block; font-size: 11px; color: #64748b; margin-top: 2px; }
.hg-ps-link-box { gap: 8px; justify-content: flex-start; }
.hg-ps-link-box > span { margin-top: 0; font-weight: 600; color: #334155; }
.hg-ps-link-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hg-ps-link-url {
    flex: 1;
    min-width: 0;
    display: block;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    color: #0f172a;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hg-ps-link-url:hover { border-color: color-mix(in srgb, var(--hg-primary) 40%, #e2e8f0); color: var(--hg-primary); }
.hg-ps-link-copy { flex-shrink: 0; height: 36px; padding: 0 12px; gap: 6px; }
.hg-ps-link-box .hg-ps-hint { margin-top: 0; }
.hg-ps-link-modelo {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #fff;
    font-size: 12px;
    line-height: 1.45;
    color: #334155;
    overflow-wrap: anywhere;
}
.hg-ps-branch-perf { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.hg-ps-report-toolbar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.hg-ps-report-toolbar-right { display: flex; gap: 10px; align-items: center; }
.hg-ps-tabs { display: inline-flex; gap: 4px; background: #f1f5f9; padding: 4px; border-radius: 10px; }
.hg-ps-tab { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-size: 12px; cursor: pointer; color: #64748b; }
.hg-ps-tab.is-active { background: #fff; color: #0f172a; font-weight: 600; box-shadow: 0 1px 2px rgba(15,23,42,.06); }
.hg-ps-status-timeline, .hg-ps-insights { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.hg-ps-side-card .hg-ps-status-timeline,
.hg-ps-side-card .hg-ps-insights { margin-top: 14px; }
.hg-ps-status-timeline li { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; }
.hg-ps-status-timeline li > div { display: flex; flex-direction: column; gap: 2px; }
.hg-ps-insights li { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.hg-ps-status-timeline strong, .hg-ps-insights strong { color: #0f172a; }
.hg-ps-status-timeline span, .hg-ps-insights span { color: #64748b; }
.hg-ps-timeline-icon { flex-shrink: 0; margin-top: 1px; color: #10b981; }
.hg-ps-alert-count { margin: 8px 0 4px; color: #d97706; }
.hg-ps-owner { margin-top: 10px; font-size: 13px; }
.hg-ps-icon-line { display: flex; align-items: center; gap: 6px; }

.hg-ps-inline-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hg-ps-select { width: 180px; }
.hg-ps-score-pill { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; background: #f8fafc; border: 1px solid #e2e8f0; font-weight: 600; font-size: 11px; }
.hg-ps-score-pill--icon { gap: 4px; }
.hg-ps-score-pill.is-bad { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.hg-ps-score-pill.is-mid { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.hg-ps-score-pill.is-good { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }

.hg-ps-report-filters { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 12px; padding: 16px 20px; border-bottom: 1px solid #e2e8f0; }
@media (max-width: 1200px) { .hg-ps-report-filters { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.hg-ps-report-kpis { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 12px; padding: 16px 20px; border-bottom: 1px solid #e2e8f0; }
@media (max-width: 1100px) { .hg-ps-report-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.hg-ps-report-kpi { display: flex; gap: 10px; align-items: center; border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px; background: #fafafa; }
.hg-ps-report-kpi-icon { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; }
.hg-ps-report-kpi-icon.tone-blue { background: color-mix(in srgb, var(--hg-primary) 12%, white); color: var(--hg-primary); }
.hg-ps-report-kpi-icon.tone-primary { background: color-mix(in srgb, var(--hg-primary) 12%, white); color: var(--hg-primary); }
.hg-ps-report-kpi-icon.tone-emerald { background: #ecfdf5; color: #059669; }
.hg-ps-report-kpi-icon.tone-amber { background: #fffbeb; color: #d97706; }
.hg-ps-report-kpi-icon.tone-red { background: #fef2f2; color: #dc2626; }
.hg-ps-report-kpi-value { font-size: 18px; font-weight: 650; line-height: 1; }
.hg-ps-report-kpi-label { font-size: 11px; color: #64748b; margin-top: 4px; }
.hg-ps-dist-layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 20px; padding: 16px 20px 20px; }
@media (max-width: 1100px) { .hg-ps-dist-layout { grid-template-columns: 1fr; } }
.hg-ps-dist-card { border: 1px solid #e2e8f0; border-radius: 12px; padding: 16px; background: #fafafa; }
.hg-ps-dist-grid { display: grid; grid-template-columns: minmax(0,1fr) 220px; gap: 20px; align-items: center; margin-top: 12px; }
@media (max-width: 800px) { .hg-ps-dist-grid { grid-template-columns: 1fr; } }
.hg-ps-dist-bars { display: flex; flex-direction: column; gap: 10px; }
.hg-ps-donut-wrap { text-align: center; }
.hg-ps-donut { width: 160px; height: 160px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; }
.hg-ps-donut-hole { width: 96px; height: 96px; border-radius: 50%; background: #fafafa; display: grid; place-items: center; font-size: 24px; font-weight: 700; }
.hg-ps-donut-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.hg-ps-donut-chips span { border: 1px solid #e2e8f0; border-radius: 8px; padding: 4px 6px; font-size: 10px; display: inline-flex; gap: 6px; align-items: center; justify-content: center; background: #fff; }
.hg-ps-donut-chips i { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.hg-ps-ranking { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hg-ps-ranking li { display: flex; justify-content: space-between; gap: 8px; align-items: center; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 12px; background: #fff; }
.hg-ps-ranking strong { display: block; font-size: 13px; }
.hg-ps-ranking span { font-size: 11px; color: #64748b; }
.hg-ps-featured { border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px; background: #fafafa; }
.hg-ps-featured p { margin: 0 0 8px; font-size: 13px; }
.hg-ps-featured-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* —— Sheets / drawers Pesquisa Satisfação (protótipo) —— */
.hg-ps-sheet-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    justify-content: flex-end;
    background: rgb(0 0 0 / 0.8);
    overscroll-behavior: contain;
}
.hg-ps-sheet-overlay--top { z-index: 100001; }

body:has(.hg-ps-sheet-overlay),
html:has(.hg-ps-sheet-overlay) {
    overflow: hidden !important;
}

.hg-ps-sheet {
    position: relative;
    width: 100%;
    height: 100%;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-left: 1px solid #e2e8f0;
    box-shadow: -12px 0 40px rgb(0 0 0 / 0.15);
    overflow: hidden;
    animation: hg-sheet-slide-in-from-right 500ms ease-in-out both;
}
.hg-ps-sheet--lg { max-width: 42rem; } /* sm:max-w-2xl */
.hg-ps-sheet--md { max-width: 36rem; } /* sm:max-w-xl */
.hg-ps-sheet--xl { max-width: 85vw; }
@media (min-width: 1024px) { .hg-ps-sheet--xl { max-width: 82vw; } }
@media (min-width: 1280px) { .hg-ps-sheet--xl { max-width: 80vw; } }
@media (max-width: 900px) { .hg-ps-sheet--xl { max-width: 100vw; } }

.hg-ps-sheet-x {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    width: 1.75rem;
    height: 1.75rem;
    border: 0;
    border-radius: 0.375rem;
    background: transparent;
    color: #64748b;
    display: grid;
    place-items: center;
    cursor: pointer;
    opacity: 0.75;
}
.hg-ps-sheet-x:hover { opacity: 1; background: #f1f5f9; color: #0f172a; }
.hg-ps-sheet-x.is-static {
    position: static;
    margin-left: auto;
    flex-shrink: 0;
}
.hg-ps-sheet-head {
    flex-shrink: 0;
    padding: 1.25rem 1.5rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    padding-right: 3rem;
}
.hg-ps-sheet-head-row { display: flex; align-items: flex-start; gap: 0.75rem; }
.hg-ps-sheet-avatar {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.5rem;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    background: #f1f5f9;
    color: #64748b;
}
.hg-ps-sheet-avatar.is-danger { background: color-mix(in srgb, #ef4444 12%, white); color: #dc2626; }
.hg-ps-sheet-avatar.is-primary { background: color-mix(in srgb, var(--hg-primary) 12%, white); color: var(--hg-primary); }
.hg-ps-sheet-avatar.is-round { border-radius: 999px; }
.hg-ps-sheet-head-copy { min-width: 0; flex: 1; }
.hg-ps-sheet-head-copy h2 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
}
.hg-ps-sheet-head-copy > p {
    margin: 0.125rem 0 0;
    font-size: 0.75rem;
    color: #64748b;
}
.hg-ps-sheet-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
.hg-ps-sheet-head-meta { margin-top: 0.375rem; font-size: 0.75rem; color: #64748b; }
.hg-ps-sheet-head-meta strong { color: #0f172a; }

/* —— Alerta / "Tratar cliente" (reformulado, paridade Lovable) —— */
.hg-ps-alert-head {
    flex-shrink: 0;
    padding: 1.25rem 1.5rem 1rem;
    padding-right: 3rem;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}
.hg-ps-alert-head-top { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.hg-ps-alert-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: color-mix(in srgb, #ef4444 12%, white);
    color: #dc2626;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.hg-ps-alert-name { margin: 0; font-size: 1.0625rem; font-weight: 600; color: #0f172a; line-height: 1.3; }
.hg-ps-alert-tag {
    font-family: ui-monospace, monospace;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
}

.hg-ps-alert-head-grid { display: grid; grid-template-columns: 1fr; gap: 0.75rem 0; }
@media (min-width: 768px) { .hg-ps-alert-head-grid { grid-template-columns: 1fr 1fr; } }
.hg-ps-alert-head-col { min-width: 0; }
@media (min-width: 768px) {
    .hg-ps-alert-head-col { padding-right: 1.5rem; }
    .hg-ps-alert-head-col--divide { padding-right: 0; padding-left: 1.5rem; border-left: 1px solid #e2e8f0; }
}
.hg-ps-alert-kicker { font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.05em; color: #64748b; font-weight: 600; margin-bottom: 0.5rem; }

.hg-ps-alert-dl { display: grid; grid-template-columns: 1fr; gap: 0.375rem 1rem; }
@media (min-width: 480px) { .hg-ps-alert-dl { grid-template-columns: 1fr 1fr; } }
.hg-ps-alert-lv { display: flex; align-items: baseline; gap: 0.375rem; min-width: 0; }
.hg-ps-alert-lv span { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.03em; color: #64748b; font-weight: 600; flex-shrink: 0; }
.hg-ps-alert-lv strong { font-size: 0.8125rem; font-weight: 500; color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.hg-ps-alert-resposta-mini { display: flex; align-items: center; gap: 0.75rem; }
.hg-ps-alert-resposta-mini-copy { min-width: 0; }
.hg-ps-alert-resposta-mini-title { font-size: 0.8125rem; font-weight: 500; color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hg-ps-alert-resposta-mini-sub { font-size: 0.75rem; color: #64748b; margin-top: 0.125rem; }

.hg-ps-alert-divider { height: 1px; background: #e2e8f0; margin: 1rem 0 0.75rem; }
.hg-ps-alert-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.hg-ps-btn-resolve { border-color: color-mix(in srgb, #10b981 60%, transparent) !important; color: #059669 !important; }
.hg-ps-btn-resolve:hover { background: color-mix(in srgb, #10b981 10%, white) !important; color: #059669 !important; }

.hg-ps-alert-body { flex: 1; min-height: 0; display: flex; background: #f8fafc; }
.hg-ps-alert-main { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 1rem; overflow: hidden; }
.hg-ps-alert-cols { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
@media (min-width: 1024px) { .hg-ps-alert-cols { grid-template-columns: 1fr 1fr; } }
.hg-ps-alert-wa-col { min-height: 0; display: flex; flex-direction: column; }
.hg-ps-alert-panel-col { min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.hg-ps-alert-panel-scroll { flex: 1; min-height: 0; overflow-y: auto; padding-right: 0.25rem; }
.hg-ps-tratativa-textarea { min-height: 12rem; }

.hg-ps-wa-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; border-radius: 0.75rem; border: 1px solid #e2e8f0; background: #fff; overflow: hidden; }
.hg-ps-wa-panel-head { display: flex; align-items: center; gap: 0.5rem; padding: 0.625rem 1rem; border-bottom: 1px solid #e2e8f0; background: #f8fafc; font-size: 0.875rem; font-weight: 600; color: #0f172a; }
.hg-ps-wa-panel-head svg:first-child { color: #25d366; flex-shrink: 0; }
.hg-ps-wa-panel-online { margin-left: auto; display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.625rem; font-weight: 400; color: #059669; }
.hg-ps-wa-panel-online span { width: 0.375rem; height: 0.375rem; border-radius: 999px; background: #10b981; }
.hg-ps-wa-panel-body { flex: 1; min-height: 0; overflow-y: auto; padding: 1rem 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; background: #efe6dc; }
/* Com o embed do SuperMensagem no lugar do painel de mensagens, quem desenha a
   conversa é o iframe: sem padding, sem fundo e sem rolagem nossa. */
.hg-ps-wa-panel-body--embed { padding: 0; gap: 0; background: #f8fafc; overflow: hidden; }
.hg-ps-wa-panel-body--embed .hg-conv-embed { flex: 1; min-height: 0; }
.hg-ps-wa-empty { margin: auto; padding: 1.5rem; text-align: center; font-size: 0.8125rem; color: #64748b; }
.hg-ps-wa-expand { margin-left: auto; }
.hg-ps-wa-send-btn { background: #10b981 !important; border-color: #10b981 !important; color: #fff !important; }
.hg-ps-wa-send-btn:hover { background: #059669 !important; border-color: #059669 !important; }
.hg-ps-wa-send-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.hg-ps-panel-card { border-radius: 0.75rem; border: 1px solid #e2e8f0; background: #fff; overflow: hidden; margin-bottom: 0.75rem; }
.hg-ps-panel-card:last-child { margin-bottom: 0; }
.hg-ps-panel-card-head { display: flex; align-items: center; gap: 0.5rem; padding: 0.625rem 1rem; border-bottom: 1px solid #e2e8f0; background: #f8fafc; font-size: 0.875rem; font-weight: 600; color: #0f172a; }
.hg-ps-panel-card-meta { margin-left: auto; font-size: 0.75rem; color: #64748b; font-weight: 400; }
.hg-ps-panel-card-action {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border: 0;
    background: transparent;
    color: var(--hg-primary);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    padding: 0;
}
.hg-ps-panel-card-action:hover { text-decoration: underline; }
.hg-ps-panel-card-body { padding: 1rem; }
.hg-ps-icon-primary { color: var(--hg-primary); }
.hg-ps-icon-danger { color: #dc2626; }

.hg-ps-row-kv { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0; border-bottom: 1px solid #f1f5f9; }
.hg-ps-row-kv:last-child { border-bottom: 0; }
.hg-ps-row-kv span { font-size: 0.75rem; color: #64748b; min-width: 6.5rem; flex-shrink: 0; }
.hg-ps-row-kv strong { font-size: 0.8125rem; font-weight: 500; color: #0f172a; margin-left: auto; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.hg-ps-alert-rail { width: 3.5rem; flex-shrink: 0; border-left: 1px solid #e2e8f0; background: #fff; display: flex; flex-direction: column; align-items: center; padding: 0.75rem 0; gap: 0.25rem; }
.hg-ps-alert-rail-btn { position: relative; width: 2.5rem; height: 2.5rem; border: 0; border-radius: 0.5rem; background: transparent; color: #64748b; display: grid; place-items: center; cursor: pointer; }
.hg-ps-alert-rail-btn:hover { background: #f1f5f9; color: #0f172a; }
.hg-ps-alert-rail-btn.is-active { background: color-mix(in srgb, var(--hg-primary) 10%, white); color: var(--hg-primary); }
.hg-ps-alert-rail-btn.is-active::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 1.5rem;
    border-radius: 2px 0 0 2px;
    background: var(--hg-primary);
}

.hg-ps-sheet-scroll {
    flex: 1;
    overflow: auto;
    padding: 1.25rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hg-ps-block h3 {
    margin: 0 0 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
}
.hg-ps-block h3 span {
    margin-left: 0.5rem;
    font-size: 0.75rem;
    font-weight: 400;
    color: #64748b;
}
.hg-ps-block-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.hg-ps-block-head h3 { margin: 0; }
.hg-ps-block-head span { font-size: 0.75rem; color: #64748b; }

.hg-ps-panel {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #fff;
    padding: 1rem;
}
.hg-ps-panel--form { display: flex; flex-direction: column; gap: 0.75rem; }
.hg-ps-why-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 0.8125rem; color: #334155; }
.hg-ps-why-list li { display: flex; gap: 8px; }
.hg-ps-why-list strong { color: #0f172a; }
.hg-ps-why-dot { color: #94a3b8; flex-shrink: 0; }
.hg-ps-why-list li.is-danger .hg-ps-why-dot { color: #dc2626; }

.hg-ps-score-line {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}
.hg-ps-score-line > span { font-size: 0.75rem; color: #64748b; }
.hg-ps-score-round {
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 1.125rem;
    font-weight: 700;
    flex-shrink: 0;
}
.hg-ps-score-round.is-bad { background: #fef2f2; color: #b91c1c; }
.hg-ps-score-round.is-mid { background: #fffbeb; color: #b45309; }
.hg-ps-score-round.is-good { background: #ecfdf5; color: #047857; }

.hg-ps-stars-row { display: flex; gap: 0.125rem; color: #cbd5e1; }
.hg-ps-stars-row .is-on,
.hg-ps-stars-row svg.is-on { color: #fbbf24; }

.hg-ps-quote {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    padding: 0.75rem;
    border-radius: 0.375rem;
    background: #f8fafc;
    font-size: 0.875rem;
    color: #334155;
}
.hg-ps-quote svg { color: #94a3b8; margin-top: 0.125rem; flex-shrink: 0; }
.hg-ps-quote p { margin: 0; white-space: pre-wrap; }

.hg-ps-inline-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    margin-top: 0.75rem;
}
.hg-ps-text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border: 0;
    background: transparent;
    color: var(--hg-primary);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0;
    cursor: pointer;
    text-decoration: none;
}
.hg-ps-text-link:hover { text-decoration: underline; }

.hg-ps-form-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.hg-ps-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.hg-ps-form-footer > p {
    margin: 0;
    font-size: 0.6875rem;
    color: #64748b;
    flex: 1;
    min-width: 10rem;
}
.hg-ps-form-footer-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.hg-ps-btn-wa {
    display: inline-flex !important;
    align-items: center;
    gap: 0.375rem;
    border-color: color-mix(in srgb, #25d366 40%, transparent) !important;
    color: #128c7e !important;
    background: #fff !important;
}
.hg-ps-btn-wa:hover {
    background: color-mix(in srgb, #25d366 10%, white) !important;
    color: #128c7e !important;
}
.hg-ps-btn-wa svg { color: #25d366; }

.hg-ps-empty-dashed {
    border: 1px dashed #cbd5e1;
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: #64748b;
    background: #f8fafc;
}

.hg-ps-timeline {
    position: relative;
    list-style: none;
    margin: 0 0 0 0.5rem;
    padding: 0;
    border-left: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.hg-ps-timeline > li {
    position: relative;
    margin-left: 1rem;
}
.hg-ps-timeline-dot {
    position: absolute;
    left: -1.375rem;
    top: 0.875rem;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 999px;
    background: var(--hg-primary);
}
.hg-ps-timeline-card {
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    background: #fff;
    padding: 0.75rem;
}
.hg-ps-timeline-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.hg-ps-timeline-who {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: #0f172a;
}
.hg-ps-timeline-who svg { color: #94a3b8; }
.hg-ps-timeline-who span { color: #64748b; font-weight: 400; }
.hg-ps-timeline-card > p {
    margin: 0.5rem 0 0;
    font-size: 0.875rem;
    color: #334155;
    white-space: pre-wrap;
}

.hg-ps-info-duo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.hg-ps-kicker {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}
.hg-ps-main-score {
    margin-top: 0.25rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.2;
}
.hg-ps-main-score small {
    font-size: 0.75rem;
    font-weight: 400;
    color: #64748b;
}
.hg-ps-main-score.is-sm { font-size: 0.875rem; font-weight: 500; }
.hg-ps-main-score.is-good { color: #059669; font-size: 0.875rem; }
.hg-ps-main-score.is-bad { color: #dc2626; font-size: 0.875rem; }
.hg-ps-main-score--icon { display: inline-flex; align-items: center; gap: 6px; }

.hg-ps-contact-item { display: flex; align-items: center; gap: 6px; }

.hg-ps-contact-list {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: #334155;
}
.hg-ps-answers {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.hg-ps-answers li {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    padding: 0.75rem;
    background: #fff;
}
.hg-ps-answers strong { display: block; font-size: 0.75rem; color: #0f172a; }
.hg-ps-answers p { margin: 0.25rem 0 0; font-size: 0.75rem; color: #64748b; white-space: pre-wrap; }
.hg-ps-answer-n {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--hg-primary) 12%, white);
    color: var(--hg-primary);
    font-size: 0.6875rem;
    font-weight: 600;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.hg-ps-muted { color: #64748b; font-size: 0.75rem; border: 0 !important; padding: 0 !important; background: transparent !important; }

.hg-ps-wa-row { display: flex; }
.hg-ps-wa-row.is-out { justify-content: flex-end; }
.hg-ps-wa-row.is-in { justify-content: flex-start; }
.hg-ps-wa-msg {
    max-width: 80%;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.08);
}
.hg-ps-wa-msg p { margin: 0; white-space: pre-wrap; }
.hg-ps-wa-msg span { display: block; margin-top: 0.25rem; font-size: 0.625rem; }
.hg-ps-wa-msg.is-in { background: #fff; color: #111b21; border-top-left-radius: 0; }
.hg-ps-wa-msg.is-in span { color: #667781; }
.hg-ps-wa-msg.is-out { background: #d9fdd3; color: #111b21; border-top-right-radius: 0; }
.hg-ps-wa-msg.is-out span { color: #4a7a4a; }
@media (max-width: 640px) {
    .hg-ps-sheet--lg,
    .hg-ps-sheet--md { max-width: 100%; }
    .hg-ps-form-2,
    .hg-ps-info-duo { grid-template-columns: 1fr; }
}



/* —— Tela do cliente (Relatórios) —— */
.hg-ps-client-overlay {
    padding: 1.25rem;
    z-index: 100000 !important;
}
.hg-ps-client-modal {
    width: min(28rem, 100%);
    max-width: 28rem;
    max-height: min(92vh, 860px);
    padding: 0;
    overflow: hidden;
    z-index: 100001;
}
.hg-ps-client-header {
    position: relative;
    padding: 1.25rem 1.5rem 0.75rem;
    border-bottom: 1px solid var(--hg-border, #e2e8f0);
}
.hg-ps-client-title {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--hg-foreground, #0f172a);
    line-height: 1.25;
}
.hg-ps-client-title svg { color: var(--hg-primary); flex-shrink: 0; }
.hg-ps-client-subtitle {
    margin: 0.35rem 0 0;
    font-size: 0.75rem;
    color: #64748b;
}
.hg-ps-client-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 1.75rem;
    height: 1.75rem;
    border: 0;
    border-radius: 0.375rem;
    background: transparent;
    color: #64748b;
    display: grid;
    place-items: center;
    cursor: pointer;
    opacity: 0.7;
}
.hg-ps-client-close:hover { opacity: 1; background: #f1f5f9; color: #0f172a; }
.hg-ps-client-open {
    position: absolute;
    top: 1rem;
    right: 2.75rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 1.75rem;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.hg-ps-client-open:hover { background: #f8fafc; }
.hg-ps-client-tabs-wrap { padding: 1rem 1.5rem 0; }
.hg-ps-client-tabs {
    display: flex;
    width: 100%;
    height: 2.25rem;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    border-radius: 0.5rem;
    background: #f1f5f9;
    padding: 0.25rem;
}
.hg-ps-client-tab {
    flex: 1;
    height: 100%;
    border: 0;
    border-radius: 0.375rem;
    background: transparent;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
}
.hg-ps-client-tab.is-active {
    background: #fff;
    color: #0f172a;
    font-weight: 600;
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.08);
}
.hg-ps-client-body {
    padding: 1.5rem;
    background: color-mix(in srgb, #f1f5f9 40%, #fff);
    overflow: auto;
    flex: 1;
    min-height: 0;
}

.hg-ps-phone {
    margin: 0 auto;
    width: 100%;
    max-width: 24rem;
    min-height: 34rem;
    display: flex;
    flex-direction: column;
    border-radius: 2rem;
    border: 6px solid #262626;
    background: #171717;
    box-shadow: 0 20px 40px rgb(15 23 42 / 0.25);
    overflow: hidden;
}
.hg-ps-phone-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem 0.25rem;
    color: #fff;
    font-size: 10px;
    background: #171717;
}
.hg-ps-phone-status-icons { display: flex; gap: 0.25rem; align-items: center; }
.hg-ps-phone-wa-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    background: #075E54;
    color: #fff;
}
.hg-ps-phone-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.2);
    display: grid;
    place-items: center;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
}
.hg-ps-phone-wa-meta { flex: 1; min-width: 0; }
.hg-ps-phone-wa-meta strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hg-ps-phone-wa-meta span { display: block; font-size: 10px; color: rgb(255 255 255 / 0.7); }
.hg-ps-phone-generic-header { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0.75rem; background: #334155; color: #fff; }
.hg-ps-phone-avatar.is-neutral { background: rgb(255 255 255 / 0.18); }
.hg-ps-phone-bubble--email { max-width: 92%; }
.hg-ps-phone-bubble-subject { font-size: 10px; color: #737373; margin-bottom: 4px; }
.hg-ps-phone-bubble-cta { display: inline-block; margin-top: 8px; padding: 6px 14px; border-radius: 999px; background: var(--hg-primary); color: #fff !important; font-size: 11px; font-weight: 600; text-decoration: none !important; }
.hg-ps-phone-extra-questions { display: flex; flex-direction: column; gap: 14px; padding-top: 4px; border-top: 1px dashed #e5e5e5; }
.hg-ps-phone-extra-question { display: flex; flex-direction: column; gap: 6px; }
.hg-ps-phone-question.is-sm { font-size: 11px; font-weight: 500; }
.hg-ps-phone-extra-options { display: flex; flex-wrap: wrap; gap: 6px; }
.hg-ps-phone-extra-option { border: 1px solid #e5e5e5; border-radius: 999px; padding: 3px 10px; font-size: 10px; color: #404040; }
.hg-ps-phone-extra-option.is-scale { width: 22px; height: 22px; padding: 0; display: grid; place-items: center; border-radius: 6px; }
.hg-ps-phone-extra-input { height: 28px; border: 1px solid #e5e5e5; border-radius: 6px; background: #fafafa; }
.hg-ps-phone-chat {
    flex: 1;
    padding: 1rem 0.75rem;
    min-height: 9.5rem;
    background-color: #ECE5DD;
    background-image:
        radial-gradient(circle at 20% 10%, rgba(0,0,0,0.03) 1px, transparent 1px),
        radial-gradient(circle at 80% 60%, rgba(0,0,0,0.03) 1px, transparent 1px);
    background-size: 24px 24px;
}
.hg-ps-phone-bubble {
    max-width: 85%;
    background: #fff;
    border-radius: 0.5rem;
    border-top-left-radius: 0;
    padding: 0.5rem 0.75rem;
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.08);
}
.hg-ps-phone-bubble-title {
    font-size: 11px;
    font-weight: 600;
    color: #047857;
    margin-bottom: 2px;
}
.hg-ps-phone-bubble p {
    margin: 0;
    font-size: 12px;
    color: #262626;
    white-space: pre-wrap;
}
.hg-ps-phone-bubble a,
.hg-ps-phone-bubble-link {
    display: inline-block;
    margin-top: 0.25rem;
    font-size: 11px;
    color: #047857;
    text-decoration: underline;
    word-break: break-all;
}
.hg-ps-phone-bubble-time {
    margin-top: 0.25rem;
    font-size: 9px;
    color: #737373;
    text-align: right;
}
.hg-ps-phone-landing {
    flex-shrink: 0;
    background: #fff;
    border-top: 1px solid #e5e5e5;
    padding: 1rem;
}
.hg-ps-phone-landing-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin-bottom: 0.75rem;
}
.hg-ps-phone-survey { display: flex; flex-direction: column; gap: 1.25rem; }
.hg-ps-phone-question {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}
.hg-ps-phone-question.is-center { text-align: center; margin-bottom: 0.75rem; }
.hg-ps-phone-nps {
    display: grid;
    grid-template-columns: repeat(11, minmax(0, 1fr));
    gap: 0.25rem;
}
.hg-ps-phone-nps span {
    height: 2rem;
    border-radius: 0.375rem;
    border: 1px solid #e2e8f0;
    display: grid;
    place-items: center;
    font-size: 0.75rem;
}
.hg-ps-phone-nps span.is-bad { background: #fef2f2; color: #b91c1c; }
.hg-ps-phone-nps span.is-mid { background: #fffbeb; color: #b45309; }
.hg-ps-phone-nps span.is-good { background: #ecfdf5; color: #047857; }
.hg-ps-phone-hint {
    display: flex;
    justify-content: space-between;
    margin-top: 0.25rem;
    font-size: 10px;
    color: #94a3b8;
}
.hg-ps-phone-stars {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    color: #fbbf24;
}
.hg-ps-phone-thumbs {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}
.hg-ps-phone-thumb {
    width: 4rem;
    height: 4rem;
    border-radius: 999px;
    border: 2px solid;
    display: grid;
    place-items: center;
}
.hg-ps-phone-thumb.is-good {
    border-color: #6ee7b7;
    background: #ecfdf5;
    color: #059669;
}
.hg-ps-phone-thumb.is-bad {
    border-color: #fca5a5;
    background: #fef2f2;
    color: #dc2626;
}
.hg-ps-phone-submit {
    width: 100%;
    border-radius: 0.375rem;
    background: var(--hg-primary);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.625rem 0.75rem;
    text-align: center;
}

.hg-dropdown { position: relative; display: inline-flex; }
.hg-dropdown-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 260px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 12px 30px rgba(15,23,42,.12); padding: 6px; z-index: 40; }
.hg-dropdown-label { padding: 8px 10px 6px; font-size: 11px; color: #64748b; border-bottom: 1px solid #e2e8f0; margin-bottom: 4px; }
.hg-dropdown-item { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: #0f172a; font-size: 13px; }
.hg-dropdown-item small { color: #94a3b8; font-size: 10px; }
.hg-dropdown-item:hover { background: #f8fafc; }

/* Dropdown Tela do cliente (Gerir pesquisas) */
.hg-ps-client-dropdown { position: relative; display: inline-flex; }
.hg-ps-client-chevron { opacity: 0.7; transition: transform .15s ease; }
.hg-ps-client-chevron.is-open { transform: rotate(180deg); }
.hg-ps-client-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    width: 16rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
    padding: 4px;
    z-index: 50;
}
.hg-ps-client-menu-label {
    padding: 8px 10px 6px;
    font-size: 12px;
    font-weight: 600;
    color: #0f172a;
}
.hg-ps-client-menu-sep {
    height: 1px;
    background: #e2e8f0;
    margin: 2px 4px 4px;
}
.hg-ps-client-menu-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: #0f172a;
}
.hg-ps-client-menu-item svg {
    flex-shrink: 0;
    margin-top: 2px;
}
.hg-ps-client-menu-item svg.is-amber { color: #f59e0b; }
.hg-ps-client-menu-item svg.is-primary { color: var(--hg-primary); }
.hg-ps-client-menu-item svg.is-emerald { color: #059669; }
.hg-ps-client-menu-item span {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.hg-ps-client-menu-item strong {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
}
.hg-ps-client-menu-item small {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 400;
}
.hg-ps-client-menu-item:hover {
    background: color-mix(in srgb, var(--hg-primary) 12%, white);
}
.hg-ps-client-menu-item:hover strong {
    color: color-mix(in srgb, var(--hg-primary) 85%, #0f172a);
}

/* =============================================================================
   Monitor de Agendamento — cores DMS (protótipo Thiago / bandeira HOND)
   Escopo: somente .hg-page--monitor-thiago (não altera o design system global).
   Espelha STATUS_CONFIG + statusStyle() de pos-vendas-agendamento-thiago.
   ============================================================================= */

.hg-page--monitor-thiago {
    /* Tokens locais da página (paridade com STATUS_CONFIG do Thiago) */
    --hg-thiago-agendado: #FFFF00;
    --hg-thiago-agendado-borda: #000000;
    --hg-thiago-agendado-texto: #000000;

    --hg-thiago-confirmado: #1E4600;
    --hg-thiago-confirmado-borda: #FFFFFF;
    --hg-thiago-confirmado-texto: #FFFFFF;

    --hg-thiago-recebido: #49A400;
    --hg-thiago-recebido-borda: #FFFFFF;
    --hg-thiago-recebido-texto: #FFFFFF;

    --hg-thiago-os-aberta: #0000CD;
    --hg-thiago-os-aberta-borda: #FFFFFF;
    --hg-thiago-os-aberta-texto: #FFFFFF;

    --hg-thiago-entrega: #633DBC;
    --hg-thiago-entrega-borda: #FFFFFF;
    --hg-thiago-entrega-texto: #FFFFFF;

    --hg-thiago-nao-compareceu: #FF0000;
    --hg-thiago-nao-compareceu-borda: #FFFFFF;
    --hg-thiago-nao-compareceu-texto: #FFFFFF;

    --hg-thiago-bloqueado: #FFA500;
    --hg-thiago-bloqueado-borda: #FFFFFF;
    --hg-thiago-bloqueado-texto: #000000;

    --hg-thiago-fora-expediente: #808080;
    --hg-thiago-fora-expediente-borda: #FFFFFF;
    --hg-thiago-fora-expediente-texto: #FFFFFF;
}

/* --- Cards Dia / Semana --- */

.hg-page--monitor-thiago .hg-agenda-agendado {
    background: var(--hg-thiago-agendado);
    color: var(--hg-thiago-agendado-texto);
    border-color: var(--hg-thiago-agendado-borda);
}

.hg-page--monitor-thiago .hg-agenda-confirmado {
    background: var(--hg-thiago-confirmado);
    color: var(--hg-thiago-confirmado-texto);
    border-color: var(--hg-thiago-confirmado-borda);
}

.hg-page--monitor-thiago .hg-agenda-compareceu,
.hg-page--monitor-thiago .hg-agenda-recebido {
    background: var(--hg-thiago-recebido);
    color: var(--hg-thiago-recebido-texto);
    border-color: var(--hg-thiago-recebido-borda);
}

.hg-page--monitor-thiago .hg-agenda-os-aberta {
    background: var(--hg-thiago-os-aberta);
    color: var(--hg-thiago-os-aberta-texto);
    border-color: var(--hg-thiago-os-aberta-borda);
}

.hg-page--monitor-thiago .hg-agenda-entrega {
    background: var(--hg-thiago-entrega);
    color: var(--hg-thiago-entrega-texto);
    border-color: var(--hg-thiago-entrega-borda);
}

.hg-page--monitor-thiago .hg-agenda-nao_compareceu {
    background: var(--hg-thiago-nao-compareceu);
    color: var(--hg-thiago-nao-compareceu-texto);
    border-color: var(--hg-thiago-nao-compareceu-borda);
}

.hg-page--monitor-thiago .hg-agenda-bloqueado {
    background: var(--hg-thiago-bloqueado);
    color: var(--hg-thiago-bloqueado-texto);
    border-color: var(--hg-thiago-bloqueado-borda);
}

.hg-page--monitor-thiago .hg-agenda-fora-expediente {
    background: var(--hg-thiago-fora-expediente);
    color: var(--hg-thiago-fora-expediente-texto);
    border-color: var(--hg-thiago-fora-expediente-borda);
}

/* Bloqueios / fora do expediente (células de bloqueio) */
.hg-page--monitor-thiago .hg-agenda-block,
.hg-page--monitor-thiago .hg-agenda-week-block {
    background: var(--hg-thiago-bloqueado);
    color: var(--hg-thiago-bloqueado-texto);
    border-color: var(--hg-thiago-bloqueado-borda);
}

.hg-page--monitor-thiago .hg-agenda-block-indisponivel,
.hg-page--monitor-thiago .hg-agenda-week-block.hg-agenda-block-indisponivel {
    background: var(--hg-thiago-fora-expediente);
    color: var(--hg-thiago-fora-expediente-texto);
    border-color: var(--hg-thiago-fora-expediente-borda);
}

/* --- Legenda (dots iguais ao statusStyle do Thiago) --- */

.hg-page--monitor-thiago .hg-legend-dot {
    border: 1px solid transparent;
    box-sizing: border-box;
}

.hg-page--monitor-thiago .hg-legend-agendado {
    background: var(--hg-thiago-agendado);
    border-color: var(--hg-thiago-agendado-borda);
}

.hg-page--monitor-thiago .hg-legend-confirmado {
    background: var(--hg-thiago-confirmado);
    border-color: var(--hg-thiago-confirmado-borda);
}

.hg-page--monitor-thiago .hg-legend-compareceu,
.hg-page--monitor-thiago .hg-legend-recebido {
    background: var(--hg-thiago-recebido);
    border-color: var(--hg-thiago-recebido-borda);
}

.hg-page--monitor-thiago .hg-legend-os-aberta {
    background: var(--hg-thiago-os-aberta);
    border-color: var(--hg-thiago-os-aberta-borda);
}

.hg-page--monitor-thiago .hg-legend-entrega {
    background: var(--hg-thiago-entrega);
    border-color: var(--hg-thiago-entrega-borda);
}

.hg-page--monitor-thiago .hg-legend-nao_compareceu {
    background: var(--hg-thiago-nao-compareceu);
    border-color: var(--hg-thiago-nao-compareceu-borda);
}

.hg-page--monitor-thiago .hg-legend-bloqueado {
    background: var(--hg-thiago-bloqueado);
    border-color: var(--hg-thiago-bloqueado-borda);
}

.hg-page--monitor-thiago .hg-legend-fora-expediente,
.hg-page--monitor-thiago .hg-legend-indisponivel {
    background: var(--hg-thiago-fora-expediente);
    border-color: var(--hg-thiago-fora-expediente-borda);
}

/* =============================================================================
   Monitor — coluna Consultor (paridade visual com protótipo Thiago)
   Escopo: .hg-page--monitor-thiago
   ============================================================================= */

.hg-page--monitor-thiago .hg-agenda-grid-consultor-head,
.hg-page--monitor-thiago .hg-agenda-week-consultor-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--hg-muted-foreground);
}

.hg-page--monitor-thiago .hg-agenda-consultor-head-icon {
    width: 0.875rem;
    height: 0.875rem;
    flex-shrink: 0;
    color: var(--hg-muted-foreground);
}

.hg-page--monitor-thiago .hg-agenda-grid-consultor {
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
}

.hg-page--monitor-thiago .hg-agenda-consultor-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    width: 100%;
}

.hg-page--monitor-thiago .hg-agenda-avatar {
    width: 2.25rem;
    height: 2.25rem;
    flex-shrink: 0;
    border-radius: 9999px;
    background: color-mix(in srgb, var(--hg-primary) 10%, transparent);
    color: var(--hg-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
}

.hg-page--monitor-thiago .hg-agenda-consultor-name,
.hg-page--monitor-thiago .hg-agenda-week-consultor-name {
    min-width: 0;
    flex: 1;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
    text-transform: uppercase;
    color: var(--hg-foreground);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: normal;
}

.hg-page--monitor-thiago .hg-agenda-week-consultor-inner {
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    width: 100%;
}

/* =============================================================================
   Monitor — grade/cards da agenda (paridade visual com protótipo Thiago)
   Escopo: .hg-page--monitor-thiago
   ============================================================================= */

.hg-page--monitor-thiago .hg-agenda-grid-slot-head {
    width: var(--hg-slot-width);
    padding: 0.5rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--hg-muted-foreground);
}

.hg-page--monitor-thiago .hg-agenda-grid-cell,
.hg-page--monitor-thiago .hg-agenda-grid-cell-empty,
.hg-page--monitor-thiago .hg-agenda-grid-cell-span {
    padding: 0.375rem;
}

.hg-page--monitor-thiago .hg-agenda-card,
.hg-page--monitor-thiago .hg-agenda-block {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
    width: 100%;
    height: 100%;
    min-height: calc(var(--hg-row-height) - 0.75rem);
    border-radius: 0.375rem;
    border: 1px solid;
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.25;
    user-select: none;
    box-sizing: border-box;
    overflow: hidden;
}

.hg-page--monitor-thiago .hg-agenda-card {
    transition: box-shadow 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.hg-page--monitor-thiago .hg-agenda-card:hover {
    box-shadow: 0 4px 10px rgb(0 0 0 / 0.12);
    transform: translateY(-1px);
}

.hg-page--monitor-thiago .hg-agenda-card-placa,
.hg-page--monitor-thiago .hg-agenda-week-card-placa {
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.hg-page--monitor-thiago .hg-agenda-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.25rem;
    min-width: 0;
}

.hg-page--monitor-thiago .hg-agenda-grip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.4;
    color: inherit;
    line-height: 0;
}

.hg-page--monitor-thiago .hg-agenda-card-owner,
.hg-page--monitor-thiago .hg-agenda-week-card-owner {
    margin-top: 0;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.2;
    opacity: 0.9;
    text-decoration: none;
}

.hg-page--monitor-thiago .hg-agenda-card-owner:hover,
.hg-page--monitor-thiago .hg-agenda-week-card-owner:hover {
    text-decoration: underline;
    text-decoration-color: currentColor;
}

.hg-page--monitor-thiago .hg-agenda-card-time,
.hg-page--monitor-thiago .hg-agenda-block-time,
.hg-page--monitor-thiago .hg-agenda-week-card-time {
    margin-top: 0.125rem;
    font-size: 0.625rem;
    opacity: 0.7;
    line-height: 1.2;
}

.hg-page--monitor-thiago .hg-agenda-block-title {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    min-width: 0;
}

.hg-page--monitor-thiago .hg-agenda-block-title span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hg-page--monitor-thiago .hg-agenda-block-lock {
    flex-shrink: 0;
    width: 0.75rem;
    height: 0.75rem;
}

.hg-page--monitor-thiago .hg-agenda-block-indisponivel {
    opacity: 0.8;
    cursor: default;
}

.hg-page--monitor-thiago .hg-agenda-block:not(.hg-agenda-block-indisponivel):hover {
    filter: brightness(0.95);
}

.hg-page--monitor-thiago .hg-agenda-week-card,
.hg-page--monitor-thiago .hg-agenda-week-block {
    border-radius: 0.375rem;
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
}

/* =============================================================================
   Drawer de atendimento — visual Thiago (somente .hg-atendimento--thiago)
   O sheet é teleportado ao body; por isso o escopo é no próprio drawer.
   ============================================================================= */

/* Tokens no :root, não no drawer: a tela de Eventos precisa das mesmas cores nos
   badges de status e não carrega nenhuma das classes `--thiago`. Ficavam
   duplicados aqui e em .hg-page--monitor-thiago; esta é a definição única para
   quem não é card de grade. */
:root {
    --hg-thiago-agendado: #FFFF00;
    --hg-thiago-confirmado: #1E4600;
    --hg-thiago-recebido: #49A400;
    --hg-thiago-os-aberta: #0000CD;
    --hg-thiago-entrega: #633DBC;
    --hg-thiago-nao-compareceu: #FF0000;
    --hg-thiago-bloqueado: #FFA500;
    --hg-thiago-fora-expediente: #808080;
}

.hg-atendimento--thiago .hg-drawer-close-fab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background: var(--hg-muted);
    color: var(--hg-muted-foreground);
    line-height: 0;
}

.hg-atendimento--thiago .hg-drawer-close-fab:hover {
    background: color-mix(in srgb, var(--hg-muted) 70%, var(--hg-foreground));
    color: var(--hg-foreground);
}

.hg-atendimento--thiago .hg-atendimento-header {
    background: var(--hg-card);
}

.hg-atendimento--thiago .hg-atendimento-block-title {
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--hg-muted-foreground);
    margin-bottom: 0.5rem;
}

.hg-atendimento--thiago .hg-atendimento-kv-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--hg-muted-foreground);
}

.hg-atendimento--thiago .hg-atendimento-kv-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--hg-foreground);
}

/* Badges de status — cores DMS, em qualquer tela. Antes só valiam dentro do
   drawer do Monitor, então a listagem de Eventos e o drawer dela mostravam o
   badge pastel do design system: mesma informação, duas aparências. */
.hg-badge.hg-agenda-agendado {
    background: var(--hg-thiago-agendado);
    color: #000;
    border: 1px solid #000;
}
.hg-badge.hg-agenda-confirmado {
    background: var(--hg-thiago-confirmado);
    color: #fff;
    border: 1px solid var(--hg-thiago-confirmado);
}
.hg-badge.hg-agenda-recebido,
.hg-badge.hg-agenda-compareceu {
    background: var(--hg-thiago-recebido);
    color: #fff;
    border: 1px solid var(--hg-thiago-recebido);
}
.hg-badge.hg-agenda-os-aberta {
    background: var(--hg-thiago-os-aberta);
    color: #fff;
    border: 1px solid var(--hg-thiago-os-aberta);
}
.hg-badge.hg-agenda-entrega {
    background: var(--hg-thiago-entrega);
    color: #fff;
    border: 1px solid var(--hg-thiago-entrega);
}
.hg-badge.hg-agenda-nao_compareceu {
    background: var(--hg-thiago-nao-compareceu);
    color: #fff;
    border: 1px solid var(--hg-thiago-nao-compareceu);
}
.hg-badge.hg-agenda-bloqueado {
    background: var(--hg-thiago-bloqueado);
    color: #000;
    border: 1px solid var(--hg-thiago-bloqueado);
}
.hg-badge.hg-agenda-fora-expediente {
    background: var(--hg-thiago-fora-expediente);
    color: #fff;
    border: 1px solid var(--hg-thiago-fora-expediente);
}

/* O ponto some quando o fundo já é a cor cheia do status — ele fica da mesma cor
   do badge e virava um borrão. A listagem de Eventos desenha o ponto; o drawer
   não. Continua visível nos badges pastel (.hg-status-*). */
.hg-badge[class*='hg-agenda-'] .hg-badge-dot {
    display: none;
}

.hg-atendimento--thiago .hg-atendimento-body {
    background: color-mix(in srgb, var(--hg-muted) 35%, transparent);
}

.hg-atendimento--thiago .hg-resumo-grid--linx {
    height: 100%;
    align-content: stretch;
}

.hg-atendimento--thiago .hg-quadrant,
.hg-atendimento--thiago .hg-solicitacoes-card {
    border-radius: 0.75rem;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
}

.hg-atendimento--thiago .hg-quadrant-icon,
.hg-atendimento--thiago .hg-solicitacoes-card-icon {
    color: var(--hg-primary);
}

.hg-atendimento--thiago .hg-resumo-kv-ico {
    color: var(--hg-primary);
}

/* Histórico de OS — linha estilo Thiago */
.hg-atendimento--thiago .hg-os-list {
    border-radius: 0.75rem;
    border: 1px solid var(--hg-border);
    background: var(--hg-card);
    overflow: hidden;
}

.hg-atendimento--thiago .hg-os-list-item + .hg-os-list-item {
    border-top: 1px solid var(--hg-border);
}

.hg-atendimento--thiago .hg-os-item-btn {
    border-bottom: none;
    padding: 0.625rem 1rem;
}

.hg-os-item-left {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.hg-os-item-chevron {
    flex-shrink: 0;
    color: var(--hg-muted-foreground);
    transition: transform 0.15s ease;
}

.hg-os-item-chevron.is-open {
    transform: rotate(90deg);
}

.hg-os-item-hash {
    flex-shrink: 0;
    color: var(--hg-muted-foreground);
    font-size: 0.75rem;
    font-weight: 600;
}

.hg-os-item-numero {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hg-os-item-status {
    flex-shrink: 0;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    background: color-mix(in srgb, var(--hg-muted) 80%, transparent);
    color: var(--hg-muted-foreground);
}

.hg-os-item-valor {
    flex-shrink: 0;
    font-weight: 600;
    color: var(--hg-primary);
}

.hg-os-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    text-align: center;
}

.hg-os-empty-icon {
    color: color-mix(in srgb, var(--hg-muted-foreground) 70%, transparent);
}

.hg-os-empty-title {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.hg-os-empty-text {
    margin-top: 0.125rem;
    font-size: 0.75rem;
    color: var(--hg-muted-foreground);
}

/* Observações do cliente no drawer — card do resumo + form no padrão da modal. */
.hg-solicitacoes-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem;
    min-width: 0;
    overflow: hidden;
    border-radius: 0 0 calc(var(--hg-radius) + 4px) calc(var(--hg-radius) + 4px);
}

.hg-solicitacoes-card-body .hg-agendar-sol-form {
    margin-top: 0;
}

.hg-solicitacoes-card-body .hg-solicitacoes-empty,
.hg-solicitacoes-card-body .hg-solicitacoes-loading {
    margin: 0;
    padding: 0.75rem 0.25rem;
}

.hg-solicitacoes-card-body .hg-solicitacoes-rows {
    margin: -0.75rem;
    margin-top: 0;
    border-top: 1px solid var(--hg-border);
}

.hg-solicitacoes-card-heading {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    min-width: 0;
}

.hg-solicitacoes-card-head .hg-label-hint {
    color: var(--hg-primary);
    flex-shrink: 0;
}

/* Popover abaixo do ícone — o card fica no topo do resumo e o hint pra cima era cortado. */
.hg-label-hint--below .hg-label-hint-popover {
    top: calc(100% + 0.4rem);
    bottom: auto;
}

.hg-label-hint--below .hg-label-hint-popover::after {
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: var(--hg-foreground, #111);
}

/* Descrição + Tipo + Adicionar na mesma linha (drawer mais estreito que a modal). */
.hg-solicitacoes-add-form-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.5rem;
    align-items: flex-end;
    min-width: 0;
    width: 100%;
}

.hg-solicitacoes-add-form-row .hg-agendar-sol-desc {
    flex: 1 1 0;
    min-width: 0;
}

.hg-solicitacoes-add-form-row .hg-agendar-sol-tipo {
    flex: 1 1 10rem;
    width: auto;
    max-width: 14rem;
    min-width: 0;
}

/* .hg-select tem min-width: 15rem global — no drawer isso estoura a coluna e cobria o botão. */
.hg-solicitacoes-add-form-row .hg-select,
.hg-solicitacoes-add-form-row .hg-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.hg-solicitacoes-add-form-row .hg-agendar-sol-actions {
    flex: 0 0 auto;
    align-self: flex-end;
}

.hg-solicitacoes-add-form-row .hg-agendar-sol-add {
    height: 2.25rem;
    min-height: 2.25rem;
    max-height: 2.25rem;
}

@media (max-width: 720px) {
    .hg-solicitacoes-add-form-row {
        flex-wrap: wrap;
    }

    .hg-solicitacoes-add-form-row .hg-agendar-sol-tipo {
        flex: 1 1 9rem;
        width: auto;
        max-width: 100%;
    }

    .hg-solicitacoes-add-form-row .hg-agendar-sol-actions {
        width: 100%;
    }

    .hg-solicitacoes-add-form-row .hg-agendar-sol-add {
        width: 100%;
        justify-content: center;
    }
}

.hg-atendimento--thiago .hg-solicitacoes-card-head {
    justify-content: flex-start;
}

/* =============================================================================
   Tooltip hover dos cards da agenda (paridade Thiago — bg primary laranja)
   ============================================================================= */

.hg-agenda-hover-tooltip {
    position: fixed;
    z-index: 90;
    transform: translate(-50%, -100%);
    max-width: min(22rem, calc(100vw - 1.5rem));
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    background: var(--hg-primary);
    color: var(--hg-primary-foreground);
    font-size: 0.75rem;
    line-height: 1.35;
    pointer-events: none;
    box-shadow: 0 8px 20px rgb(0 0 0 / 0.18);
}

.hg-agenda-hover-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--hg-primary);
}

.hg-agenda-hover-tooltip-title {
    font-weight: 600;
}

.hg-agenda-hover-tooltip-name {
    margin-top: 0.125rem;
}

.hg-agenda-hover-tooltip-meta {
    margin-top: 0.125rem;
    opacity: 0.85;
}

.hg-agenda-hover-tooltip-hint {
    margin-top: 0.375rem;
    font-size: 0.625rem;
    opacity: 0.8;
}

/* =============================================================================
   Modal Agendar Serviço — layout Thiago
   ============================================================================= */

.hg-modal--agendar-thiago {
    max-width: 42.5rem;
    width: calc(100vw - 2rem);
    max-height: min(90vh, 52rem);
    display: flex;
    flex-direction: column;
}

.hg-modal-title--agendar {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hg-modal-body--agendar {
    flex: 1;
    min-height: 0;
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem 1.5rem;
    background: color-mix(in srgb, var(--hg-muted) 30%, transparent);
}

.hg-agendar-section-title {
    margin: 0.5rem 0 0.5rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--hg-primary);
}

.hg-agendar-section-heading {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin: 0.5rem 0 0.5rem;
}

.hg-agendar-section-heading .hg-agendar-section-title {
    margin: 0;
}

.hg-agendar-section-heading .hg-label-hint {
    color: var(--hg-primary);
}

.hg-agendar-divider {
    border: 0;
    border-top: 1px solid var(--hg-border);
    margin: 1rem 0;
}

.hg-modal--agendar-thiago .hg-label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--hg-foreground);
}

.hg-modal--agendar-thiago .hg-required {
    color: var(--hg-destructive);
}

.hg-label--with-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.hg-label-hint {
    position: relative;
    display: inline-flex;
    color: var(--hg-muted-foreground);
    cursor: help;
}

.hg-label-hint:hover,
.hg-label-hint:focus-within {
    color: var(--hg-foreground);
}

.hg-label-hint-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: help;
    line-height: 0;
}

.hg-label-hint-popover {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 0.4rem);
    z-index: 40;
    width: max-content;
    max-width: 17.5rem;
    transform: translateX(-50%);
    padding: 0.5rem 0.625rem;
    border-radius: calc(var(--hg-radius) - 2px);
    border: 1px solid var(--hg-border);
    background: var(--hg-foreground, #111);
    color: var(--hg-background, #fff);
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.35;
    text-transform: none;
    letter-spacing: normal;
    white-space: normal;
    box-shadow: 0 8px 24px rgb(0 0 0 / 0.18);
    pointer-events: none;
}

.hg-label-hint-popover::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border: 5px solid transparent;
    border-top-color: var(--hg-foreground, #111);
}

.hg-modal--agendar-thiago .hg-input,
.hg-modal--agendar-thiago .hg-select {
    background: var(--hg-card);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.hg-modal--agendar-thiago .hg-agendar-section,
.hg-modal--agendar-thiago .hg-agendar-sol-form,
.hg-modal--agendar-thiago .hg-agendar-cliente {
    min-width: 0;
    max-width: 100%;
}

.hg-field-error {
    margin: 0.25rem 0 0;
    font-size: 0.6875rem;
    color: var(--hg-destructive);
}

.hg-input.is-invalid,
.hg-input.is-invalid:focus {
    border-color: var(--hg-destructive);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--hg-destructive) 35%, transparent);
}

.hg-field--span-2 {
    grid-column: 1 / -1;
}

.hg-agendar-busca-row {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.hg-agendar-busca {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hg-agendar-busca-grid {
    display: grid;
    grid-template-columns: 30% 1fr;
    gap: 0.75rem;
    align-items: start;
}

.hg-agendar-busca-criterio,
.hg-agendar-busca-termo {
    min-width: 0;
}

.hg-agendar-busca .hg-ps-rselect,
.hg-agendar-busca .hg-select,
.hg-agendar-busca .hg-input {
    width: 100%;
    min-width: 0;
}

@media (max-width: 640px) {
    .hg-agendar-busca-grid {
        grid-template-columns: 1fr;
    }
}

.hg-agendar-busca-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.hg-agendar-busca-btn-inner {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.hg-agendar-busca-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.hg-agendar-busca-input {
    flex: 1;
    min-width: 0;
}

.hg-agendar-busca-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    flex-shrink: 0;
    white-space: nowrap;
    min-height: 2.5rem;
    padding-inline: 0.875rem;
}

.hg-agendar-busca-results {
    margin-top: 0.5rem;
    border: 1px solid var(--hg-border);
    border-radius: calc(var(--hg-radius) - 2px);
    background: var(--hg-card);
    overflow: hidden;
    max-height: 12rem;
    overflow-y: auto;
}

/* Resultado da busca: ícone do veículo + veículo em destaque, cliente embaixo. */
.hg-agendar-busca-result {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 0;
    border-bottom: 1px solid var(--hg-border);
    background: transparent;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.hg-agendar-busca-result-icon {
    display: flex;
    flex-shrink: 0;
    color: var(--hg-muted-foreground);
}

.hg-agendar-busca-result-body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.hg-agendar-busca-result-top {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--hg-foreground);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hg-agendar-busca-result-top .hg-mono {
    letter-spacing: 0.04em;
}

.hg-agendar-busca-result-sub {
    font-size: 0.72rem;
    color: var(--hg-muted-foreground);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hg-agendar-busca-result:last-child {
    border-bottom: none;
}

.hg-agendar-busca-result:hover {
    background: color-mix(in srgb, var(--hg-primary) 8%, transparent);
}

/* Estado "não achado" */
.hg-agendar-naoachado {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--hg-border);
    border-radius: calc(var(--hg-radius) - 2px);
    background: var(--hg-card);
}

.hg-agendar-naoachado-title {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--hg-foreground);
}

.hg-agendar-naoachado-sub {
    margin: 0;
    font-size: 0.72rem;
    color: var(--hg-muted-foreground);
}

.hg-agendar-cadastrar-btn {
    align-self: flex-start;
    margin-top: 0.25rem;
}

/* Estado "selecionado" */
.hg-agendar-selecionado {
    margin-top: 0.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--hg-border);
    border-radius: calc(var(--hg-radius) - 2px);
    background: var(--hg-card);
}

.hg-agendar-selecionado-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.hg-agendar-selecionado-veiculo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    min-width: 0;
}

.hg-plate-badge {
    padding: 0.1rem 0.45rem;
    border: 1px solid var(--hg-border);
    border-radius: 0.375rem;
    background: var(--hg-muted);
    font-family: ui-monospace, monospace;
    font-weight: 700;
    letter-spacing: 0.04em;
    font-size: 0.78rem;
    flex-shrink: 0;
}

.hg-agendar-trocar {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border: 0;
    background: transparent;
    color: var(--hg-muted-foreground);
    font-size: 0.75rem;
    cursor: pointer;
    flex-shrink: 0;
}

.hg-agendar-trocar:hover {
    color: var(--hg-foreground);
}

.hg-agendar-selecionado-nome {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 500;
}

.hg-agendar-selecionado-contato {
    margin: 0;
    font-size: 0.72rem;
    color: var(--hg-muted-foreground);
}

.hg-modal-footer--agendar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--hg-border);
    background: var(--hg-card);
    padding: 0.75rem 1.5rem;
}

.hg-agendar-footer-hint {
    flex: 1;
    min-width: 12rem;
    font-size: 0.6875rem;
    color: var(--hg-muted-foreground);
}

.hg-agendar-footer-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.hg-modal--agendar-thiago .hg-btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Observações do cliente — formulário sem overflow horizontal */
.hg-agendar-sol-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.25rem;
    min-width: 0;
    width: 100%;
}

.hg-agendar-sol-form--row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
}

.hg-agendar-sol-form .hg-field {
    margin: 0;
    min-width: 0;
}

.hg-agendar-sol-desc {
    flex: 1 1 12rem;
    min-width: 0;
}

.hg-agendar-sol-tipo {
    flex: 0 1 12.5rem;
    width: 12.5rem;
    max-width: 100%;
    min-width: 0;
}

.hg-agendar-sol-tipo .hg-select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.hg-agendar-sol-selects {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    min-width: 0;
}

@media (max-width: 640px) {
    .hg-agendar-sol-form--row {
        flex-direction: column;
        align-items: stretch;
    }

    .hg-agendar-sol-tipo {
        width: 100%;
        flex: 1 1 auto;
    }

    .hg-agendar-sol-selects {
        grid-template-columns: 1fr;
    }

    .hg-agendar-sol-actions {
        justify-content: stretch;
    }

    .hg-agendar-sol-add {
        width: 100%;
        justify-content: center;
    }
}

.hg-agendar-sol-selects .hg-select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.hg-agendar-sol-actions {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    flex-shrink: 0;
    padding-bottom: 0;
}

.hg-agendar-sol-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    flex-shrink: 0;
    height: 2.25rem;
    min-height: 2.25rem;
    max-height: 2.25rem;
    padding: 0 0.75rem;
    white-space: nowrap;
    line-height: 1;
    box-sizing: border-box;
    overflow: visible;
}

.hg-agendar-sol-add svg {
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    display: block;
}

.hg-agendar-anotacao {
    display: block;
    width: 100%;
    height: auto;
    min-height: 5.5rem;
    padding: 0.75rem 0.875rem;
    resize: vertical;
    line-height: 1.45;
    box-sizing: border-box;
}

.hg-agendar-sol-list {
    margin-top: 0.75rem;
    border: 1px solid var(--hg-border);
    border-radius: calc(var(--hg-radius) - 2px);
    background: var(--hg-card);
    overflow: hidden;
}

.hg-agendar-sol-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--hg-border);
    font-size: 0.875rem;
}

.hg-agendar-sol-item:last-child {
    border-bottom: none;
}

.hg-agendar-sol-item-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hg-agendar-sol-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border: 0;
    border-radius: calc(var(--hg-radius) - 4px);
    background: transparent;
    color: var(--hg-muted-foreground);
    cursor: pointer;
    flex-shrink: 0;
}

.hg-agendar-sol-remove:hover {
    background: color-mix(in srgb, var(--hg-destructive) 10%, transparent);
    color: var(--hg-destructive);
}

/* Cliente — stack limpo igual ao Thiago */
.hg-agendar-cliente {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hg-agendar-cliente .hg-field {
    margin: 0;
    width: 100%;
}

.hg-agendar-cliente-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

@media (max-width: 640px) {
    .hg-agendar-cliente-row {
        grid-template-columns: 1fr;
    }
}

.hg-field-hint--ok {
    color: color-mix(in srgb, var(--hg-primary) 70%, #166534);
}

.hg-field-hint--warn {
    color: #9a3412;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: calc(var(--hg-radius) - 2px);
    padding: 0.625rem 0.75rem;
    line-height: 1.4;
    font-weight: 500;
}

/* ── Loading overlay (espera de API / Livewire) ── */
.hg-loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2147483000 !important;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: color-mix(in srgb, var(--hg-background, #fff) 45%, rgb(0 0 0 / 0.35));
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    pointer-events: auto;
}

.hg-loading-overlay.is-visible,
html.hg-lw-busy .hg-loading-overlay--monitor {
    display: flex;
}

.hg-page.is-lw-busy {
    cursor: progress;
}

.hg-drawer-enrich-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    margin: 0.75rem 1rem 0;
    border-radius: 0.375rem;
    border: 1px solid color-mix(in srgb, var(--hg-primary, #f97316) 28%, var(--hg-border, #e5e7eb));
    background: color-mix(in srgb, var(--hg-primary, #f97316) 8%, #fff);
    color: var(--hg-foreground, #111);
    font-size: 0.8125rem;
    font-weight: 500;
}

.hg-loading-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.875rem;
    min-width: min(16rem, 100%);
    padding: 1.25rem 1.75rem;
    border-radius: var(--hg-radius, 0.5rem);
    border: 1px solid var(--hg-border, #e5e7eb);
    background: var(--hg-card, #fff);
    box-shadow: 0 12px 40px rgb(0 0 0 / 0.16);
    text-align: center;
}

.hg-loading-spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid color-mix(in srgb, var(--hg-primary, #f97316) 22%, transparent);
    border-top-color: var(--hg-primary, #f97316);
    border-radius: 50%;
    animation: hg-loading-spin 0.7s linear infinite;
}

.hg-loading-spinner--sm {
    width: 1rem;
    height: 1rem;
    border-width: 2px;
    flex-shrink: 0;
}

.hg-solicitacoes-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.hg-loading-text {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.35;
    color: var(--hg-foreground, #111);
}

@keyframes hg-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hg-loading-spinner {
        animation: none;
        border-top-color: transparent;
        border-right-color: var(--hg-primary, #f97316);
    }
}

/* ── Pré-visualização de template do WhatsApp (drawer de Campanhas) ───────── */

.hg-tpl-preview {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    background: #0b141a;
    border-radius: 0.625rem;
    padding: 0.875rem;
}

.hg-tpl-preview-avatar {
    flex: 0 0 auto;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgb(255 255 255 / 0.08);
    color: #25d366;
}

.hg-tpl-preview-bubble {
    max-width: 26rem;
    background: #005c4b;
    color: #e9edef;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    box-shadow: 0 1px 1px rgb(0 0 0 / 0.2);
}

.hg-tpl-preview-header {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.hg-tpl-preview-body code {
    background: rgb(0 0 0 / 0.25);
    border-radius: 0.25rem;
    padding: 0 0.25rem;
    font-size: 0.75rem;
}

.hg-tpl-preview-footer {
    margin-top: 0.375rem;
    font-size: 0.6875rem;
    color: rgb(233 237 239 / 0.6);
}

/* Variável do template: precisa ficar óbvio que não é texto fixo. */
.hg-tpl-var {
    background: rgb(37 211 102 / 0.18);
    border-bottom: 1px dashed rgb(37 211 102 / 0.7);
    border-radius: 0.1875rem;
    padding: 0 0.125rem;
}

.hg-tpl-vars {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.hg-tpl-vars-title {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--hg-muted-foreground);
}

.hg-tpl-vars-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    background: var(--hg-muted, #f4f4f5);
    border-radius: 0.25rem;
    padding: 0.125rem 0.375rem;
}

.hg-tpl-vars-item code {
    font-size: 0.6875rem;
    color: var(--hg-muted-foreground);
}

/* Menu de ações que precisa escapar de um container com overflow (ex.: a tabela
   de Campanhas, onde .hg-table-scroll usa overflow-x:auto e acaba cortando).
   A posição é calculada por JS a partir do botão — ver campaigns-list.blade.php. */
.hg-dropdown-menu--floating {
    position: fixed;
    right: auto;
    z-index: 50;
}

/* Embed (hypergestor.app iframe): sem sidebar/topbar */
.hg-app--embed {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--hg-background);
}

.hg-app--embed .hg-main--embed {
    flex: 1;
    min-height: 0;
    width: 100%;
}

/* —— Oracle SQL Client (rota-teste) —— */
.hg-db {
    --hg-db-bg: #e8eaed;
    --hg-db-panel: #f7f8fa;
    --hg-db-editor: #1e2430;
    --hg-db-editor-fg: #d7dde8;
    --hg-db-border: #c4c9d2;
    --hg-db-accent: #1b6ef3;
    --hg-db-run: #1f8a4c;
    --hg-db-run-hover: #187240;
    --hg-db-null: #8b5cf6;
    --hg-db-row-alt: #f0f3f7;
    --hg-db-row-hover: #e4eefc;
    --hg-db-selected: #d4e4fc;
    --hg-db-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    height: calc(100vh - 6.5rem);
    min-height: 28rem;
    max-width: none;
    padding-bottom: 0.75rem;
}

.hg-db-statusbar {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
    padding: 0.45rem 0.75rem;
    background: linear-gradient(180deg, #fbfbfc 0%, #eef1f5 100%);
    border: 1px solid var(--hg-db-border);
    border-radius: 0.4rem;
    font-size: 0.75rem;
}

.hg-db-statusbar-conn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
}

.hg-db-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #94a3b8;
    box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.25);
}

.hg-db-dot.is-ok {
    background: #16a34a;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.25);
}

.hg-db-dot.is-err {
    background: #dc2626;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.25);
}

.hg-db-statusbar-meta {
    color: #475569;
    font-family: var(--hg-db-mono);
    font-size: 0.72rem;
}

.hg-db-statusbar-meta strong {
    color: #0f172a;
    font-weight: 600;
}

.hg-db-statusbar-actions {
    margin-left: auto;
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.hg-db-btn {
    appearance: none;
    border: 1px solid var(--hg-db-border);
    background: #fff;
    color: #1e293b;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.65rem;
    border-radius: 0.3rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    line-height: 1.2;
}

.hg-db-btn:hover {
    background: #f1f5f9;
}

.hg-db-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.hg-db-btn-run {
    background: var(--hg-db-run);
    border-color: var(--hg-db-run);
    color: #fff;
}

.hg-db-btn-run:hover {
    background: var(--hg-db-run-hover);
}

.hg-db-btn-ghost {
    background: transparent;
}

.hg-db-btn-clear {
    background: #fff;
    border-color: #f1b4b4;
    color: #b91c1c;
}

.hg-db-btn-clear:hover {
    background: #fef2f2;
    border-color: #ef4444;
}

.hg-db-btn-sm {
    padding: 0.2rem 0.5rem;
    font-size: 0.68rem;
}

.hg-db-workspace {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
    flex: 1 1 0;
    min-height: 0;
    height: 100%;
    border: 1px solid var(--hg-db-border);
    border-radius: 0.4rem;
    overflow: hidden;
    background: var(--hg-db-panel);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.hg-db-sidebar {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    background: #f3f5f8;
    border-right: 1px solid var(--hg-db-border);
}

.hg-db-sidebar-head {
    flex-shrink: 0;
    padding: 0.55rem 0.65rem 0.45rem;
    border-bottom: 1px solid var(--hg-db-border);
    background: #ebedf1;
}

.hg-db-sidebar-title {
    margin: 0;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.hg-db-schema {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #0f172a;
    font-family: var(--hg-db-mono);
}

.hg-db-schema .hg-db-object-icon {
    flex-shrink: 0;
    width: 0.95rem;
    height: 0.95rem;
    max-width: 0.95rem;
    max-height: 0.95rem;
    color: #64748b;
    display: block;
}

.hg-db-schema-count {
    margin-left: auto;
    font-size: 0.68rem;
    font-weight: 600;
    color: #64748b;
    background: #fff;
    border: 1px solid var(--hg-db-border);
    border-radius: 999px;
    padding: 0.05rem 0.4rem;
}

.hg-db-search {
    flex-shrink: 0;
    padding: 0.45rem 0.55rem;
    border-bottom: 1px solid var(--hg-db-border);
}

.hg-db-search-hint {
    margin: 0.35rem 0 0;
    font-size: 0.65rem;
    color: #64748b;
    line-height: 1.3;
}

.hg-db-object-list.is-loading {
    opacity: 0.55;
    pointer-events: none;
}

.hg-db-object {
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 0.22rem 0.65rem 0.22rem 0.75rem;
    font-size: 0.72rem;
    font-family: var(--hg-db-mono);
    color: #1e293b;
    cursor: pointer;
    border-left: 2px solid transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hg-db-object:hover {
    background: var(--hg-db-row-hover);
}

.hg-db-object.is-active {
    background: var(--hg-db-selected);
    border-left-color: var(--hg-db-accent);
    font-weight: 600;
}

.hg-db-search input {
    width: 100%;
    border: 1px solid var(--hg-db-border);
    border-radius: 0.3rem;
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
    background: #fff;
    font-family: var(--hg-db-mono);
}

.hg-db-search input:focus {
    outline: 2px solid rgba(27, 110, 243, 0.25);
    border-color: var(--hg-db-accent);
}

.hg-db-object-list {
    flex: 1 1 0;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 0;
    padding: 0.25rem 0;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.hg-db-object-empty {
    padding: 1rem 0.75rem;
    font-size: 0.75rem;
    color: #64748b;
}

.hg-db-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    background: #fff;
}

.hg-db-toolbar {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.65rem;
    border-bottom: 1px solid var(--hg-db-border);
    background: linear-gradient(180deg, #fafbfc 0%, #eef1f4 100%);
}

.hg-db-toolbar-hint {
    font-size: 0.68rem;
    color: #64748b;
}

.hg-db-toolbar-hint kbd {
    font-family: var(--hg-db-mono);
    font-size: 0.65rem;
    border: 1px solid var(--hg-db-border);
    border-bottom-width: 2px;
    border-radius: 0.2rem;
    padding: 0.05rem 0.3rem;
    background: #fff;
}

.hg-db-editor-panel {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid var(--hg-db-border);
    background: #21222c;
}

.hg-db-editor-chrome {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.35rem 0.65rem;
    background: linear-gradient(180deg, #2b2d3a 0%, #232530 100%);
    border-bottom: 1px solid #44475a;
    color: #bd93f9;
}

.hg-db-editor-label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8be9fd;
    font-family: var(--hg-db-mono);
}

.hg-db-editor-hint {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.65rem;
    color: #6272a4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hg-db-editor-chrome .hg-db-btn-ghost {
    color: #f8f8f2;
    border-color: #44475a;
    background: transparent;
}

.hg-db-editor-chrome .hg-db-btn-ghost:hover {
    background: #44475a;
    color: #fff;
}

.hg-db-editor-wrap {
    position: relative;
    height: 22rem;
    min-height: 14rem;
    max-height: 70vh;
    resize: vertical;
    overflow: auto;
    background: #282a36; /* Dracula bg */
}

.hg-db-editor-wrap .hg-db-editor {
    display: none;
}

.hg-db-editor-wrap .CodeMirror {
    height: 100% !important;
    font-family: var(--hg-db-mono);
    font-size: 0.875rem;
    line-height: 1.55;
    background: #282a36;
    color: #f8f8f2;
    border: 0;
}

.hg-db-editor-wrap .CodeMirror-scroll {
    min-height: 100%;
}

.hg-db-editor-wrap .CodeMirror-gutters {
    background: #21222c;
    border-right: 1px solid #44475a;
}

.hg-db-editor-wrap .CodeMirror-linenumber {
    color: #6272a4;
}

.hg-db-editor-wrap .CodeMirror-cursor {
    border-left-color: #f8f8f2;
}

.hg-db-editor-wrap .CodeMirror-selected {
    background: #44475a !important;
}

.hg-db-editor-wrap .CodeMirror-focused .CodeMirror-selected {
    background: #44475a !important;
}

.hg-db-editor-wrap .CodeMirror-activeline-background {
    background: rgba(68, 71, 90, 0.35);
}

.hg-db-editor-wrap .CodeMirror-placeholder {
    color: #6272a4 !important;
    font-style: italic;
}

.hg-db-results {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
}

.hg-db-results-bar {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.85rem;
    padding: 0.35rem 0.65rem;
    border-bottom: 1px solid var(--hg-db-border);
    background: #f5f7fa;
    font-size: 0.72rem;
    color: #475569;
}

.hg-db-results-bar strong {
    color: #0f172a;
}

.hg-db-tab {
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    color: var(--hg-db-accent);
    border-bottom: 2px solid var(--hg-db-accent);
    padding-bottom: 0.15rem;
}

.hg-db-grid-wrap {
    flex: 1 1 0;
    overflow: auto;
    min-height: 0;
    position: relative;
    overscroll-behavior: contain;
}

.hg-db-grid {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-family: var(--hg-db-mono);
    font-size: 0.72rem;
}

.hg-db-grid th,
.hg-db-grid td {
    padding: 0.22rem 0.55rem;
    border-right: 1px solid #dce1e8;
    border-bottom: 1px solid #dce1e8;
    white-space: nowrap;
    vertical-align: top;
}

.hg-db-grid thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #e9edf3;
    color: #334155;
    font-weight: 700;
    text-align: left;
    box-shadow: inset 0 -1px 0 var(--hg-db-border);
}

.hg-db-grid .hg-db-rownum {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #eef1f5;
    color: #64748b;
    text-align: right;
    min-width: 2.5rem;
    border-right: 1px solid var(--hg-db-border);
}

.hg-db-grid thead .hg-db-rownum {
    z-index: 3;
    background: #e0e5ec;
}

.hg-db-grid tbody tr:nth-child(even) td {
    background: var(--hg-db-row-alt);
}

.hg-db-grid tbody tr:nth-child(even) .hg-db-rownum {
    background: #e6eaef;
}

.hg-db-grid tbody tr:hover td {
    background: var(--hg-db-row-hover);
}

.hg-db-grid tbody tr:hover .hg-db-rownum {
    background: #d9e6f8;
}

.hg-db-null {
    color: var(--hg-db-null);
    font-style: italic;
    opacity: 0.85;
}

.hg-db-msg {
    padding: 0.85rem 1rem;
    font-size: 0.8125rem;
    font-family: var(--hg-db-mono);
}

.hg-db-msg-error {
    color: #b91c1c;
    background: #fef2f2;
    border-top: 1px solid #fecaca;
    white-space: pre-wrap;
}

.hg-db-msg-empty {
    color: #64748b;
}

.hg-db-diag {
    border: 1px solid var(--hg-db-border);
    border-radius: 0.4rem;
    background: #fff;
    overflow: hidden;
}

.hg-db-diag-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 0;
    background: #f5f7fa;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
    color: #334155;
    text-align: left;
}

.hg-db-diag-toggle:hover {
    background: #eef1f5;
}

.hg-db-diag-body {
    padding: 0.75rem 1rem 1rem;
    border-top: 1px solid var(--hg-db-border);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.hg-db-diag-section h3 {
    margin: 0 0 0.45rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.hg-db-diag-section dl {
    margin: 0;
    display: grid;
    grid-template-columns: 6.5rem 1fr;
    gap: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.hg-db-diag-section dt {
    color: #64748b;
}

.hg-db-diag-section dd {
    margin: 0;
    font-family: var(--hg-db-mono);
    word-break: break-word;
}

.hg-db-checks {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.hg-db-checks li {
    display: flex;
    gap: 0.45rem;
    align-items: flex-start;
    font-size: 0.72rem;
}

.hg-db-cmds {
    flex-shrink: 0;
    border: 1px solid var(--hg-db-border);
    border-radius: 0.4rem;
    background: #fff;
    overflow: hidden;
}

.hg-db-cmds-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #f5f7fa;
    border-bottom: 1px solid var(--hg-db-border);
}

.hg-db-cmds-head strong {
    font-size: 0.75rem;
    font-weight: 700;
    color: #334155;
}

.hg-db-cmds-head span {
    font-size: 0.72rem;
    color: #64748b;
}

.hg-db-cmds-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0.6rem 0.75rem;
}

.hg-db-cmd-output {
    margin: 0;
    padding: 0.55rem 0.75rem 0.7rem;
    border-top: 1px solid var(--hg-db-border);
    background: #1e2430;
    color: #d7dde8;
    font-family: var(--hg-db-mono);
    font-size: 0.72rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.hg-db-cmd-output.is-ok {
    border-top-color: #86efac;
}

.hg-db-cmd-output.is-err {
    border-top-color: #fca5a5;
}

.hg-db-cmds-list {
    display: flex;
    flex-direction: column;
}

.hg-db-cmd {
    display: grid;
    grid-template-columns: 9.5rem 1fr auto;
    gap: 0.5rem 0.75rem;
    align-items: center;
    padding: 0.45rem 0.75rem;
    border-top: 1px solid #eef1f5;
}

.hg-db-cmd:first-child {
    border-top: 0;
}

.hg-db-cmd-meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.hg-db-cmd-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #0f172a;
}

.hg-db-cmd-hint {
    font-size: 0.68rem;
    color: #64748b;
    line-height: 1.3;
}

.hg-db-cmd-code {
    display: block;
    min-width: 0;
    margin: 0;
    padding: 0.4rem 0.55rem;
    border-radius: 0.3rem;
    background: #1e2430;
    color: #d7dde8;
    font-family: var(--hg-db-mono);
    font-size: 0.72rem;
    line-height: 1.4;
    overflow-x: auto;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .hg-db-cmd {
        grid-template-columns: 1fr auto;
    }

    .hg-db-cmd-meta {
        grid-column: 1 / -1;
    }
}

.hg-db-loading {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
    z-index: 5;
}

@media (max-width: 900px) {
    .hg-db {
        height: auto;
        min-height: 0;
    }

    .hg-db-workspace {
        grid-template-columns: 1fr;
        grid-template-rows: 16rem minmax(24rem, 60vh);
        height: auto;
        min-height: 0;
        flex: none;
    }

    .hg-db-sidebar {
        max-height: 16rem;
        height: 16rem;
        border-right: 0;
        border-bottom: 1px solid var(--hg-db-border);
    }
}

/* =============================================================================
   Conversas (aba de Eventos)
   Restaurado em 18/08/2026. Estas 105 regras entraram em 49569e0 e foram
   perdidas no merge a1cbaff ("Merge branch 'main' into homolog"), que resolveu o
   conflito deste arquivo pegando um lado só. Produção seguia num commit anterior
   ao merge, então a aba aparecia estilizada lá e crua no local — o local não
   estava atrasado, a main regrediu.
   Mesmo merge que quebrou o montarPayload do LinxAgendaService (ver 450e28d).
   ============================================================================= */

.hg-conv-toptabs { display: inline-flex; gap: 2px; padding: 4px; background: #f1f5f9; border-radius: 10px; margin-bottom: 4px; }
.hg-conv-toptabs-btn { border: 0; background: transparent; padding: 7px 16px; border-radius: 8px; font-size: 13px; font-weight: 500; color: #64748b; cursor: pointer; }
.hg-conv-toptabs-btn.is-active { background: #fff; color: #0f172a; box-shadow: 0 1px 2px rgba(15,23,42,.08); }

.hg-conv-subtabs { display: flex; gap: 2px; padding: 8px 12px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
.hg-conv-subtabs-btn { flex: 1; border: 0; background: transparent; padding: 7px 12px; border-radius: 8px; font-size: 13px; font-weight: 500; color: #64748b; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.hg-conv-subtabs-btn:hover:not(.is-active) { background: color-mix(in srgb, var(--hg-primary) 12%, transparent); color: var(--hg-primary); }
.hg-conv-subtabs-btn.is-active { background: #fff; color: #0f172a; box-shadow: 0 1px 2px rgba(15,23,42,.08); }

.hg-conv-wrap { display: flex; flex-direction: column; gap: 12px; }

.hg-conv-kpis { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; overflow: visible; padding-top: 0.375rem; }
@media (max-width: 1200px) { .hg-conv-kpis { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.hg-conv-kpi { position: relative; text-align: left; border: 1px solid #e2e8f0; background: #fff; border-radius: 10px; padding: 12px 14px; cursor: pointer; transition: background-color .15s ease, border-color .15s ease; }
.hg-conv-kpi:hover { background: #f8fafc; }
.hg-conv-kpi.is-active { border-color: var(--hg-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hg-primary) 15%, transparent); }
.hg-conv-kpi-value { font-size: 20px; font-weight: 700; line-height: 1.2; }
.hg-conv-kpi-label { margin-top: 2px; font-size: 12px; color: #64748b; }
.hg-conv-filterbar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; border: 1px solid #e2e8f0; background: #fff; border-radius: 10px; padding: 12px 14px; }
.hg-conv-search-field { flex: 1; min-width: 220px; }

.hg-conv-board { display: flex; height: 640px; overflow: hidden; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; }

.hg-conv-list { display: flex; flex-direction: column; width: 330px; flex-shrink: 0; border-right: 1px solid #e2e8f0; }
.hg-conv-list-head { padding: 8px 12px; border-bottom: 1px solid #e2e8f0; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #64748b; }
.hg-conv-list-body { flex: 1; overflow-y: auto; }
.hg-conv-list-empty { padding: 40px 16px; text-align: center; font-size: 13px; color: #64748b; }
.hg-conv-list-hint { margin: 16px 12px 0; padding: 10px 12px; border-radius: 8px; background: #fff7ed; border: 1px solid #fed7aa; font-size: 13px; color: #9a3412; line-height: 1.45; }
.hg-conv-list-hint-link { display: inline; padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: #c2410c; text-decoration: underline; cursor: pointer; }
.hg-conv-list-hint-link:hover { color: #9a3412; }

.hg-conv-item { display: flex; align-items: flex-start; width: 100%; gap: 16px; padding: 12px 14px; border: 0; border-bottom: 1px solid #f1f5f9; background: transparent; text-align: left; cursor: pointer; overflow: visible; }
.hg-conv-item:hover { background: #f8fafc; }
.hg-conv-item.is-selected {
    background: color-mix(in srgb, var(--hg-primary) 14%, white);
    box-shadow: inset 3px 0 0 var(--hg-primary);
}
.hg-conv-item.is-selected .hg-conv-item-nome { color: var(--hg-primary); }
.hg-conv-item.is-mine { box-shadow: inset 3px 0 0 var(--hg-primary); }
.hg-conv-item-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; padding-top: 1px; }
.hg-conv-item-top { display: flex; align-items: center; gap: 8px; min-height: 18px; }
.hg-conv-item-nome { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; line-height: 1.3; color: #0f172a; }
.hg-conv-item.has-new .hg-conv-item-nome { font-weight: 700; }
.hg-conv-item-hora { flex-shrink: 0; font-size: 11px; line-height: 1.3; color: #94a3b8; }
.hg-conv-item-preview-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hg-conv-item-preview { margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 1.35; color: #64748b; }
.hg-conv-item-meta { margin-top: 2px; display: flex; align-items: center; gap: 8px; min-height: 20px; }
.hg-conv-item-resp { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; line-height: 1.2; color: #94a3b8; }
.hg-conv-avatar-wrap { position: relative; flex-shrink: 0; width: 36px; height: 36px; margin-top: 1px; margin-right: 2px; }
.hg-conv-canal { position: absolute; right: -3px; bottom: -3px; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 999px; background: #fff; box-shadow: 0 0 0 1.5px #fff; }
.hg-conv-canal-icon { display: block; width: 14px; height: 14px; }
.hg-conv-canal-icon.is-whatsapp { color: #22c55e; }
.hg-conv-canal-icon.is-email { color: #0ea5e9; }

.hg-conv-avatar { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 999px; background: color-mix(in srgb, var(--hg-primary) 12%, white); color: var(--hg-primary); font-size: 12px; font-weight: 700; line-height: 1; }
.hg-conv-avatar--lg { width: 44px; height: 44px; font-size: 14px; }

.hg-conv-badge { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 999px; font-size: 10px; font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.hg-conv-badge.is-nova { background: color-mix(in srgb, var(--hg-primary) 10%, white); color: var(--hg-primary); border-color: color-mix(in srgb, var(--hg-primary) 30%, white); }
.hg-conv-badge.is-em-atendimento { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.hg-conv-badge.is-aguardando-cliente { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.hg-conv-badge.is-encerrada { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; }
.hg-conv-badge.is-transferida-vendas { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.hg-conv-badge.is-transferida-ura { background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe; }

.hg-conv-unread { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #25d366; color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }
.hg-conv-unread--new { background: #25d366; }

/* Histórico de atendimentos anteriores do cliente (jornadas agrupadas) */
.hg-conv-hist { display: inline-flex; align-items: center; gap: 2px; font-size: 10px; font-weight: 600; color: #92836b; background: #f3efe7; padding: 1px 6px; border-radius: 999px; }
.hg-conv-hist-panel { margin: 0 0 10px; border: 1px solid #e6ded2; border-radius: 8px; background: #faf7f2; overflow: hidden; }
.hg-conv-hist-panel > summary { cursor: pointer; list-style: none; padding: 9px 14px; font-size: 12.5px; font-weight: 600; color: #5c534a; user-select: none; }
.hg-conv-hist-panel > summary::-webkit-details-marker { display: none; }
.hg-conv-hist-panel[open] > summary { border-bottom: 1px solid #e6ded2; }
.hg-conv-hist-list { list-style: none; margin: 0; padding: 4px 0; display: grid; }
.hg-conv-hist-list li { display: flex; align-items: center; gap: 10px; padding: 7px 14px; font-size: 13px; }
.hg-conv-hist-list li + li { border-top: 1px solid #efe8dd; }
.hg-conv-hist-assunto { color: #211b15; flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hg-conv-hist-data { color: #92836b; font-size: 11.5px; flex: none; }

.hg-conv-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #94a3b8; }
.hg-conv-empty p { font-size: 13px; margin: 0; }

.hg-conv-main { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.hg-conv-embed-wrap { flex: 1; min-height: 0; background: #f8fafc; }
.hg-conv-embed { display: block; width: 100%; height: 100%; border: 0; }
.hg-conv-embed-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 16px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    flex-shrink: 0;
}
.hg-conv-embed-toolbar-hint {
    font-size: 12px;
    color: #64748b;
}
.hg-conv-fullscreen-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.hg-conv-head { padding: 12px 16px; border-bottom: 1px solid #e2e8f0; }
.hg-conv-head-row { display: flex; align-items: flex-start; gap: 10px; }
.hg-conv-head-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hg-conv-head-nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; }
.hg-conv-head-contato { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: #64748b; }
.hg-conv-head-meta { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; padding-top: 2px; }
.hg-conv-head-equipe { font-size: 12px; color: #64748b; text-align: right; white-space: nowrap; }
.hg-conv-head-actions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }

.hg-conv-innertabs { display: flex; gap: 4px; padding: 8px 16px 0; border-bottom: 1px solid #e2e8f0; }
.hg-conv-innertab { border: 0; border-bottom: 2px solid transparent; background: transparent; margin-bottom: -1px; padding: 8px 10px; font-size: 12px; font-weight: 500; color: #64748b; cursor: pointer; }
.hg-conv-innertab.is-active { border-bottom-color: var(--hg-primary); color: #0f172a; }
.hg-conv-innertab-count { margin-left: 6px; border-radius: 999px; background: #f1f5f9; padding: 1px 6px; font-size: 10px; color: #64748b; }

.hg-conv-timeline { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.hg-conv-timeline-empty { padding: 40px 0; text-align: center; font-size: 13px; color: #94a3b8; }

.hg-conv-msg-sistema-wrap { display: flex; justify-content: center; }
.hg-conv-msg-sistema { border: 1px solid #e2e8f0; background: #f8fafc; border-radius: 999px; padding: 4px 12px; font-size: 11px; color: #64748b; }

.hg-conv-msg-nota { margin: 0 auto; width: 100%; max-width: 85%; border: 1px solid #fde68a; background: #fffbeb; border-radius: 10px; padding: 8px 12px; }
.hg-conv-msg-nota-head { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: #b45309; }

.hg-conv-msg-row { display: flex; }
.hg-conv-msg-row.is-mine { justify-content: flex-end; }
.hg-conv-msg-row.is-other { justify-content: flex-start; }
.hg-conv-msg { max-width: 75%; border-radius: 10px; border: 1px solid #e2e8f0; padding: 8px 12px; font-size: 13px; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.hg-conv-msg.is-mine { background: color-mix(in srgb, var(--hg-primary) 8%, white); border-color: color-mix(in srgb, var(--hg-primary) 25%, white); }
.hg-conv-msg.is-other { background: #f8fafc; }
.hg-conv-msg-autor { font-size: 11px; font-weight: 600; color: #64748b; }
.hg-conv-msg-text { margin-top: 2px; white-space: pre-wrap; }
.hg-conv-msg-time { margin-top: 2px; text-align: right; font-size: 10px; color: #94a3b8; }

.hg-conv-composer { border-top: 1px solid #e2e8f0; padding: 12px 16px; }
.hg-conv-composer-lock { display: flex; align-items: start; gap: 8px; margin-bottom: 8px; border-radius: 8px; border: 1px solid #e2e8f0; background: #f8fafc; padding: 8px 12px; font-size: 12px; color: #64748b; }
.hg-conv-composer-lock svg { margin-top: 2px; flex-shrink: 0; }
.hg-conv-composer-mode { margin-bottom: 8px; font-size: 11px; color: #64748b; }
.hg-conv-composer-mode-nota { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: #b45309; }
.hg-conv-composer-row { display: flex; align-items: end; gap: 8px; }
.hg-conv-composer-row .hg-ps-rselect { flex: 1; min-width: 0; }
.hg-conv-composer-textarea { flex: 1; min-height: 3.5rem; }

.hg-conv-context { display: flex; flex-direction: column; gap: 12px; width: 320px; flex-shrink: 0; overflow-y: auto; border-left: 1px solid #e2e8f0; background: #f8fafc; padding: 14px; }
.hg-conv-context-head { display: flex; align-items: center; gap: 10px; }
.hg-conv-context-nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
.hg-conv-context-filial { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: #64748b; }

.hg-conv-context-avulso { border: 1px solid #fde68a; background: #fffbeb; border-radius: 10px; padding: 10px 12px; }
.hg-conv-context-avulso-head { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #b45309; }
.hg-conv-context-avulso p { margin: 6px 0 0; font-size: 11px; color: #92702a; }
.hg-conv-nova-duplicata-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.hg-conv-nova-duplicata { margin: 12px 0; }
.hg-conv-editar-alerta { margin: 0 0 12px; }

.hg-conv-block { border: 1px solid #e2e8f0; background: #fff; border-radius: 10px; padding: 12px; }
.hg-conv-block-title { margin-bottom: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #64748b; }
.hg-conv-kv { display: grid; grid-template-columns: 100px 1fr; gap: 8px; padding: 3px 0; font-size: 12px; }
.hg-conv-kv span { color: #64748b; }
.hg-conv-kv strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; color: #0f172a; }
.hg-conv-vehicle-line { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 4px; }

.hg-conv-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.hg-conv-tag { display: inline-flex; align-items: center; border-radius: 999px; background: #f1f5f9; padding: 2px 10px; font-size: 11px; color: #334155; }
.hg-conv-tags-empty { font-size: 12px; color: #94a3b8; }
.hg-conv-tag-add { margin-top: 8px; display: flex; gap: 6px; }
.hg-conv-input-sm { height: 30px; font-size: 12px; }
.hg-conv-tag-toggle { margin-top: 8px; display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; padding: 2px; font-size: 12px; color: var(--hg-primary); cursor: pointer; }

.hg-conv-quickactions { display: grid; gap: 6px; }
.hg-conv-quickactions .hg-btn { justify-content: flex-start; }

.hg-conv-hint { margin: 10px 0 0; font-size: 11px; color: #64748b; }
.hg-conv-modal--wide { max-width: 48rem; }
.hg-conv-modal--md { max-width: 32rem; }
.hg-conv-input-muted { background: #f1f5f9; color: #334155; cursor: default; }
.hg-conv-form-stack { display: flex; flex-direction: column; gap: 16px; margin-top: 14px; }
.hg-conv-modal-subtitle { margin: 2px 0 0; font-size: 12px; color: #64748b; font-weight: 400; }

.hg-conv-progress { display: flex; gap: 8px; margin-bottom: 14px; }
.hg-conv-progress-seg { flex: 1; height: 6px; border-radius: 999px; background: #e2e8f0; }
.hg-conv-progress-seg.is-active { background: var(--hg-primary); }

.hg-conv-nova-resultados { margin-top: 14px; max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.hg-conv-nova-empty { border: 1px dashed #cbd5e1; border-radius: 10px; padding: 32px 16px; text-align: center; font-size: 13px; color: #64748b; }
.hg-conv-nova-empty-action { margin-top: 12px; display: flex; justify-content: center; }

.hg-conv-nova-item { display: flex; align-items: start; gap: 10px; width: 100%; text-align: left; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 12px; background: #fff; cursor: pointer; }
.hg-conv-nova-item:hover { background: #f8fafc; }
.hg-conv-nova-item.is-selected { border-color: var(--hg-primary); background: color-mix(in srgb, var(--hg-primary) 6%, white); }
.hg-conv-nova-item-body { min-width: 0; flex: 1; }
.hg-conv-nova-item-top { display: flex; align-items: center; gap: 8px; }
.hg-conv-nova-item-nome { font-size: 13px; font-weight: 600; }
.hg-conv-nova-item-top svg { color: var(--hg-primary); flex-shrink: 0; }
.hg-conv-nova-item-grid { margin-top: 3px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; font-size: 12px; color: #64748b; }
.hg-conv-nova-item-cidade { margin-top: 3px; display: flex; align-items: center; gap: 4px; font-size: 11px; color: #94a3b8; }

.hg-conv-nova-confirm-grid { margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hg-conv-nova-atendimento { font-size: 12px; color: #64748b; margin-top: 2px; }
.hg-conv-nova-aberta-row { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; padding: 8px 10px; font-size: 12px; }

/* ==========================================================================
   Aprovações (apr-*) e Configurações (cfg-*)
   ========================================================================== */

.hg-app .hg-main .fi-page:has(.apr-page),
.hg-app--v2 .hg-main .fi-page:has(.apr-page) {
    padding: 0;
    background: #f8fafc;
}

.hg-app .hg-main .fi-page:has(.apr-page) .fi-section,
.hg-app--v2 .hg-main .fi-page:has(.apr-page) .fi-section,
.hg-app .hg-main .fi-page:has(.apr-page) .fi-page-content,
.hg-app--v2 .hg-main .fi-page:has(.apr-page) .fi-page-content {
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.hg-app .hg-main .fi-page:has(.cfg-page),
.hg-app--v2 .hg-main .fi-page:has(.cfg-page) {
    padding: 0;
    background: #fff;
}

.hg-app .hg-main .fi-page:has(.cfg-page) .fi-section,
.hg-app--v2 .hg-main .fi-page:has(.cfg-page) .fi-section,
.hg-app .hg-main .fi-page:has(.cfg-page) .fi-ta-ctn,
.hg-app--v2 .hg-main .fi-page:has(.cfg-page) .fi-ta-ctn,
.hg-app .hg-main .fi-page:has(.cfg-page) .fi-page-content,
.hg-app--v2 .hg-main .fi-page:has(.cfg-page) .fi-page-content {
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.hg-app .fi-page:has(.apr-page) .fi-header,
.hg-app--v2 .fi-page:has(.apr-page) .fi-header,
.hg-app .fi-page:has(.apr-page) .fi-page-header,
.hg-app--v2 .fi-page:has(.apr-page) .fi-page-header,
.hg-app .fi-page:has(.cfg-page) .fi-header,
.hg-app--v2 .fi-page:has(.cfg-page) .fi-header,
.hg-app .fi-page:has(.cfg-page) .fi-page-header,
.hg-app--v2 .fi-page:has(.cfg-page) .fi-page-header {
    display: none;
}

.apr-page,
.cfg-page {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: #0f172a;
    -webkit-font-smoothing: antialiased;
}

.apr-container,
.cfg-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.apr-header,
.cfg-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.apr-header__left,
.cfg-header__left {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
}

.apr-header__icon,
.cfg-header__icon {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    background: rgba(244, 129, 32, 0.12);
    color: #F48120;
    flex-shrink: 0;
}

.apr-header__title,
.cfg-header__title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.apr-header__subtitle,
.cfg-header__subtitle {
    margin: 0.25rem 0 0;
    max-width: 48rem;
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.45;
}

.apr-header__you {
    margin: 0;
    border: 1px solid #e2e8f0;
    background: #f1f5f9;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    color: #64748b;
}

.apr-kpi__label svg {
    color: #F48120;
}

.apr-btn svg {
    width: 0.875rem;
    height: 0.875rem;
    margin-right: 0.35rem;
    flex-shrink: 0;
}

.apr-kpis {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 1280px) {
    .apr-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.apr-kpi {
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 1px 2px rgb(15 23 42 / 4%);
}

.apr-kpi--destaque { border-color: rgba(244, 129, 32, 0.4); }

.apr-kpi__label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.apr-kpi__value {
    margin: 0.25rem 0 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.apr-kpi--destaque .apr-kpi__value { color: #F48120; }

.apr-card,
.cfg-card {
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem 1.25rem;
    box-shadow: 0 1px 2px rgb(15 23 42 / 4%);
}

.apr-card__head,
.cfg-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.apr-card__title,
.cfg-card__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.apr-page .apr-card__title {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #0f172a;
}

.apr-card__desc,
.cfg-card__desc {
    margin: 0.2rem 0 0;
    font-size: 0.8125rem;
    color: #64748b;
}

.apr-card__actions,
.cfg-card__actions,
.cfg-header__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.apr-search,
.cfg-search {
    position: relative;
}

.apr-search svg,
.cfg-search svg {
    position: absolute;
    left: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.apr-search input,
.cfg-search input,
.apr-select,
.cfg-select,
.cfg-input,
.cfg-textarea,
.apr-textarea {
    border: 1px solid var(--hg-input, #e2e8f0);
    border-radius: 0.5rem;
    background: var(--hg-card, #fff);
    font: inherit;
    color: var(--hg-foreground, #0f172a);
}

.apr-select:focus,
.cfg-select:focus {
    outline: none;
    border-color: var(--hg-primary, #F48120);
    box-shadow: 0 0 0 1px var(--hg-primary, #F48120);
}

.apr-search input,
.cfg-search input {
    height: 2.25rem;
    padding: 0 0.75rem 0 2rem;
    min-width: 16rem;
    font-size: 0.8125rem;
}

.apr-select,
.cfg-select {
    height: 2.25rem;
    padding: 0 0.75rem;
    font-size: 0.8125rem;
    min-width: 12rem;
}

.cfg-input,
.cfg-textarea,
.apr-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.cfg-input--color {
    height: 2.5rem;
    padding: 0.25rem;
    max-width: 6rem;
}

.apr-tabs,
.cfg-tabs,
.cfg-subtabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.35rem;
}

.cfg-subtabs { margin-bottom: 0.25rem; }

.apr-tab,
.cfg-tab,
.cfg-subtab {
    border: 0;
    background: transparent;
    border-radius: 0.5rem;
    padding: 0.45rem 0.75rem;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
}

.apr-tab:hover,
.cfg-tab:hover,
.cfg-subtab:hover { background: #f1f5f9; color: #0f172a; }

.apr-tab.is-active,
.cfg-tab.is-active,
.cfg-subtab.is-active {
    background: #0f172a;
    color: #fff;
}

.apr-tab__count {
    margin-left: 0.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.15rem;
    height: 1.15rem;
    border-radius: 9999px;
    background: #F48120;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 0 0.3rem;
}

.apr-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.15rem;
    width: fit-content;
    max-width: 100%;
    border-bottom: 0;
    padding: 0.2rem;
    background: #f1f5f9;
    border-radius: 9999px;
}

.apr-tabs .apr-tab {
    display: inline-flex;
    align-items: center;
    height: 2rem;
    padding: 0 0.9rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
    background: transparent;
}

.apr-tabs .apr-tab:hover {
    background: transparent;
    color: #334155;
}

.apr-tabs .apr-tab.is-active,
.apr-tabs .apr-tab.is-active:hover {
    background: #fff;
    color: #0f172a;
    font-weight: 700;
    box-shadow: 0 0 0 1px #e2e8f0, 0 1px 2px rgb(15 23 42 / 6%);
}

.apr-tabs .apr-tab__count {
    margin-left: 0.4rem;
}

.apr-list,
.cfg-stack { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1rem; }

.apr-item {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    padding: 1rem;
    box-shadow: 0 1px 2px rgb(15 23 42 / 4%);
}

.apr-item__top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.apr-item__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.apr-item__title-row h3 {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
}

.apr-item__detalhe {
    margin: 0.35rem 0 0;
    font-size: 0.75rem;
    color: #64748b;
}

.apr-item__meta {
    margin: 0.35rem 0 0;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
}

.apr-item__actions { display: flex; gap: 0.5rem; }

.apr-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    border: 1px solid;
    padding: 0.1rem 0.5rem;
    font-size: 11px;
    font-weight: 500;
}

.apr-badge--pendente { border-color: #fcd34d; background: #fffbeb; color: #78350f; }
.apr-badge--aprovada { border-color: #6ee7b7; background: #ecfdf5; color: #065f46; }
.apr-badge--rejeitada { border-color: #fda4af; background: #fff1f2; color: #9f1239; }
.apr-badge--expirada { border-color: #cbd5e1; background: #f1f5f9; color: #64748b; }

.apr-btn,
.cfg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2.25rem;
    padding: 0 0.9rem;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
}

.apr-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.apr-btn--primary,
.cfg-btn--primary {
    background: #F48120;
    color: #fff;
}

.apr-btn--primary:hover:not(:disabled),
.cfg-btn--primary:hover { background: #e0731a; }

.apr-btn--outline,
.cfg-btn--outline {
    background: #fff;
    border-color: #e2e8f0;
    color: #0f172a;
}

.apr-btn--danger {
    background: #e11d48;
    color: #fff;
}

.apr-item__grid {
    display: grid;
    gap: 0.75rem;
    margin: 0.75rem 0 0;
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
    font-size: 0.75rem;
}

@media (min-width: 640px) {
    .apr-item__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
    .apr-item__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.apr-item__grid dt {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
}

.apr-item__grid dd {
    margin: 0.15rem 0 0;
    color: #64748b;
}

.apr-item__grid dd.is-strong { color: #0f172a; font-weight: 600; }
.apr-item__grid dd.is-danger { color: #be123c; }
.apr-item__grid dd.is-tiny,
.cfg-muted.is-tiny { font-size: 11px; }

.apr-item__decisoes {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0.75rem 0 0;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: #64748b;
}

.apr-item__decisoes li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.apr-dot {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 9999px;
    flex-shrink: 0;
}

.apr-dot--ok { background: #10b981; }
.apr-dot--no { background: #e11d48; }

.apr-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #64748b;
}

.apr-empty__title {
    margin: 0;
    font-weight: 600;
    color: #0f172a;
}

.apr-empty__desc { margin: 0.35rem 0 0; font-size: 0.875rem; }

.apr-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.apr-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgb(15 23 42 / 45%);
}

.apr-modal__panel {
    position: relative;
    width: min(32rem, 100%);
    background: #fff;
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: 0 20px 40px rgb(15 23 42 / 18%);
}

.apr-modal__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.apr-modal__desc {
    margin: 0.35rem 0 1rem;
    font-size: 0.875rem;
    color: #64748b;
}

.apr-modal__label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 0.35rem;
}

.apr-modal__hint {
    margin: 0.5rem 0 0;
    font-size: 0.75rem;
    color: #64748b;
}

.apr-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}

.cfg-pending {
    border: 1px solid #fcd34d;
    background: #fffbeb;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    color: #78350f;
}

.cfg-pending__title { margin: 0; font-weight: 600; }
.cfg-pending ul { margin: 0.35rem 0 0; padding-left: 1.25rem; }

.cfg-table-wrap { overflow-x: auto; }

.cfg-table-wrap:has(.cfg-menu) {
    overflow: visible;
}

.cfg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.cfg-table th {
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    padding: 0.65rem 0.5rem;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.cfg-table td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}

.cfg-strong { font-weight: 600; }
.cfg-muted { color: #64748b; font-size: 0.75rem; }
.cfg-empty-cell { text-align: center; color: #64748b; padding: 2rem !important; }

.cfg-chip {
    display: inline-flex;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    padding: 0.1rem 0.5rem;
    font-size: 11px;
    font-weight: 500;
}

.cfg-chip--ok { border-color: #6ee7b7; background: #ecfdf5; color: #065f46; }
.cfg-chip--warn { border-color: #fcd34d; background: #fffbeb; color: #92400e; }
.cfg-chip--muted { border-color: #cbd5e1; background: #f1f5f9; color: #64748b; }

.cfg-status {
    display: inline-flex;
    border-radius: 9999px;
    padding: 0.1rem 0.5rem;
    font-size: 11px;
    font-weight: 500;
}

.cfg-status--ativo { background: #ecfdf5; color: #065f46; }
.cfg-status--convite_pendente { background: #eff6ff; color: #1d4ed8; }
.cfg-status--suspenso { background: #fff1f2; color: #be123c; }
.cfg-status--inativo { background: #f1f5f9; color: #64748b; }

.cfg-result { font-weight: 500; font-size: 0.75rem; }
.cfg-result--sucesso { color: #047857; }
.cfg-result--pendente { color: #b45309; }
.cfg-result--negado { color: #be123c; }

.cfg-grid-filiais {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
}

.cfg-filial {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.9rem 1rem;
    background: #f8fafc;
}

.cfg-perfis {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
}

.cfg-perfil,
.cfg-excecao,
.cfg-politica,
.cfg-conflito {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.9rem 1rem;
    background: #fff;
}

.cfg-perfil h3,
.cfg-politica h3 {
    margin: 0 0 0.35rem;
    font-size: 0.9rem;
}

.cfg-perfil p,
.cfg-excecao p,
.cfg-politica p,
.cfg-conflito p {
    margin: 0.25rem 0 0;
    font-size: 0.8125rem;
    color: #475569;
}

.cfg-excecao__top,
.cfg-politica__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.cfg-politica__top { justify-content: space-between; align-items: flex-start; }

.cfg-conflito--critico { border-color: #fda4af; background: #fff1f2; }
.cfg-conflito--alerta { border-color: #fcd34d; background: #fffbeb; }

.cfg-switches { display: flex; flex-direction: column; gap: 0.75rem; }

.cfg-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.85rem 1rem;
}

.cfg-switch-row span { display: flex; flex-direction: column; gap: 0.15rem; }
.cfg-switch-row strong { font-size: 0.875rem; }

.cfg-toggle {
    width: 2.5rem;
    height: 1.4rem;
    border-radius: 9999px;
    border: 0;
    background: #cbd5e1;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}

.cfg-toggle::after {
    content: "";
    position: absolute;
    top: 0.15rem;
    left: 0.15rem;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 9999px;
    background: #fff;
    transition: transform 0.15s ease;
}

.cfg-toggle.is-on { background: #F48120; }
.cfg-toggle.is-on::after { transform: translateX(1.1rem); }
.cfg-toggle.is-mixed { background: #fdba74; }
.cfg-toggle.is-mixed::after { transform: translateX(0.55rem); }

.cfg-kv {
    display: grid;
    gap: 0.75rem;
    margin: 1rem 0 0;
    grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
}

.cfg-kv dt {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
}

.cfg-kv dd {
    margin: 0.15rem 0 0;
    font-weight: 600;
    font-size: 0.875rem;
}

.cfg-form-grid {
    display: grid;
    gap: 0.85rem;
    margin-top: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cfg-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #475569;
}

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

.cfg-card__footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.cfg-label-upper {
    margin: 0.5rem 0;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.cfg-agentes {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.85rem;
    background: #f8fafc;
}

.cfg-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8125rem;
    cursor: pointer;
    line-height: 1.35;
}

.cfg-eq-modal input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1rem;
    height: 1rem;
    margin: 0.1rem 0 0;
    flex-shrink: 0;
    border: 1.5px solid #cbd5e1;
    border-radius: 0.25rem;
    background: #fff;
    cursor: pointer;
    display: inline-grid;
    place-content: center;
    transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}

.cfg-eq-modal input[type="checkbox"]:hover {
    border-color: #F48120;
}

.cfg-eq-modal input[type="checkbox"]:checked {
    background: #F48120;
    border-color: #F48120;
}

.cfg-eq-modal input[type="checkbox"]:checked::after {
    content: "";
    width: 0.22rem;
    height: 0.42rem;
    margin-bottom: 0.12rem;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.cfg-eq-modal input[type="checkbox"]:focus-visible {
    outline: 2px solid rgb(244 129 32 / 40%);
    outline-offset: 2px;
}

.cfg-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
}

.cfg-footer__badge {
    margin-right: auto;
    display: inline-flex;
    align-items: center;
    border: 1px solid #fcd34d;
    background: #fffbeb;
    color: #78350f;
    border-radius: 9999px;
    padding: 0.25rem 0.7rem;
    font-size: 11.5px;
    font-weight: 500;
}

@media (max-width: 640px) {
    .apr-search input,
    .cfg-search input { min-width: 0; width: 100%; }
    .cfg-form-grid { grid-template-columns: 1fr; }
}

/* ---- Configurações: fidelidade ao protótipo (estrutura) ---- */

.cfg-tabs,
.cfg-subtabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    border: 0;
    border-bottom: 0;
    padding: 0.25rem;
    background: #f1f5f9;
    border-radius: 0.65rem;
    width: fit-content;
    max-width: 100%;
}

.cfg-tab,
.cfg-subtab {
    border: 0;
    background: transparent;
    border-radius: 0.5rem;
    padding: 0.45rem 0.85rem;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
}

.cfg-tab:hover,
.cfg-subtab:hover {
    background: rgb(255 255 255 / 55%);
    color: #0f172a;
}

.cfg-tab.is-active,
.cfg-subtab.is-active {
    background: #fff;
    color: #0f172a;
    box-shadow: 0 1px 2px rgb(15 23 42 / 8%);
}

.cfg-estrutura-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.cfg-btn--sm {
    height: 2rem;
    padding: 0 0.75rem;
    font-size: 0.75rem;
}

.cfg-btn svg {
    margin-right: 0.35rem;
}

.cfg-card__head-left {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.cfg-card__head > .cfg-btn {
    flex-shrink: 0;
    align-self: center;
}

.cfg-card__icon {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: rgba(244, 129, 32, 0.12);
    color: #F48120;
    flex-shrink: 0;
}

.cfg-card__title--caps {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.8rem;
}

.cfg-table th.is-right,
.cfg-table td.is-right { text-align: right; }
.cfg-table td.is-num { font-variant-numeric: tabular-nums; }

.cfg-tipo,
.cfg-vis,
.cfg-ex-chip,
.cfg-mfa {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    padding: 0.15rem 0.55rem;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.cfg-token {
    display: inline-block;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    padding: 0.2rem 0.45rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #334155;
}

.cfg-tipo--local { background: #f8fafc; color: #64748b; }
.cfg-tipo--multifilial { border-color: #7dd3fc; background: #f0f9ff; color: #075985; }
.cfg-tipo--central { border-color: #c4b5fd; background: #f5f3ff; color: #5b21b6; }

.cfg-vis { background: #f8fafc; color: #64748b; }

.cfg-ex-chip {
    border-color: #fcd34d;
    background: #fffbeb;
    color: #92400e;
}

.cfg-mfa.is-on { border-color: #6ee7b7; background: #ecfdf5; color: #065f46; }
.cfg-mfa.is-off { background: #f8fafc; color: #94a3b8; }

.cfg-menu-cell { position: relative; }

.cfg-menu-cell:has(.cfg-menu) {
    z-index: 40;
}

.cfg-icon-btn {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 0.4rem;
    background: transparent;
    color: #64748b;
    cursor: pointer;
}

.cfg-icon-btn:hover { background: #f1f5f9; color: #0f172a; }

.cfg-menu {
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 50;
    min-width: 11rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #fff;
    box-shadow: 0 10px 24px rgb(15 23 42 / 12%);
    padding: 0.35rem;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.cfg-menu--usuario {
    min-width: 15.5rem;
    padding: 0.4rem;
}

.cfg-menu__label {
    margin: 0.15rem 0.55rem 0.35rem;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
    text-align: left;
}

.cfg-menu__sep {
    height: 1px;
    margin: 0.3rem 0.35rem;
    background: #e2e8f0;
    border: 0;
}

.cfg-menu button {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 0.45rem 0.6rem;
    border-radius: 0.35rem;
    font: inherit;
    font-size: 0.8125rem;
    cursor: pointer;
    color: #0f172a;
}

.cfg-menu button svg {
    flex-shrink: 0;
    color: #64748b;
}

.cfg-menu button:hover { background: #f1f5f9; }

.cfg-menu button.is-danger,
.cfg-menu button.is-danger svg {
    color: #dc2626;
}

.cfg-menu button.is-danger:hover {
    background: #fef2f2;
}

.cfg-filiais-layout {
    display: grid;
    gap: 1rem;
}

@media (min-width: 1024px) {
    .cfg-filiais-layout { grid-template-columns: 340px 1fr; }
}

.cfg-filial-nav { display: flex; flex-direction: column; gap: 0.85rem; }

.cfg-filial-row {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.cfg-filial-row .cfg-filial-btn { flex: 1; min-width: 0; }

.cfg-filial-row .cfg-menu-cell { flex-shrink: 0; }

.cfg-filial-detalhe {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 1rem 0.75rem;
}

.cfg-filial-token-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cfg-label-inline {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cfg-filial-btn__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    min-width: 0;
    text-align: left;
}

.cfg-filial-btn__name {
    font-weight: 600;
}

.cfg-filial-btn__token {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    font-weight: 500;
    color: #64748b;
}

.cfg-filial-group ul {
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0 0 0 0.75rem;
    border-left: 1px solid #e2e8f0;
}

.cfg-filial-group li {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.3rem 0.5rem;
    font-size: 0.8125rem;
}

.cfg-filial-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    border: 0;
    background: transparent;
    border-radius: 0.4rem;
    padding: 0.35rem 0.45rem;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    text-align: left;
}

.cfg-filial-btn:hover { background: #f1f5f9; }
.cfg-filial-btn.is-active { background: rgba(244, 129, 32, 0.12); color: #c2620f; }

.cfg-filial-empty {
    margin: 0.35rem 0 0;
    padding-left: 0.75rem;
    border-left: 1px solid #e2e8f0;
    font-size: 0.75rem;
    color: #64748b;
}

.cfg-filial-central-title {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.cfg-pessoa {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.cfg-pessoa > span:last-child {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cfg-avatar {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background: #e2e8f0;
    color: #334155;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

.cfg-transfer {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem;
}

.cfg-transfer h3 {
    margin: 0 0 0.35rem;
    font-size: 0.9rem;
}

.cfg-transfer .cfg-btn { margin-top: 0.75rem; }

/* ─── Clientes e Veículos (consulta) — fiel ao projeto-posvendas-v2 ─── */

.hg-app .hg-main .fi-page:has(.cv-page),
.hg-app--v2 .hg-main .fi-page:has(.cv-page) {
    padding: 0;
    background: #f8fafc;
}

.hg-app .hg-main .fi-page:has(.cv-page) .fi-section,
.hg-app--v2 .hg-main .fi-page:has(.cv-page) .fi-section,
.hg-app .hg-main .fi-page:has(.cv-page) .fi-page-content,
.hg-app--v2 .hg-main .fi-page:has(.cv-page) .fi-page-content {
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.hg-app .fi-page:has(.cv-page) .fi-header,
.hg-app--v2 .fi-page:has(.cv-page) .fi-header,
.hg-app .fi-page:has(.cv-page) .fi-page-header,
.hg-app--v2 .fi-page:has(.cv-page) .fi-page-header {
    display: none;
}

.cv-page {
    min-height: 100%;
    background: var(--hg-background);
    color: var(--hg-foreground);
}

.cv-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 640px) {
    .cv-container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

.cv-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.cv-header__icon {
    flex-shrink: 0;
    border-radius: 0.5rem;
    background: color-mix(in oklab, var(--hg-primary) 10%, transparent);
    color: var(--hg-primary);
    padding: 0.625rem;
    display: inline-flex;
}

.cv-header__text {
    min-width: 0;
    flex: 1;
}

.cv-header__title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.25;
    color: var(--hg-foreground);
}

.cv-header__subtitle {
    margin: 0.125rem 0 0;
    font-size: 0.875rem;
    color: var(--hg-muted-foreground);
    line-height: 1.4;
}

.cv-header__action {
    margin-left: auto;
    flex-shrink: 0;
}

.cv-filters {
    border-radius: 0.5rem;
    border: 1px solid var(--hg-border);
    background: var(--hg-card);
    box-shadow: 0 1px 2px rgb(0 0 0 / 4%);
    padding: 0.75rem;
}

.cv-filters__row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

@media (min-width: 1024px) {
    .cv-filters__row {
        flex-direction: row;
        align-items: flex-start;
    }
}

.cv-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cv-field--criterio {
    width: 100%;
}

@media (min-width: 1024px) {
    .cv-field--criterio {
        width: 170px;
        flex-shrink: 0;
    }
}

.cv-field--termo {
    flex: 1;
    min-width: 0;
}

.cv-label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--hg-muted-foreground);
    line-height: 1rem;
    min-height: 1rem;
    display: flex;
    align-items: center;
}

.cv-label--with-hint {
    width: 100%;
    justify-content: space-between;
    gap: 0.5rem;
}

.cv-select,
.cv-input {
    height: 2.25rem;
    width: 100%;
    border-radius: 0.375rem;
    border: 1px solid var(--hg-border);
    background: var(--hg-card);
    color: var(--hg-foreground);
    font-size: 0.875rem;
    padding: 0 0.75rem;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.cv-select {
    border-radius: 0.5rem;
    font-size: 0.8125rem;
}

.cv-select:focus,
.cv-input:focus {
    border-color: var(--hg-primary);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--hg-primary) 25%, transparent);
}

textarea.cv-input {
    height: auto;
    min-height: 4.5rem;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
    resize: vertical;
    line-height: 1.45;
}

.cv-select--sm {
    width: 190px;
}

.cv-input-wrap {
    position: relative;
}

.cv-input-icon {
    position: absolute;
    left: 0.625rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--hg-muted-foreground);
    pointer-events: none;
}

.cv-input-wrap .cv-input {
    padding-left: 2rem;
}

.cv-input.is-invalid {
    border-color: oklch(0.55 0.2 25);
}

.cv-input.is-invalid:focus {
    box-shadow: 0 0 0 3px oklch(0.55 0.2 25 / 25%);
}

.cv-field-hint {
    margin: 0;
    font-size: 0.75rem;
    color: var(--hg-muted-foreground);
}

.cv-error {
    margin: 0;
    font-size: 0.75rem;
    color: oklch(0.55 0.2 25);
}

.cv-filters__actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .cv-filters__actions {
        flex-direction: row;
    }
}

@media (min-width: 1024px) {
    .cv-filters__actions {
        padding-top: 21px;
        align-items: flex-end;
    }
}

.cv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 2.25rem;
    padding: 0 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, opacity 0.15s;
    text-decoration: none;
    color: inherit;
    background: transparent;
}

.cv-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cv-btn__inner {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.cv-btn--primary {
    background: var(--hg-primary);
    color: var(--hg-primary-foreground);
    border-color: var(--hg-primary);
}

.cv-btn--primary:hover:not(:disabled) {
    opacity: 0.92;
}

.cv-btn--outline {
    background: var(--hg-card);
    border-color: var(--hg-border);
    color: var(--hg-foreground);
}

.cv-btn--outline:hover:not(:disabled) {
    background: var(--hg-muted);
}

.cv-btn--ghost {
    background: transparent;
    border-color: transparent;
    color: var(--hg-foreground);
}

.cv-btn--ghost:hover:not(:disabled) {
    background: var(--hg-muted);
}

.cv-btn--sm {
    height: 2rem;
    padding: 0 0.75rem;
    font-size: 0.8125rem;
    gap: 0.375rem;
}

.cv-empty,
.cv-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--hg-border);
    background: var(--hg-card);
    padding: 4rem 1.5rem;
    text-align: center;
}

.cv-empty__icon {
    border-radius: 9999px;
    background: var(--hg-muted);
    color: var(--hg-muted-foreground);
    padding: 0.75rem;
    display: inline-flex;
    margin-bottom: 0.25rem;
}

.cv-empty__title {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--hg-foreground);
}

.cv-empty__desc {
    margin: 0;
    max-width: 28rem;
    font-size: 0.875rem;
    color: var(--hg-muted-foreground);
    line-height: 1.45;
}

.cv-empty__tips {
    margin: 0.25rem 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.875rem;
    color: var(--hg-muted-foreground);
    line-height: 1.6;
}

.cv-loading {
    gap: 0.75rem;
}

.cv-loading p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--hg-muted-foreground);
}

.cv-spinner {
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid color-mix(in oklab, var(--hg-primary) 25%, transparent);
    border-top-color: var(--hg-primary);
    border-radius: 9999px;
    animation: cv-spin 0.7s linear infinite;
}

@keyframes cv-spin {
    to {
        transform: rotate(360deg);
    }
}

.cv-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .cv-toolbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.cv-toolbar__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.cv-toolbar__count {
    font-weight: 500;
}

.cv-toolbar__sort {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cv-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border-radius: 0.375rem;
    border: 1px solid var(--hg-border);
    background: var(--hg-card);
    padding: 0.125rem 0.5rem;
    font-size: 10.5px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--hg-foreground);
    white-space: nowrap;
}

.cv-badge--outline {
    background: transparent;
}

.cv-badge--muted {
    background: var(--hg-muted);
    border-color: transparent;
    color: var(--hg-muted-foreground);
}

.cv-badge--primary {
    background: var(--hg-primary);
    border-color: var(--hg-primary);
    color: var(--hg-primary-foreground);
}

.cv-badge--ok {
    background: oklch(0.72 0.14 155 / 12%);
    border-color: oklch(0.72 0.14 155 / 30%);
    color: oklch(0.42 0.1 155);
}

.cv-badge--warn {
    background: oklch(0.85 0.14 85 / 16%);
    border-color: oklch(0.75 0.14 85 / 35%);
    color: oklch(0.48 0.12 70);
}

.cv-badge--danger {
    background: oklch(0.7 0.18 25 / 12%);
    border-color: oklch(0.65 0.18 25 / 30%);
    color: oklch(0.48 0.16 25);
}

.cv-badge--info {
    background: oklch(0.7 0.12 240 / 12%);
    border-color: oklch(0.65 0.12 240 / 30%);
    color: oklch(0.42 0.12 250);
}

.cv-posvendas {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cv-results {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cv-card {
    border-radius: 0.5rem;
    border: 1px solid var(--hg-border);
    background: var(--hg-card);
    box-shadow: 0 1px 2px rgb(0 0 0 / 4%);
    transition: border-color 0.15s, box-shadow 0.15s;
    cursor: pointer;
}

.cv-card:hover {
    border-color: color-mix(in oklab, var(--hg-primary) 40%, var(--hg-border));
}

.cv-card__head {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border-bottom: 1px solid var(--hg-border);
    padding: 0.75rem 1rem;
}

@media (min-width: 640px) {
    .cv-card__head {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }
}

.cv-card__identity {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
}

.cv-card__avatar {
    flex-shrink: 0;
    border-radius: 0.375rem;
    background: color-mix(in oklab, var(--hg-primary) 10%, transparent);
    color: var(--hg-primary);
    padding: 0.5rem;
    display: inline-flex;
}

.cv-card__main {
    min-width: 0;
}

.cv-card__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.cv-card__name {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--hg-foreground);
}

.cv-card__fields {
    margin-top: 0.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem 1.5rem;
}

@media (min-width: 640px) {
    .cv-card__fields {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.cv-card__actions {
    display: flex;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cv-card__vehicles {
    display: flex;
    flex-direction: column;
}

.cv-card__empty-vehicles {
    margin: 0;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--hg-muted-foreground);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
}

.cv-card__empty-vehicles p {
    margin: 0;
}

.cv-vehicle {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--hg-border);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cv-vehicle:first-child {
    border-top: 0;
}

@media (min-width: 640px) {
    .cv-vehicle {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }
}

.cv-vehicle__body {
    min-width: 0;
    flex: 1;
}

.cv-vehicle__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.cv-vehicle__car-icon {
    color: var(--hg-muted-foreground);
    flex-shrink: 0;
}

.cv-vehicle__placa {
    border-radius: 0.25rem;
    border: 1px solid var(--hg-border);
    background: var(--hg-muted);
    padding: 0.125rem 0.375rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
    font-weight: 600;
}

.cv-vehicle__model {
    font-size: 0.875rem;
    font-weight: 500;
}

.cv-vehicle__fields {
    margin-top: 0.5rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem 1rem;
}

@media (min-width: 640px) {
    .cv-vehicle__fields {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.cv-vehicle__actions {
    display: flex;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cv-campo__label {
    font-size: 10.5px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--hg-muted-foreground);
}

.cv-campo__value {
    font-size: 0.875rem;
    color: var(--hg-foreground);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cv-campo__value--with-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.cv-campo__value--with-icon svg {
    color: var(--hg-muted-foreground);
    flex-shrink: 0;
}

.cv-wa {
    color: #25d366;
    font-weight: 500;
}

.cv-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 0.5rem;
    border: 1px solid var(--hg-border);
    background: var(--hg-card);
    padding: 0.625rem 1rem;
}

.cv-pagination__info {
    font-size: 0.75rem;
    color: var(--hg-muted-foreground);
}

.cv-pagination__btns {
    display: flex;
    gap: 0.5rem;
}

@media (max-width: 639px) {
    .cv-header {
        flex-wrap: wrap;
    }

    .cv-header__action {
        margin-left: 0;
        width: 100%;
    }

    .cv-filters__actions .cv-btn {
        width: 100%;
    }
}

.cv-sheet {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    justify-content: flex-end;
}

.cv-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgb(15 23 42 / 45%);
    animation: hg-sheet-fade-in 200ms ease-out both;
}

.cv-sheet__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(900px, 100%);
    height: 100%;
    background: #fff;
    box-shadow: -12px 0 40px rgb(15 23 42 / 18%);
    will-change: transform;
    animation: hg-sheet-slide-in-from-right 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (prefers-reduced-motion: reduce) {
    .cv-sheet__backdrop,
    .cv-sheet__panel {
        animation: none;
    }
}

.cv-sheet.is-closing .cv-sheet__backdrop {
    animation: hg-sheet-fade-out 220ms ease-in both;
}

.cv-sheet.is-closing .cv-sheet__panel {
    animation: hg-sheet-slide-out-to-right 320ms cubic-bezier(0.4, 0, 1, 1) both;
}

@media (prefers-reduced-motion: reduce) {
    .cv-sheet.is-closing .cv-sheet__backdrop,
    .cv-sheet.is-closing .cv-sheet__panel {
        animation: none;
    }
}

.cv-sheet__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.35rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

.cv-sheet__title {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.cv-sheet__desc {
    margin: 0.35rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #64748b;
}

.cv-icon-btn {
    border: 0;
    background: transparent;
    border-radius: 0.4rem;
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    color: #64748b;
    cursor: pointer;
}

.cv-icon-btn:hover { background: #f1f5f9; color: #0f172a; }

.cv-sheet__body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.35rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    background: #f8fafc;
}

.cv-sheet__footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.65rem;
    padding: 0.9rem 1.35rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.cv-alert {
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    padding: 0.75rem 0.9rem;
    font-size: 0.8125rem;
}

.cv-alert--info {
    background: #fff;
    color: #475569;
}

.cv-alert--info strong {
    font-weight: 500;
    color: #334155;
}

.cv-alert--info p { margin: 0.4rem 0 0; font-size: 0.75rem; color: #64748b; }

.cv-alert--danger {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.cv-modo {
    display: inline-flex;
    border: 0;
    border-radius: 9999px;
    background: #e2e8f0;
    padding: 0.2rem;
    gap: 0.15rem;
    width: fit-content;
}

.cv-modo__btn {
    border: 0;
    background: transparent;
    border-radius: 9999px;
    height: 2rem;
    padding: 0 0.9rem;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
}

.cv-modo__btn.is-active {
    background: #fff;
    color: #0f172a;
    font-weight: 600;
    box-shadow: 0 1px 2px rgb(15 23 42 / 8%);
}

.cv-sec {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem 1.1rem;
    background: #fff;
    box-shadow: 0 1px 2px rgb(15 23 42 / 4%);
}

.cv-sec__title {
    margin: 0 0 0.85rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.cv-sec__opt {
    font-size: 0.7rem;
    font-weight: 500;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cv-sec__hint {
    margin: -0.35rem 0 0.75rem;
    font-size: 0.75rem;
    color: #64748b;
}

.cv-form-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
}

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

.cv-form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cv-form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cv-form-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.cv-form-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (max-width: 900px) {
    .cv-form-grid--3,
    .cv-form-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .cv-form-grid--2,
    .cv-form-grid--3,
    .cv-form-grid--4 { grid-template-columns: 1fr; }
}

.cv-form-grid .cv-field--span2 { grid-column: span 2; }

@media (max-width: 560px) {
    .cv-form-grid .cv-field--span2 { grid-column: 1 / -1; }
}

.cv-textarea {
    width: 100%;
    border: 1px solid var(--hg-border, #e2e8f0);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font: inherit;
    font-size: 0.875rem;
    resize: vertical;
}

.cv-check-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #475569;
    padding-top: 1.55rem;
}

.cv-check-row input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    margin: 0;
    accent-color: #F48120;
    flex-shrink: 0;
}

.cv-check-row--flush { padding-top: 0; }

.cv-check-row--sm {
    margin-top: 6px;
    font-size: 0.6875rem;
    gap: 0.375rem;
    color: #64748b;
}

.cv-check-row--sm input[type="checkbox"] {
    width: 0.875rem;
    height: 0.875rem;
}

@media (max-width: 640px) {
    .cv-check-row { padding-top: 0; }
}

.cv-sheet__title-icon,
.cv-sec__icon {
    color: #F48120;
    flex-shrink: 0;
}

.cv-sheet .cv-select:focus,
.cv-sheet .cv-input:focus,
.cv-sheet .cv-textarea:focus {
    border-color: #F48120;
    box-shadow: 0 0 0 1px #F48120;
}

.cv-sheet .cv-label {
    color: #94a3b8;
    font-weight: 600;
}

.cv-sheet .cv-form-grid--3 .cv-check-row {
    align-self: end;
    min-height: 2.25rem;
    padding-top: 0;
    padding-bottom: 0.1rem;
}

.cv-consent__grid input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    margin: 0;
    accent-color: #F48120;
    flex-shrink: 0;
}

.cv-sheet__footer .cv-btn--primary {
    min-width: 11rem;
    font-weight: 600;
}

.cv-alert__row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.cv-alert__row svg { flex-shrink: 0; margin-top: 0.1rem; }

.cv-badge--sec {
    background: #f1f5f9;
    color: #64748b;
    border: 0;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.7rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
}

.cv-hint {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 400;
    line-height: 1rem;
    color: #94a3b8;
    text-transform: none;
    letter-spacing: 0;
}

/* Aviso informativo que precisa ser lido — ocupa o lugar do erro no formulário,
   mas sem o vermelho: não houve erro do usuário. O cinza do .cv-hint some
   demais para uma informação que decide se a pessoa segue ou corrige a placa. */
.cv-hint--aviso {
    display: block;
    padding: 0.375rem 0.5rem;
    border-left: 2px solid #f59e0b;
    border-radius: 0 4px 4px 0;
    background: #fffbeb;
    color: #92400e;
    font-size: 0.75rem;
    line-height: 1.15rem;
}

.cv-dica {
    display: block;
    font-size: 0.6875rem;
    color: #94a3b8;
    margin: -0.15rem 0 0.15rem;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}

.cv-veic-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cv-veic-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #f8fafc;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.cv-veic-row__info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.cv-veic-row__meta { color: #64748b; }

.cv-consent {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid #e2e8f0;
}

.cv-consent__label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.cv-consent__grid {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 560px) {
    .cv-consent__grid { grid-template-columns: 1fr; }
}

.cv-origem-note {
    margin: 0;
    font-size: 0.6875rem;
    color: #94a3b8;
}

.cv-sheet__footer--wrap {
    flex-wrap: wrap;
}

.cv-sheet__footer .cv-btn--ghost {
    margin-right: auto;
}

.cv-input:disabled {
    background: #f1f5f9;
    color: #64748b;
    cursor: not-allowed;
}

/* Dialog veículo (sobre o sheet) */
.cv-dialog {
    position: fixed;
    inset: 0;
    z-index: 210;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.cv-dialog__backdrop {
    position: absolute;
    inset: 0;
    background: rgb(15 23 42 / 50%);
    animation: hg-sheet-fade-in 180ms ease-out both;
}

.cv-dialog__panel {
    position: relative;
    width: min(48rem, 100%);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 20px 50px rgb(15 23 42 / 25%);
    overflow: hidden;
    will-change: transform, opacity;
    animation: cv-dialog-in 280ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cv-dialog-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes cv-dialog-out {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cv-dialog__backdrop,
    .cv-dialog__panel {
        animation: none;
    }
}

.cv-dialog.is-closing .cv-dialog__backdrop {
    animation: hg-sheet-fade-out 180ms ease-in both;
}

.cv-dialog.is-closing .cv-dialog__panel {
    animation: cv-dialog-out 240ms ease-in both;
}

@media (prefers-reduced-motion: reduce) {
    .cv-dialog.is-closing .cv-dialog__backdrop,
    .cv-dialog.is-closing .cv-dialog__panel {
        animation: none;
    }
}

.cv-dialog__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}

.cv-dialog__title {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #0f172a;
}

.cv-dialog__desc {
    margin: 0.35rem 0 0;
    font-size: 0.8125rem;
    color: #64748b;
}

.cv-dialog__body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
}

.cv-dialog__footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.65rem;
    padding: 0.9rem 1.25rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

/* ---- Configurações: visual do protótipo v2 (screenshot) ---- */

.cfg-page {
    min-height: 100%;
    background: #fff;
}

.cfg-page .cfg-container {
    padding: 1.5rem 1rem;
    gap: 1rem;
}

@media (min-width: 768px) {
    .cfg-page .cfg-container { padding: 1.5rem 1.5rem; }
}

.cfg-page .cfg-header {
    align-items: flex-start;
    gap: 0.75rem;
}

.cfg-page .cfg-header__left { gap: 0.75rem; }

.cfg-page .cfg-header__icon {
    border-radius: 0.5rem;
    padding: 0.625rem;
    width: auto;
    height: auto;
    background: rgba(244, 129, 32, 0.1);
    color: #F48120;
}

.cfg-page .cfg-header__title {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.025em;
    color: #0f172a;
}

.cfg-page .cfg-header__subtitle {
    margin-top: 0.125rem;
    max-width: 48rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #64748b;
}

.cfg-page .cfg-estrutura-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.cfg-page .cfg-estrutura-toolbar,
.cfg-page .cfg-header__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-shrink: 0;
}

.cfg-page .cfg-tabs,
.cfg-page .cfg-subtabs {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0;
    height: 2.25rem;
    min-height: 2.25rem;
    width: fit-content;
    max-width: 100%;
    padding: 0.25rem;
    border: 0;
    border-bottom: 0;
    border-radius: 0.5rem;
    background: #f1f5f9;
    color: #64748b;
}

.cfg-page .cfg-tab,
.cfg-page .cfg-subtab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 1.75rem;
    min-height: 1.75rem;
    padding: 0.25rem 0.75rem;
    border: 0;
    border-radius: 0.375rem;
    background: transparent;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25;
    white-space: nowrap;
    box-shadow: none;
}

.cfg-page .cfg-tab:hover,
.cfg-page .cfg-subtab:hover {
    background: transparent;
    color: #0f172a;
}

.cfg-page .cfg-tab.is-active,
.cfg-page .cfg-subtab.is-active {
    background: #fff;
    color: #0f172a;
    box-shadow: 0 1px 2px rgb(15 23 42 / 12%), 0 1px 1px rgb(15 23 42 / 6%);
}

.cfg-page .cfg-btn {
    gap: 0.375rem;
    height: 2.25rem;
    padding: 0 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

.cfg-page .cfg-btn svg {
    margin: 0;
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.cfg-page .cfg-btn--outline {
    border-color: #e2e8f0;
    background: #fff;
    color: #0f172a;
    box-shadow: 0 1px 2px rgb(15 23 42 / 5%);
}

.cfg-page .cfg-btn--outline:hover {
    background: #f8fafc;
}

.cfg-page .cfg-btn--primary {
    background: #F48120;
    border-color: #F48120;
    color: #fff;
    box-shadow: 0 1px 2px rgb(244 129 32 / 25%);
}

.cfg-page .cfg-btn--primary:hover {
    background: #e0731a;
    border-color: #e0731a;
}

.cfg-page .cfg-btn--sm {
    height: 2.25rem;
    padding: 0 1rem;
    font-size: 0.875rem;
}

.cfg-page .cfg-pending {
    border-radius: 0.5rem;
    border: 1px solid #fcd34d;
    background: #fffbeb;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    color: #78350f;
}

.cfg-page .cfg-card {
    padding: 0;
    overflow: visible;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 1px 2px rgb(15 23 42 / 6%);
}

.cfg-page .cfg-card__head {
    margin: 0;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    align-items: flex-start;
    border-radius: 0.75rem 0.75rem 0 0;
}

.cfg-page .cfg-card > *:not(.cfg-card__head) {
    margin-left: 1rem;
    margin-right: 1rem;
}

.cfg-page .cfg-card__head + * { margin-top: 1rem; }

.cfg-page .cfg-card > *:not(.cfg-card__head):last-child {
    margin-bottom: 1rem;
}

.cfg-page .cfg-card__title {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #0f172a;
}

.cfg-page .cfg-card__title--caps {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #F48120;
}

.cfg-page .cfg-card__desc {
    margin-top: 0.125rem;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #64748b;
}

.cfg-page .cfg-card__icon {
    margin-top: 0.05rem;
    width: auto;
    height: auto;
    padding: 0.375rem;
    border-radius: 0.375rem;
    background: rgba(244, 129, 32, 0.12);
    color: #F48120;
}

.cfg-page .cfg-card__icon svg {
    width: 1rem;
    height: 1rem;
    display: block;
}

.cfg-page .cfg-table {
    font-size: 0.875rem;
    border-collapse: collapse;
}

.cfg-page .cfg-table th {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: #64748b;
    height: 2.5rem;
    padding: 0.5rem 0.85rem;
    background: transparent;
    border-bottom: 1px solid #e2e8f0;
}

.cfg-page .cfg-table td {
    padding: 0.85rem 0.85rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    color: #0f172a;
}

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

.cfg-page .cfg-table tbody tr:hover td { background: #f8fafc; }

.cfg-page .cfg-table td.cfg-strong {
    font-weight: 600;
    color: #0f172a;
}

.cfg-page .cfg-table td.cfg-muted {
    font-size: 0.75rem;
    color: #64748b;
}

.cfg-page .cfg-chip,
.cfg-page .cfg-tipo,
.cfg-page .cfg-vis,
.cfg-page .cfg-ex-chip {
    gap: 0.375rem;
    border-radius: 9999px;
    padding: 0.15rem 0.55rem;
    font-size: 11px;
    font-weight: 500;
}

.cfg-page .cfg-icon-btn {
    width: 2rem;
    height: 2rem;
    color: #94a3b8;
}

.cfg-page .cfg-footer {
    margin-top: 0.25rem;
    padding-top: 1rem;
}

.cfg-page .cfg-transfer {
    border-radius: 0.5rem;
}

.cfg-eq-modal {
    max-width: 42rem;
}

.cfg-eq-modal__head {
    align-items: flex-start;
    padding: 1.25rem 1.5rem 1rem;
    border-bottom: 0;
}

.cfg-eq-modal__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #0f172a;
}

.cfg-eq-modal__desc {
    margin: 0.35rem 0 0;
    font-size: 0.875rem;
    line-height: 1.4;
    color: #64748b;
    font-weight: 400;
}

.cfg-eq-modal__body {
    padding: 0 1.5rem 0.5rem;
    max-height: 60vh;
}

.cfg-eq-modal .cfg-eq-modal__grid {
    margin-top: 0;
    gap: 0.75rem;
}

.cfg-eq-modal .cfg-field {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
}

.cfg-eq-modal .cfg-input,
.cfg-eq-modal .cfg-select,
.cfg-eq-modal .cfg-textarea {
    height: 2.5rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    font-weight: 400;
    font-size: 0.875rem;
}

.cfg-eq-modal .cfg-textarea {
    height: auto;
    min-height: 4.5rem;
    resize: vertical;
}

.cfg-eq-modal .cfg-input:focus,
.cfg-eq-modal .cfg-select:focus,
.cfg-eq-modal .cfg-textarea:focus {
    outline: none;
    border-color: #F48120;
    box-shadow: 0 0 0 1px #F48120;
}

.cfg-eq-modal__hint {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: #64748b;
}

.cfg-eq-modal__checks {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.75rem;
}

.cfg-eq-modal__check-all {
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
}

.cfg-eq-modal__checks-grid {
    display: grid;
    gap: 0.4rem;
}

@media (min-width: 640px) {
    .cfg-eq-modal__checks-grid { grid-template-columns: 1fr 1fr; }
}

.cfg-eq-modal .hg-modal-footer {
    padding: 1rem 1.5rem 1.25rem;
    border-top: 0;
}

.cfg-fi-modal {
    max-width: 40rem;
}

.cfg-fi-modal__row-cep,
.cfg-fi-modal__row-city {
    display: grid;
    gap: 0.75rem;
    grid-column: 1 / -1;
}

.cfg-fi-modal__row-cep { grid-template-columns: 2fr 1fr; }

.cfg-fi-modal__row-city { grid-template-columns: 1.3fr 1.3fr 4.5rem; }

.cfg-fi-modal__section {
    grid-column: 1 / -1;
    margin: 0.35rem 0 0;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
}

.cfg-fi-modal .cfg-select,
.cfg-fi-modal .cfg-input {
    width: 100%;
    min-width: 0;
}

.cfg-page .cfg-btn--ghost {
    background: transparent;
    border-color: transparent;
    color: #0f172a;
    box-shadow: none;
    font-weight: 500;
}

.cfg-page .cfg-btn--ghost:hover {
    background: #f8fafc;
}

.cfg-us-modal {
    max-width: 42rem;
}

/* Reserva altura pra combo de equipe abrir sem esmagar o rodapé. */
.cfg-us-modal--lotacao {
    overflow: visible;
}

.cfg-us-modal--lotacao .cfg-eq-modal__body {
    min-height: 24rem;
    overflow: visible;
    flex-shrink: 0;
}

.cfg-us-modal__progress {
    display: flex;
    gap: 0.4rem;
    padding: 0 1.5rem 0.75rem;
}

.cfg-us-modal__progress span {
    flex: 1;
    height: 0.375rem;
    border-radius: 9999px;
    background: #e2e8f0;
}

.cfg-us-modal__progress span.is-on {
    background: #F48120;
}

.cfg-us-modal__fields {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cfg-us-modal .cfg-input,
.cfg-us-modal .cfg-select {
    width: 100%;
    min-width: 0;
    background: #fff;
}

.cfg-us-modal .cfg-input.is-invalid {
    border-color: #e11d48;
}

.cfg-us-modal__error {
    color: #be123c;
    font-size: 12px;
    font-weight: 400;
}

.cfg-us-modal__mirror {
    border: 1px dashed #cbd5e1;
    border-radius: 0.5rem;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.cfg-us-modal__mirror-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.cfg-us-modal__mirror-title {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #0f172a;
}

.cfg-us-modal__search {
    position: relative;
}

.cfg-us-modal__search svg {
    position: absolute;
    left: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.cfg-us-modal__search .cfg-input {
    height: 2.25rem;
    padding-left: 2.15rem;
    background: #fff;
    border-radius: 0.4rem;
}

.cfg-us-modal__search .cfg-input:focus {
    border-color: #F48120;
    box-shadow: 0 0 0 1px #F48120;
}

.cfg-us-modal__search .cfg-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.cfg-us-modal__people {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 11.5rem;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 0.4rem;
    background: #fff;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.cfg-us-modal__people li + li {
    border-top: 1px solid #f1f5f9;
}

.cfg-us-modal__people button {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.12rem;
    width: 100%;
    border: 0;
    border-left: 2px solid transparent;
    background: transparent;
    padding: 0.55rem 0.75rem;
    text-align: left;
    cursor: pointer;
    font: inherit;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.cfg-us-modal__people button .cfg-strong {
    font-size: 12.5px;
    font-weight: 500;
    color: #0f172a;
}

.cfg-us-modal__people button .cfg-muted {
    font-size: 11.5px;
    color: #64748b;
}

.cfg-us-modal__people button:hover,
.cfg-us-modal__people button:focus-visible {
    background: #fff7ed;
    border-left-color: #F48120;
    outline: none;
}

.cfg-us-modal__people button:hover .cfg-strong,
.cfg-us-modal__people button:focus-visible .cfg-strong {
    color: #c2620f;
}

.cfg-us-modal__people button:active {
    background: #ffedd5;
}

.cfg-us-modal__empty {
    padding: 0.65rem 0.75rem;
    font-size: 12.5px;
    color: #64748b;
}

.cfg-us-modal__modelo {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 0.4rem;
    padding: 0.65rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.cfg-us-modal__modelo .cfg-check {
    margin-top: 0.15rem;
    font-size: 12.5px;
    color: #334155;
}

.cfg-us-modal__info {
    display: block;
    border: 1px solid #7dd3fc;
    background: #f0f9ff;
    color: #0c4a6e;
    border-radius: 0.4rem;
    padding: 0.5rem 0.7rem;
    font-size: 12px;
    font-weight: 400;
}

.cfg-us-modal__resumo {
    margin: 0;
    border-radius: 0.5rem;
    background: #f1f5f9;
    padding: 0.85rem 1rem;
    font-size: 0.875rem;
    line-height: 1.45;
    color: #334155;
}

.cfg-us-modal__review {
    display: grid;
    gap: 0.65rem;
}

@media (min-width: 640px) {
    .cfg-us-modal__review { grid-template-columns: 1fr 1fr; }
}

.cfg-us-modal__campo {
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 0.5rem;
    padding: 0.65rem 0.8rem;
}

.cfg-us-modal__campo--full {
    grid-column: 1 / -1;
}

.cfg-us-modal__campo span {
    display: block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.cfg-us-modal__campo strong {
    display: block;
    margin-top: 0.25rem;
    font-size: 13px;
    font-weight: 500;
    color: #0f172a;
    line-height: 1.4;
}

.cfg-us-modal__invite {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.85rem 0.95rem;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.12s ease, background 0.12s ease;
}

.cfg-us-modal__invite:hover {
    border-color: #fdba74;
    background: #fff7ed;
}

.cfg-us-modal__invite:has(input:checked) {
    border-color: #fdba74;
    background: #fff7ed;
}

.cfg-us-modal__invite input {
    margin-top: 0.15rem;
}

.cfg-us-modal__invite strong {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #0f172a;
}

.cfg-us-modal__invite .cfg-eq-modal__hint {
    margin-top: 0.2rem;
}

.cfg-us-modal__invite--note {
    cursor: default;
    flex-direction: column;
    gap: 0.2rem;
    border-color: #fdba74;
    background: #fff7ed;
}

.cfg-us-modal__invite--note:hover {
    border-color: #fdba74;
    background: #fff7ed;
}

.cfg-us-modal__footer {
    justify-content: space-between;
}

.cfg-xfer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cfg-page .cfg-xfer .cfg-card__title--caps {
    color: #0f172a;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.cfg-xfer-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cfg-page .cfg-xfer .cfg-field {
    font-size: 0.875rem;
    font-weight: 500;
    color: #0f172a;
    gap: 0.375rem;
}

.cfg-xfer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.cfg-page .cfg-xfer-select {
    width: 100%;
    min-width: 0;
    height: 2.25rem;
    padding: 0 0.75rem;
    border: 1px solid var(--hg-input, #e2e8f0);
    border-radius: 0.5rem;
    background-color: var(--hg-card, #fff);
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--hg-foreground, #0f172a);
    cursor: pointer;
}

.cfg-page .cfg-xfer-select.is-placeholder {
    color: #94a3b8;
}

.cfg-page .cfg-xfer-select option {
    color: #0f172a;
}

.cfg-page .cfg-xfer-select:focus {
    outline: none;
    border-color: var(--hg-primary, #F48120);
    box-shadow: 0 0 0 1px var(--hg-primary, #F48120);
}

.cfg-xfer-datewrap {
    position: relative;
    display: block;
}

.cfg-page .cfg-xfer-date {
    display: block;
    width: 100%;
    min-width: 0;
    height: 2.5rem;
    padding: 0 2.4rem 0 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #fff;
    font-size: 0.875rem;
    font-weight: 400;
    color: #0f172a;
}

.cfg-page .cfg-xfer-date:focus {
    outline: none;
    border-color: #F48120;
    box-shadow: 0 0 0 1px #F48120;
}

.cfg-xfer-date-ph {
    display: none;
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 400;
    pointer-events: none;
}

.cfg-xfer-datewrap.is-empty .cfg-xfer-date-ph {
    display: block;
}

.cfg-xfer-datewrap.is-empty .cfg-xfer-date::-webkit-datetime-edit,
.cfg-xfer-datewrap.is-empty .cfg-xfer-date::-webkit-datetime-edit-fields-wrapper,
.cfg-xfer-datewrap.is-empty .cfg-xfer-date::-webkit-datetime-edit-text,
.cfg-xfer-datewrap.is-empty .cfg-xfer-date::-webkit-datetime-edit-month-field,
.cfg-xfer-datewrap.is-empty .cfg-xfer-date::-webkit-datetime-edit-day-field,
.cfg-xfer-datewrap.is-empty .cfg-xfer-date::-webkit-datetime-edit-year-field {
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.cfg-page .cfg-xfer-date::-webkit-calendar-picker-indicator {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.cfg-xfer-date-ic {
    position: absolute;
    right: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: #94a3b8;
    pointer-events: none;
}

.cfg-xfer-opts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

.cfg-xfer-opt {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 400;
    color: #0f172a;
    line-height: 1.3;
}

.cfg-xfer-opt:hover {
    background: #f8fafc;
}

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

.cfg-xfer-radio {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    border: 1.5px solid #F48120;
    border-radius: 999px;
    background: #fff;
    box-sizing: border-box;
}

.cfg-xfer-opt:has(.cfg-xfer-opt__input:checked) .cfg-xfer-radio {
    background: #F48120;
    box-shadow: inset 0 0 0 2.5px #fff;
}

.cfg-xfer-opt:has(.cfg-xfer-opt__input:focus-visible) {
    outline: 2px solid rgb(244 129 32 / 40%);
    outline-offset: 2px;
}

.cfg-page .cfg-xfer .cfg-btn--primary {
    align-self: flex-start;
    height: 2.5rem;
    padding: 0 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .cfg-xfer-grid,
    .cfg-xfer-opts {
        grid-template-columns: 1fr;
    }
}

.cfg-page .cfg-card:has(.cfg-acessos-body) .cfg-card__title--caps {
    color: #0f172a;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.cfg-acessos-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cfg-page .cfg-acessos-body .cfg-field {
    font-size: 0.875rem;
    font-weight: 500;
    color: #0f172a;
    gap: 0.375rem;
}

.cfg-acessos-select {
    max-width: 24rem;
}

.cfg-resumo {
    margin: 0;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #f8fafc;
    padding: 0.65rem 0.9rem;
    font-size: 13px;
    line-height: 1.55;
    color: #0f172a;
}

.cfg-resumo.is-warn {
    border-color: #fcd34d;
    background: #fffbeb;
    color: #92400e;
}

.cfg-acessos-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cfg-origem,
.cfg-nivel,
.cfg-sens {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    padding: 0.15rem 0.55rem;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.cfg-origem--equipe { border-color: #7dd3fc; background: #f0f9ff; color: #0369a1; }
.cfg-origem--perfil { border-color: #c4b5fd; background: #f5f3ff; color: #5b21b6; }
.cfg-origem--excecao { border-color: #fcd34d; background: #fffbeb; color: #92400e; }
.cfg-origem--seguranca { border-color: #fda4af; background: #fff1f2; color: #9f1239; }
.cfg-origem--padrao { background: #f8fafc; color: #64748b; }

.cfg-nivel--visualizar { border-color: #7dd3fc; background: #f0f9ff; color: #0369a1; }
.cfg-nivel--trabalhar { border-color: #6ee7b7; background: #ecfdf5; color: #047857; }
.cfg-nivel--administrar { border-color: #fcd34d; background: #fffbeb; color: #92400e; }
.cfg-nivel--sem_acesso { background: #f1f5f9; color: #64748b; }

.cfg-sens-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.cfg-sens.is-ok {
    border-color: #6ee7b7;
    background: #ecfdf5;
    color: #047857;
}

.cfg-sens.is-off {
    background: #f8fafc;
    color: #64748b;
}

.cfg-chip--info {
    border-color: #7dd3fc;
    background: #f0f9ff;
    color: #0369a1;
}

.cfg-sim-modal {
    max-width: 24rem;
    width: min(24rem, calc(100vw - 2rem));
}

.cfg-sim-menu {
    display: grid;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    list-style: none;
    grid-template-columns: 1fr 1fr;
}

.cfg-sim-menu li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    padding: 0.5rem 0.65rem;
    font-size: 13px;
    color: #0f172a;
}

.cfg-sim-menu li span:last-child {
    color: #64748b;
    font-size: 11.5px;
    white-space: nowrap;
}

.cfg-acesso-pessoa {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem 1.25rem;
}

.cfg-acesso-pessoa__select {
    margin: 0;
    min-width: min(100%, 22rem);
    flex: 1 1 16rem;
}

.cfg-acesso-pessoa__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    padding-bottom: 0.2rem;
}

.cfg-acessos-split {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(17rem, 0.75fr);
    gap: 1.25rem;
    align-items: start;
}

.cfg-acessos-panel {
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.cfg-acessos-panel:last-child {
    position: sticky;
    top: 1rem;
}

.cfg-acessos-panel__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
}

.cfg-acessos-panel__head .cfg-label-upper {
    margin: 0 0 0.15rem;
}

.cfg-acessos-panel__head .cfg-muted {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: #64748b;
}

.cfg-acessos-panel__count {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
}

.cfg-menu-acesso {
    border: 1px solid #e5e7eb;
    border-radius: 0.85rem;
    background: #fff;
    overflow: auto;
    max-height: min(70vh, 44rem);
}

.cfg-menu-acesso--perfil {
    max-height: none;
}

.cfg-menu-acesso__hint {
    margin: 0 0 0.65rem;
}

.cfg-menu-acesso__lista {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cfg-menu-acesso__lista.is-raiz > .cfg-menu-acesso__item.is-grupo:not(.is-subgrupo) + .cfg-menu-acesso__item.is-grupo {
    border-top: 1px solid #f1f5f9;
}

.cfg-menu-acesso__lista.is-raiz > .cfg-menu-acesso__item.is-grupo:not(.is-subgrupo) > .cfg-menu-acesso__linha {
    padding: 0.85rem 1rem 0.35rem;
}

.cfg-menu-acesso__lista.is-raiz > .cfg-menu-acesso__item.is-grupo:not(.is-subgrupo) > .cfg-menu-acesso__linha .cfg-menu-acesso__label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: #334155;
}

.cfg-menu-acesso__lista.is-raiz > .cfg-menu-acesso__item.is-grupo:not(.is-subgrupo) > .cfg-menu-acesso__linha .cfg-menu-acesso__icone {
    display: none;
}

.cfg-menu-acesso__lista.is-raiz > .cfg-menu-acesso__item.is-grupo > .cfg-menu-acesso__lista {
    padding: 0 0.5rem 0.7rem 0.35rem;
}

.cfg-menu-acesso__item.is-subgrupo > .cfg-menu-acesso__linha {
    min-height: 2rem;
    padding: 0.45rem 0.85rem 0.15rem 1.85rem;
}

.cfg-menu-acesso__item.is-subgrupo > .cfg-menu-acesso__linha .cfg-menu-acesso__label {
    font-size: 12.5px;
    font-weight: 600;
    color: #64748b;
}

.cfg-menu-acesso__item.is-subgrupo > .cfg-menu-acesso__linha .cfg-menu-acesso__icone {
    display: none;
}

.cfg-menu-acesso__item.is-subgrupo > .cfg-menu-acesso__lista {
    margin: 0;
    padding: 0 0.35rem 0.35rem 1.35rem;
    border-left: 0;
}

.cfg-menu-acesso__linha {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    min-height: 2.6rem;
    padding: 0.4rem 0.85rem;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
}

button.cfg-menu-acesso__linha {
    cursor: pointer;
    border-radius: 0.5rem;
}

button.cfg-menu-acesso__linha:hover,
button.cfg-menu-acesso__linha:focus-visible {
    background: transparent;
}

button.cfg-menu-acesso__linha:hover .cfg-menu-acesso__label,
button.cfg-menu-acesso__linha:focus-visible .cfg-menu-acesso__label {
    color: #c2410c;
}

button.cfg-menu-acesso__linha:disabled {
    cursor: wait;
    opacity: 0.7;
}

.cfg-menu-acesso__item.is-off .cfg-menu-acesso__label {
    color: #94a3b8;
}

.cfg-menu-acesso__item.is-off .cfg-menu-acesso__icone {
    color: #cbd5e1;
}

.cfg-menu-acesso__nome {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
    flex: 1;
}

.cfg-menu-acesso__icone {
    display: inline-flex;
    width: 1.25rem;
    height: 1.25rem;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    background: transparent;
    color: #ea580c;
    flex-shrink: 0;
}

.cfg-menu-acesso__icone svg {
    width: 1rem;
    height: 1rem;
}

.cfg-menu-acesso__label {
    font-size: 14px;
    font-weight: 500;
    color: #0f172a;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cfg-menu-acesso__ex {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: #b45309;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    flex-shrink: 0;
}

.cfg-menu-acesso__acoes {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    flex-shrink: 0;
}

.cfg-menu-acesso__count {
    font-size: 12px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: #94a3b8;
}

.cfg-menu-acesso__chip {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
    flex-shrink: 0;
}

.cfg-menu-acesso__chip.is-on {
    background: #ecfdf5;
    color: #047857;
}

.cfg-menu-acesso__chip.is-off {
    background: transparent;
    color: #94a3b8;
}

.cfg-menu-acesso--perfil .cfg-menu-acesso__item.is-folha:hover > .cfg-menu-acesso__linha .cfg-menu-acesso__label {
    color: #c2410c;
}

.cfg-menu-acesso__nivel {
    min-width: 9.75rem;
}

.cfg-menu-acesso__nivel .hg-select,
.cfg-menu-acesso__nivel .hg-ps-rselect-trigger {
    min-height: 2.1rem;
    min-width: 9.75rem;
    width: 9.75rem;
    padding: 0.25rem 0.65rem;
    font-size: 13px;
    font-weight: 500;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.55rem;
    color: #0f172a;
}

.cfg-menu-acesso--perfil .is-nivel-sem_acesso .hg-select,
.cfg-menu-acesso--perfil .is-nivel-sem_acesso .hg-ps-rselect-trigger {
    color: #94a3b8;
}

.cfg-menu-acesso__linha .cfg-pf-mod,
.cfg-menu-acesso__linha .cfg-field {
    margin: 0;
}

.cfg-page .cfg-menu-acesso,
.cfg-page .cfg-menu-acesso--perfil,
.cfg-page .cfg-menu-acesso .cfg-menu-acesso__linha {
    background: #fff;
}

.cfg-sens-fold {
    border: 0;
    border-top: 1px solid #f1f5f9;
    border-radius: 0;
    background: transparent;
    padding: 0.15rem 0 0;
}

.cfg-sens-fold summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    cursor: pointer;
    list-style: none;
    padding: 0.7rem 0.1rem;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: #334155;
}

.cfg-sens-fold summary::-webkit-details-marker {
    display: none;
}

.cfg-sens-fold summary span {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: #94a3b8;
}

.cfg-sens-fold .cfg-sens-list {
    padding: 0 0 0.4rem;
}

.cfg-sim-shell {
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e7eb;
    border-radius: 0.85rem;
    background: #fff;
    color: #0f172a;
    overflow: hidden;
    max-height: min(70vh, 44rem);
    box-shadow: none;
}

.cfg-sim-shell.is-updating {
    opacity: 0.62;
}

.cfg-sim-shell__head {
    padding: 0.9rem 1rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.cfg-sim-shell__kicker {
    margin: 0 0 0.2rem;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    color: #94a3b8;
}

.cfg-sim-shell__titulo {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cfg-sim-shell__meta {
    margin: 0.2rem 0 0;
    font-size: 12.5px;
    color: #94a3b8;
}

.cfg-sim-shell__nav {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    padding: 0.55rem 0.55rem 0.7rem;
    overflow: auto;
    flex: 1;
}

.cfg-sim-shell__grupo {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    margin-top: 0.55rem;
}

.cfg-sim-shell__grupo-titulo {
    display: block;
    margin: 0 0 0.15rem;
    padding: 0.15rem 0.7rem;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: #94a3b8;
}

.cfg-sim-shell__subgrupo {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    margin: 0.1rem 0 0.15rem;
    padding: 0;
    border-left: 0;
}

.cfg-sim-shell__label,
.cfg-sim-shell__link {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    color: #0f172a;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.3;
    padding: 0.4rem 0.7rem;
    border-radius: 0.45rem;
    font-family: inherit;
}

.cfg-sim-shell__label {
    color: #94a3b8;
    font-size: 12.5px;
    font-weight: 600;
    padding-left: 0.7rem;
}

.cfg-sim-shell__link svg,
.cfg-sim-shell__label svg {
    width: 0.95rem;
    height: 0.95rem;
    flex-shrink: 0;
    color: #ea580c;
}

.cfg-sim-shell__link span,
.cfg-sim-shell__label span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cfg-sim-shell__link.is-brand {
    font-weight: 600;
}

.cfg-sim-shell__link.is-child {
    padding-left: 1.7rem;
}

.cfg-sim-shell__vazio,
.cfg-sim-shell__hint {
    margin: 0.45rem 0.55rem 0.15rem;
    font-size: 13px;
    line-height: 1.45;
    color: #94a3b8;
}

.cfg-sim-shell__foot {
    padding: 0.7rem 0.85rem 0.85rem;
    border-top: 1px solid #f1f5f9;
    background: #fff;
}

.cfg-sim-shell__cta {
    width: 100%;
    justify-content: center;
}

.cfg-sim-modal .cfg-sim-shell {
    margin-top: 0.15rem;
    max-height: min(60vh, 36rem);
}

@media (max-width: 980px) {
    .cfg-acessos-split {
        grid-template-columns: 1fr;
    }

    .cfg-acessos-panel:last-child {
        position: static;
    }

    .cfg-menu-acesso,
    .cfg-sim-shell {
        max-height: none;
    }
}

@media (max-width: 640px) {
    .cfg-sim-menu { grid-template-columns: 1fr; }

    .cfg-acesso-pessoa {
        align-items: stretch;
        flex-direction: column;
    }
}

.cfg-page .cfg-card:has(.cfg-pf-grid) .cfg-card__title--caps,
.cfg-page .cfg-pf .cfg-card__title--caps {
    color: #0f172a;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.cfg-pf {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cfg-pf-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.cfg-pf-card {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    text-align: left;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #fff;
    padding: 0.65rem 0.8rem;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

.cfg-pf-card:hover {
    background: #f8fafc;
}

.cfg-pf-card.is-active {
    border-color: #F48120;
    background: #fff7ed;
}

.cfg-pf-card__name {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
}

.cfg-pf-card__name svg {
    color: #64748b;
    flex-shrink: 0;
}

.cfg-pf-card__desc {
    font-size: 11.5px;
    line-height: 1.4;
    color: #64748b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cfg-pf-card__meta {
    margin-top: 0.15rem;
    font-size: 11px;
    color: #64748b;
}

.cfg-pf-head-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.cfg-pf-ident {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.cfg-page .cfg-pf-input,
.cfg-page .cfg-pf-textarea {
    height: 2.25rem;
    min-width: 0;
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.cfg-page .cfg-pf-textarea {
    height: auto;
    min-height: 3.4rem;
    padding: 0.5rem 0.75rem;
    resize: vertical;
}

.cfg-page .cfg-pf-input:focus,
.cfg-page .cfg-pf-textarea:focus {
    outline: none;
    border-color: #F48120;
    box-shadow: 0 0 0 1px #F48120;
}

.cfg-pf-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #f8fafc;
    padding: 0.65rem 0.85rem;
}

.cfg-pf-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 12px;
    color: #0f172a;
    margin: 0;
}

.cfg-pf-toolbar__meta {
    margin-left: auto;
    font-size: 11px;
    color: #64748b;
}

.cfg-page .cfg-btn--ghost-danger {
    height: 2rem;
    padding: 0 0.6rem;
    border: 0;
    background: transparent;
    color: #dc2626;
    font-size: 0.8125rem;
    font-weight: 500;
}

.cfg-page .cfg-btn--ghost-danger:hover {
    background: #fef2f2;
}

.cfg-page .cfg-btn--ghost {
    border: 0;
    background: transparent;
    color: #64748b;
}

.cfg-page .cfg-btn--ghost:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.cfg-page .cfg-btn--xs {
    height: 1.75rem;
    padding: 0 0.55rem;
    font-size: 11px;
}

.cfg-page .cfg-btn--primary:disabled {
    background: #fdba74;
    border-color: #fdba74;
    color: #fff;
    opacity: 0.7;
    cursor: not-allowed;
}

.cfg-pf-search {
    position: relative;
}

.cfg-pf-search svg {
    position: absolute;
    left: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.cfg-pf-search .cfg-input {
    height: 2.25rem;
    padding-left: 2.1rem;
}

.cfg-pf-group-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.cfg-pf-group-head .cfg-label-upper {
    margin: 0;
}

.cfg-pf-group-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.cfg-pf-mods {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.cfg-pf-mod {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #fff;
}

.cfg-pf-mod p {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: #0f172a;
}

.cfg-pf-mod span {
    display: block;
    font-size: 11px;
    color: #64748b;
}

.cfg-page .cfg-pf-nivel {
    width: 9.5rem;
    min-width: 9.5rem;
    height: 2rem;
    padding: 0 1.8rem 0 0.6rem;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.cfg-page .cfg-pf-mod .hg-ps-rselect {
    width: 9.5rem;
    min-width: 9.5rem;
    flex-shrink: 0;
}

.cfg-page .cfg-pf-mod .hg-ps-rselect-trigger {
    height: 2rem;
    font-size: 0.75rem;
}

.cfg-pf-diffs {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
    max-height: 16rem;
    overflow: auto;
}

.cfg-page .cfg-pf-resumo {
    overflow-x: auto;
}

.cfg-page .cfg-table--resumo {
    min-width: 45rem;
    font-size: 0.75rem;
}

.cfg-page .cfg-table--resumo th {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
    background: #f8fafc;
    white-space: nowrap;
    padding: 0.55rem 0.75rem;
    height: auto;
}

.cfg-page .cfg-table--resumo th:first-child {
    color: #0f172a;
    font-weight: 600;
}

.cfg-page .cfg-table--resumo td {
    padding: 0.55rem 0.75rem;
    vertical-align: middle;
}

.cfg-page .cfg-table--resumo td.cfg-strong {
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
}

.cfg-toggle:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

@media (max-width: 900px) {
    .cfg-pf-grid,
    .cfg-pf-mods,
    .cfg-pf-ident {
        grid-template-columns: 1fr;
    }
    .cfg-pf-toolbar__meta { margin-left: 0; }
}

.cfg-page .cfg-aud .cfg-card__title--caps {
    color: #0f172a;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.cfg-aud-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cfg-aud-filters {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cfg-aud-filters__row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.5rem 0.65rem;
}

.cfg-aud-search {
    position: relative;
    flex: 1 1 14rem;
    min-width: 12rem;
}

.cfg-aud-search svg {
    position: absolute;
    left: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.cfg-aud-search .cfg-input {
    height: 2.25rem;
    width: 100%;
    padding-left: 2.1rem;
    font-size: 0.8125rem;
}

.cfg-aud-search .cfg-input:focus {
    outline: none;
    border-color: #F48120;
    box-shadow: 0 0 0 1px #F48120;
}

.cfg-page .cfg-aud-field {
    font-size: 0.875rem;
    font-weight: 400;
    color: #0f172a;
    gap: 0.25rem;
    text-transform: none;
}

.cfg-aud-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.cfg-page .cfg-aud-field .hg-ps-rselect {
    width: 10rem;
    min-width: 10rem;
}

.cfg-page .cfg-aud-field .cfg-xfer-select,
.cfg-page .cfg-aud-field .cfg-xfer-date,
.cfg-page .cfg-aud-field .cfg-xfer-datewrap {
    height: 2.25rem;
    width: 10rem;
    min-width: 10rem;
    font-size: 0.8125rem;
}

.cfg-page .cfg-table--aud td {
    font-size: 0.8125rem;
}

.cfg-nowrap { white-space: nowrap; }

.cfg-result-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 9999px;
    border: 1px solid;
    padding: 0.12rem 0.5rem;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.cfg-result-pill--sucesso {
    border-color: #6ee7b7;
    background: #ecfdf5;
    color: #047857;
}

.cfg-result-pill--pendente {
    border-color: #fcd34d;
    background: #fffbeb;
    color: #92400e;
}

.cfg-result-pill--negado {
    border-color: #fda4af;
    background: #fff1f2;
    color: #9f1239;
}

.cfg-page .cfg-logs .cfg-card__title--caps {
    color: #0f172a;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.cfg-log-kpis {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.5rem;
}

.cfg-log-kpi {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    padding: 0.65rem 0.75rem;
}

.cfg-log-kpi__icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: rgba(244, 129, 32, 0.12);
    color: #F48120;
}

.cfg-log-kpi__icon svg {
    width: 1rem;
    height: 1rem;
}

.cfg-log-kpi__label {
    margin: 0;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.cfg-log-kpi__value {
    margin: 0.1rem 0 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.1;
    color: #0f172a;
}

.cfg-cell-stack {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.cfg-cell-stack__main {
    font-weight: 500;
    color: #0f172a;
}

.cfg-cell-stack__sub {
    font-size: 0.75rem;
    color: #64748b;
}

.cfg-table-wrap--logs {
    max-height: 32rem;
    overflow: auto;
}

.cfg-page .cfg-table--logs thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fff;
}

.cfg-page .cfg-table--logs td {
    font-size: 0.8125rem;
    vertical-align: top;
}

.cfg-page .cfg-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.cfg-result-pill--erro {
    border-color: #fda4af;
    background: #fff1f2;
    color: #9f1239;
}

.cfg-logs .cfg-result-pill--negado {
    border-color: #fcd34d;
    background: #fffbeb;
    color: #92400e;
}

@media (max-width: 1100px) {
    .cfg-log-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .cfg-log-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.cfg-pol {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cfg-page .cfg-pol .cfg-card__title--caps {
    color: #0f172a;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.cfg-pol-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cfg-pol-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem 1.5rem;
}

.cfg-pol-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cfg-pol-switch {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.cfg-pol-switch--box {
    align-items: center;
    padding: 0.85rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #f8fafc;
}

.cfg-pol-label {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
}

.cfg-page .cfg-pol .cfg-muted {
    font-size: 0.75rem;
    color: #64748b;
}

.cfg-pol-field {
    font-weight: 400;
    color: #0f172a;
    gap: 0.35rem;
}

.cfg-pol-num {
    position: relative;
    display: block;
}

.cfg-page .cfg-pol-num .cfg-input {
    height: 2.5rem;
    padding-right: 6.25rem;
    font-size: 0.875rem;
}

.cfg-page .cfg-pol-num .cfg-input:focus {
    outline: none;
    border-color: #F48120;
    box-shadow: 0 0 0 1px #F48120;
}

.cfg-pol-num__suf {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8125rem;
    color: #94a3b8;
    pointer-events: none;
}

.cfg-pol-fuso {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(16rem, 1fr);
    gap: 1rem;
    align-items: stretch;
}

.cfg-pol-fuso-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    background: #f8fafc;
    color: #334155;
    font-size: 0.8125rem;
    line-height: 1.4;
}

.cfg-pol-fuso-box strong {
    font-weight: 600;
    color: #0f172a;
}

.cfg-pol-fuso-box p {
    margin: 0;
    color: #64748b;
}

.cfg-pol-intro {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #475569;
}

.cfg-pol-intro strong {
    color: #0f172a;
    font-weight: 600;
}

.cfg-exp-list {
    display: flex;
    flex-direction: column;
}

.cfg-exp-row {
    display: grid;
    grid-template-columns: auto 11rem minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem 1rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.cfg-exp-row:last-child {
    border-bottom: 0;
}

.cfg-exp-row__dia {
    font-size: 0.875rem;
    font-weight: 500;
    color: #0f172a;
}

.cfg-exp-row__horas {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cfg-exp-row__as {
    font-size: 0.8125rem;
    color: #64748b;
}

.cfg-exp-row__off {
    margin: 0;
}

.cfg-page .cfg-pol-time {
    width: 7.75rem;
    min-width: 7.75rem;
    height: 2.25rem;
    font-size: 0.8125rem;
}

.cfg-exp-row__horas .cfg-xfer-datewrap {
    width: 7.75rem;
}

.cfg-pol-sub {
    margin: 0 0 0.65rem;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.cfg-pol-equipes {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
}

.cfg-pol-equipes .cfg-pol-sub {
    margin: 0;
    padding: 0.65rem 0.85rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.cfg-pol-equipes .cfg-pol-eq-grid {
    padding: 0.75rem;
}

.cfg-pol-equipes .cfg-pol-note {
    margin: 0;
    padding: 0.65rem 0.85rem;
    border-top: 1px solid #f1f5f9;
}

.cfg-pol-eq-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.cfg-pol-eq {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin: 0;
    padding: 0.65rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #fff;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

.cfg-pol-eq:hover {
    background: #f8fafc;
}

.cfg-pol-eq.is-on {
    border-color: #fed7aa;
    background: #fff7ed;
}

.cfg-pol-eq__text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.cfg-pol-eq__text strong {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #0f172a;
}

.cfg-pol-eq__text span {
    font-size: 0.75rem;
    color: #64748b;
}

.cfg-xfer-radio.is-on {
    background: #F48120;
    box-shadow: inset 0 0 0 2.5px #fff;
}

.cfg-pol-note {
    margin: 0.75rem 0 0;
}

@media (max-width: 900px) {
    .cfg-pol-grid,
    .cfg-pol-grid--3,
    .cfg-pol-fuso,
    .cfg-pol-eq-grid {
        grid-template-columns: 1fr;
    }
    .cfg-exp-row {
        grid-template-columns: auto 1fr;
    }
    .cfg-exp-row__horas,
    .cfg-exp-row__off {
        grid-column: 1 / -1;
        padding-left: 3.25rem;
    }
}

.cfg-apr {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cfg-apr-head {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.cfg-page .cfg-apr .cfg-card__title--caps {
    color: #0f172a;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.cfg-apr-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.cfg-apr-card {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1rem 1.1rem 1.1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 1px 2px rgb(15 23 42 / 6%);
}

.cfg-apr-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.cfg-apr-card__top h3 {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0f172a;
}

.cfg-apr-card__top .cfg-muted {
    margin: 0.2rem 0 0;
    font-size: 0.75rem;
}

.cfg-apr-card__toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #334155;
}

.cfg-apr-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.cfg-apr-card.is-off .cfg-apr-card__body {
    opacity: 0.45;
    pointer-events: none;
}

.cfg-apr-alert {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.35rem 0 0.15rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid #f5c2c7;
    background: #fdecee;
    color: #842029;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    line-height: 1.25;
}

.cfg-apr-alert svg {
    flex: 0 0 auto;
}

.cfg-apr-card__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.cfg-page .cfg-apr-prazo {
    height: 2.5rem;
    font-size: 0.875rem;
}

.cfg-page .cfg-apr-prazo:focus {
    outline: none;
    border-color: #F48120;
    box-shadow: 0 0 0 1px #F48120;
}

.cfg-apr-perfis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem 0.75rem;
    margin-top: 0.4rem;
}

.cfg-apr-check {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    margin: 0;
    font-size: 0.8125rem;
    color: #0f172a;
    cursor: pointer;
    line-height: 1.3;
}

.cfg-apr-check input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1rem;
    height: 1rem;
    margin: 0.1rem 0 0;
    flex-shrink: 0;
    border: 1.5px solid #cbd5e1;
    border-radius: 0.25rem;
    background: #fff;
    cursor: pointer;
    display: inline-grid;
    place-content: center;
}

.cfg-apr-check input[type="checkbox"]:hover {
    border-color: #F48120;
}

.cfg-apr-check input[type="checkbox"]:checked {
    background: #F48120;
    border-color: #F48120;
}

.cfg-apr-check input[type="checkbox"]:checked::after {
    content: "";
    width: 0.28rem;
    height: 0.5rem;
    border: solid #fff;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg) translate(-0.5px, -0.5px);
}

.cfg-apr-adv {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
}

.cfg-apr-adv__btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 0;
    padding: 0.65rem 0.75rem;
    border: 0;
    background: #f8fafc;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    text-align: left;
}

.cfg-apr-adv__btn svg {
    flex-shrink: 0;
    color: #94a3b8;
    transition: transform 0.15s ease;
}

.cfg-apr-adv__btn svg.is-open {
    transform: rotate(90deg);
}

.cfg-apr-adv__body {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.75rem;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.cfg-apr-card__foot {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (max-width: 900px) {
    .cfg-apr-grid,
    .cfg-apr-card__row,
    .cfg-apr-perfis {
        grid-template-columns: 1fr;
    }
}

.cfg-page .cfg-cf .cfg-card__title--caps {
    color: #0f172a;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.cfg-cf-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cfg-cf-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cfg-cf-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border: 1px solid #fdba74;
    border-radius: 0.75rem;
    background: #fffbeb;
}

.cfg-cf-item--critico {
    border-color: #fda4af;
    background: #fff1f2;
}

.cfg-cf-item__icon {
    flex-shrink: 0;
    margin-top: 0.1rem;
    color: #F48120;
}

.cfg-cf-item--critico .cfg-cf-item__icon {
    color: #e11d48;
}

.cfg-cf-item__body {
    flex: 1;
    min-width: 0;
}

.cfg-cf-item__title {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
    color: #0f172a;
}

.cfg-cf-item__desc {
    margin: 0.2rem 0 0;
    font-size: 0.75rem;
    line-height: 1.45;
    color: #64748b;
}

.cfg-cf-item .cfg-btn {
    flex-shrink: 0;
    align-self: center;
}

@media (max-width: 720px) {
    .cfg-cf-item {
        flex-wrap: wrap;
    }
    .cfg-cf-item .cfg-btn {
        margin-left: 2.1rem;
        align-self: flex-start;
    }
}

.cfg-pz {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cfg-page .cfg-pz .cfg-card__title--caps {
    color: #0f172a;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.cfg-pz-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cfg-page .cfg-pz .cfg-textarea {
    min-height: 5.5rem;
    resize: vertical;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.cfg-page .cfg-pz .cfg-textarea:focus {
    outline: none;
    border-color: #F48120;
    box-shadow: 0 0 0 1px #F48120;
}

.cfg-pz-combo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cfg-page .cfg-pz-num {
    width: 5rem;
    min-width: 5rem;
    height: 2.5rem;
    font-size: 0.875rem;
}

.cfg-pz-combo .cfg-xfer-select {
    width: 9rem;
}

.cfg-pz-combo .hg-ps-rselect {
    width: 9rem;
}

.cfg-pz-nc {
    max-width: 18rem;
}

.cfg-page .cfg-pz .is-off {
    opacity: 0.45;
    pointer-events: none;
}

.cfg-page .cfg-pz .cfg-muted {
    font-size: 0.75rem;
    color: #64748b;
}

.cfg-pz-text {
    width: 100%;
}

.cfg-pz-imgs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem 1.5rem;
}

.cfg-pz-img {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.cfg-pz-img__row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cfg-pz-img__row .cfg-btn {
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
}

.cfg-pz-img__preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 9.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #f8fafc;
    color: #94a3b8;
    font-size: 0.8125rem;
    overflow: hidden;
}

.cfg-pz-img__preview img {
    display: block;
    max-width: 100%;
    max-height: 9.5rem;
    object-fit: contain;
}

.cfg-pz-color {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cfg-pz-color .cfg-input {
    flex: 1;
    min-width: 0;
    height: 2.5rem;
}

.cfg-pz-color__swatch {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #fff;
    cursor: pointer;
    flex-shrink: 0;
}

.cfg-pz-color__swatch::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.cfg-pz-color__swatch::-webkit-color-swatch {
    border: 0;
    border-radius: 0.35rem;
}

.cfg-pz-notify-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.4rem 0 0.65rem;
}

.cfg-pz-notify-swatch {
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 9999px;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgb(15 23 42 / 0.12);
}

.cfg-pz-notify-swatch.is-selected {
    border-color: #0f172a;
}

.cfg-pz-notify-preview {
    max-width: 22.5rem;
}

.cfg-pz-notify-preview .hg-interesse-card {
    box-shadow: none;
    border: 1px solid var(--hg-border, #e2e8f0);
}

.cfg-pz-notify-sound {
    width: 14rem !important;
    flex: 1;
    min-width: 0;
}

.cfg-pz-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.45rem;
    padding: 1.1rem 1.25rem;
    border-radius: 0.75rem;
    min-height: 4.25rem;
}

.cfg-pz-preview__btn {
    border: 0;
    border-radius: 0.45rem;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.55rem 1rem;
    cursor: default;
    pointer-events: none;
}

.cfg-pz-preview__txt {
    color: #fff;
    font-size: 0.875rem;
}

@media (max-width: 720px) {
    .cfg-pz-imgs {
        grid-template-columns: 1fr;
    }
}

.cfg-dx {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cfg-dx-stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.cfg-page .cfg-dx .cfg-card__title--caps {
    color: #0f172a;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.35;
}

.cfg-page .cfg-dx .cfg-muted {
    font-size: 0.75rem;
    color: #64748b;
}

.cfg-dx-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cfg-dx-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cfg-dx-pill {
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    border-radius: 0.5rem;
    padding: 0.45rem 0.8rem;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 1px 2px rgb(15 23 42 / 4%);
}

.cfg-dx-pill:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.cfg-dx-pill.is-on {
    background: #F48120;
    border-color: #F48120;
    color: #fff;
    box-shadow: 0 1px 2px rgb(244 129 32 / 25%);
}

.cfg-dx-pill.has-excecao {
    position: relative;
    padding-right: 1.35rem;
}

.cfg-dx-pill-dot {
    display: inline-block;
    width: 0.45rem;
    height: 0.45rem;
    margin-left: 0.35rem;
    border-radius: 999px;
    background: #F48120;
    vertical-align: middle;
}

.cfg-dx-pill.is-on .cfg-dx-pill-dot {
    background: #fff;
}

.cfg-dx-heranca {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.6rem;
    background: #fff7ed;
    color: #9a3412;
    font-size: 0.8125rem;
}

.cfg-dx-heranca p {
    margin: 0;
    flex: 1 1 16rem;
}

.cfg-dx-equipes {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cfg-dx-equipe {
    border: 1px solid #e2e8f0;
    border-radius: 0.6rem;
    padding: 0.65rem 0.8rem;
    background: #fff;
}

.cfg-dx-equipe__head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
}

.cfg-dx-equipe__head > span:not(.cfg-dx-equipe__count) {
    min-width: 0;
    flex: 1 1 auto;
}

.cfg-dx-equipe__count {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
}

.cfg-dx-equipe__users {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem 1rem;
    margin-top: 0.65rem;
    padding-left: 1.4rem;
}

.cfg-dx-tag {
    display: inline-flex;
    margin-top: 0.45rem;
    padding: 0.15rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.cfg-dx-tag--conv {
    background: #dbeafe;
    color: #1d4ed8;
}

.cfg-dx-tag--ret {
    background: #ffedd5;
    color: #c2410c;
}

.cfg-dx-tag--myh {
    background: #dcfce7;
    color: #15803d;
}

.cfg-dx-tag--res {
    background: #f3e8ff;
    color: #7e22ce;
}

.cfg-dx-tag--rev {
    background: #e0f2fe;
    color: #0369a1;
}

.cfg-dx-min {
    max-width: 18rem;
}

.cfg-dx-horario {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.cfg-dx-horario.is-off {
    opacity: 0.45;
    pointer-events: none;
}

.cfg-dx-horario__dia {
    display: grid;
    grid-template-columns: minmax(10.5rem, 13rem) 2.75rem minmax(0, 1fr) 2rem;
    align-items: center;
    gap: 0.75rem 0.85rem;
    min-height: 2.75rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid #eef2f7;
}

.cfg-dx-horario__dia:last-child {
    border-bottom: 0;
}

.cfg-dx-horario__dia--acao {
    min-height: 2.15rem;
    border-bottom: 0;
}

.cfg-dx-horario__rotulo {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #0f172a;
}

.cfg-dx-horario__data {
    width: 100%;
    min-width: 0;
    height: 2.25rem;
    padding: 0 0.55rem;
    font-size: 0.8125rem;
    line-height: 2.25rem;
}

.cfg-dx-horario__toggle-slot {
    display: block;
    width: 2.6rem;
}

.cfg-dx-horario__faixa {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.cfg-dx-horario__faixa .cfg-input {
    min-width: 0;
    flex: 1;
    max-width: 7.75rem;
    height: 2.25rem;
    padding: 0 0.55rem;
    font-size: 0.8125rem;
}

.cfg-dx-horario__off {
    font-size: 0.8125rem;
    color: #64748b;
}

.cfg-dx-horario__dia .cfg-icon-btn {
    justify-self: end;
}

.cfg-dx-horario-esp {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 0.35rem;
    padding-top: 0.85rem;
    border-top: 1px solid #eef2f7;
}

.cfg-dx-horario-esp.is-off {
    opacity: 0.45;
    pointer-events: none;
}

@media (max-width: 640px) {
    .cfg-dx-horario__dia {
        grid-template-columns: minmax(0, 1fr) auto 2rem;
        gap: 0.45rem 0.65rem;
    }

    .cfg-dx-horario__rotulo,
    .cfg-dx-horario__data {
        grid-column: 1;
    }

    .cfg-dx-horario__dia > .cfg-toggle,
    .cfg-dx-horario__toggle-slot {
        grid-column: 2;
        grid-row: 1;
    }

    .cfg-dx-horario__dia > .cfg-icon-btn {
        grid-column: 3;
        grid-row: 1;
    }

    .cfg-dx-horario__faixa,
    .cfg-dx-horario__off,
    .cfg-dx-horario__dia--acao .cfg-dx-all {
        grid-column: 1 / -1;
    }

    .cfg-dx-horario__faixa .cfg-input {
        max-width: none;
    }

    .cfg-dx-horario__dia--acao .cfg-dx-horario__rotulo,
    .cfg-dx-horario__dia--acao .cfg-dx-horario__toggle-slot {
        display: none;
    }
}

.cfg-dx-agents__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.55rem;
}

.cfg-dx-agents.is-off {
    opacity: 0.45;
    pointer-events: none;
}

.cfg-dx-all {
    border: 0;
    background: none;
    padding: 0;
    color: #F48120;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.cfg-dx-all:hover {
    color: #c2620f;
}

.cfg-dx-agents__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem 1rem;
}

.cfg-dx-note {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.6rem;
    background: #f8fafc;
    color: #475569;
    font-size: 0.75rem;
    line-height: 1.45;
}

.cfg-dx-note svg {
    flex-shrink: 0;
    margin-top: 0.1rem;
    color: #F48120;
}

.cfg-dx-note p {
    margin: 0;
}

@media (max-width: 900px) {
    .cfg-dx-agents__grid,
    .cfg-dx-equipe__users {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .cfg-dx-agents__grid,
    .cfg-dx-equipe__users {
        grid-template-columns: 1fr;
    }
}

/* Meta — seleção de sessão (pos-vendas-db/meta-sessoes) e wizard de criação
   de modelo de mensagem (pos-vendas-db/modelos-mensagem), 22/08/2026. */
.hg-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: 0.75rem;
}

.hg-card--session {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.hg-card-session-header {
    display: flex;
    justify-content: flex-end;
}

.hg-card-session-title {
    margin: 0;
    font-weight: 600;
    font-size: 0.9375rem;
}

.hg-card-session-number {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--hg-muted-foreground);
}

.hg-card--session .hg-btn {
    margin-top: 0.5rem;
}

.hg-template-editor {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 18rem;
    gap: 1.25rem;
    align-items: start;
}

@media (max-width: 900px) {
    .hg-template-editor {
        grid-template-columns: 1fr;
    }
}

.hg-template-editor-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hg-template-preview-sticky {
    position: sticky;
    top: 1rem;
}

.hg-template-variable-btn {
    font-size: 0.75rem;
}

.hg-template-buttons-row {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

/* —— Sessões Meta (Administração) —— */
.smeta-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}
.smeta-search {
    flex: 1;
    min-width: 16rem;
    max-width: 32rem;
}
.smeta-toolbar-meta {
    margin-left: auto;
}
.smeta-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--hg-muted-foreground);
    background: var(--hg-muted);
    border-radius: 999px;
    padding: 0.375rem 0.75rem;
}
.smeta-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    padding: 3rem 1.5rem;
}
.smeta-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    background: color-mix(in srgb, var(--hg-primary) 10%, transparent);
    color: var(--hg-primary);
    margin-bottom: 0.25rem;
}
.smeta-empty-text {
    margin: 0 0 0.5rem;
    max-width: 24rem;
    font-size: 0.8125rem;
    color: var(--hg-muted-foreground);
}
.smeta-table-wrap {
    overflow-x: auto;
}
.smeta-table th {
    white-space: nowrap;
}
.smeta-th-actions {
    width: 1%;
}
.smeta-user {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
}
.smeta-user-text {
    min-width: 0;
}
.smeta-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 999px;
    background: color-mix(in srgb, var(--hg-primary) 12%, white);
    color: var(--hg-primary);
    font-size: 11px;
    font-weight: 700;
}
.smeta-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    color: #334155;
}
.smeta-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 6px;
    padding: 3px 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11px;
}
.smeta-pill--token {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
}
.smeta-actions {
    white-space: nowrap;
}
.smeta-modal {
    max-width: 40rem;
}
.smeta-modal-sub {
    margin: 4px 0 0;
    font-size: 12px;
    color: #64748b;
    font-weight: 400;
}
.smeta-modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.smeta-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 4px;
}
.smeta-section + .smeta-section {
    border-top: 1px solid #f1f5f9;
    padding-top: 16px;
}
.smeta-section-title {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #94a3b8;
}
.smeta-token-input {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    resize: vertical;
}
.smeta-modal-delete {
    max-width: 26rem;
}
.smeta-delete-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.smeta-delete-warn {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 10px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
}
.smeta-delete-warn p {
    margin: 4px 0 0;
    font-size: 13px;
    color: #c2410c;
}
.smeta-delete-target {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.smeta-btn-danger {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #fff !important;
}
.smeta-btn-danger:hover {
    background: #b91c1c !important;
    border-color: #b91c1c !important;
}

.smeta-user-pick-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.smeta-user-pick-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.smeta-user-pick {
    max-height: 220px;
    overflow: auto;
    border: 1px solid var(--hg-border, #e2e8f0);
    border-radius: 10px;
    background: #fff;
    padding: 4px;
}

.smeta-user-pick-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.35;
}

.smeta-user-pick-item:hover {
    background: #f8fafc;
}

.smeta-user-pick-item.is-selected {
    background: #fff7ed;
}

.smeta-user-pick-item input {
    margin-top: 2px;
    flex-shrink: 0;
}

/* —— Ficha do cliente (sheet amplo, abas, KPIs, veículos) —— */
.cv-sheet__panel--ficha {
    width: min(1100px, 100%);
}

.cv-ficha-head {
    padding: 1.15rem 1.35rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

.cv-ficha-head__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.cv-ficha-head__identity {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
}

.cv-ficha-head__avatar {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    background: color-mix(in srgb, var(--hg-primary, #f48120) 12%, #fff);
    color: var(--hg-primary, #f48120);
    flex-shrink: 0;
}

.cv-ficha-head__name {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
    line-height: 1.3;
}

.cv-ficha-head__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.35rem;
}

.cv-ficha-head__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
    flex-shrink: 0;
}

.cv-ficha-campos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem 1rem;
    margin-top: 1rem;
}

@media (min-width: 640px) {
    .cv-ficha-campos {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.cv-ficha-campos--cadastro {
    margin-top: 0;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.15rem 2rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
}

.cv-ficha-cadastro-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.cv-sheet--stack {
    z-index: 220;
}

@media (min-width: 640px) {
    .cv-ficha-campos--cadastro {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.cv-ficha-campos--cadastro .cv-campo {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.cv-ficha-campos--cadastro .cv-ficha-grid__full {
    grid-column: 1 / -1;
}

.cv-ficha-campos--cadastro .cv-campo__label {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #94a3b8;
}

.cv-ficha-campos--cadastro .cv-campo__value {
    font-size: 0.875rem;
    font-weight: 400;
    color: #0f172a;
    line-height: 1.4;
    white-space: normal;
    word-break: break-word;
}

.cv-ficha-campos--cadastro .cv-campo--status .cv-campo__value {
    font-weight: 400;
}

.cv-ficha-campos--cadastro .cv-campo--status .cv-badge {
    border-radius: 9999px;
    padding: 0.2rem 0.65rem;
    font-size: 0.6875rem;
    font-weight: 600;
}

.cv-ficha-body {
    flex: 1;
    overflow: auto;
    padding: 1rem 1.35rem 1.5rem;
    background: #f8fafc;
}

.cv-ficha-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.25rem;
    border-radius: 0.5rem;
    background: #eef2f7;
    margin-bottom: 1rem;
}

.cv-ficha-tab {
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    border-radius: 0.375rem;
    cursor: pointer;
}

.cv-ficha-tab.is-active {
    background: #fff;
    color: #0f172a;
    box-shadow: 0 1px 2px rgb(15 23 42 / 8%);
}

.cv-ficha-kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
    .cv-ficha-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .cv-ficha-kpis {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.cv-ficha-kpi {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #fff;
    padding: 0.7rem 0.8rem;
    min-width: 0;
}

.cv-ficha-kpi__label {
    display: block;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #94a3b8;
}

.cv-ficha-kpi__value {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
    word-break: break-word;
}

.cv-ficha-sec {
    margin-bottom: 1.35rem;
}

.cv-ficha-sec__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.7rem;
}

.cv-ficha-sec__head .cv-ficha-sec__title {
    margin: 0;
}

.cv-ficha-sec__title {
    margin: 0 0 0.7rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #94a3b8;
}

.cv-ficha-sec__title span {
    color: #64748b;
    font-weight: 700;
}

.cv-ficha-empty {
    border: 1px dashed #cbd5e1;
    border-radius: 0.625rem;
    padding: 1rem 1.1rem;
    color: #64748b;
    font-size: 0.875rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
}

.cv-ficha-empty p {
    margin: 0;
}

.cv-ficha-vcard {
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    background: #fff;
    padding: 0.95rem 1.05rem;
    margin-bottom: 0.65rem;
}

.cv-ficha-vcard.is-focus {
    border-color: color-mix(in srgb, var(--hg-primary, #f48120) 55%, #e2e8f0);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--hg-primary, #f48120) 22%, transparent);
}

.cv-ficha-vcard__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.cv-ficha-vcard__id {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    color: #64748b;
}

.cv-ficha-vcard__icon {
    color: #94a3b8;
    flex-shrink: 0;
}

.cv-ficha-vcard__placa {
    font-size: 0.875rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: 0.02em;
}

.cv-ficha-vcard__model {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
}

.cv-ficha-vcard__link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border: 0;
    background: transparent;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
}

.cv-ficha-vcard__link:hover {
    color: var(--hg-primary, #f48120);
}

.cv-ficha-vcard__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem 1.15rem;
}

@media (min-width: 640px) {
    .cv-ficha-vcard__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.cv-ficha-vcard--cliente .cv-campo__label {
    font-size: 0.625rem;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

.cv-ficha-vcard--cliente .cv-campo__value {
    font-size: 0.8125rem;
    color: #0f172a;
    margin-top: 0.1rem;
}

.cv-ficha-vcard__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.9rem;
    padding-top: 0.8rem;
    border-top: 1px solid #f1f5f9;
}

.cv-ficha-action {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.4rem;
    background: #fff;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.2;
    padding: 0.4rem 0.65rem;
    cursor: pointer;
}

.cv-ficha-action:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
}

.cv-ficha-action svg {
    flex-shrink: 0;
    color: #94a3b8;
}

.cv-badge--mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.cv-ficha-grid__full {
    grid-column: 1 / -1;
}

.cv-ficha-tabpanel--wa {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 16.5rem);
    height: calc(100vh - 16.5rem);
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #fff;
}

.cv-ficha-wa-embed {
    flex: 1;
    min-height: 420px;
    background: #f8fafc;
}

.cv-ficha-wa-embed .hg-conv-embed {
    min-height: 420px;
    height: 100%;
}

.cv-ficha-alert {
    border: 1px solid color-mix(in srgb, #f59e0b 35%, #e2e8f0);
    background: color-mix(in srgb, #f59e0b 8%, #fff);
    border-radius: 0.5rem;
    padding: 0.75rem 0.9rem;
    font-size: 0.875rem;
    color: #0f172a;
    margin-bottom: 0.65rem;
}

.cv-ficha-alert span {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.75rem;
    color: #64748b;
}

.cv-rel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cv-rel__titulo {
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #0f172a;
    border-radius: 0.65rem;
    padding: 0.65rem 0.85rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.cv-rel__lista {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-left: 2px solid #e2e8f0;
    padding-left: 0.85rem;
}

.cv-acc {
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    background: #fff;
    overflow: hidden;
}

.cv-acc__sum {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.55rem;
    padding: 0.7rem 0.85rem;
    cursor: pointer;
    user-select: none;
}

.cv-acc__sum::-webkit-details-marker {
    display: none;
}

.cv-acc__arrow {
    color: #94a3b8;
    font-size: 0.8rem;
}

.cv-acc__title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
}

.cv-acc__meta {
    font-size: 0.75rem;
    color: #64748b;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cv-acc__count {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 500;
    color: #475569;
}

.cv-acc__trail {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.cv-acc__trail .cv-acc__count {
    margin-left: 0;
}

.cv-acc__chevron {
    display: inline-flex;
    color: #94a3b8;
    transition: transform 0.15s ease;
}

.cv-acc[open] .cv-acc__chevron {
    transform: rotate(180deg);
}

.cv-acc__body {
    padding: 0 0.85rem 0.85rem;
    border-top: 1px solid #f1f5f9;
}

.cv-acc__rel {
    margin: 0.65rem 0 0.5rem;
    font-size: 0.75rem;
    color: #64748b;
}


.cv-os-itens {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.85rem;
}

.cv-os-itens__label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 0.35rem;
}

.cv-os-itens__list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    overflow: hidden;
    background: #fff;
}

.cv-os-itens__row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.4rem 0.65rem;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.8rem;
    color: #0f172a;
}

.cv-os-itens__row:last-child {
    border-bottom: none;
}

.cv-os-itens__row span:last-child {
    flex-shrink: 0;
    color: #475569;
    font-variant-numeric: tabular-nums;
}

.cv-acc__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.75rem;
    padding-top: 0.65rem;
    border-top: 1px solid #f1f5f9;
}

.cv-tl-filters {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    background: #fff;
    padding: 0.75rem;
    margin-bottom: 0.85rem;
}

@media (min-width: 640px) {
    .cv-tl-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .cv-tl-filters {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.cv-tl-filters__field {
    display: grid;
    gap: 0.3rem;
}

.cv-tl-filters__field > span {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.cv-tl-filters__field select,
.cv-tl-filters__field input {
    height: 2.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0 0.6rem;
    font-size: 0.8125rem;
    color: #0f172a;
    background: #fff;
}

.cv-tl {
    list-style: none;
    margin: 0;
    padding: 0 0 0 1.35rem;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cv-tl::before {
    content: '';
    position: absolute;
    left: 0.55rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 1px;
    background: #e2e8f0;
}

.cv-tl__item {
    position: relative;
}

.cv-tl__dot {
    position: absolute;
    left: -1.35rem;
    top: 0.7rem;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 999px;
    border: 2px solid #cbd5e1;
    background: #fff;
    box-sizing: border-box;
}

.cv-tl__card {
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    background: #fff;
    padding: 0.7rem 0.85rem;
}

.cv-tl__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.45rem;
}

.cv-tl__head strong {
    font-size: 0.875rem;
    color: #0f172a;
}

.cv-tl__desc {
    margin: 0.4rem 0 0.55rem;
    font-size: 0.8125rem;
    color: #64748b;
}

.cv-vendas {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cv-dialog__panel--vinculo {
    width: min(32.5rem, 100%);
    max-width: 32.5rem;
}

.cv-dialog--vinculo {
    z-index: 260;
}

.cv-vinculo-dlg__header {
    padding: 1.1rem 1.25rem 0.95rem;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

.cv-vinculo-dlg__titles {
    min-width: 0;
    flex: 1;
    padding-right: 0.25rem;
}

.cv-dialog--vinculo .cv-dialog__title {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.25;
    text-transform: uppercase;
    color: #0f172a;
}

.cv-dialog--vinculo .cv-dialog__desc {
    margin: 0.4rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #64748b;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}

.cv-vinculo-dlg__body {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1.1rem 1.25rem 1.15rem;
    background: #fff;
}

.cv-vinculo-dlg__row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
}

@media (min-width: 480px) {
    .cv-vinculo-dlg__row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.cv-vinculo-dlg__field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}

.cv-vinculo-dlg__label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
    line-height: 1.2;
}

.cv-vinculo-dlg__req {
    color: #ea580c;
    font-weight: 700;
}

.cv-vinculo-dlg__opt {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
    color: #94a3b8;
}

.cv-vinculo-dlg__control {
    width: 100%;
    height: 2.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #fff;
    color: #0f172a;
    font-size: 0.875rem;
    line-height: 1.25;
    padding: 0 0.75rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.cv-vinculo-dlg__control::placeholder {
    color: #94a3b8;
}

.cv-vinculo-dlg__control:hover {
    border-color: #cbd5e1;
}

.cv-vinculo-dlg__control:focus {
    border-color: #fb923c;
    box-shadow: 0 0 0 3px rgb(251 146 60 / 22%);
}

.cv-vinculo-dlg__control--select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 1rem;
    padding-right: 2.25rem;
    cursor: pointer;
}

.cv-vinculo-dlg__control--area {
    height: auto;
    min-height: 5.25rem;
    padding: 0.65rem 0.75rem;
    resize: vertical;
    line-height: 1.45;
}

.cv-vinculo-dlg__footer {
    gap: 0.55rem;
    padding: 0.85rem 1.25rem;
    background: #fff;
    border-top: 1px solid #e2e8f0;
}

.cv-dialog--vinculo .cv-vinculo-dlg__footer .cv-btn {
    min-height: 2.25rem;
    padding: 0 0.95rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 0.5rem;
}

.cv-dialog--vinculo .cv-vinculo-dlg__footer .cv-btn--primary {
    background: #ea580c;
    border-color: #ea580c;
    color: #fff;
}

.cv-dialog--vinculo .cv-vinculo-dlg__footer .cv-btn--primary:hover:not(:disabled) {
    background: #c2410c;
    border-color: #c2410c;
}

.cv-dialog--vinculo .cv-vinculo-dlg__footer .cv-btn--outline {
    background: #fff;
    border-color: #e2e8f0;
    color: #0f172a;
}

.cv-dialog--vinculo .cv-vinculo-dlg__footer .cv-btn--outline:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.cv-vinculo-aud {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-height: 22rem;
    overflow-y: auto;
}

.cv-vinculo-aud__item {
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    background: #fff;
    padding: 0.7rem 0.85rem;
}

.cv-vinculo-aud__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.cv-vinculo-aud__head strong {
    font-size: 0.875rem;
    color: #0f172a;
}

.cv-vinculo-aud__meta,
.cv-vinculo-aud__extra {
    margin: 0.35rem 0 0;
    font-size: 0.75rem;
    color: #64748b;
}

.cv-vinculo-aud__vals {
    margin: 0.4rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    font-size: 0.8125rem;
    color: #0f172a;
}

.whk-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.hg-master-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.whk-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8125rem;
    background: color-mix(in srgb, var(--hg-muted) 55%, transparent);
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
}
.whk-page {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.whk-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}
.whk-metric {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--hg-border);
    border-radius: var(--hg-radius);
    background: var(--hg-card);
    text-align: left;
    cursor: pointer;
}
.whk-metric.is-active {
    border-color: var(--hg-primary);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--hg-primary) 35%, transparent);
}
.whk-metric-label {
    font-size: 0.75rem;
    color: var(--hg-muted-foreground);
}
.whk-metric-value {
    font-size: 1.25rem;
    font-weight: 650;
}
.whk-metric--ok .whk-metric-value { color: oklch(0.45 0.12 145); }
.whk-metric--err .whk-metric-value { color: oklch(0.52 0.18 27); }
.whk-nowrap { white-space: nowrap; }
.whk-body-cell {
    max-width: 18rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.whk-modal {
    max-width: 48rem;
    width: calc(100vw - 2rem);
}

/* Modal de detalhe — layout amplo, scroll interno e seções claras */
.whk-modal--detalhe {
    display: flex;
    flex-direction: column;
    max-width: min(56rem, calc(100vw - 2rem));
    max-height: min(90vh, 920px);
    overflow: hidden;
}

.whk-modal-header {
    flex-shrink: 0;
    align-items: flex-start;
    gap: 1rem;
    border-bottom: 1px solid var(--hg-border);
    padding-bottom: 1rem;
}

.whk-modal-header-main {
    flex: 1;
    min-width: 0;
}

.whk-modal-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.625rem;
}

.whk-modal-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin: 0.35rem 0 0;
    font-size: 0.8125rem;
    color: var(--hg-muted-foreground);
    line-height: 1.4;
}

.whk-meta-sep {
    opacity: 0.45;
    user-select: none;
}

.whk-meta-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
    word-break: break-all;
}

.whk-http-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    line-height: 1.2;
    white-space: nowrap;
}

.whk-http-badge--ok {
    color: oklch(0.42 0.12 145);
    background: color-mix(in srgb, oklch(0.55 0.14 145) 14%, transparent);
    border: 1px solid color-mix(in srgb, oklch(0.55 0.14 145) 28%, transparent);
}

.whk-http-badge--err {
    color: oklch(0.48 0.16 27);
    background: color-mix(in srgb, oklch(0.55 0.18 27) 12%, transparent);
    border: 1px solid color-mix(in srgb, oklch(0.55 0.18 27) 26%, transparent);
}

.whk-modal-body {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-top: 0.25rem;
    scrollbar-gutter: stable;
}

.whk-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.125rem 0;
    border-bottom: 1px solid color-mix(in srgb, var(--hg-border) 80%, transparent);
}

.whk-section:last-child {
    border-bottom: 0;
    padding-bottom: 0.25rem;
}

.whk-section--summary {
    padding-top: 0.875rem;
}

.whk-section--summary .whk-detail-grid {
    padding: 0.875rem 1rem;
    border-radius: calc(var(--hg-radius) + 2px);
    background: color-mix(in srgb, var(--hg-muted) 38%, transparent);
    border: 1px solid color-mix(in srgb, var(--hg-border) 90%, transparent);
}

.whk-section-title {
    margin: 0;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--hg-muted-foreground);
}

.whk-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.625rem;
}

.whk-detail-grid--summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.whk-detail-grid--lead {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 640px) {
    .whk-detail-grid--lead {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.whk-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    padding: 0.625rem 0.75rem;
    border-radius: var(--hg-radius);
    background: var(--hg-card);
    border: 1px solid color-mix(in srgb, var(--hg-border) 85%, transparent);
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.whk-section--summary .whk-field {
    background: var(--hg-card);
}

.whk-field:hover {
    border-color: color-mix(in srgb, var(--hg-primary) 22%, var(--hg-border));
}

.whk-k {
    display: block;
    font-size: 0.625rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--hg-muted-foreground);
    line-height: 1.3;
}

.whk-v {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--hg-foreground);
    line-height: 1.45;
    word-break: break-word;
}

.whk-v--mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.whk-v--empty {
    color: var(--hg-muted-foreground);
    font-weight: 400;
    font-style: italic;
    opacity: 0.72;
}

.whk-error {
    margin: 0;
    padding: 0.75rem 1rem;
    border-radius: var(--hg-radius);
    background: color-mix(in srgb, oklch(0.52 0.18 27) 12%, white);
    color: oklch(0.45 0.16 27);
    font-size: 0.875rem;
    border: 1px solid color-mix(in srgb, oklch(0.52 0.18 27) 22%, transparent);
}

.whk-text-block {
    margin: 0;
    padding: 0.875rem 1rem;
    border-radius: var(--hg-radius);
    background: color-mix(in srgb, var(--hg-muted) 35%, transparent);
    border: 1px solid color-mix(in srgb, var(--hg-border) 90%, transparent);
    font-size: 0.875rem;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--hg-foreground);
}

.whk-link {
    display: block;
    padding: 0.75rem 0.875rem;
    border-radius: var(--hg-radius);
    background: color-mix(in srgb, var(--hg-primary) 6%, var(--hg-card));
    border: 1px solid color-mix(in srgb, var(--hg-primary) 18%, var(--hg-border));
    color: var(--hg-primary);
    font-size: 0.8125rem;
    line-height: 1.45;
    word-break: break-all;
    text-decoration: none;
    transition: background 120ms ease, border-color 120ms ease;
}

.whk-link:hover {
    background: color-mix(in srgb, var(--hg-primary) 10%, var(--hg-card));
    border-color: color-mix(in srgb, var(--hg-primary) 30%, var(--hg-border));
    text-decoration: underline;
}

.whk-body-full {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.whk-section--code {
    gap: 0.5rem;
}

.whk-code-panel {
    border-radius: calc(var(--hg-radius) + 2px);
    overflow: hidden;
    border: 1px solid #1e293b;
    box-shadow: inset 0 1px 0 color-mix(in srgb, white 6%, transparent);
}

.whk-pre {
    margin: 0;
    padding: 0.875rem 1rem;
    background: #0f172a;
    color: #cbd5e1;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
    line-height: 1.55;
    overflow: auto;
    max-height: 14rem;
    white-space: pre-wrap;
    word-break: break-word;
    tab-size: 2;
}

.whk-section--code .whk-pre {
    max-height: 12rem;
}

.whk-section--code:last-child .whk-pre {
    max-height: 10rem;
}

@media (max-width: 639px) {
    .whk-modal--detalhe {
        max-height: calc(100vh - 1rem);
        width: calc(100vw - 1rem);
    }

    .whk-detail-grid,
    .whk-detail-grid--summary,
    .whk-detail-grid--lead {
        grid-template-columns: 1fr;
    }

    .whk-modal-header {
        padding-bottom: 0.875rem;
    }
}

[x-cloak] {
    display: none !important;
}


/* ── Ficha do usuário (slide-over) — HGPV drawer ───────────────────── */
.cfg-pessoa--link {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    text-align: left;
    width: 100%;
}
.cfg-pessoa--link:hover .cfg-strong { text-decoration: underline; }

.hg-modal-overlay--drawer {
    justify-content: flex-end;
    align-items: stretch;
    padding: 0;
}
.cfg-ficha {
    width: min(760px, 100%);
    height: 100%;
    background: var(--cfg-surface, #fff);
    box-shadow: -12px 0 40px rgba(0, 0, 0, .18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: cfgFichaIn .18s ease-out;
}
@keyframes cfgFichaIn { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }

.cfg-ficha__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    padding: 1.1rem 1.25rem .75rem;
    border-bottom: 1px solid var(--cfg-border, #e5e7eb);
}
.cfg-ficha__id { display: flex; gap: .8rem; align-items: flex-start; }
.cfg-avatar--lg { width: 3rem; height: 3rem; font-size: 1rem; }
.cfg-ficha__name { font-size: 1.15rem; font-weight: 700; margin: 0; }
.cfg-ficha__sub { color: var(--cfg-muted, #6b7280); font-size: .82rem; margin: .1rem 0 .4rem; }
.cfg-ficha__chips { display: flex; gap: .4rem; flex-wrap: wrap; }

.cfg-ficha__actions {
    display: flex;
    gap: .5rem;
    padding: .8rem 1.25rem;
    border-bottom: 1px solid var(--cfg-border, #e5e7eb);
    flex-wrap: wrap;
}
.cfg-ficha__more { position: relative; }
.cfg-ficha__more .cfg-menu { right: 0; left: auto; top: calc(100% + 4px); }
.cfg-ficha__seguranca-acoes { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .6rem; }

.cfg-ficha .cfg-resumo { margin: .85rem 1.25rem 0; }

.cfg-ficha__body { padding: 1rem 1.25rem 2rem; overflow-y: auto; display: flex; flex-direction: column; gap: 1rem; }
.cfg-ficha__card {
    border: 1px solid var(--cfg-border, #e5e7eb);
    border-radius: .7rem;
    padding: .9rem 1rem;
    background: var(--cfg-surface, #fff);
}
.cfg-ficha__card-title {
    font-size: .72rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--cfg-muted, #6b7280);
    font-weight: 700;
    margin: 0 0 .7rem;
}
.cfg-ficha__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .7rem; }
.cfg-ficha__field {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    font-size: .9rem;
    min-width: 0;
    border: 1px solid var(--cfg-border, #e5e7eb);
    border-radius: .6rem;
    padding: .7rem .85rem;
    background: var(--cfg-surface-2, #fafafa);
}
.cfg-ficha__field strong { overflow-wrap: anywhere; }
.cfg-ficha__field .cfg-pol-label { font-size: .68rem; letter-spacing: .03em; text-transform: uppercase; }
.cfg-ficha__field strong { font-weight: 600; }

.cfg-ficha__modulos { display: flex; flex-direction: column; gap: .35rem; margin-top: .8rem; }
.cfg-ficha__mod {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    border: 1px solid var(--cfg-border, #e5e7eb);
    border-radius: .5rem;
    padding: .5rem .7rem;
    font-size: .86rem;
}
.cfg-ficha__mod-right { display: flex; align-items: center; gap: .5rem; }

.cfg-ficha__mfa { display: flex; align-items: center; gap: .6rem; }
.cfg-linkbtn { background: none; border: 0; color: var(--cfg-primary, #FF8205); cursor: pointer; font-weight: 600; padding: 0; font-size: .85rem; }
.cfg-linkbtn:hover { text-decoration: underline; }

.cfg-ficha__hist { border-left: 2px solid var(--cfg-border, #e5e7eb); padding: .15rem 0 .5rem .7rem; margin-bottom: .3rem; }
.cfg-ficha__hist-top { display: flex; justify-content: space-between; gap: .5rem; font-size: .85rem; }
.cfg-ficha__empty {
    text-align: center;
    color: var(--cfg-muted, #6b7280);
    font-size: .85rem;
    padding: 1rem;
    border: 1px dashed var(--cfg-border, #e5e7eb);
    border-radius: .5rem;
}

.cfg-btn--danger-outline { border: 1px solid #f5c2c7; color: #b02a37; background: #fff; }
.cfg-btn--danger-outline:hover { background: #fdecee; }
.cfg-btn--ok-outline { border: 1px solid #a3cfbb; color: #0f5132; background: #fff; }
.cfg-btn--ok-outline:hover { background: #eaf6f0; }
.cfg-chip--info { background: #eef2ff; color: #3730a3; }

.cfg-ficha__actions .cfg-btn { display: inline-flex; align-items: center; gap: .4rem; }

/* ── Modal "Revisar acesso" por pessoa ─────────────────────────────── */
.cfg-rev { width: min(1160px, 96vw); max-width: 96vw; max-height: 92vh; display: flex; flex-direction: column; overflow: hidden; }
.cfg-rev__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    padding: 1.1rem 1.4rem;
    border-bottom: 1px solid var(--cfg-border, #e5e7eb);
}
.cfg-rev__name { font-size: 1.15rem; font-weight: 700; margin: 0; text-transform: uppercase; letter-spacing: .01em; }
.cfg-rev__body { padding: 1.1rem 1.4rem 1.6rem; overflow-y: auto; display: flex; flex-direction: column; gap: 1rem; }
.cfg-rev__chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.cfg-rev__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .7rem; }
.cfg-rev__section { display: flex; flex-direction: column; gap: .4rem; }
/* Linhas de módulo/visibilidade planas (só separador) — como o protótipo. */
.cfg-rev .cfg-ficha__modulos { gap: 0; border: 1px solid var(--cfg-border, #e5e7eb); border-radius: .6rem; overflow: hidden; }
.cfg-rev .cfg-ficha__mod {
    border: 0;
    border-bottom: 1px solid var(--cfg-border, #e5e7eb);
    border-radius: 0;
    padding: .7rem .9rem;
    background: transparent;
}
.cfg-rev .cfg-ficha__modulos .cfg-ficha__mod:last-child { border-bottom: 0; }
.cfg-rev__section > .cfg-ficha__mod {
    border: 1px solid var(--cfg-border, #e5e7eb);
    border-radius: .6rem;
}
.cfg-rev .cfg-ficha__mod.is-muted { opacity: .55; }

.cfg-card.cfg-dx-live { padding-bottom: 0; overflow: hidden; }
.cfg-dx-live .cfg-card__icon {
    display: grid;
    place-items: center;
    background: #ecfdf5;
}
.cfg-dx-live__pulse {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #10b981;
    animation: cfg-dx-pulse 1.6s ease-out infinite;
}
@keyframes cfg-dx-pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
    70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.cfg-dx-live__body {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 0 1.1rem 1.1rem;
}
.cfg-dx-live__kpis {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.5rem;
}
.cfg-dx-live-kpi {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.7rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    cursor: pointer;
    text-align: left;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}
.cfg-dx-live-kpi:hover { border-color: #cbd5e1; }
.cfg-dx-live-kpi__value { font-size: 1.12rem; font-weight: 750; letter-spacing: -0.02em; color: #0f172a; }
.cfg-dx-live-kpi__label { font-size: 11px; font-weight: 650; color: #64748b; }
.cfg-dx-live-kpi--hoje.is-on { border-color: #94a3b8; background: #f8fafc; }
.cfg-dx-live-kpi--dist.is-on { border-color: #93c5fd; background: #eff6ff; }
.cfg-dx-live-kpi--dist.is-on .cfg-dx-live-kpi__value { color: #1d4ed8; }
.cfg-dx-live-kpi--trans.is-on { border-color: #5eead4; background: #f0fdfa; }
.cfg-dx-live-kpi--trans.is-on .cfg-dx-live-kpi__value { color: #0f766e; }
.cfg-dx-live-kpi--ok.is-on { border-color: #6ee7b7; background: #ecfdf5; }
.cfg-dx-live-kpi--ok.is-on .cfg-dx-live-kpi__value { color: #047857; }
.cfg-dx-live-kpi--warn.is-on { border-color: #fcd34d; background: #fffbeb; }
.cfg-dx-live-kpi--warn.is-on .cfg-dx-live-kpi__value { color: #b45309; }
.cfg-dx-live-kpi--err.is-on { border-color: #fda4af; background: #fff1f2; }
.cfg-dx-live-kpi--err.is-on .cfg-dx-live-kpi__value { color: #be123c; }
.cfg-dx-live__toolbar {
    display: grid;
    grid-template-columns: minmax(180px, 1.5fr) minmax(140px, 1fr) minmax(140px, 1fr);
    gap: 0.55rem;
    align-items: end;
}
.cfg-dx-live__split {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    min-height: 540px;
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
    overflow: hidden;
    background: #fff;
}
.cfg-dx-live__feed {
    overflow-y: auto;
    max-height: 68vh;
    border-right: 1px solid #e2e8f0;
    background: #f8fafc;
}
.cfg-dx-live-item {
    display: block;
    width: 100%;
    padding: 0.85rem 0.95rem 0.85rem 1rem;
    border: 0;
    border-bottom: 1px solid #e8eef4;
    background: #fff;
    text-align: left;
    cursor: pointer;
    box-shadow: inset 4px 0 0 #cbd5e1;
}
.cfg-dx-live-item:hover { background: #f1f5f9; }
.cfg-dx-live-item.is-ok { box-shadow: inset 4px 0 0 #10b981; }
.cfg-dx-live-item.is-fail { box-shadow: inset 4px 0 0 #e11d48; }
.cfg-dx-live-item.is-fresh { box-shadow: inset 4px 0 0 #10b981; }
.cfg-dx-live-item.is-fail.is-fresh { box-shadow: inset 4px 0 0 #e11d48; }
.cfg-dx-live-item.is-on {
    background: #eef2ff;
    box-shadow: inset 4px 0 0 #4f46e5;
}
.cfg-dx-live-item.is-fail.is-on {
    background: #fff1f2;
    box-shadow: inset 4px 0 0 #e11d48;
}
.cfg-dx-live-item.is-ok.is-on {
    background: #ecfdf5;
    box-shadow: inset 4px 0 0 #059669;
}
.cfg-dx-live-item__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}
.cfg-dx-live-item__top time {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    font-variant-numeric: tabular-nums;
}
.cfg-dx-live-item__alvo {
    margin: 0.35rem 0 0.12rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
}
.cfg-dx-live-item__motivo {
    margin: 0;
    font-size: 12.5px;
    font-weight: 650;
    color: #be123c;
    line-height: 1.4;
}
.cfg-dx-live-item.is-ok .cfg-dx-live-item__motivo { color: #047857; }
.cfg-dx-live-item__meta {
    margin: 0.28rem 0 0;
    font-size: 12px;
    color: #64748b;
}
.cfg-dx-live-item__status {
    font-weight: 700;
    color: #be123c;
}
.cfg-dx-live-item.is-ok .cfg-dx-live-item__status { color: #047857; }
.cfg-dx-live__detail {
    overflow-y: auto;
    max-height: 68vh;
    padding: 1.15rem 1.2rem 1.4rem;
    background: #f8fafc;
}
.cfg-dx-live__empty {
    padding: 2.2rem 1rem;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
}
.cfg-dx-live-detail__head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.cfg-dx-live-detail__who { min-width: 0; flex: 1; }
.cfg-dx-live-detail__avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.cfg-dx-live-detail__avatar--atribuido { background: #d1fae5; color: #047857; }
.cfg-dx-live-detail__avatar--nao_atribuido { background: #ffe4e6; color: #be123c; }
.cfg-dx-live-detail__avatar--erro { background: #ffe4e6; color: #9f1239; }
.cfg-dx-live-detail__alvo { margin: 0; font-size: 1.08rem; font-weight: 750; color: #0f172a; }
.cfg-dx-live-detail__hora { margin: 0.15rem 0 0; font-size: 12.5px; color: #64748b; }
.cfg-dx-live-detail__motivo {
    margin: 0.95rem 0 0;
    padding: 0.9rem 0.95rem;
    border-radius: 0.8rem;
    border: 1px solid #e2e8f0;
    background: #fff;
}
.cfg-dx-live-detail__motivo-kicker {
    margin: 0;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}
.cfg-dx-live-detail__motivo-title {
    margin: 0.25rem 0 0;
    font-size: 1rem;
    font-weight: 750;
    color: #0f172a;
}
.cfg-dx-live-detail__motivo-text {
    margin: 0.4rem 0 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: #334155;
}
.cfg-dx-live-detail__nota {
    margin: 0.55rem 0 0;
    font-size: 0.82rem;
    color: #57534e;
}
.cfg-dx-live-detail__erro {
    margin: 0.55rem 0 0;
    font-size: 0.82rem;
    color: #9f1239;
}
.cfg-dx-live-detail__motivo--atribuido {
    background: #ecfdf5;
    border-color: #6ee7b7;
}
.cfg-dx-live-detail__motivo--atribuido .cfg-dx-live-detail__motivo-kicker { color: #047857; }
.cfg-dx-live-detail__motivo--nao_atribuido {
    background: #fff1f2;
    border-color: #fda4af;
}
.cfg-dx-live-detail__motivo--nao_atribuido .cfg-dx-live-detail__motivo-kicker,
.cfg-dx-live-detail__motivo--nao_atribuido .cfg-dx-live-detail__motivo-title { color: #9f1239; }
.cfg-dx-live-detail__motivo--erro {
    background: #fff1f2;
    border-color: #fb7185;
}
.cfg-dx-live-detail__facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin: 1rem 0 0;
}
.cfg-dx-live-detail__facts > div {
    padding: 0.65rem 0.75rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
}
.cfg-dx-live-detail__facts dt {
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}
.cfg-dx-live-detail__facts dd { margin: 0.18rem 0 0; font-size: 0.86rem; color: #0f172a; font-weight: 600; }
.cfg-dx-live-detail__block { margin-top: 1.05rem; }
.cfg-dx-live-detail__block h3 {
    margin: 0 0 0.45rem;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}
.cfg-dx-live-detail__cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem;
    margin-top: 0.2rem;
}
.cfg-dx-live-flow {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.75rem 0.85rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.7rem;
}
.cfg-dx-live-flow span { display: block; font-size: 11px; color: #64748b; font-weight: 650; }
.cfg-dx-live-flow strong { font-size: 0.92rem; color: #0f172a; }
.cfg-dx-live-flow__arrow { color: #94a3b8; font-size: 1.1rem; }
.cfg-dx-live-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0; padding: 0; list-style: none; }
.cfg-dx-live-chips li {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e2e8f0;
    font-size: 12px;
}
.cfg-dx-live-chips li.is-win { background: #ecfdf5; border-color: #6ee7b7; color: #047857; font-weight: 650; }
.cfg-dx-live-chips em { font-style: normal; font-size: 10px; text-transform: uppercase; }
.cfg-dx-live-excluidos { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.cfg-dx-live-excluidos li {
    padding: 0.55rem 0.7rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.6rem;
}
.cfg-dx-live-excluidos strong { display: block; font-size: 0.82rem; }
.cfg-dx-live-excluidos span { display: block; font-size: 12px; color: #64748b; }
.cfg-dx-live-detail__meta { margin-top: 1.05rem; font-size: 12px; color: #64748b; }
.cfg-dx-acao {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.12rem 0.5rem;
}
.cfg-dx-acao--distribuicao { background: #dbeafe; color: #1d4ed8; }
.cfg-dx-acao--transbordo { background: #ccfbf1; color: #0f766e; }
.cfg-dx-acao--transferencia { background: #ede9fe; color: #6d28d9; }
@media (max-width: 980px) {
    .cfg-dx-live__kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .cfg-dx-live__toolbar,
    .cfg-dx-live__split,
    .cfg-dx-live-detail__cols { grid-template-columns: 1fr; }
    .cfg-dx-live__feed,
    .cfg-dx-live__detail { max-height: 48vh; border-right: 0; }
}

.cfg-dx-teste { display: grid; gap: 1rem; }
.cfg-dx-teste__status {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 0 1.2rem 0.25rem;
}
.cfg-dx-teste-stat {
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    padding: 0.75rem 0.9rem;
    background: #f8fafc;
}
.cfg-dx-teste-stat span,
.cfg-dx-teste-stat em {
    display: block;
    font-size: 11px;
    font-weight: 650;
    color: #64748b;
}
.cfg-dx-teste-stat strong {
    display: block;
    margin: 0.15rem 0 0.2rem;
    font-size: 0.98rem;
    color: #0f172a;
}
.cfg-dx-teste-stat.is-on { border-color: #99f6e4; background: #f0fdfa; }
.cfg-dx-teste-stat.is-on strong { color: #0f766e; }
.cfg-dx-teste-stat.is-warn { border-color: #fcd34d; background: #fffbeb; }
.cfg-dx-teste-stat.is-warn strong { color: #b45309; }
.cfg-dx-teste__aviso {
    margin: 0 1.2rem 0.4rem;
    padding: 0.65rem 0.8rem;
    border-radius: 0.7rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    font-size: 0.82rem;
}
.cfg-dx-teste__form {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr)) auto;
    gap: 0.75rem 0.85rem;
    align-items: end;
    padding: 0.4rem 1.2rem 0.2rem;
}
.cfg-dx-teste-modos {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    grid-column: 1 / -1;
}
.cfg-dx-teste__submit { padding-bottom: 0.1rem; }
.cfg-dx-teste-check {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    color: #334155;
}
.cfg-dx-teste-check input { accent-color: #0f766e; }
.cfg-dx-teste__hint {
    margin: 0;
    padding: 0.35rem 1.2rem 1.1rem;
    font-size: 12px;
    color: #64748b;
}
.cfg-dx-teste-live { margin-top: 0; }
.cfg-dx-teste-item--aguardando time { color: #0f766e; font-variant-numeric: tabular-nums; }
.cfg-dx-teste-log { display: grid; gap: 0.55rem; margin-top: 1rem; }
.cfg-dx-teste-log__item {
    padding: 0.7rem 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.7rem;
    background: #fff;
}
.cfg-dx-teste-log__item.is-ok { box-shadow: inset 3px 0 0 #10b981; }
.cfg-dx-teste-log__item.is-fail { box-shadow: inset 3px 0 0 #e11d48; }
.cfg-dx-teste-log__item div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}
.cfg-dx-teste-log__item time { font-size: 12px; color: #64748b; }
.cfg-dx-teste-log__item strong { display: block; font-size: 0.86rem; }
.cfg-dx-teste-log__item p { margin: 0.2rem 0 0; font-size: 12px; color: #64748b; }
@media (max-width: 1100px) {
    .cfg-dx-teste__status,
    .cfg-dx-teste__form { grid-template-columns: 1fr 1fr; }
    .cfg-dx-teste__submit { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
    .cfg-dx-teste__status,
    .cfg-dx-teste__form { grid-template-columns: 1fr; }
}

/* HGPV-240: motivos de leads em Configurações → Personalizações */
.cfg-reasons__add {
    display: flex;
    gap: 0.5rem;
}

.cfg-reasons__add .cfg-input {
    flex: 1;
}

.cfg-reasons__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.cfg-reasons__chip {
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    font-size: 12px;
}

.cfg-reasons__remove {
    border: 0;
    background: none;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
}

.cfg-reasons__remove:hover {
    color: #dc2626;
}
