:root {
    --hg-radius: 0.75rem;
    --hg-background: oklch(0.985 0.003 240);
    --hg-foreground: oklch(0.18 0.02 260);
    --hg-card: oklch(1 0 0);
    --hg-muted: oklch(0.96 0.005 250);
    --hg-muted-foreground: oklch(0.55 0.02 260);
    --hg-primary: oklch(0.72 0.18 50);
    --hg-primary-foreground: oklch(1 0 0);
    --hg-border: oklch(0.92 0.008 250);
    --hg-input: oklch(0.92 0.008 250);
    --hg-destructive: oklch(0.62 0.22 27);

    --hg-status-agendado: oklch(0.6 0.16 55);
    --hg-status-agendado-bg: oklch(0.97 0.04 65);
    --hg-status-agendado-border: oklch(0.82 0.12 60);
    --hg-status-confirmado: oklch(0.5 0.18 250);
    --hg-status-confirmado-bg: oklch(0.96 0.03 250);
    --hg-status-confirmado-border: oklch(0.78 0.14 250);
    --hg-status-compareceu: oklch(0.5 0.16 150);
    --hg-status-compareceu-bg: oklch(0.96 0.05 150);
    --hg-status-compareceu-border: oklch(0.78 0.16 150);
    --hg-status-nao-compareceu: oklch(0.55 0.22 27);
    --hg-status-nao-compareceu-bg: oklch(0.96 0.04 27);
    --hg-status-nao-compareceu-border: oklch(0.8 0.16 27);
    --hg-status-bloqueado: oklch(0.32 0.03 270);
    --hg-status-bloqueado-bg: oklch(0.93 0.01 270);
    --hg-status-bloqueado-border: oklch(0.7 0.03 270);
    --hg-status-indisponivel: oklch(0.6 0.01 260);
    --hg-status-indisponivel-bg: oklch(0.96 0.005 260);
    --hg-drop-ok: oklch(0.55 0.18 150);
    --hg-drop-bad: oklch(0.55 0.22 27);
}

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

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

.hg-sidebar {
    width: 15rem;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--hg-border);
    background: var(--hg-card);
}

.hg-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-bottom: 1px solid var(--hg-border);
}

.hg-sidebar-brand-link {
    color: inherit;
    text-decoration: none;
    transition: background 0.15s;
}

.hg-sidebar-brand-link:hover {
    background: var(--hg-muted);
}

.hg-sidebar-brand-icon {
    border-radius: 0.375rem;
    background: color-mix(in oklch, var(--hg-primary) 10%, transparent);
    padding: 0.375rem;
    color: var(--hg-primary);
}

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

.hg-nav {
    flex: 1;
    padding: 0.75rem 0.5rem;
    overflow-y: auto;
}

.hg-nav-group-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    background: transparent;
    border-radius: 0.375rem;
    padding: 0.5rem 0.625rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--hg-muted-foreground);
    cursor: pointer;
    text-align: left;
}

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

.hg-nav-sub {
    margin-top: 0.125rem;
    margin-left: 0.75rem;
    padding-left: 0.75rem;
    border-left: 1px solid var(--hg-border);
}

.hg-nav-link {
    display: block;
    border-radius: 0.375rem;
    padding: 0.375rem 0.625rem;
    font-size: 13px;
    color: var(--hg-muted-foreground);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

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

.hg-nav-link.is-active {
    background: color-mix(in oklch, var(--hg-primary) 10%, transparent);
    color: var(--hg-primary);
    font-weight: 500;
}

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

.hg-sidebar-footer a {
    color: var(--hg-muted-foreground);
    text-decoration: none;
}

.hg-sidebar-footer a:hover {
    color: var(--hg-foreground);
}

.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;
}

.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;
}

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

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

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

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

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

.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;
}

.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 oklch, 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-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-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 oklch, 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-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 oklch, 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);
    text-transform: capitalize;
}

.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: 500;
    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 oklch, 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;
}

.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 {
    background: var(--hg-muted);
}

.hg-btn-primary {
    background: var(--hg-primary);
    border-color: var(--hg-primary);
    color: var(--hg-primary-foreground);
}

.hg-btn-primary:hover {
    filter: brightness(0.95);
}

.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));
    }
}

.hg-totalizer {
    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-count {
    font-size: 1.25rem;
    font-weight: 600;
}

.hg-totalizer-label {
    font-size: 0.75rem;
    opacity: 0.85;
}

.hg-totalizer-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    margin-bottom: 0.375rem;
}

