/* =========================================================
   Chat GLPI v4.1 — Interactiva Networks
   Redesign: painel de operação, não widget de marketing.

   Princípios
   - Um acento só. Nada de gradiente decorativo.
   - Horário, tempo de espera e contadores em fonte monoespaçada
     tabular: são dados, não texto.
   - Trilha de status de 3px à esquerda de cada linha: o analista
     lê a fila inteira sem parar para interpretar bolinhas.
   - Zero animação em loop infinito. Movimento só quando algo muda.
   ========================================================= */

#notificacaochat-container {
    /* ── superfícies ───────────────────────────────────── */
    --nc-bg:          #ffffff;
    --nc-bg-sunken:   #f5f6f8;
    --nc-bg-raised:   #ffffff;
    --nc-bg-hover:    #eef1f6;
    --nc-header:      #131c2b;
    --nc-header-ink:  #eef2f8;

    /* ── texto ─────────────────────────────────────────── */
    --nc-ink:         #101722;
    --nc-ink-mid:     #586373;
    --nc-ink-soft:    #8a94a3;

    /* ── linhas ────────────────────────────────────────── */
    --nc-line:        #e3e7ed;
    --nc-line-soft:   #eef1f5;

    /* ── acento e semântica ────────────────────────────── */
    --nc-accent:      #1c50c8;
    --nc-accent-deep: #163fa0;
    --nc-accent-wash: #eaf0fe;
    --nc-online:      #12a150;
    --nc-away:        #b8770f;
    --nc-busy:        #cf3f3f;
    --nc-wait:        #b8770f;
    --nc-wait-wash:   #fdf4e3;
    --nc-alert-wash:  #fcecec;

    /* ── forma ─────────────────────────────────────────── */
    --nc-r-sm:  6px;
    --nc-r-md:  9px;
    --nc-r-lg:  14px;
    --nc-shadow: 0 1px 2px rgba(16,23,34,.06),
                 0 12px 32px -8px rgba(16,23,34,.18),
                 0 0 0 1px rgba(16,23,34,.06);

    /* ── tipografia ────────────────────────────────────── */
    --nc-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    --nc-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono",
               Menlo, Consolas, monospace;

    position: fixed;
    bottom: 100px;
    right: 24px;
    z-index: 9999;
    font-family: var(--nc-font);
    -webkit-font-smoothing: antialiased;
}

#notificacaochat-container.nc3-open { z-index: 99999; }

/* ── tema escuro (classe aplicada pelo JS ao ler o tema do GLPI) ── */
#notificacaochat-container.nc3-dark {
    --nc-bg:         #161b23;
    --nc-bg-sunken:  #10141b;
    --nc-bg-raised:  #1c222c;
    --nc-bg-hover:   #222935;
    --nc-header:     #0c1119;
    --nc-header-ink: #e7ecf4;
    --nc-ink:        #e7ecf4;
    --nc-ink-mid:    #98a3b3;
    --nc-ink-soft:   #6b7686;
    --nc-line:       #262e3a;
    --nc-line-soft:  #1f2630;
    --nc-accent:     #4f83f1;
    --nc-accent-deep:#3d6cd6;
    --nc-accent-wash:#1b2740;
    --nc-online:     #35c777;
    --nc-away:       #e0a33c;
    --nc-busy:       #ef6a6a;
    --nc-wait:       #e0a33c;
    --nc-wait-wash:  #2a2418;
    --nc-alert-wash: #2d1c1c;
    --nc-shadow: 0 1px 2px rgba(0,0,0,.4),
                 0 16px 40px -8px rgba(0,0,0,.6),
                 0 0 0 1px rgba(255,255,255,.07);
}

