/* Central de Suporte com Triagem — estilos do app (sobre o design system /_jev/jev.css) */
:root {
  --p1: #f87171; --p2: #fb923c; --p3: #fbbf24; --p4: #94a3b8;
  --ch-email: #60a5fa; --ch-whatsapp: #34d399; --ch-instagram: #f472b6;
}
.sup { padding-top: 16px; }
.sup h1 { font-size: clamp(26px, 3vw, 38px); margin: 0 0 6px; }

/* ---------- topo: título + ações + KPIs ---------- */
.top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 22px; align-items: end; }
.intro p { color: var(--text-muted); font-size: 15px; max-width: 760px; margin: 0 0 12px; }
.intro p b { color: var(--text); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
#play { min-width: 214px; }
#play.running { background: linear-gradient(135deg, #34d399, #22d3ee); box-shadow: 0 8px 26px rgba(34,211,238,.25); }
#speed[aria-pressed="true"] { border-color: rgba(34,211,238,.6); color: #a5f3fc; background: rgba(34,211,238,.1); }
.status { display: inline-block; margin-top: 2px; padding: 1px 7px; border-radius: 999px; font: 800 9.5px/1.5 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); background: rgba(255,255,255,.05); white-space: nowrap; }
.status.live { color: #6ee7b7; background: rgba(16,185,129,.14); }
.status.warn { color: #fde68a; background: rgba(234,179,8,.14); }
.status.done { color: #a5f3fc; background: rgba(34,211,238,.12); }

.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { padding: 10px 14px; border-radius: 14px; background: var(--bg-card); border: 1px solid var(--border); min-width: 0; }
.kpi .k { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .v { font-size: 24px; font-weight: 800; line-height: 1.2; margin-top: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi .s { font-size: 11.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.bump { animation: kbump .5s ease; }
@keyframes kbump { 0% { border-color: rgba(34,211,238,.8); box-shadow: 0 0 16px rgba(34,211,238,.25); } 100% { border-color: var(--border); box-shadow: none; } }

/* ---------- faixa "chegando agora" ---------- */
.arrival {
  margin-top: 14px; display: grid; grid-template-columns: 92px minmax(0, 1fr); min-height: 112px;
  border-radius: 18px; border: 1px solid var(--border); overflow: hidden;
  background: linear-gradient(90deg, rgba(167,139,250,.08), rgba(34,211,238,.04) 40%, rgba(255,255,255,.015));
}
.arr-label { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; border-right: 1px solid var(--border); font: 800 10.5px/1.25 var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); padding: 8px; }
.radar { position: relative; width: 14px; height: 14px; border-radius: 50%; background: var(--text-dim); }
.arrival.live .radar { background: #22d3ee; box-shadow: 0 0 12px #22d3ee; }
.arrival.live .radar::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(34,211,238,.6); animation: radar 1.4s ease-out infinite; }
@keyframes radar { from { transform: scale(.5); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }
.arr-stage { position: relative; display: flex; align-items: stretch; min-width: 0; padding: 12px 14px; }
.arr-empty { display: flex; flex-direction: column; justify-content: center; gap: 4px; color: var(--text-muted); font-size: 14px; }
.arr-empty b { color: var(--text); }
.arr-empty.done b { color: #6ee7b7; }
.arr-empty.err b { color: #fca5a5; }
.arr-empty.waiting { opacity: 0; animation: fade .3s ease .45s forwards; }
.arr-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 16px; width: 100%; align-items: center; animation: arrin .35s cubic-bezier(.2,.8,.2,1); }
@keyframes arrin { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
.arr-row.leaving { opacity: 0; transform: translateY(10px) scale(.98); transition: opacity .3s ease, transform .3s ease; }
.arr-ticket { position: relative; min-width: 0; padding: 10px 12px; border-radius: 14px; background: rgba(0,0,0,.28); border: 1px solid var(--border-strong); overflow: hidden; }
.arr-ticket .who { margin-bottom: 6px; }
.arr-ticket .msg { font-size: 13.5px; color: #d6d7de; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.arr-ticket .msg b { color: var(--text); }
.arr-ticket.reading::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(34,211,238,.16) 50%, transparent 70%); background-size: 220% 100%; animation: scan 1s linear infinite; pointer-events: none; }
@keyframes scan { from { background-position: 130% 0; } to { background-position: -30% 0; } }
.arr-decision { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.reading { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 14px; }
.reading b { color: #a5f3fc; font-size: 15px; }
.dchips { display: flex; flex-wrap: wrap; gap: 6px; }
.dchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font: 700 12.5px/1.35 var(--font); border: 1px solid var(--border-strong); background: rgba(255,255,255,.05); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.dchips .dchip { opacity: 0; transform: translateY(6px) scale(.96); animation: pop .32s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes pop { to { opacity: 1; transform: none; } }
.dchip i { font-style: normal; font-family: var(--mono); font-size: 11.5px; opacity: .85; }
.dchip.dep { color: var(--c, #fff); border-color: color-mix(in srgb, var(--c, #fff) 55%, transparent); background: color-mix(in srgb, var(--c, #fff) 13%, transparent); }
.dchip.pri { color: #0a0a0f; border-color: transparent; background: var(--pc, var(--p4)); }
.dchip.warn { color: #fecaca; border-color: rgba(248,113,113,.45); background: rgba(248,113,113,.1); }
.dchip.macro { color: #ddd6fe; border-color: rgba(167,139,250,.45); background: rgba(167,139,250,.12); }
.took { font-size: 12.5px; color: var(--text-muted); }
.took b { color: var(--text); font-family: var(--mono); }
.took .fast { color: #34d399; }
.arr-error { color: #fca5a5; font-size: 14px; display: flex; align-items: center; gap: 8px; }

/* lote (backlog) */
.stack-hd { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.stack-hd b { font-size: 15px; }
.stack-hd span { font-size: 12px; color: var(--text-muted); }
.stack-av { display: flex; flex-wrap: wrap; gap: 4px; }
.stack-av .avatar { width: 26px; height: 26px; font-size: 10px; }
.stack-av .more { display: grid; place-items: center; height: 26px; padding: 0 8px; border-radius: 999px; font: 800 11px var(--font); color: var(--text-muted); background: rgba(255,255,255,.08); }
.dchip .n { font-family: var(--mono); font-weight: 800; }

/* quem */
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 800 12.5px var(--font); color: #0a0a0f; background: var(--ac, #9ca3af); }
.who-t { display: flex; flex-direction: column; min-width: 0; }
.who-t b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-t span { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- quadro kanban ---------- */
.board { position: relative; margin-top: 14px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.col { min-width: 0; display: flex; flex-direction: column; border-radius: 16px; background: rgba(255,255,255,.022); border: 1px solid var(--border); position: relative; overflow: hidden; }
.col::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--c); opacity: .9; }
.col.hit { animation: colhit .9s ease; }
@keyframes colhit { 0% { box-shadow: 0 0 0 1px var(--c), 0 0 26px color-mix(in srgb, var(--c) 35%, transparent); } 100% { box-shadow: none; } }
.col-hd { display: flex; align-items: center; gap: 7px; padding: 11px 10px 9px; font-size: 13px; border-bottom: 1px solid var(--border); min-width: 0; }
.col-hd b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.col-hd .cnt { flex: none; margin-left: auto; font: 800 12px var(--mono); padding: 1px 8px; border-radius: 999px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.col-hd .urg { flex: none; white-space: nowrap; font: 800 10.5px var(--font); color: #0a0a0f; background: var(--p1); padding: 1px 6px; border-radius: 6px; }
.col-list { position: relative; display: flex; flex-direction: column; gap: 7px; padding: 8px 7px; height: max(300px, calc(100vh - 432px)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.col-empty { margin: 4px 2px; padding: 12px 10px; border: 1px dashed var(--border-strong); border-radius: 12px; color: var(--text-dim); font-size: 12px; line-height: 1.45; }

.tk { position: relative; flex: none; display: flex; flex-direction: column; gap: 5px; padding: 8px 9px 8px 12px; border-radius: 12px; cursor: pointer; text-align: left; color: var(--text);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.025)); border: 1px solid var(--border); transition: border-color .2s, background .2s, opacity .3s; outline: none; }
.tk::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--pc, var(--p4)); }
.tk:hover, .tk:focus-visible { border-color: var(--border-hover); background: rgba(167,139,250,.07); }
.tk.landed { animation: landed 1.4s ease; }
@keyframes landed { 0% { box-shadow: 0 0 0 1px var(--c), 0 0 22px color-mix(in srgb, var(--c) 45%, transparent); } 100% { box-shadow: none; } }
.tk-top { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12.5px; }
.pchip { flex: none; font: 900 10.5px/1 var(--font); padding: 3px 6px; border-radius: 6px; color: #0a0a0f; background: var(--pc, var(--p4)); letter-spacing: .02em; }
.tk-top .ch { flex: none; margin-left: auto; font-size: 12px; }
.tk-top .nm { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tk-bot { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tk-bot .fr { margin-left: auto; flex: none; font-size: 11.5px; font-family: var(--mono); color: var(--text-muted); white-space: nowrap; }
.tk-bot .fr.hot { color: #fca5a5; }
.tk-txt { font-size: 12.5px; line-height: 1.4; color: #c9cad3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.tk-txt b { color: var(--text); font-weight: 700; }
.tk-tags { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.tag { font: 700 10.5px/1.5 var(--font); padding: 0 6px; border-radius: 6px; background: rgba(255,255,255,.06); color: var(--text-muted); white-space: nowrap; }
.tag.warn { color: #fecaca; background: rgba(248,113,113,.14); }
.tag.mine { color: #a5f3fc; background: rgba(34,211,238,.14); }
.tag.cache { color: #9ca3af; background: rgba(255,255,255,.05); }
.tk.done { opacity: .5; }
.tk.done::after { content: "✓ respondido"; position: absolute; right: 8px; top: 8px; font: 800 10px var(--font); color: #6ee7b7; background: rgba(16,185,129,.16); padding: 1px 6px; border-radius: 6px; }
.tk.loading { cursor: progress; }
.tk.loading::after { content: "carregando detalhe…"; position: absolute; inset: 0; display: grid; place-items: center; border-radius: 12px; background: rgba(10,10,15,.72); font: 700 11.5px var(--font); color: #a5f3fc; }
.tk.ghost { pointer-events: none; box-shadow: 0 18px 50px rgba(0,0,0,.5), 0 0 0 1px var(--c), 0 0 30px color-mix(in srgb, var(--c) 45%, transparent); background: #171a26; }

.foot-note { margin-top: 12px; font-size: 12.5px; color: var(--text-dim); display: flex; flex-wrap: wrap; gap: 6px 16px; }
.foot-note b { color: var(--text-muted); font-family: var(--mono); }

/* ---------- modais ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 22px; background: rgba(5,6,10,.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet { width: min(1120px, 100%); max-height: calc(100vh - 44px); display: flex; flex-direction: column; border-radius: 20px; background: #0f1119; border: 1px solid var(--border-strong); box-shadow: 0 40px 120px rgba(0,0,0,.6); overflow: hidden; animation: rise .22s cubic-bezier(.2,.8,.2,1); }
.sheet--sm { width: min(680px, 100%); }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.d-hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.d-hd h3 { margin: 0; font-size: 17px; }
.d-hd .dchip { font-size: 13px; padding: 5px 12px; }
.grow { flex: 1; }
.d-took { font-size: 12.5px; color: var(--text-muted); }
.d-took b { color: var(--text); font-family: var(--mono); }
.d-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); overflow: auto; }
.d-left { padding: 16px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.d-right { padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.d-msg { padding: 12px 14px; border-radius: 14px 14px 14px 4px; background: rgba(255,255,255,.05); border: 1px solid var(--border); font-size: 14.5px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; max-height: 190px; overflow: auto; }
.d-msg .subj { display: block; font-weight: 800; margin-bottom: 4px; }
.d-reply { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; background: rgba(167,139,250,.06); border: 1px solid rgba(167,139,250,.28); }
.d-reply-hd { display: flex; align-items: center; gap: 8px; }
.d-reply h4, .d-right-t { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.d-right-t span { text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--text-dim); }
.macro-title { font-weight: 800; font-size: 15px; }
#d-text { min-height: 128px; font-size: 14px; background: rgba(0,0,0,.3); }
.alts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; color: var(--text-dim); }
.alts .jev-chip { min-height: 28px; font-size: 12px; padding: 4px 10px; }
.alts .jev-chip i { font-style: normal; font-family: var(--mono); color: var(--text-dim); }
.d-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sim { font-size: 11.5px; color: var(--text-dim); }
.blk { padding: 12px; border-radius: 14px; background: var(--bg-card); border: 1px solid var(--border); }
.blk.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.blk-t { display: flex; align-items: baseline; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px; }
.blk-t .val { margin-left: auto; text-transform: none; letter-spacing: 0; color: var(--text); font-size: 13px; }
.blk-t .dim { text-transform: none; letter-spacing: 0; font-weight: 600; }
.blk .jev-bar { grid-template-columns: minmax(90px, 44%) 1fr 48px; font-size: 12.5px; }
.lvl-now { margin-top: 8px; font-size: 13px; color: var(--text-muted); }
.lvl-now b { color: var(--text); }
.sig { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sg { padding: 8px 10px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255,255,255,.03); }
.sg .l { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--text-muted); }
.sg .l b { font-family: var(--mono); color: var(--text); }
.sg .t { margin-top: 6px; height: 6px; border-radius: 999px; background: rgba(255,255,255,.07); overflow: hidden; }
.sg .t i { display: block; height: 100%; width: 0; border-radius: 999px; background: rgba(255,255,255,.3); transition: width .5s cubic-bezier(.2,.8,.2,1); }
.sg.on { border-color: rgba(248,113,113,.45); background: rgba(248,113,113,.07); }
.sg.on .t i { background: linear-gradient(90deg, #f87171, #f472b6); }
.sg.on .l { color: #fecaca; }

/* composer */
.c-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 12px; overflow: auto; }
.c-lead { margin: 0; color: var(--text-muted); font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.c-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fld { display: flex; flex-direction: column; min-width: 0; position: relative; }
#c-texto { min-height: 120px; }
.c-cnt { position: absolute; right: 10px; bottom: 8px; font-size: 11px; color: var(--text-dim); pointer-events: none; }
.segctl { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(0,0,0,.35); border: 1px solid var(--border-strong); min-height: 44px; }
.segctl button { flex: 1; border: 0; border-radius: 9px; background: transparent; color: var(--text-muted); font: 700 13px var(--font); cursor: pointer; min-height: 34px; white-space: nowrap; }
.segctl button[aria-checked="true"] { background: rgba(167,139,250,.2); color: var(--text); box-shadow: inset 0 0 0 1px rgba(167,139,250,.5); }
.c-foot { display: flex; align-items: center; gap: 10px; }
.c-err { color: #fca5a5; font-size: 13px; }
.jev-select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #9ca3af 50%), linear-gradient(135deg, #9ca3af 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.jev-select option { background: #13161f; color: var(--text); }

/* ---------- responsivo ---------- */
@media (max-width: 1180px) {
  .top { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .board { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(230px, 30%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .col { scroll-snap-align: start; }
}
@media (max-width: 760px) {
  .intro p { font-size: 14px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi { padding: 9px 11px; }
  .kpi .k { white-space: normal; letter-spacing: .05em; font-size: 10.5px; line-height: 1.3; }
  .kpi .s { white-space: normal; font-size: 11px; line-height: 1.35; }
  .kpi .v { font-size: 20px; }
  .arrival { grid-template-columns: 1fr; }
  .arr-label { flex-direction: row; border-right: 0; border-bottom: 1px solid var(--border); padding: 8px 12px; justify-content: flex-start; }
  .arr-label br { display: none; }
  .arr-row { grid-template-columns: 1fr; gap: 10px; }
  .board { grid-auto-columns: 84%; }
  .col-list { height: 62vh; }
  .modal { padding: 0; place-items: stretch; }
  .sheet, .sheet--sm { width: 100%; max-height: 100vh; height: 100%; border-radius: 0; }
  .d-grid { grid-template-columns: 1fr; }
  .d-left { border-right: 0; border-bottom: 1px solid var(--border); }
  .d-took, .hide-sm { display: none; }
  .c-row { grid-template-columns: 1fr; }
  .sig, .blk.two { grid-template-columns: 1fr; }
  #play { min-width: 0; }
}