.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: 0.75rem;
    padding: 1rem;
    cursor: pointer;
}

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

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

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

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

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

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

.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 oklch, 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-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;
    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-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;
}

.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-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 oklch, 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 oklch, 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: column;
    gap: 0.125rem;
    font-size: 0.8125rem;
}

.hg-callout-item strong {
    font-weight: 600;
}

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

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

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

.hg-agenda-interactive {
    position: relative;
}

.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;
}

.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 oklch, 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 oklch, 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 oklch, var(--hg-primary) 5%, transparent);
}

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

.hg-agenda-grid-cell-empty.is-drop-ok {
    background: color-mix(in oklch, 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 oklch, 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;
}

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

.hg-agenda-card-owner {
    font-weight: 500;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.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: 50;
    display: flex;
    justify-content: flex-end;
    background: rgb(0 0 0 / 0.45);
}

.hg-atendimento-drawer {
    width: 100%;
    max-width: none;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--hg-card);
    box-shadow: -12px 0 40px rgb(0 0 0 / 0.15);
    overflow: hidden;
}

@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;
    }
}

.hg-drawer-close-fab {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 0.375rem;
    background: var(--hg-muted);
    color: var(--hg-muted-foreground);
    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: 1rem 1.5rem 1rem 1.5rem;
    position: relative;
}

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

.hg-atendimento-avatar {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    background: color-mix(in oklch, var(--hg-primary) 10%, transparent);
    color: var(--hg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hg-atendimento-name {
    font-size: 1.125rem;
    font-weight: 600;
}

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

.hg-atendimento-body {
    flex: 1;
    min-height: 0;
    display: flex;
    background: color-mix(in oklch, 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 oklch, 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);
}

.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 oklch, var(--hg-muted) 30%, transparent);
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    flex-shrink: 0;
}

.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 oklch, 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;
}

.hg-field-row-label {
    color: var(--hg-muted-foreground);
}

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

.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; }
}

.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 oklch, 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 oklch, #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;
}

.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.8125rem;
    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 {
    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;
}
    flex: 1;
}

.hg-btn-emerald {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.hg-btn-emerald:hover {
    filter: brightness(0.95);
}

.hg-btn-danger-outline {
    border: 2px solid color-mix(in oklch, var(--hg-destructive) 60%, transparent);
    color: var(--hg-destructive);
}

.hg-btn-danger-outline:hover {
    background: color-mix(in oklch, var(--hg-destructive) 10%, transparent);
}

.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 oklch, 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);
}

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

.hg-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgb(0 0 0 / 0.5);
    padding: 1rem;
}

.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;
}

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

.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-body {
    padding: 1.25rem;
    overflow-y: auto;
}

.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;
    gap: 0.75rem;
}

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

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

.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;
    font-size: 0.875rem;
}

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

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

.hg-atendimento-kv-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--hg-muted-foreground);
}

.hg-atendimento-kv-value {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 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);
}

.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 */
.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 {
    background: var(--hg-status-compareceu-bg);
    color: var(--hg-status-compareceu);
    border-color: var(--hg-status-compareceu-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-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-compareceu); }
.hg-totalizer-nao_compareceu .hg-totalizer-dot { background: var(--hg-status-nao-compareceu); }
.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 { background: var(--hg-status-compareceu); }
.hg-legend-nao_compareceu { background: var(--hg-status-nao-compareceu); }
.hg-legend-bloqueado { background: var(--hg-status-bloqueado); }
.hg-legend-indisponivel { background: var(--hg-status-indisponivel); 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(12rem, 1fr));
    gap: 0.75rem;
}

.hg-debug-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    padding: 0.5rem 0.75rem;
    border-radius: calc(var(--hg-radius) - 2px);
    border: 1px solid var(--hg-border);
    background: color-mix(in oklch, 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-all;
}

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

.hg-log-viewer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    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 - 420px);
    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-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-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 {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

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

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

.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 oklch, 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-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 {
    border-color: color-mix(in oklch, var(--hg-primary) 45%, var(--hg-border));
    box-shadow: 0 4px 14px color-mix(in oklch, var(--hg-primary) 12%, transparent);
    transform: translateY(-1px);
}

.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 oklch, 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-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 oklch, var(--hg-destructive) 45%, transparent);
    background: color-mix(in oklch, 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 oklch, 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;
    }
}