/* utilitário: números que não dançam a cada atualização */
.nc3-mono {
    font-family: var(--nc-mono);
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

/* =========================================================
   BOTÃO FLUTUANTE
   ========================================================= */
.nc3-fab {
    position: relative;
    width: 52px; height: 52px;
    border-radius: var(--nc-r-lg);
    background: var(--nc-header);
    border: none; cursor: pointer;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 6px rgba(16,23,34,.2), 0 10px 24px -8px rgba(16,23,34,.4);
    transition: transform .18s cubic-bezier(.2,.8,.3,1), box-shadow .18s;
}
.nc3-fab:hover  { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(16,23,34,.24), 0 16px 32px -10px rgba(16,23,34,.5); }
.nc3-fab:active { transform: translateY(0); }
.nc3-fab:focus-visible { outline: 2px solid var(--nc-accent); outline-offset: 3px; }

/* disponibilidade indicada por um ponto discreto, sem pulsar */
.nc3-fab::after {
    content: '';
    position: absolute; left: 9px; bottom: 9px;
    width: 7px; height: 7px; border-radius: 50%;
    background: rgba(255,255,255,.28);
    transition: background .2s;
}
.nc3-fab.nc3-analysts-online::after { background: var(--nc-online); }

.nc3-fab-badge {
    position: absolute; top: -5px; right: -5px;
    min-width: 19px; height: 19px;
    border-radius: 10px; padding: 0 5px;
    background: var(--nc-busy); color: #fff;
    font-family: var(--nc-mono);
    font-variant-numeric: tabular-nums;
    font-size: 10.5px; font-weight: 700; letter-spacing: -.02em;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--nc-bg);
}

.nc3-online-label {
    position: absolute; bottom: 62px; right: 2px;
    background: var(--nc-bg-raised);
    color: var(--nc-ink-mid);
    font-size: 11px; font-weight: 600;
    padding: 4px 9px; border-radius: 20px;
    white-space: nowrap; pointer-events: none;
    border: 1px solid var(--nc-line);
    box-shadow: 0 2px 8px rgba(16,23,34,.08);
}
.nc3-online-label.nc3-offline { color: var(--nc-ink-soft); }

/* =========================================================
   PAINEL
   ========================================================= */
.nc3-panel {
    position: absolute; bottom: 66px; right: 0;
    width: 382px;
    height: min(624px, calc(100vh - 160px));
    border-radius: var(--nc-r-lg);
    background: var(--nc-bg);
    box-shadow: var(--nc-shadow);
    display: flex; flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transition: transform .2s cubic-bezier(.2,.9,.3,1), opacity .14s;
}
.nc3-widget.nc3-closed .nc3-panel {
    transform: scale(.96) translateY(10px);
    opacity: 0; pointer-events: none; display: none;
}
.nc3-widget.nc3-closed { pointer-events: none; }
.nc3-widget.nc3-closed #nc3-fab,
.nc3-widget.nc3-closed #nc3-online-label { pointer-events: all; }
.nc3-widget:not(.nc3-closed) .nc3-panel { transform: none; opacity: 1; }

