/* =============================================================================
   HelpRex Agent - transcricao literal do artefato aprovado (contrato visual)
   docs/design-reference/claude-artifact-UvGHeAspiEwLDfnqJThJWC/artifact-2026-09-16.html

   Cada classe abaixo corresponde a um estilo inline do template do artefato
   (secoes RAIL, INBOX, TICKET WORKSPACE e SETTINGS) ou aos tokens `C` do seu
   script. Valores em px sao copiados sem arredondar. Somente desktop (>= 1280):
   o mobile fica para depois do MVP, por decisao do produto.
   ============================================================================= */

:root {
    --hx-paper: #FAF8F5;
    --hx-surface: #FFFFFF;
    --hx-sunken: #F5F2ED;
    --hx-line: #E2DDD5;
    --hx-line2: #CFC8BE;
    --hx-ink: #231F1C;
    --hx-ink2: #3B3733;
    --hx-ink3: #5C564F;
    --hx-mute: #6F6860;
    --hx-faint: #7C746B;
    --hx-brand: #D9662C;
    --hx-brand-deep: #B35426;
    --hx-red: #C0392B;
    --hx-red-bg: #FBE9E7;
    --hx-red-ink: #9B2C1F;
    --hx-red-line: #F2CBC6;
    --hx-amber: #B58B2E;
    --hx-amber-bg: #F7F1E2;
    --hx-amber-ink: #7A6A3C;
    --hx-amber-line: #E6DEC9;
    --hx-green: #3E9B6B;
    --hx-green-bg: #E9F3ED;
    --hx-green-ink: #2F6547;
    --hx-green-line: #CDE4D8;
    --hx-blue-bg: #E9F1F7;
    --hx-blue-ink: #2E5C80;
    --hx-blue-line: #CFE0EC;
    --hx-new-bg: #FDEEE6;
    --hx-new-ink: #A6461B;
    --hx-new-line: #F5D3C0;
    /* Accent do item ativo do trilho: a cor primaria do workspace substitui a marca (I-THEMES). */
    --hx-accent: var(--workspace-accent, #D9662C);
    --hx-accent-ink: var(--workspace-accent-contrast, #231F1C);
    --hx-sans: 'IBM Plex Sans', system-ui, sans-serif;
    --hx-mono: 'IBM Plex Mono', monospace;
}

/* ----- base (identica ao <style> global do artefato) ----- */
html, body { margin: 0; padding: 0; }
body { font-family: var(--hx-sans); font-size: 16px; line-height: normal; -webkit-font-smoothing: antialiased; color: var(--hx-ink2); background: var(--hx-paper); }
*, *::before, *::after { box-sizing: border-box; }
a { color: var(--hx-brand-deep); text-decoration: none; }
a:hover { color: #8E3F19; text-decoration: underline; }
button, input, select, textarea { font-family: inherit; }
@keyframes hx-shimmer { 0% { background-position: -380px 0; } 100% { background-position: 380px 0; } }
@keyframes hx-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes hx-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #D5D0C8; border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--hx-accent); outline-offset: 2px; }

/* Rotulos em caixa alta foram substituidos por peso e cor em todo o produto
   (inventario "Fora da superficie principal" do artefato). As classes legadas
   do site.css que ainda gritavam recebem a gramatica nova aqui. */
.btn, .badge, .chip, .pill, .tag, .stat-label, .human-state-kicker, .login-card label, dl.meta dt,
.readonly-field span, .usage-item span, .lp-plan-name, th, label, legend, .sidebar-section,
.card-kicker, .kicker, .eyebrow, .section-title, .form-label, .field-label, .table-head,
.segmented-control button, .status-filter-label {
    text-transform: none;
    letter-spacing: normal;
    font-family: var(--hx-sans);
}

/* ----- reset escopado (P1 da pre-review): o site.css estiliza input/select/textarea por tipo
   (0,1,1: altura 42 px, padding 10 12, fundo escuro, halo coral no foco), h1-h4 (line-height 1.1),
   p (cor), a:hover (opacity .8) e table/th/td. Dentro das telas hx tudo isso e neutralizado ANTES
   das classes; as classes de campo usam seletor elemento.classe (0,1,1) para vencer o site.css. ----- */
:is(.hx-rail, .hx-inbox, .hx-ws, .hx-form, .hx-auth, .hx-dialog, .hx-menu) :is(input, select, textarea) {
    height: auto; width: auto; padding: 0; margin: 0; background: none; border: 0; border-radius: 0;
    font-family: inherit; font-size: inherit; line-height: normal; color: inherit; box-shadow: none; transition: none;
}
:is(.hx-rail, .hx-inbox, .hx-ws, .hx-form, .hx-auth, .hx-dialog, .hx-menu) :is(input, select, textarea):focus { box-shadow: none; }
:where(.hx-rail, .hx-inbox, .hx-ws, .hx-form, .hx-auth, .hx-dialog, .hx-menu) :is(h1, h2, h3, h4) { line-height: normal; color: inherit; margin: 0; letter-spacing: normal; font-size: inherit; }
:where(.hx-rail, .hx-inbox, .hx-ws, .hx-form, .hx-auth, .hx-dialog, .hx-menu) p { color: inherit; margin: 0; }
:where(.hx-rail, .hx-inbox, .hx-ws, .hx-form, .hx-auth, .hx-dialog, .hx-menu) a:hover { opacity: 1; }
:where(.hx-rail, .hx-inbox, .hx-ws, .hx-form, .hx-auth, .hx-dialog, .hx-menu) button { transition: none; }
:where(.hx-rail, .hx-inbox, .hx-ws, .hx-form, .hx-auth, .hx-dialog, .hx-menu) label { display: inline; margin: 0; color: inherit; font-size: inherit; }
:where(.hx-rail, .hx-inbox, .hx-ws, .hx-form, .hx-auth, .hx-dialog, .hx-menu) code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }

/* =============================================================================
   1. SHELL: trilho 206 px + coluna principal
   ============================================================================= */
.hx-app { display: flex; height: 100vh; min-height: 100vh; background: var(--hx-paper); }
.hx-rail { width: 206px; min-width: 0; overflow: hidden; flex: none; background: #2B2622; display: flex; flex-direction: column; border-right: 1px solid #14100E; }
.hx-rail-head { display: flex; flex-direction: row; align-items: center; gap: 9px; padding: 14px 12px 12px 14px; justify-content: flex-start; text-decoration: none; }
.hx-rail-head:hover { text-decoration: none; }
.hx-rail-mark { width: 26px; height: 26px; flex: none; border-radius: 7px; background: var(--hx-accent); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: var(--hx-accent-ink); overflow: hidden; }
.hx-rail-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hx-rail-brand { min-width: 0; flex: 1; }
.hx-rail-brand-name { font-size: 13.5px; font-weight: 600; color: #F2EEE8; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-rail-brand-sub { font-size: 11px; color: #A69D93; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-rail-body { flex: 1; overflow-y: auto; padding: 6px 8px 8px; scrollbar-width: none; }
/* O trilho real tem mais itens que o artefato e rola; a barra de rolagem roubaria 10 px da largura dos itens (189 no artefato). */
.hx-rail-body::-webkit-scrollbar { display: none; }
.hx-rail-section { font-family: var(--hx-mono); font-size: 9.5px; letter-spacing: 0.06em; color: #7D756B; padding: 10px 8px 6px; }
.hx-rail-item { width: 100%; min-width: 0; overflow: hidden; display: flex; align-items: center; justify-content: flex-start; gap: 10px; height: 34px; padding: 0 9px; margin-bottom: 2px; border: none; border-radius: 7px; cursor: pointer; text-align: left; font-size: 12.5px; font-weight: 400; background: transparent; color: #C3BBB1; text-decoration: none; font-family: inherit; }
.hx-rail-item:hover { color: #C3BBB1; text-decoration: none; }
.hx-rail-item.is-active { font-weight: 600; background: #3E3731; color: #F7F3EE; }
.hx-rail-item.is-active:hover { color: #F7F3EE; }
.hx-rail-item.is-unavailable { cursor: not-allowed; opacity: .55; }
/* Tile do artefato (dc-script `dot`): 26 px, raio 7, icone de 15 px em traco 1,6 na cor #D2CAC0. */
.hx-rail-item-dot { width: 26px; height: 26px; flex: none; border-radius: 7px; display: flex; align-items: center; justify-content: center; background: #3E3731; color: #D2CAC0; }
.hx-rail-item-dot svg { display: block; width: 15px; height: 15px; }
.hx-rail-item.is-active .hx-rail-item-dot { background: var(--hx-accent); color: var(--hx-accent-ink); }
.hx-rail-item-label { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-rail-item-count { font-family: var(--hx-mono); font-size: 10.5px; padding: 1px 5px; border-radius: 4px; background: #3E3731; color: #B5ADA3; }
.hx-rail-item.is-active .hx-rail-item-count { background: var(--hx-accent); color: var(--hx-accent-ink); }
.hx-rail-divider { height: 1px; background: #3A342E; margin: 14px 8px 4px; }
.hx-rail-foot { border-top: 1px solid #3A342E; padding: 10px; display: flex; align-items: center; gap: 9px; }
.hx-rail-avatar-wrap { position: relative; flex: none; }
.hx-rail-avatar { width: 28px; height: 28px; border-radius: 999px; background: #4A423A; color: #E8E2DA; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; }
.hx-rail-presence { position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 999px; background: #3E9B6B; border: 2px solid #2B2622; }
.hx-rail-user { min-width: 0; flex: 1; }
.hx-rail-user-name { font-size: 12px; font-weight: 500; color: #E8E2DA; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-rail-user-status { font-size: 10.5px; color: #8F877D; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Idioma e Sair sao destinos reais que o artefato nao desenha: ficam no rodape, na mesma
   gramatica dos metadados do trilho (10.5 px, cor de status), sem caixa alta. */
.hx-rail-foot-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.hx-rail-foot-btn { height: 22px; padding: 0 6px; border: 1px solid #3A342E; border-radius: 5px; background: transparent; color: #B5ADA3; font-size: 10.5px; font-family: var(--hx-mono); cursor: pointer; line-height: 1; }
.hx-rail-foot-btn:hover { background: #3E3731; color: #E8E2DA; }
.hx-rail-menu { position: relative; }
.hx-rail-menu-logout { border-top: 1px solid var(--hx-line); margin-top: 4px; padding-top: 4px; }
/* O menu de idioma reaproveita a abertura do site.js (.lang-switch.open) e so troca a pele. */
.hx-rail-foot .lang-menu { right: 0; left: auto; bottom: 28px; min-width: 148px; background: #FFFFFF; border: 1px solid var(--hx-line); border-radius: 8px; box-shadow: 0 1px 2px rgba(35,31,28,.06), 0 18px 48px rgba(35,31,28,.14); padding: 4px; }
.hx-rail-foot .lang-trigger { background: transparent; border: 1px solid #3A342E; border-radius: 5px; padding: 0; width: 22px; height: 22px; color: #B5ADA3; font-family: var(--hx-mono); font-size: 13px; font-weight: 400; letter-spacing: normal; }
.hx-rail-foot .lang-trigger:hover, .hx-rail-foot .lang-switch.open .lang-trigger { background: #3E3731; border-color: #3A342E; color: #E8E2DA; }
.hx-rail-foot .lang-item { display: flex; align-items: center; gap: 8px; width: 100%; height: 28px; padding: 0 8px; border: none; border-radius: 5px; background: none; font-size: 12px; color: var(--hx-ink2); cursor: pointer; text-align: left; }
.hx-rail-foot .lang-item:hover { background: var(--hx-paper); color: var(--hx-ink); }
.hx-rail-foot .lang-item.is-active { font-weight: 600; color: var(--hx-ink); }
.hx-rail-foot .lang-item code { font-family: var(--hx-mono); font-size: 10.5px; color: var(--hx-faint); }
.hx-main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--hx-paper); min-height: 0; }
/* Paginas legadas (administracao etc.) continuam com o CSS proprio dentro da coluna principal. */
.hx-legacy { font-size: 14px; line-height: 1.55; }
.hx-main > .hx-legacy { flex: 1; min-height: 0; overflow-y: auto; }
.hx-skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: #FFFFFF; color: var(--hx-ink); padding: 6px 10px; border-radius: 6px; border: 1px solid var(--hx-line); font-size: 12.5px; }
.hx-skip:focus { left: 8px; }

/* =============================================================================
   2. ATOMOS: botoes, pills, SLA, avatares, chips de tipo
   ============================================================================= */
.hx-btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 14px; border: none; border-radius: 6px; background: var(--hx-ink); color: var(--hx-paper); font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none; }
.hx-btn-primary:hover { background: var(--hx-ink2); color: var(--hx-paper); text-decoration: none; }
.hx-btn-primary.h31 { height: 31px; }
.hx-btn-primary.h29 { height: 29px; padding: 0 15px; }
.hx-btn-primary:disabled { background: #D5CFC6; color: #6F6860; cursor: default; }
.hx-btn-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 31px; padding: 0 14px; border: 1px solid var(--hx-line); border-radius: 6px; background: var(--hx-surface); color: #6B645C; font-size: 12.5px; font-weight: 400; cursor: pointer; white-space: nowrap; text-decoration: none; }
.hx-btn-secondary:hover { border-color: var(--hx-line2); color: #6B645C; text-decoration: none; }
.hx-btn-secondary.p13 { padding: 0 13px; }
.hx-btn-secondary.is-ink { color: var(--hx-ink2); }
.hx-btn-link { height: 31px; padding: 0 14px; border: none; background: none; color: var(--hx-brand-deep); font-size: 12.5px; font-weight: 500; cursor: pointer; }
.hx-btn-link.is-end { margin-left: auto; }
.hx-btn-link:disabled { opacity: .6; cursor: not-allowed; }
.hx-btn-text { display: inline-flex; align-items: center; gap: 5px; border: none; background: none; font-size: 12px; color: var(--hx-mute); cursor: pointer; padding: 0; text-decoration: none; }
.hx-btn-text:hover { color: var(--hx-brand-deep); text-decoration: none; }
.hx-btn-30 { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 30px; padding: 0 12px; border: 1px solid var(--hx-line); border-radius: 6px; background: var(--hx-surface); color: var(--hx-ink2); font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap; text-decoration: none; }
.hx-btn-30:hover { border-color: var(--hx-line2); color: var(--hx-ink2); text-decoration: none; }
.hx-btn-30.is-active { border-color: var(--hx-ink); background: var(--hx-ink); color: var(--hx-paper); }
.hx-btn-30.is-plain { padding: 0 13px; font-weight: 400; }
.hx-btn-30:disabled { opacity: .5; cursor: default; }
.hx-btn-more { width: 30px; height: 30px; border: 1px solid var(--hx-line); border-radius: 6px; background: var(--hx-surface); color: #6B645C; font-size: 15px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.hx-btn-more:hover { border-color: var(--hx-line2); }
.hx-btn-29 { display: inline-flex; align-items: center; justify-content: center; height: 29px; padding: 0 12px; border: 1px solid var(--hx-line); border-radius: 6px; background: var(--hx-surface); font-size: 12px; font-weight: 500; color: var(--hx-ink2); cursor: pointer; white-space: nowrap; text-decoration: none; }
.hx-btn-29:hover { border-color: var(--hx-brand); color: var(--hx-brand-deep); text-decoration: none; }
.hx-btn-29.is-plain { font-weight: 400; }
.hx-btn-29.is-plain:hover { border-color: var(--hx-line2); color: var(--hx-ink2); }
.hx-btn-icon-29 { width: 29px; height: 29px; border: 1px solid var(--hx-line); border-radius: 6px; background: var(--hx-surface); font-size: 14px; color: var(--hx-ink3); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.hx-btn-28 { height: 28px; padding: 0 10px; border: 1px solid var(--hx-line); border-radius: 5px; background: var(--hx-surface); font-size: 11.5px; color: #6B645C; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.hx-btn-28:hover { border-color: var(--hx-line2); }
.hx-btn-28.is-on { border-color: var(--hx-ink); color: var(--hx-ink); }

.hx-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px; border: 1px solid transparent; white-space: nowrap; line-height: normal; }
.hx-pill-new, .hx-pill[data-status="New"] { background: var(--hx-new-bg); color: var(--hx-new-ink); border-color: var(--hx-new-line); }
.hx-pill-open, .hx-pill[data-status="Open"] { background: var(--hx-blue-bg); color: var(--hx-blue-ink); border-color: var(--hx-blue-line); }
.hx-pill-pending, .hx-pill[data-status="Pending"] { background: var(--hx-sunken); color: var(--hx-amber-ink); border-color: var(--hx-amber-line); }
.hx-pill-resolved, .hx-pill[data-status="Resolved"] { background: var(--hx-green-bg); color: var(--hx-green-ink); border-color: var(--hx-green-line); }
.hx-pill-neutral, .hx-pill[data-status="Closed"] { background: var(--hx-sunken); color: var(--hx-mute); border-color: var(--hx-line); }
.hx-pill-prio { background: var(--hx-sunken); color: var(--hx-ink3); border-color: var(--hx-line); }
.hx-pill-prio.is-urgent, .hx-pill-prio[data-priority="Urgent"] { background: var(--hx-red-bg); color: var(--hx-red-ink); border-color: var(--hx-red-line); }
.hx-pill-danger { background: var(--hx-red-bg); color: var(--hx-red-ink); border-color: var(--hx-red-line); }
.hx-pill-amber { background: var(--hx-amber-bg); color: var(--hx-amber-ink); border-color: var(--hx-amber-line); }
.hx-pill-green { background: var(--hx-green-bg); color: var(--hx-green-ink); border-color: var(--hx-green-line); }

.hx-sla { display: inline-flex; align-items: center; font-family: var(--hx-mono); font-size: 11px; padding: 2px 7px; border-radius: 4px; border: 1px solid transparent; white-space: nowrap; line-height: normal; }
.hx-sla-danger { font-weight: 600; background: var(--hx-red-bg); color: var(--hx-red-ink); border-color: var(--hx-red-line); }
.hx-sla-warn { font-weight: 600; background: var(--hx-amber-bg); color: var(--hx-amber-ink); border-color: var(--hx-amber-line); }
.hx-sla-ok { background: var(--hx-paper); color: var(--hx-mute); border-color: var(--hx-line); }
.hx-sla-idle { background: transparent; color: var(--hx-faint); border: 1px dashed var(--hx-line2); }

.hx-tag { font-size: 11px; color: var(--hx-mute); background: #F0EBE4; border-radius: 4px; padding: 2px 7px; white-space: nowrap; }

.hx-avatar { flex: none; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-weight: 600; background: #E4DCD1; color: var(--hx-ink3); }
.hx-avatar-21 { width: 21px; height: 21px; font-size: 9.5px; }
.hx-avatar-22 { width: 22px; height: 22px; font-size: 9.5px; }
.hx-avatar-24 { width: 24px; height: 24px; font-size: 10px; }
.hx-avatar.is-unassigned { background: transparent; border: 1px dashed var(--hx-line2); }
.hx-avatar.is-agent { background: var(--hx-ink); color: var(--hx-paper); }
.hx-avatar.is-automation { background: #EFEAE3; color: var(--hx-mute); }

.hx-kind { font-size: 10px; font-weight: 600; letter-spacing: 0.01em; padding: 1px 6px; border-radius: 3px; border: 1px solid transparent; white-space: nowrap; }
.hx-kind-customer { background: var(--hx-surface); color: var(--hx-mute); border-color: var(--hx-line); }
.hx-kind-agent { background: var(--hx-blue-bg); color: var(--hx-blue-ink); border-color: var(--hx-blue-line); }
.hx-kind-internal { background: var(--hx-amber-bg); color: var(--hx-amber-ink); border-color: var(--hx-amber-line); }
.hx-kind-automation { background: var(--hx-sunken); color: var(--hx-mute); border-color: var(--hx-line); }

input.hx-check, .hx-check { appearance: none; -webkit-appearance: none; width: 15px; height: 15px; flex: none; margin: 0; padding: 0; border-radius: 3px; border: 1.5px solid #D5CFC6; background: transparent; cursor: pointer; display: inline-block; box-shadow: none; }
input.hx-check:checked, input.hx-check.is-checked, .hx-check:checked, .hx-check.is-checked { border-color: var(--hx-ink); background: var(--hx-ink); }
/* Artefato (headCheck no estado selecionado): a caixa da pagina fica cheia enquanto houver selecao, parcial ou total. */
input.hx-check:indeterminate { border-color: var(--hx-ink); background: var(--hx-ink); }
input.hx-check:focus { box-shadow: none; }
.hx-dot { width: 3px; height: 3px; border-radius: 999px; background: #C9C2B7; flex: none; }
.hx-chevron { flex: none; }

/* =============================================================================
   3. CAIXA DE ENTRADA
   ============================================================================= */
.hx-inbox { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--hx-paper); }
.hx-inbox-head { padding: 14px 20px 0; border-bottom: 1px solid var(--hx-line); background: var(--hx-paper); }
.hx-inbox-head-row { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 12px; }
.hx-inbox-head-copy { flex: 1; min-width: 0; }
.hx-page-title { margin: 0 0 3px; font-size: 21px; line-height: normal; letter-spacing: -0.02em; font-weight: 600; color: var(--hx-ink); }
.hx-page-sub { font-size: 12.5px; color: var(--hx-mute); }
.hx-inbox-head-actions { display: flex; align-items: center; gap: 8px; }
.hx-live { display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px; border: 1px solid var(--hx-line); border-radius: 6px; background: var(--hx-surface); }
.hx-live-dot { width: 6px; height: 6px; border-radius: 999px; background: var(--hx-green); animation: hx-pulse 2.4s ease-in-out infinite; }
.hx-live.is-offline .hx-live-dot { background: var(--hx-red); animation: none; }
.hx-live-label { font-size: 12px; color: #6B645C; }
.hx-views { display: flex; align-items: center; gap: 2px; overflow-x: auto; padding-bottom: 1px; }
.hx-view { display: flex; align-items: center; gap: 7px; white-space: nowrap; height: 32px; padding: 0 12px; border: none; border-bottom: 2px solid transparent; background: none; cursor: pointer; font-size: 12.5px; font-weight: 500; color: var(--hx-mute); text-decoration: none; }
.hx-view:hover { color: var(--hx-mute); text-decoration: none; }
.hx-view.is-active { border-bottom-color: var(--hx-accent); font-weight: 600; color: var(--hx-ink); }
.hx-view.is-active:hover { color: var(--hx-ink); }
.hx-view-count { font-family: var(--hx-mono); font-size: 10.5px; padding: 1px 5px; border-radius: 4px; background: #EFEAE3; color: var(--hx-mute); }
.hx-view.is-active .hx-view-count { background: var(--hx-ink); color: var(--hx-paper); }
.hx-view-save { margin-left: 6px; height: 30px; padding: 0 9px; border: 1px dashed var(--hx-line2); background: none; border-radius: 6px; font-size: 12px; color: var(--hx-mute); cursor: pointer; white-space: nowrap; }
.hx-view-save:hover { color: var(--hx-brand-deep); border-color: var(--hx-brand); }
.hx-view-save:disabled { cursor: not-allowed; opacity: .6; }
.hx-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 20px; border-bottom: 1px solid var(--hx-line); background: var(--hx-sunken); }
.hx-search { display: flex; align-items: center; gap: 8px; flex: 1 1 220px; min-width: 180px; max-width: 250px; height: 31px; padding: 0 10px; background: var(--hx-surface); border: 1px solid var(--hx-line); border-radius: 6px; }
.hx-search:focus-within { border-color: var(--hx-line2); }
.hx-search input, .hx-search input[type="search"], .hx-search input[type="text"] { height: auto; border: none; outline: none; box-shadow: none; font-size: 12.5px; line-height: normal; width: 100%; color: var(--hx-ink2); background: none; padding: 1px 0 1px 2px; min-width: 0; font-family: inherit; -webkit-appearance: none; appearance: none; }
/* O artefato usa <input> simples; o campo de busca do app e type=search e o Chrome reservaria espaco do "x". */
.hx-search input::-webkit-search-cancel-button, .hx-search input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.hx-search input:focus { box-shadow: none; border: none; }
.hx-search input::placeholder { color: var(--hx-faint); }
.hx-chip { display: inline-flex; align-items: center; gap: 6px; height: 31px; padding: 0 11px; border: 1px solid var(--hx-line); border-radius: 999px; background: var(--hx-surface); color: var(--hx-ink3); font-size: 12px; font-weight: 500; cursor: pointer; white-space: nowrap; text-decoration: none; }
.hx-chip:hover { color: var(--hx-ink3); text-decoration: none; border-color: var(--hx-line2); }
.hx-chip.is-active { border-color: var(--hx-ink); background: var(--hx-ink); color: var(--hx-paper); }
.hx-chip.is-active:hover { color: var(--hx-paper); border-color: var(--hx-ink); }
.hx-chip-menu { position: relative; }
.hx-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 200px; max-height: 320px; overflow-y: auto; background: var(--hx-surface); border: 1px solid var(--hx-line); border-radius: 8px; box-shadow: 0 1px 2px rgba(35,31,28,.06), 0 18px 48px rgba(35,31,28,.14); padding: 5px; z-index: 30; }
.hx-menu-item { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 30px; padding: 0 9px; border: none; border-radius: 5px; background: none; font-size: 12.5px; color: var(--hx-ink2); cursor: pointer; text-align: left; }
.hx-menu-item:hover { background: var(--hx-paper); }
.hx-menu-item.is-selected { font-weight: 600; color: var(--hx-ink); }
.hx-menu-sep { height: 1px; background: #F0EBE4; margin: 4px 2px; }
.hx-adv-btn { display: inline-flex; align-items: center; gap: 6px; height: 31px; padding: 0 11px; border: 1px solid var(--hx-line); border-radius: 6px; background: transparent; color: var(--hx-ink3); font-size: 12px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.hx-adv-btn.is-open, details[open] > .hx-adv-btn { border-color: var(--hx-ink); background: var(--hx-surface); color: var(--hx-ink); }
.hx-adv-count { margin-left: 2px; font-family: var(--hx-mono); font-size: 10.5px; background: var(--hx-brand); color: var(--hx-ink); border-radius: 3px; padding: 1px 4px; }
.hx-mode { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.hx-mode-btn { height: 27px; padding: 0 10px; border: 1px solid transparent; border-radius: 5px; background: transparent; font-size: 12px; font-weight: 500; color: var(--hx-mute); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.hx-mode-btn:hover { color: var(--hx-mute); text-decoration: none; }
.hx-mode-btn.is-active { border-color: var(--hx-line2); background: var(--hx-surface); font-weight: 600; color: var(--hx-ink); }
.hx-adv { padding: 16px 20px; background: var(--hx-surface); border-bottom: 1px solid var(--hx-line); animation: hx-fade .16s ease-out; }
.hx-adv-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.hx-field-label { display: block; font-size: 11px; font-weight: 600; color: var(--hx-mute); margin-bottom: 5px; }
.hx-field, input.hx-field, select.hx-field { width: 100%; height: 31px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; margin: 0; border: 1px solid var(--hx-line); border-radius: 6px; background: var(--hx-surface); font-size: 12.5px; line-height: normal; color: var(--hx-ink2); box-shadow: none; font-family: inherit; }
input.hx-field, select.hx-field { appearance: none; -webkit-appearance: none; outline: none; display: block; }
input.hx-field:focus, select.hx-field:focus { box-shadow: none; border-color: var(--hx-line2); }
select.hx-field { padding-right: 26px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9' viewBox='0 0 10 10' fill='none' stroke='%237C746B' stroke-width='1.7'%3E%3Cpolyline points='1.5,3.5 5,7 8.5,3.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; cursor: pointer; }
.hx-adv-actions { display: flex; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #F0EBE4; }
.hx-split { flex: 1; min-height: 0; display: flex; }
.hx-list-pane { flex: 1; min-width: 0; display: flex; flex-direction: column; border-right: 1px solid var(--hx-line); background: var(--hx-paper); }
.hx-bulk { display: flex; align-items: center; gap: 10px; padding: 9px 14px; background: var(--hx-ink); color: #F2EEE8; animation: hx-fade .14s ease-out; }
.hx-bulk-count { font-size: 12.5px; font-weight: 600; }
.hx-bulk-sep { width: 1px; height: 16px; background: #4A423A; }
.hx-bulk-btn { border: none; background: none; color: #E8E2DA; font-size: 12px; cursor: pointer; padding: 3px 6px; border-radius: 4px; }
.hx-bulk-btn:hover { background: var(--hx-ink2); }
.hx-bulk-close { margin-left: auto; border: none; background: none; color: var(--hx-faint); font-size: 16px; line-height: 1; cursor: pointer; }
select.hx-bulk-select, input.hx-bulk-select { height: 24px; padding: 0 6px; border: 1px solid #4A423A; border-radius: 4px; background: var(--hx-ink2); color: #E8E2DA; font-size: 12px; box-shadow: none; }
.hx-list-head { display: flex; align-items: center; gap: 10px; padding: 7px 14px; border-bottom: 1px solid var(--hx-line); background: var(--hx-paper); }
.hx-list-count { font-size: 11.5px; color: var(--hx-mute); white-space: nowrap; }
.hx-sort { margin-left: auto; display: flex; align-items: center; gap: 4px; border: none; background: none; font-size: 11.5px; color: #6B645C; cursor: pointer; padding: 0; }
.hx-list-body { flex: 1; overflow-y: auto; min-height: 0; }
.hx-list-foot { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--hx-line); background: var(--hx-paper); font-size: 11.5px; color: var(--hx-mute); }
.hx-list-foot .hx-btn-28 { height: 26px; }
.hx-list-foot-spacer { margin-left: auto; }

.hx-skel-row { padding: 13px 14px 13px 17px; border-bottom: 1px solid #F0EBE4; }
.hx-skel { height: 9px; border-radius: 3px; background: linear-gradient(90deg, #EFEBE4 0px, #F7F4EF 120px, #EFEBE4 240px); background-size: 380px 100%; animation: hx-shimmer 1.4s linear infinite; margin-bottom: 9px; }
.hx-skel.l1 { height: 10px; width: 62%; }
.hx-skel.l2 { width: 38%; }
.hx-skel.l3 { width: 84%; margin-bottom: 0; }
.hx-state { padding: 74px 40px; text-align: center; }
.hx-state.is-denied { padding: 70px 40px; }
.hx-state-icon { width: 46px; height: 46px; margin: 0 auto 18px; border-radius: 10px; border: 1.5px dashed var(--hx-line2); display: flex; align-items: center; justify-content: center; }
.hx-state.is-denied .hx-state-icon { border: none; background: #F0EBE4; }
.hx-state-title { font-size: 15px; font-weight: 600; color: var(--hx-ink); margin-bottom: 6px; }
.hx-state-text { font-size: 13px; line-height: 1.55; color: var(--hx-mute); max-width: 290px; margin: 0 auto 18px; }
.hx-state.is-denied .hx-state-text { max-width: 320px; }
.hx-error { margin: 20px 14px; padding: 20px; border: 1px solid var(--hx-red-line); border-left: 3px solid var(--hx-red); border-radius: 8px; background: #FDF3F1; }
.hx-error-title { font-size: 14px; font-weight: 600; color: var(--hx-red-ink); margin-bottom: 5px; }
.hx-error-text { font-size: 12.5px; line-height: 1.55; color: #7A5049; margin-bottom: 14px; }
.hx-error-actions { display: flex; gap: 8px; }
.hx-error-btn { height: 30px; padding: 0 13px; border: none; border-radius: 6px; background: var(--hx-red-ink); color: #FFF; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.hx-error-btn-alt { height: 30px; padding: 0 13px; border: 1px solid #E7C8C2; border-radius: 6px; background: var(--hx-surface); color: #7A5049; font-size: 12.5px; cursor: pointer; }
.hx-error-ref { margin-top: 12px; font-family: var(--hx-mono); font-size: 10.5px; color: #A8817A; }

.hx-row { display: flex; gap: 10px; padding: 11px 14px 11px 11px; border-bottom: 1px solid #F0EBE4; cursor: pointer; background: transparent; box-shadow: none; text-decoration: none; color: inherit; outline-offset: -2px; }
.hx-row:hover { text-decoration: none; color: inherit; }
.hx-row.is-active { background: var(--hx-surface); box-shadow: inset 3px 0 0 var(--hx-ink); }
.hx-row.is-checked { background: #FBF6F1; }
.hx-row.is-active.is-checked { background: var(--hx-surface); }
.hx-row-prio { width: 3px; flex: none; border-radius: 2px; background: #C9C2B7; align-self: stretch; }
.hx-row[data-priority="Urgent"] .hx-row-prio { background: var(--hx-red); }
.hx-row[data-priority="High"] .hx-row-prio { background: var(--hx-brand); }
.hx-row[data-priority="Medium"] .hx-row-prio { background: #C9C2B7; }
.hx-row[data-priority="Low"] .hx-row-prio { background: #E6E1D9; }
input.hx-row-check, .hx-row-check { margin-top: 1px; }
.hx-row-main { flex: 1; min-width: 0; }
.hx-row-l1 { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.hx-row-num { font-family: var(--hx-mono); font-size: 11px; color: var(--hx-faint); flex: none; }
.hx-row-title { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; color: var(--hx-ink); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-row-l2 { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; }
.hx-row-client { font-size: 12px; font-weight: 500; color: var(--hx-ink3); }
.hx-row-channel { font-size: 11.5px; color: var(--hx-faint); }
.hx-row-snippet { font-size: 12.5px; line-height: 1.45; color: var(--hx-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-row-author { font-weight: 500; color: var(--hx-ink3); margin-right: 4px; }
.hx-row-foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.hx-row-meta { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.hx-row-time { font-size: 11.5px; color: var(--hx-faint); white-space: nowrap; }

.hx-table { width: 100%; border-collapse: collapse; background: transparent; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
.hx-table thead { background: transparent; }
.hx-table thead tr { background: var(--hx-sunken); }
.hx-table th { text-align: left; font-size: 11px; font-weight: 600; color: var(--hx-mute); padding: 8px 12px; border-bottom: 1px solid var(--hx-line); white-space: nowrap; }
.hx-table th a, .hx-table th button { color: inherit; font: inherit; text-decoration: none; background: none; border: none; padding: 0; cursor: pointer; }
.hx-table tbody tr { border-bottom: 1px solid #F0EBE4; cursor: pointer; }
.hx-table tbody tr:hover { background: #FBF9F6; }
.hx-table tbody tr:last-child td { border-bottom: 0; }
.hx-table tbody tr.is-active { background: var(--hx-surface); box-shadow: inset 3px 0 0 var(--hx-ink); }
.hx-table td { padding: 9px 12px; font-size: 12.5px; color: var(--hx-ink3); vertical-align: middle; border-bottom: 0; }
.hx-table td a { color: inherit; font-weight: inherit; }
.hx-table td a:hover { color: inherit; opacity: 1; }
.hx-table td.hx-td-num { font-family: var(--hx-mono); font-size: 11.5px; color: var(--hx-faint); white-space: nowrap; }
.hx-table td.hx-td-title { color: var(--hx-ink); font-weight: 500; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-table td.hx-td-check { width: 15px; padding-right: 0; }

.hx-preview-collapsed { width: 44px; flex: none; border-left: 1px solid var(--hx-line); background: var(--hx-sunken); display: flex; flex-direction: column; align-items: center; padding-top: 14px; }
.hx-preview-expand { width: 30px; height: 30px; border: 1px solid var(--hx-line); border-radius: 7px; background: var(--hx-surface); color: var(--hx-ink3); font-size: 14px; cursor: pointer; }
.hx-preview-vlabel { margin-top: 14px; writing-mode: vertical-rl; font-size: 11.5px; color: var(--hx-mute); letter-spacing: 0.01em; }
.hx-preview-handle { width: 6px; flex: none; cursor: col-resize; background: var(--hx-line); }
.hx-preview-handle:hover, .hx-preview-handle.is-dragging { background: var(--hx-line2); }
.hx-preview { width: 560px; min-width: 0; flex: none; background: var(--hx-surface); display: flex; flex-direction: column; min-height: 0; }
.hx-preview-head { padding: 16px 22px 13px; border-bottom: 1px solid #EFEAE3; }
.hx-preview-head-row { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.hx-preview-num { font-family: var(--hx-mono); font-size: 11.5px; color: var(--hx-faint); }
.hx-preview-head-row .hx-btn-29 { margin-left: auto; }
.hx-preview-title { font-size: 16px; font-weight: 600; letter-spacing: -0.015em; color: var(--hx-ink); line-height: 1.3; margin-bottom: 6px; }
.hx-preview-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--hx-mute); flex-wrap: wrap; }
.hx-preview-meta strong { font-weight: 500; color: var(--hx-ink3); }
.hx-preview-body { flex: 1; overflow-y: auto; padding: 18px 22px; min-height: 0; }
.hx-preview-msg { margin-bottom: 16px; }
.hx-preview-msg-head { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
.hx-preview-msg-head .hx-msg-time { margin-left: auto; }
.hx-preview-foot { border-top: 1px solid #EFEAE3; padding: 12px 22px 16px; }
.hx-preview-reply { display: block; width: 100%; text-align: left; border: 1px solid var(--hx-line); border-radius: 8px; padding: 11px 13px; font-size: 13px; color: var(--hx-faint); cursor: text; background: var(--hx-paper); text-decoration: none; }
.hx-preview-reply:hover { border-color: var(--hx-line2); color: var(--hx-faint); text-decoration: none; }
.hx-preview-empty { padding: 60px 30px; text-align: center; font-size: 13px; color: var(--hx-mute); line-height: 1.55; }

/* =============================================================================
   4. MENSAGENS (previa e workspace)
   ============================================================================= */
.hx-msg-author { font-size: 12.5px; font-weight: 600; color: var(--hx-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-msg-time { font-size: 11px; color: var(--hx-faint); white-space: nowrap; }
.hx-bubble { font-size: 13.5px; line-height: 1.65; padding: 12px 15px; border-radius: 10px; border: 1px solid var(--hx-line); color: var(--hx-ink2); min-width: 0; overflow-wrap: anywhere; }
.hx-bubble-customer { background: var(--hx-surface); }
.hx-bubble-agent { background: #F1EEE9; }
.hx-bubble-internal { background: var(--hx-amber-bg); border: 1px dashed var(--hx-amber-line); color: var(--hx-ink2); }
.hx-bubble-automation { font-size: 13px; line-height: 1.6; padding: 10px 14px; background: var(--hx-paper); color: var(--hx-ink3); }
.hx-bubble > :first-child { margin-top: 0; }
.hx-bubble > :last-child { margin-bottom: 0; }
.hx-bubble p { margin: 0 0 10px; color: inherit; }
.hx-bubble img { max-width: 100%; height: auto; }
.hx-bubble blockquote { margin: 8px 0; padding: 0 0 0 12px; border-left: 2px solid #E6E1D9; color: var(--hx-faint); }
.hx-bubble pre { white-space: pre-wrap; font-family: var(--hx-mono); font-size: 12px; }
.hx-quote-toggle { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--hx-line); background: var(--hx-paper); border-radius: 5px; padding: 3px 9px; font-size: 11.5px; color: var(--hx-mute); cursor: pointer; }
.hx-quote-toggle:hover { border-color: var(--hx-line2); }
.hx-quote { margin-top: 10px; padding: 10px 12px; border-left: 2px solid #E6E1D9; font-size: 12.5px; line-height: 1.6; color: var(--hx-faint); white-space: pre-line; font-family: var(--hx-mono); }
.hx-attachments { display: flex; flex-wrap: wrap; gap: 8px; }
.hx-attach { margin-top: 11px; display: inline-flex; align-items: center; gap: 9px; border: 1px solid var(--hx-line); border-radius: 6px; padding: 7px 11px; background: var(--hx-paper); color: inherit; text-decoration: none; }
.hx-attach:hover { border-color: var(--hx-line2); text-decoration: none; color: inherit; }
.hx-attach-icon { width: 22px; height: 26px; border-radius: 3px; background: #E4DCD1; flex: none; }
.hx-attach-name { font-size: 12px; font-weight: 500; color: var(--hx-ink2); }
.hx-attach-meta { font-size: 10.5px; color: var(--hx-faint); }
.hx-attach-actions { display: flex; gap: 6px; margin-left: 4px; }
.hx-attach-actions a { font-size: 10.5px; color: var(--hx-brand-deep); }

/* =============================================================================
   5. WORKSPACE DO TICKET
   ============================================================================= */
.hx-ws { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--hx-paper); }
.hx-ws-top { padding: 11px 20px; border-bottom: 1px solid var(--hx-line); background: var(--hx-surface); }
.hx-ws-top-l1 { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.hx-ws-num { font-family: var(--hx-mono); font-size: 11.5px; color: var(--hx-faint); }
.hx-ws-age { font-size: 11.5px; color: var(--hx-faint); white-space: nowrap; }
.hx-ws-actions { margin-left: auto; display: flex; align-items: center; gap: 7px; position: relative; }
.hx-ws-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 180px; background: var(--hx-surface); border: 1px solid var(--hx-line); border-radius: 8px; box-shadow: 0 1px 2px rgba(35,31,28,.06), 0 18px 48px rgba(35,31,28,.14); padding: 5px; z-index: 30; }
.hx-ws-top-l2 { display: flex; align-items: center; gap: 12px; }
.hx-ws-title { margin: 0; font-size: 17.5px; font-weight: 600; letter-spacing: -0.018em; color: var(--hx-ink); line-height: 1.3; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-ws-pills { display: flex; align-items: center; gap: 6px; flex: none; }
.hx-ws-owner { margin-left: auto; display: flex; align-items: center; gap: 7px; flex: none; }
.hx-ws-owner-name { font-size: 12.5px; color: var(--hx-ink3); }
.hx-ws-notice { padding: 9px 20px; border-bottom: 1px solid var(--hx-line); font-size: 12.5px; }
.hx-ws-notice.is-amber { background: var(--hx-amber-bg); color: var(--hx-amber-ink); }
.hx-ws-notice.is-red { background: var(--hx-red-bg); color: var(--hx-red-ink); }
.hx-ws-split { flex: 1; min-height: 0; display: flex; }
.hx-ws-conv { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--hx-paper); }
.hx-ws-scroll { flex: 1; overflow-y: auto; padding: 22px 26px 10px; min-height: 0; }
.hx-ws-thread { max-width: 720px; margin: 0 auto; }
.hx-ws-thread-tools { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 11.5px; color: #6B645C; }
.hx-ws-thread-tools .hx-btn-text { font-size: 11.5px; }
.hx-event { display: flex; align-items: center; gap: 10px; margin: 14px 0; }
.hx-event-rule { flex: 1; height: 1px; background: #E6E1D9; }
.hx-event-text { font-size: 11.5px; color: var(--hx-faint); white-space: nowrap; }
.hx-msg-wrap { display: block; }
.hx-msg-wrap.is-agent { display: flex; justify-content: flex-end; }
.hx-msg { margin-bottom: 18px; max-width: 88%; min-width: 0; }
.hx-msg.is-internal { max-width: none; }
.hx-msg-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.hx-msg-text { white-space: pre-line; }
.hx-msg-delivery { margin-top: 8px; font-size: 11px; color: var(--hx-faint); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.hx-composer-wrap { border-top: 1px solid var(--hx-line); background: var(--hx-surface); padding: 0 26px 16px; }
.hx-composer-inner { max-width: 720px; margin: 0 auto; }
.hx-composer-tabs { display: flex; align-items: center; gap: 3px; padding: 9px 0 10px; }
.hx-ctab { height: 29px; padding: 0 13px; border: none; border-radius: 6px; cursor: pointer; font-size: 12.5px; font-weight: 500; background: transparent; color: var(--hx-mute); }
.hx-ctab.is-active { font-weight: 600; background: var(--hx-ink); color: var(--hx-paper); }
.hx-ctab.is-note.is-active { background: var(--hx-amber-bg); color: var(--hx-amber-ink); }
.hx-composer-hint { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--hx-faint); }
.hx-composer { border: 1px solid var(--hx-line2); border-radius: 10px; padding: 13px 15px; background: var(--hx-surface); }
.hx-composer.is-note { border-color: var(--hx-amber-line); background: var(--hx-amber-bg); }
.hx-composer-editor { font-size: 13.5px; line-height: 1.6; color: var(--hx-ink2); min-height: 52px; outline: none; }
.hx-composer-editor:empty::before { content: attr(data-placeholder); color: var(--hx-faint); }
.hx-composer-toolbar { display: flex; align-items: center; gap: 2px; margin-bottom: 8px; }
.hx-tool { width: 27px; height: 25px; border: none; background: none; border-radius: 4px; font-size: 12.5px; color: var(--hx-ink3); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.hx-tool:hover { background: #E6E1D9; }
.hx-tool.is-b { font-weight: 700; }
.hx-tool.is-i { font-style: italic; }
.hx-tool.is-u { text-decoration: underline; }
.hx-tool-sep { width: 1px; height: 16px; background: #DDD7CE; margin: 0 5px; }
.hx-composer-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 11px; border-top: 1px solid #EFEAE3; flex-wrap: wrap; }
.hx-composer-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.hx-onsend { display: flex; align-items: center; gap: 6px; height: 29px; padding: 0 10px; border: 1px solid var(--hx-line); border-radius: 6px; font-size: 12px; color: #6B645C; white-space: nowrap; }
.hx-onsend strong { font-weight: 600; color: var(--hx-ink2); }
.hx-onsend select { height: auto; border: none; background: none; font-size: 12px; font-weight: 600; color: var(--hx-ink2); padding: 0; cursor: pointer; box-shadow: none; appearance: auto; }
.hx-send { height: 29px; padding: 0 15px; border: none; border-radius: 6px; background: var(--hx-ink); color: var(--hx-paper); font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.hx-send.is-note { background: var(--hx-amber-ink); }
.hx-send:disabled { background: #D5CFC6; color: #6F6860; cursor: default; }
.hx-composer-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hx-composer-file { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border: 1px solid var(--hx-line); border-radius: 5px; background: var(--hx-paper); font-size: 11.5px; color: var(--hx-ink2); }
.hx-composer-file button { border: none; background: none; color: var(--hx-faint); cursor: pointer; font-size: 13px; line-height: 1; padding: 0; }
.hx-composer-extra { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #EFEAE3; }
.hx-composer-status { margin-top: 10px; font-size: 12px; line-height: 1.5; }
.hx-composer-status.is-error { color: var(--hx-red-ink); }
.hx-composer-status.is-warn { color: var(--hx-amber-ink); }
.hx-composer-status.is-ok { color: var(--hx-green-ink); }

.hx-side { width: 300px; flex: none; border-left: 1px solid var(--hx-line); background: var(--hx-surface); overflow-y: auto; position: relative; }
.hx-side-sec { padding: 14px 18px; border-bottom: 1px solid #EFEAE3; }
.hx-side-sec.is-first { padding: 16px 18px; }
.hx-side-sec.is-last { border-bottom: none; padding: 14px 18px 22px; }
.hx-side-client { display: flex; align-items: center; gap: 10px; }
.hx-side-client-mark { width: 34px; height: 34px; flex: none; border-radius: 8px; background: var(--hx-ink); color: #F2EEE8; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.hx-side-client-copy { min-width: 0; }
.hx-side-client-name { font-size: 13.5px; font-weight: 600; color: var(--hx-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-side-client-sub { font-size: 11.5px; color: var(--hx-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-stats { display: flex; gap: 14px; margin-top: 13px; }
.hx-stat-v { font-family: var(--hx-mono); font-size: 15px; color: var(--hx-ink); }
.hx-stat-v.is-danger { color: var(--hx-red); }
.hx-stat-l { font-size: 10.5px; color: var(--hx-mute); }
.hx-side-sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.hx-side-title { font-size: 11.5px; font-weight: 600; color: var(--hx-mute); }
.hx-side-sec-head .hx-btn-text { font-size: 11.5px; }
.hx-sla-remaining { font-family: var(--hx-mono); font-size: 11.5px; color: var(--hx-red); }
.hx-sla-remaining.is-ok { color: var(--hx-ink); }
.hx-sla-remaining.is-warn { color: var(--hx-amber-ink); }
.hx-sla-remaining.is-done { color: var(--hx-green-ink); }
.hx-sla-bar { height: 5px; border-radius: 3px; background: #F0EBE4; overflow: hidden; margin-bottom: 9px; }
.hx-sla-bar-fill { height: 100%; background: var(--hx-red); }
.hx-sla-bar-fill.is-ok { background: var(--hx-green); }
.hx-sla-bar-fill.is-warn { background: var(--hx-amber); }
.hx-sla-lines { display: flex; justify-content: space-between; font-size: 11px; color: var(--hx-faint); gap: 8px; }
.hx-prop { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.hx-prop:last-child { margin-bottom: 0; }
.hx-prop-label { width: 84px; flex: none; font-size: 12px; color: var(--hx-mute); }
.hx-prop-value, select.hx-prop-value, input.hx-prop-value { flex: 1; min-width: 0; width: auto; height: 30px; display: flex; align-items: center; justify-content: space-between; padding: 0 9px; margin: 0; border: 1px solid var(--hx-line); border-radius: 6px; font-size: 12.5px; line-height: normal; color: var(--hx-ink2); background: var(--hx-surface); box-shadow: none; font-family: inherit; }
.hx-prop-value > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
select.hx-prop-value, input.hx-prop-value { appearance: none; -webkit-appearance: none; cursor: pointer; outline: none; width: 100%; display: block; }
select.hx-prop-value:focus, input.hx-prop-value:focus { box-shadow: none; border-color: var(--hx-line2); }
select.hx-prop-value { padding-right: 24px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9' viewBox='0 0 10 10' fill='none' stroke='%237C746B' stroke-width='1.7'%3E%3Cpolyline points='1.5,3.5 5,7 8.5,3.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
select.hx-prop-value:hover, input.hx-prop-value:hover, .hx-prop-value.is-clickable:hover { border-color: var(--hx-line2); background-color: var(--hx-paper); }
.hx-prop-value.is-invalid, select.hx-prop-value.is-invalid { border-color: var(--hx-red); }
.hx-prop-hint { font-size: 11px; color: var(--hx-faint); margin: -4px 0 9px 94px; }
.hx-side-actions { display: flex; align-items: center; gap: 8px; margin-top: 0; }
.hx-side-sec-head.is-hours { margin-bottom: 10px; }
.hx-side-actions .hx-btn-29 { flex: 1; }
.hx-cf { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid #F5F1EB; }
.hx-cf-k { font-size: 12px; color: var(--hx-mute); }
.hx-cf-v { font-size: 12px; font-weight: 500; color: var(--hx-ink2); text-align: right; min-width: 0; overflow-wrap: anywhere; }
.hx-cf-input, input.hx-cf-input, select.hx-cf-input, textarea.hx-cf-input { width: 100%; height: 30px; padding: 0 9px; margin: 0; border: 1px solid var(--hx-line); border-radius: 6px; font-size: 12.5px; line-height: normal; color: var(--hx-ink2); background: var(--hx-surface); outline: none; box-shadow: none; font-family: inherit; display: block; }
input.hx-cf-input:focus, select.hx-cf-input:focus, textarea.hx-cf-input:focus { border-color: var(--hx-line2); box-shadow: none; }
textarea.hx-cf-input { height: auto; min-height: 60px; padding: 6px 9px; }
.hx-hours-v { font-family: var(--hx-mono); font-size: 12px; color: var(--hx-ink); }
.hx-side-empty { font-size: 12px; color: var(--hx-faint); }
.hx-side-list { font-size: 12px; color: var(--hx-ink2); display: grid; gap: 6px; }
.hx-side-list a { color: var(--hx-brand-deep); }

.hx-ai { position: absolute; inset: 0; background: var(--hx-surface); border-left: 1px solid var(--hx-line); box-shadow: -14px 0 34px rgba(35,31,28,.10); display: flex; flex-direction: column; animation: hx-fade .16s ease-out; z-index: 5; }
.hx-ai-head { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid #EFEAE3; }
.hx-ai-mark { width: 7px; height: 7px; border-radius: 2px; background: var(--hx-brand); transform: rotate(45deg); flex: none; }
.hx-ai-title { font-size: 13px; font-weight: 600; color: var(--hx-ink); }
.hx-ai-close { margin-left: auto; border: none; background: none; font-size: 17px; line-height: 1; color: var(--hx-faint); cursor: pointer; }
.hx-ai-body { flex: 1; overflow-y: auto; padding: 16px; min-height: 0; }
.hx-ai-label { font-size: 11px; font-weight: 600; color: var(--hx-mute); margin-bottom: 9px; }
.hx-ai-text { font-size: 12.5px; line-height: 1.6; color: var(--hx-ink2); margin-bottom: 18px; }
.hx-ai-sugg { display: grid; gap: 8px; }
.hx-ai-sugg-btn { text-align: left; border: 1px solid var(--hx-line); border-radius: 7px; padding: 10px 12px; background: var(--hx-paper); font-size: 12.5px; line-height: 1.5; color: var(--hx-ink2); cursor: pointer; font-family: inherit; }
.hx-ai-sugg-btn:hover { border-color: var(--hx-brand); }
.hx-ai-sugg-btn:disabled { opacity: .55; cursor: default; }
.hx-ai-note { margin-top: 16px; font-size: 11px; line-height: 1.5; color: var(--hx-faint); }
.hx-ai-cites { margin-top: 10px; display: grid; gap: 6px; font-size: 11.5px; color: var(--hx-mute); }

/* =============================================================================
   6. FORMULARIO (arquetipo da tela de Notificacoes: Novo ticket deriva daqui)
   ============================================================================= */
.hx-form { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--hx-paper); }
.hx-form-top { padding: 14px 24px; border-bottom: 1px solid var(--hx-line); background: var(--hx-surface); }
.hx-crumb { font-size: 11.5px; color: var(--hx-faint); margin-bottom: 4px; }
.hx-crumb a { color: inherit; }
.hx-crumb a:hover { color: var(--hx-brand-deep); text-decoration: none; }
.hx-form-top-row { display: flex; align-items: center; gap: 14px; }
.hx-form-top-copy { flex: 1; min-width: 0; }
.hx-form-title { margin: 0 0 3px; font-size: 20px; line-height: normal; font-weight: 600; letter-spacing: -0.02em; color: var(--hx-ink); }
.hx-form-sub { font-size: 12.5px; color: var(--hx-mute); }
.hx-form-top-actions { display: flex; align-items: center; gap: 10px; }
.hx-save-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; border-radius: 5px; padding: 3px 9px; border: 1px solid transparent; white-space: nowrap; }
.hx-save-state.is-saved { color: var(--hx-green-ink); background: var(--hx-green-bg); border-color: var(--hx-green-line); }
.hx-save-state.is-dirty { color: var(--hx-amber-ink); background: var(--hx-amber-bg); border-color: var(--hx-amber-line); }
.hx-save-state.is-error { color: var(--hx-red-ink); background: var(--hx-red-bg); border-color: var(--hx-red-line); }
.hx-save-btn { height: 31px; padding: 0 15px; border: none; border-radius: 6px; background: var(--hx-ink); color: var(--hx-paper); font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.hx-save-btn.is-idle, .hx-save-btn:disabled { background: #D5CFC6; color: #6F6860; cursor: default; }
.hx-form-split { flex: 1; min-height: 0; display: flex; }
.hx-form-body { flex: 1; min-width: 0; overflow-y: auto; padding: 22px 24px 40px; }
.hx-form-stack { max-width: 620px; display: grid; gap: 18px; }
.hx-form-aside { width: 390px; flex: none; border-left: 1px solid var(--hx-line); background: var(--hx-sunken); display: flex; flex-direction: column; }
.hx-form-aside-head { display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-bottom: 1px solid var(--hx-line); font-size: 12px; font-weight: 600; color: var(--hx-ink); }
.hx-form-aside-body { flex: 1; overflow-y: auto; padding: 18px; }
.hx-card { background: var(--hx-surface); border: 1px solid var(--hx-line); border-radius: 10px; padding: 18px; }
.hx-card.is-flush { padding: 0; overflow: hidden; }
.hx-card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid #EFEAE3; }
.hx-card-body { padding: 16px 18px; }
.hx-card-row { display: flex; align-items: flex-start; gap: 14px; }
.hx-card-title { font-size: 14px; font-weight: 600; color: var(--hx-ink); margin-bottom: 4px; }
.hx-card-title.is-tight { margin-bottom: 3px; }
.hx-card-desc { font-size: 12.5px; line-height: 1.55; color: var(--hx-mute); }
.hx-card-desc.is-mb { margin-bottom: 14px; }
.hx-card-desc.is-sm { font-size: 12px; line-height: normal; }
.hx-label { display: block; font-size: 11.5px; font-weight: 600; color: var(--hx-mute); margin-bottom: 6px; }
.hx-label .hx-req { color: var(--hx-red); font-weight: 600; margin-left: 2px; }
.hx-input, .hx-select, .hx-textarea, input.hx-input, select.hx-select, textarea.hx-textarea { display: block; width: 100%; height: 34px; padding: 0 10px; margin: 0 0 8px; border: 1px solid var(--hx-line); border-radius: 6px; background: var(--hx-paper); font-size: 13px; line-height: normal; color: var(--hx-ink2); outline: none; box-shadow: none; font-family: inherit; }
input.hx-input:focus, select.hx-select:focus, textarea.hx-textarea:focus, .hx-input:focus, .hx-select:focus, .hx-textarea:focus { border-color: var(--hx-line2); background: var(--hx-surface); box-shadow: none; }
input.hx-input.is-invalid, select.hx-select.is-invalid, textarea.hx-textarea.is-invalid, .hx-input.is-invalid, .hx-select.is-invalid, .hx-textarea.is-invalid { border-color: var(--hx-red); }
.hx-input::placeholder, .hx-textarea::placeholder { color: var(--hx-faint); }
.hx-select, select.hx-select { appearance: none; -webkit-appearance: none; padding-right: 26px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9' viewBox='0 0 10 10' fill='none' stroke='%237C746B' stroke-width='1.7'%3E%3Cpolyline points='1.5,3.5 5,7 8.5,3.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.hx-textarea, textarea.hx-textarea { height: auto; min-height: 96px; padding: 9px 10px; line-height: 1.6; resize: vertical; }
.hx-help { font-size: 11px; color: var(--hx-faint); margin-bottom: 18px; }
.hx-help.is-tight { margin-bottom: 0; }
.hx-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 14px; }
.hx-option { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--hx-line); border-radius: 8px; background: var(--hx-surface); cursor: pointer; text-align: left; width: 100%; font-family: inherit; }
.hx-option.is-on { border-color: var(--hx-ink); background: #FBF9F6; }
.hx-option-box { width: 16px; height: 16px; flex: none; border-radius: 4px; border: 1.5px solid #D5CFC6; background: transparent; }
.hx-option.is-on .hx-option-box { border-color: var(--hx-ink); background: var(--hx-ink); }
.hx-option-copy { flex: 1; text-align: left; }
.hx-option-label { display: block; font-size: 12.5px; font-weight: 500; color: var(--hx-ink2); }
.hx-option-hint { display: block; font-size: 11px; color: var(--hx-faint); margin-top: 1px; }
.hx-toggle { width: 42px; height: 24px; flex: none; border: none; border-radius: 999px; padding: 3px; display: flex; align-items: center; justify-content: flex-start; background: #D5CFC6; cursor: pointer; }
.hx-toggle.is-on { justify-content: flex-end; background: var(--hx-ink); }
.hx-toggle-knob { width: 18px; height: 18px; border-radius: 999px; background: #FFFFFF; display: block; }
.hx-segment { display: flex; gap: 2px; background: #F0EBE4; padding: 3px; border-radius: 7px; }
.hx-segment-btn { height: 25px; padding: 0 11px; border: none; border-radius: 5px; background: transparent; font-size: 12px; font-weight: 500; color: var(--hx-mute); cursor: pointer; }
.hx-segment-btn.is-active { background: var(--hx-surface); font-weight: 600; color: var(--hx-ink); }
.hx-editor-frame { border: 1px solid var(--hx-line); border-radius: 8px; overflow: hidden; margin-bottom: 8px; }
.hx-editor-toolbar { display: flex; align-items: center; gap: 2px; padding: 5px 7px; background: var(--hx-sunken); border-bottom: 1px solid var(--hx-line); }
.hx-editor-area { padding: 14px 15px; background: var(--hx-surface); font-size: 13px; line-height: 1.75; color: var(--hx-ink2); min-height: 120px; outline: none; }
.hx-editor-area:empty::before { content: attr(data-placeholder); color: var(--hx-faint); }
.hx-var { font-family: var(--hx-mono); font-size: 11.5px; background: var(--hx-new-bg); color: var(--hx-new-ink); border: 1px solid var(--hx-new-line); border-radius: 4px; padding: 1px 6px; }
.hx-var-btn { display: inline-flex; align-items: center; gap: 5px; font-family: var(--hx-mono); font-size: 11.5px; border: 1px solid var(--hx-line); background: var(--hx-surface); border-radius: 5px; padding: 3px 8px; color: var(--hx-ink3); cursor: pointer; }
.hx-var-btn:hover { border-color: var(--hx-brand); color: var(--hx-brand-deep); }
.hx-notice-amber { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border: 1px solid var(--hx-amber-line); background: #FBF7EC; border-radius: 7px; margin-bottom: 11px; }
.hx-notice-amber .hx-notice-dot { width: 5px; height: 5px; border-radius: 999px; background: var(--hx-amber); flex: none; }
.hx-notice-amber span:last-child { font-size: 12px; line-height: 1.5; color: var(--hx-amber-ink); }
.hx-notice-red { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--hx-red-ink); }
.hx-notice-red .hx-notice-dot { width: 5px; height: 5px; border-radius: 999px; background: var(--hx-red); flex: none; }
.hx-notice-green { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--hx-green-ink); }
.hx-notice-green .hx-notice-dot { width: 5px; height: 5px; border-radius: 999px; background: var(--hx-green); flex: none; }
.hx-file-input { font-size: 12px; color: var(--hx-ink3); margin-bottom: 8px; }

/* =============================================================================
   7. AUTENTICACAO (derivada: papel, cartao contido, marca discreta)
   ============================================================================= */
.hx-auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--hx-paper); padding: 24px; font-size: 16px; line-height: normal; }
.hx-auth-card { width: 100%; max-width: 400px; background: var(--hx-surface); border: 1px solid var(--hx-line); border-radius: 10px; padding: 28px 28px 24px; }
.hx-auth-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 22px; }
.hx-auth-mark { width: 26px; height: 26px; flex: none; border-radius: 7px; background: var(--hx-accent); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: var(--hx-accent-ink); overflow: hidden; }
.hx-auth-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hx-auth-brand-name { font-size: 13.5px; font-weight: 600; color: var(--hx-ink); letter-spacing: -0.01em; }
.hx-auth-brand-sub { font-size: 11px; color: var(--hx-mute); }
.hx-auth-title { margin: 0 0 3px; font-size: 20px; line-height: normal; font-weight: 600; letter-spacing: -0.02em; color: var(--hx-ink); }
.hx-auth-sub { font-size: 12.5px; color: var(--hx-mute); margin-bottom: 18px; }
.hx-auth-field { margin-bottom: 12px; }
.hx-auth .hx-input, .hx-auth input.hx-input { margin-bottom: 0; background: var(--hx-surface); }
.hx-auth-actions { margin-top: 18px; display: grid; gap: 10px; }
.hx-auth-actions .hx-btn-primary { width: 100%; }
.hx-auth-links { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--hx-mute); }
.hx-auth-links a { color: var(--hx-brand-deep); }
.hx-auth-foot { margin-top: 22px; font-size: 11px; color: var(--hx-faint); text-align: center; }
.hx-auth-alert { display: flex; align-items: flex-start; gap: 8px; padding: 9px 11px; border-radius: 7px; font-size: 12px; line-height: 1.5; margin-bottom: 14px; border: 1px solid transparent; }
.hx-auth-alert.is-error { background: var(--hx-red-bg); color: var(--hx-red-ink); border-color: var(--hx-red-line); }
.hx-auth-alert.is-warn { background: #FBF7EC; color: var(--hx-amber-ink); border-color: var(--hx-amber-line); }
.hx-auth-alert.is-ok { background: var(--hx-green-bg); color: var(--hx-green-ink); border-color: var(--hx-green-line); }

/* =============================================================================
   8. DIALOGO FLUTUANTE (unico lugar com sombra alem de menus e barra em lote)
   ============================================================================= */
.hx-dialog { border: 1px solid var(--hx-line); border-radius: 10px; background: var(--hx-surface); padding: 18px 20px; width: min(440px, calc(100vw - 32px)); box-shadow: 0 1px 2px rgba(35,31,28,.06), 0 18px 48px rgba(35,31,28,.14); color: var(--hx-ink2); }
.hx-dialog::backdrop { background: rgba(35,31,28,.28); }
.hx-dialog-title { font-size: 14px; font-weight: 600; color: var(--hx-ink); margin: 0 0 4px; }
.hx-dialog-text { font-size: 12.5px; line-height: 1.55; color: var(--hx-mute); margin: 0 0 14px; }
.hx-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