/* ── cabeçalho ─────────────────────────────────────────── */
.nc3-header {
    background: var(--nc-header);
    color: var(--nc-header-ink);
    padding: 11px 12px 11px 14px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; flex-shrink: 0;
}
.nc3-header-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nc3-header-icon {
    width: 30px; height: 30px; flex-shrink: 0;
    background: rgba(255,255,255,.09);
    border-radius: var(--nc-r-md);
    display: flex; align-items: center; justify-content: center;
    color: var(--nc-header-ink);
}
.nc3-header-title {
    font-size: 13.5px; font-weight: 600; line-height: 1.25;
    letter-spacing: -.01em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nc3-header-sub {
    font-size: 11px; line-height: 1.3;
    color: rgba(255,255,255,.55);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nc3-header-actions { display: flex; gap: 2px; flex-shrink: 0; }
.nc3-btn-icon {
    width: 28px; height: 28px;
    border-radius: var(--nc-r-sm); border: none;
    background: transparent; color: rgba(255,255,255,.7);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .14s, color .14s;
}
.nc3-btn-icon:hover { background: rgba(255,255,255,.1); color: #fff; }
.nc3-btn-icon:focus-visible { outline: 2px solid rgba(255,255,255,.6); outline-offset: -1px; }
.nc3-btn-close:hover { background: rgba(207,63,63,.35); color: #fff; }

/* ── corpo / telas ─────────────────────────────────────── */
.nc3-body { flex: 1; overflow: hidden; position: relative; background: var(--nc-bg-sunken); }
.nc3-screen {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    opacity: 0; pointer-events: none;
    transform: translateX(12px);
    transition: opacity .16s ease, transform .16s ease;
}
.nc3-screen.active { opacity: 1; pointer-events: all; transform: none; }

/* =========================================================
   LISTA DE CONTATOS
   ========================================================= */
.nc3-search-wrap {
    margin: 10px 10px 6px;
    padding: 7px 10px;
    background: var(--nc-bg-raised);
    border: 1px solid var(--nc-line);
    border-radius: var(--nc-r-md);
    display: flex; align-items: center; gap: 8px;
    transition: border-color .14s, box-shadow .14s;
}
.nc3-search-wrap:focus-within {
    border-color: var(--nc-accent);
    box-shadow: 0 0 0 3px var(--nc-accent-wash);
}
.nc3-search-wrap svg { color: var(--nc-ink-soft); flex-shrink: 0; }
#nc3-search {
    border: none; outline: none; width: 100%; background: transparent;
    font-family: inherit; font-size: 12.5px; color: var(--nc-ink);
}
#nc3-search::placeholder { color: var(--nc-ink-soft); }

.nc3-user-list {
    flex: 1; overflow-y: auto;
    padding: 2px 8px 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--nc-line) transparent;
}

/* ASSINATURA DO DESIGN
   Trilha de status de 3px à esquerda da linha:
   verde = online, âmbar = ausente, vermelho = ocupado,
   cinza = já em atendimento por outro analista.
   A fila inteira se lê na vertical, sem interpretar ícones. */
.nc3-user-item {
    position: relative;
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px 8px 13px;
    border-radius: var(--nc-r-md);
    cursor: pointer;
    transition: background .12s;
}
.nc3-user-item::before {
    content: '';
    position: absolute; left: 3px; top: 9px; bottom: 9px;
    width: 3px; border-radius: 2px;
    background: var(--nc-line);
    transition: background .14s;
}
.nc3-user-item.nc3-st-online::before { background: var(--nc-online); }
.nc3-user-item.nc3-st-away::before   { background: var(--nc-away); }
.nc3-user-item.nc3-st-busy::before   { background: var(--nc-busy); }
.nc3-user-item.nc3-locked::before    { background: var(--nc-ink-soft); }
.nc3-user-item:hover { background: var(--nc-bg-hover); }
.nc3-user-item.nc3-active { background: var(--nc-accent-wash); }
.nc3-user-item.nc3-active::before { background: var(--nc-accent); }
.nc3-user-item.nc3-locked { opacity: .5; cursor: not-allowed; }
.nc3-user-item:focus-visible { outline: 2px solid var(--nc-accent); outline-offset: -2px; }

.nc3-user-info { flex: 1; min-width: 0; }
.nc3-user-name {
    font-size: 12.5px; font-weight: 600; color: var(--nc-ink);
    letter-spacing: -.01em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nc3-user-group {
    font-size: 10.5px; color: var(--nc-ink-soft); margin-top: 1px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nc3-badge {
    min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 9px;
    background: var(--nc-accent); color: #fff;
    font-family: var(--nc-mono); font-variant-numeric: tabular-nums;
    font-size: 10px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

/* a bolinha ao lado do nome vira redundante com a trilha */
.nc3-user-item > .nc3-status-dot { display: none; }

/* ── estado vazio: convite para agir, não lamento ───────── */
.nc3-empty {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    height: 100%; gap: 10px;
    padding: 40px 24px; text-align: center;
    color: var(--nc-ink-soft); font-size: 12.5px; line-height: 1.5;
}
.nc3-empty-icon { color: var(--nc-line); }
.nc3-empty strong {
    display: block; color: var(--nc-ink-mid);
    font-size: 13px; font-weight: 600; margin-bottom: 3px;
}

/* ── esqueleto de carregamento ─────────────────────────── */
.nc3-skeleton { padding: 8px 10px 8px 13px; display: flex; align-items: center; gap: 10px; }
.nc3-sk-box { background: var(--nc-line-soft); border-radius: var(--nc-r-sm); animation: nc3-shimmer 1.1s ease-in-out infinite; }
.nc3-sk-avatar { width: 34px; height: 34px; border-radius: var(--nc-r-md); flex-shrink: 0; }
.nc3-sk-lines { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.nc3-sk-line-1 { height: 9px; width: 58%; }
.nc3-sk-line-2 { height: 8px; width: 34%; }
@keyframes nc3-shimmer { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

/* =========================================================
   FILA DE ESPERA
   ========================================================= */
.nc3-queue-section {
    border-top: 1px solid var(--nc-line);
    background: var(--nc-bg-raised);
    padding: 8px 8px 10px;
    flex-shrink: 0;
    max-height: 42%; overflow-y: auto;
}
.nc3-queue-title {
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em;
    color: var(--nc-wait);
    padding: 2px 6px 6px;
    display: flex; align-items: center; gap: 5px;
}
.nc3-queue-item {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; padding: 7px 8px 7px 11px;
    border-radius: var(--nc-r-md);
    position: relative;
    transition: background .12s;
}
.nc3-queue-item::before {
    content: '';
    position: absolute; left: 2px; top: 7px; bottom: 7px;
    width: 3px; border-radius: 2px; background: var(--nc-wait);
}
.nc3-queue-item:hover { background: var(--nc-wait-wash); }
.nc3-queue-name { font-size: 12px; font-weight: 600; color: var(--nc-ink); }
.nc3-queue-time {
    font-family: var(--nc-mono); font-variant-numeric: tabular-nums;
    font-size: 10.5px; color: var(--nc-ink-soft); margin-top: 1px;
}
.nc3-queue-item.nc3-queue-late::before { background: var(--nc-busy); }
.nc3-queue-item.nc3-queue-late .nc3-queue-time { color: var(--nc-busy); font-weight: 600; }
.nc3-btn-assume {
    background: var(--nc-accent); color: #fff;
    border: none; border-radius: var(--nc-r-sm);
    padding: 5px 11px; font-family: inherit;
    font-size: 11.5px; font-weight: 600; cursor: pointer;
    flex-shrink: 0; transition: background .14s;
}
.nc3-btn-assume:hover { background: var(--nc-accent-deep); }
.nc3-btn-assume:focus-visible { outline: 2px solid var(--nc-accent); outline-offset: 2px; }

/* =========================================================
   AVATAR
   ========================================================= */
.nc3-avatar {
    width: 34px; height: 34px;
    border-radius: var(--nc-r-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; color: #fff;
    flex-shrink: 0; letter-spacing: -.02em;
}
.nc3-av-blue   { background: #2f62d4; }
.nc3-av-green  { background: #1c9b5c; }
.nc3-av-purple { background: #7c4dcc; }
.nc3-av-orange { background: #c96a1e; }
.nc3-av-teal   { background: #128a8a; }
.nc3-av-red    { background: #c44545; }
.nc3-av-indigo { background: #4a56c4; }

.nc3-avatar-img {
    width: 34px; height: 34px;
    border-radius: var(--nc-r-md);
    object-fit: cover; flex-shrink: 0;
}
.nc3-status-indicator { position: relative; display: inline-flex; flex-shrink: 0; }
.nc3-status-indicator::after {
    content: '';
    position: absolute; bottom: -2px; right: -2px;
    width: 10px; height: 10px; border-radius: 50%;
    border: 2px solid var(--nc-bg);
    background: var(--nc-ink-soft);
}
.nc3-user-item:hover .nc3-status-indicator::after { border-color: var(--nc-bg-hover); }
.nc3-status-indicator.nc3-s-online::after { background: var(--nc-online); }
.nc3-status-indicator.nc3-s-away::after   { background: var(--nc-away); }
.nc3-status-indicator.nc3-s-busy::after   { background: var(--nc-busy); }

/* =========================================================
   CONVERSA
   ========================================================= */
.nc3-chat-header {
    display: flex; align-items: center; gap: 9px;
    padding: 9px 11px;
    background: var(--nc-bg-raised);
    border-bottom: 1px solid var(--nc-line);
    flex-shrink: 0;
}
.nc3-btn-back {
    width: 28px; height: 28px; flex-shrink: 0;
    border-radius: var(--nc-r-sm); border: none;
    background: transparent; color: var(--nc-ink-mid);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .14s, color .14s;
}
.nc3-btn-back:hover { background: var(--nc-bg-hover); color: var(--nc-ink); }
.nc3-btn-back:focus-visible { outline: 2px solid var(--nc-accent); outline-offset: 1px; }
.nc3-chat-user-info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; }
.nc3-chat-name {
    font-size: 13px; font-weight: 600; color: var(--nc-ink); letter-spacing: -.01em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nc3-chat-status {
    font-size: 10.5px; color: var(--nc-ink-soft);
    display: flex; align-items: center; gap: 5px; margin-top: 1px;
}
.nc3-chat-status::before {
    content: ''; width: 5px; height: 5px; border-radius: 50%;
    background: var(--nc-online); flex-shrink: 0;
}
.nc3-chat-actions { display: flex; gap: 6px; flex-shrink: 0; }
.nc3-btn-end {
    display: flex; align-items: center; gap: 5px;
    padding: 5px 10px;
    border-radius: var(--nc-r-sm);
    border: 1px solid var(--nc-line);
    background: var(--nc-bg);
    color: var(--nc-ink-mid);
    font-family: inherit; font-size: 11.5px; font-weight: 600;
    cursor: pointer; transition: all .14s;
}
.nc3-btn-end:hover { border-color: var(--nc-busy); color: var(--nc-busy); background: var(--nc-alert-wash); }
.nc3-btn-end:focus-visible { outline: 2px solid var(--nc-accent); outline-offset: 1px; }

/* ── faixa de alerta de primeira resposta ──────────────── */
.nc3-no-response {
    padding: 6px 12px;
    font-size: 11.5px; font-weight: 600;
    display: flex; align-items: center; gap: 6px;
    width: 100%; box-sizing: border-box; flex-shrink: 0;
}
.nc3-no-response.warning { background: var(--nc-wait-wash);  color: var(--nc-away); border-bottom: 1px solid var(--nc-line); }
.nc3-no-response.urgent  { background: var(--nc-alert-wash); color: var(--nc-busy); border-bottom: 1px solid var(--nc-line); }

/* ── faixa de conexão perdida ──────────────────────────── */
.nc3-offline-bar {
    padding: 6px 12px; font-size: 11.5px; font-weight: 600;
    background: var(--nc-alert-wash); color: var(--nc-busy);
    text-align: center; flex-shrink: 0;
    border-bottom: 1px solid var(--nc-line);
}

/* =========================================================
   MENSAGENS
   ========================================================= */
.nc3-messages {
    flex: 1; overflow-y: auto;
    padding: 14px 13px 6px;
    display: flex; flex-direction: column; gap: 0;
    scrollbar-width: thin; scrollbar-color: var(--nc-line) transparent;
}
.nc3-msg-empty {
    color: var(--nc-ink-soft); font-size: 12.5px;
    text-align: center; padding: 36px 20px; line-height: 1.5;
}
.nc3-msg {
    display: flex; flex-direction: column;
    max-width: 84%; margin-top: 9px;
    animation: nc3-msg-in .18s ease-out;
}
/* mensagens seguidas do mesmo autor se agrupam */
.nc3-msg.nc3-msg-cont { margin-top: 2px; }
@keyframes nc3-msg-in {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: none; }
}
.nc3-msg-mine   { align-self: flex-end;   align-items: flex-end; }
.nc3-msg-theirs { align-self: flex-start; align-items: flex-start; }

.nc3-msg-sender {
    font-size: 10px; font-weight: 700;
    color: var(--nc-ink-soft);
    text-transform: uppercase; letter-spacing: .05em;
    margin-bottom: 3px; padding-left: 2px;
}
.nc3-msg-bubble {
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 12.8px; line-height: 1.5;
    word-wrap: break-word; overflow-wrap: anywhere;
    white-space: pre-wrap;
}
.nc3-msg-mine .nc3-msg-bubble {
    background: var(--nc-accent); color: #fff;
    border-bottom-right-radius: 4px;
}
.nc3-msg-mine.nc3-msg-cont .nc3-msg-bubble { border-top-right-radius: 4px; }
.nc3-msg-theirs .nc3-msg-bubble {
    background: var(--nc-bg-raised); color: var(--nc-ink);
    border: 1px solid var(--nc-line);
    border-bottom-left-radius: 4px;
}
.nc3-msg-theirs.nc3-msg-cont .nc3-msg-bubble { border-top-left-radius: 4px; }

.nc3-msg-time {
    font-family: var(--nc-mono); font-variant-numeric: tabular-nums;
    font-size: 9.5px; color: var(--nc-ink-soft);
    margin-top: 3px; padding: 0 3px; letter-spacing: -.01em;
}
.nc3-msg-mine .nc3-msg-time { text-align: right; }

.nc3-date-divider {
    display: flex; align-items: center; gap: 10px;
    margin: 16px 2px 2px;
}
.nc3-date-divider::before, .nc3-date-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--nc-line);
}
.nc3-date-divider span {
    font-size: 9.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .07em;
    color: var(--nc-ink-soft); white-space: nowrap;
}

.nc3-chat-img {
    max-width: 230px; max-height: 230px;
    border-radius: 10px; cursor: pointer; display: block;
    border: 1px solid var(--nc-line);
    transition: opacity .14s;
}
.nc3-chat-img:hover { opacity: .88; }
.nc3-msg-bubble.nc3-bubble-img {
    padding: 3px; background: transparent; border: none;
}

/* ── "digitando" com três pontos ───────────────────────── */
.nc3-typing {
    display: flex; align-items: center; gap: 6px;
    padding: 4px 14px 8px;
    font-size: 11px; color: var(--nc-ink-soft);
    flex-shrink: 0;
}
.nc3-typing-dots { display: inline-flex; gap: 3px; align-items: center; }
.nc3-typing-dots i {
    width: 4px; height: 4px; border-radius: 50%;
    background: var(--nc-ink-soft);
    animation: nc3-bounce 1.1s infinite ease-in-out;
}
.nc3-typing-dots i:nth-child(2) { animation-delay: .15s; }
.nc3-typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes nc3-bounce {
    0%, 60%, 100% { transform: none; opacity: .45; }
    30%           { transform: translateY(-3px); opacity: 1; }
}

/* =========================================================
   CAIXA DE ENVIO
   ========================================================= */
.nc3-input-area {
    display: flex; align-items: flex-end; gap: 7px;
    padding: 9px 10px;
    background: var(--nc-bg-raised);
    border-top: 1px solid var(--nc-line);
    flex-shrink: 0;
}
.nc3-input {
    flex: 1;
    border: 1px solid var(--nc-line);
    border-radius: var(--nc-r-md);
    padding: 8px 11px;
    font-family: inherit; font-size: 12.8px; line-height: 1.45;
    color: var(--nc-ink); background: var(--nc-bg);
    resize: none; outline: none;
    max-height: 100px; min-height: 36px;
    box-sizing: border-box;
    transition: border-color .14s, box-shadow .14s;
}
.nc3-input::placeholder { color: var(--nc-ink-soft); }
.nc3-input:focus {
    border-color: var(--nc-accent);
    box-shadow: 0 0 0 3px var(--nc-accent-wash);
}
.nc3-btn-attach {
    width: 34px; height: 36px; flex-shrink: 0;
    background: transparent; border: none; cursor: pointer;
    color: var(--nc-ink-soft); border-radius: var(--nc-r-sm);
    display: flex; align-items: center; justify-content: center;
    transition: color .14s, background .14s;
}
.nc3-btn-attach:hover { color: var(--nc-accent); background: var(--nc-accent-wash); }
.nc3-btn-attach:disabled { opacity: .4; cursor: wait; }
.nc3-btn-attach:focus-visible,
.nc3-btn-send:focus-visible { outline: 2px solid var(--nc-accent); outline-offset: 2px; }
.nc3-btn-send {
    width: 36px; height: 36px; flex-shrink: 0;
    border-radius: var(--nc-r-md); border: none;
    background: var(--nc-accent); color: #fff;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .14s, transform .12s;
}
.nc3-btn-send:hover  { background: var(--nc-accent-deep); }
.nc3-btn-send:active { transform: scale(.94); }

/* =========================================================
   MODAIS
   ========================================================= */
.nc3-modal {
    position: fixed; inset: 0;
    background: rgba(9,13,20,.55);
    backdrop-filter: blur(2px);
    display: flex; align-items: center; justify-content: center;
    z-index: 100000; padding: 16px;
    animation: nc3-fade .14s ease-out;
    font-family: var(--nc-font);
}
@keyframes nc3-fade { from { opacity: 0; } to { opacity: 1; } }
.nc3-modal-box {
    background: var(--nc-bg);
    border-radius: var(--nc-r-lg);
    width: 100%; max-width: 380px;
    box-shadow: 0 24px 60px rgba(9,13,20,.35), 0 0 0 1px rgba(16,23,34,.08);
    overflow: hidden;
    animation: nc3-rise .2s cubic-bezier(.2,.9,.3,1);
}
@keyframes nc3-rise { from { transform: translateY(10px) scale(.98); } to { transform: none; } }
.nc3-modal-box-lg { max-width: 448px; }
.nc3-modal-header {
    background: var(--nc-header); color: var(--nc-header-ink);
    padding: 13px 16px;
    display: flex; align-items: center; justify-content: space-between;
    font-size: 13.5px; font-weight: 600; letter-spacing: -.01em;
}
.nc3-modal-warn { background: var(--nc-header) !important; }
.nc3-modal-warn > span::before {
    content: ''; display: inline-block;
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--nc-wait); margin-right: 8px; vertical-align: middle;
}
.nc3-modal-header button {
    background: none; border: none; color: rgba(255,255,255,.6);
    cursor: pointer; font-size: 16px; line-height: 1;
    padding: 2px 5px; border-radius: 4px;
}
.nc3-modal-header button:hover { color: #fff; background: rgba(255,255,255,.1); }
.nc3-modal-body { padding: 16px; display: flex; flex-direction: column; }
.nc3-label {
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em;
    color: var(--nc-ink-soft);
    display: block; margin: 12px 0 5px;
}
.nc3-label:first-child { margin-top: 0; }
.nc3-modal-input {
    width: 100%; box-sizing: border-box;
    border: 1px solid var(--nc-line);
    border-radius: var(--nc-r-md);
    padding: 9px 11px;
    font-family: inherit; font-size: 12.8px;
    color: var(--nc-ink); background: var(--nc-bg);
    outline: none; transition: border-color .14s, box-shadow .14s;
}
.nc3-modal-input:focus {
    border-color: var(--nc-accent);
    box-shadow: 0 0 0 3px var(--nc-accent-wash);
}
textarea.nc3-modal-input { resize: vertical; line-height: 1.5; }
#nc3-ticket-desc { font-family: var(--nc-mono); font-size: 11.5px; }

.nc3-modal-question {
    font-size: 13px; color: var(--nc-ink-mid);
    text-align: center; margin: 2px 0 14px; line-height: 1.5;
}
.nc3-modal-choices { display: flex; gap: 8px; }
.nc3-choice-yes, .nc3-choice-no {
    flex: 1; padding: 13px 8px;
    border-radius: var(--nc-r-md); border: 1px solid transparent;
    cursor: pointer; font-family: inherit;
    display: flex; flex-direction: column; align-items: center; gap: 7px;
    font-size: 12px; font-weight: 600; line-height: 1.3; text-align: center;
    transition: all .14s;
}
.nc3-choice-yes { background: var(--nc-accent); color: #fff; }
.nc3-choice-yes:hover { background: var(--nc-accent-deep); }
.nc3-choice-no {
    background: var(--nc-bg); color: var(--nc-ink-mid);
    border-color: var(--nc-line);
}
.nc3-choice-no:hover { background: var(--nc-bg-hover); color: var(--nc-ink); }

.nc3-modal-footer {
    padding: 4px 16px 16px;
    display: flex; gap: 8px; justify-content: flex-end;
}
.nc3-btn-cancel {
    padding: 8px 15px; border-radius: var(--nc-r-md);
    border: 1px solid var(--nc-line);
    background: var(--nc-bg); color: var(--nc-ink-mid);
    font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
    transition: background .14s;
}
.nc3-btn-cancel:hover { background: var(--nc-bg-hover); }
.nc3-btn-confirm {
    padding: 8px 18px; border-radius: var(--nc-r-md); border: none;
    background: var(--nc-accent); color: #fff;
    font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
    transition: background .14s, opacity .14s;
}
.nc3-btn-confirm:hover { background: var(--nc-accent-deep); }
.nc3-btn-confirm:disabled { opacity: .55; cursor: wait; }

/* =========================================================
   AVISOS
   ========================================================= */
.nc3-toast {
    position: fixed; left: 50%; bottom: 28px;
    transform: translate(-50%, 14px);
    z-index: 100001;
    padding: 10px 16px;
    border-radius: var(--nc-r-md);
    font-family: var(--nc-font); font-size: 12.5px; font-weight: 600;
    background: #131c2b; color: #fff;
    box-shadow: 0 12px 32px rgba(9,13,20,.3);
    opacity: 0; pointer-events: none;
    display: flex; align-items: center; gap: 8px;
    transition: opacity .2s, transform .2s cubic-bezier(.2,.9,.3,1);
}
.nc3-toast-show { opacity: 1; transform: translate(-50%, 0); }
.nc3-toast::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.nc3-toast-success::before { background: #35c777; }
.nc3-toast-error::before   { background: #ef6a6a; }

/* =========================================================
   SCROLLBAR
   ========================================================= */
.nc3-user-list::-webkit-scrollbar,
.nc3-queue-section::-webkit-scrollbar,
.nc3-messages::-webkit-scrollbar { width: 6px; }
.nc3-user-list::-webkit-scrollbar-thumb,
.nc3-queue-section::-webkit-scrollbar-thumb,
.nc3-messages::-webkit-scrollbar-thumb {
    background: var(--nc-line); border-radius: 3px;
}
.nc3-messages::-webkit-scrollbar-thumb:hover { background: var(--nc-ink-soft); }

/* =========================================================
   RESPONSIVO
   ========================================================= */
@media (max-width: 520px) {
    #notificacaochat-container { bottom: 16px; right: 16px; left: 16px; }
    .nc3-widget { display: flex; flex-direction: column; align-items: flex-end; }
    .nc3-panel {
        width: auto; right: 0; left: 0;
        height: min(78vh, calc(100vh - 120px));
    }
    .nc3-msg { max-width: 88%; }
}
@media (max-height: 640px) {
    .nc3-panel { height: calc(100vh - 130px); }
}

/* =========================================================
   ACESSIBILIDADE
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
    #notificacaochat-container *,
    .nc3-modal, .nc3-modal *, .nc3-toast {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
@media (prefers-contrast: more) {
    #notificacaochat-container { --nc-line: #9aa4b2; --nc-ink-soft: #5c6675; }
}

/* =========================================================
   v4.2 — recorte de histórico
   ========================================================= */

/* botão "Novo" no cabeçalho da conversa */
.nc3-btn-new {
    display: flex; align-items: center; gap: 5px;
    padding: 5px 9px;
    border-radius: var(--nc-r-sm);
    border: 1px solid var(--nc-line);
    background: var(--nc-bg);
    color: var(--nc-ink-mid);
    font-family: inherit; font-size: 11.5px; font-weight: 600;
    cursor: pointer; transition: all .14s;
}
.nc3-btn-new:hover { border-color: var(--nc-accent); color: var(--nc-accent); background: var(--nc-accent-wash); }
.nc3-btn-new:focus-visible { outline: 2px solid var(--nc-accent); outline-offset: 1px; }

/* faixa "carregar conversas anteriores" no topo da thread */
.nc3-load-more { display: flex; justify-content: center; padding: 2px 0 6px; }
.nc3-load-more button {
    background: var(--nc-bg-raised);
    border: 1px solid var(--nc-line);
    border-radius: 20px;
    padding: 5px 14px;
    font-family: inherit; font-size: 11px; font-weight: 600;
    color: var(--nc-ink-mid); cursor: pointer;
    transition: all .14s;
}
.nc3-load-more button:hover { border-color: var(--nc-accent); color: var(--nc-accent); }
.nc3-load-more button:disabled { opacity: .55; cursor: wait; }

/* seletor de recorte no modal de chamado */
.nc3-scope-row { display: flex; gap: 5px; margin-bottom: 7px; }
.nc3-scope {
    flex: 1; padding: 6px 8px;
    border-radius: var(--nc-r-sm);
    border: 1px solid var(--nc-line);
    background: var(--nc-bg);
    color: var(--nc-ink-mid);
    font-family: inherit; font-size: 11.5px; font-weight: 600;
    cursor: pointer; transition: all .14s;
}
.nc3-scope:hover { border-color: var(--nc-ink-soft); }
.nc3-scope-on {
    background: var(--nc-accent-wash);
    border-color: var(--nc-accent);
    color: var(--nc-accent);
}
.nc3-scope:focus-visible { outline: 2px solid var(--nc-accent); outline-offset: 1px; }

/* caixa de seleção da transcrição */
.nc3-check-row {
    display: flex; align-items: flex-start; gap: 8px;
    margin-top: 10px; cursor: pointer;
    font-size: 12px; color: var(--nc-ink-mid); line-height: 1.4;
}
.nc3-check-row input { margin: 1px 0 0; accent-color: var(--nc-accent); cursor: pointer; }
