/* ==========================================================================
   Portal do Cliente — tokens
   Paleta: azul-petróleo profundo (confiança/financeiro) + âmbar para
   pendências + vermelho terracota para atraso. Fundo neutro levemente
   frio, cards brancos com sombra suave e bordas discretas.
   Tipografia: pilha de sistema (sem depender de internet, já que isso
   roda 100% local).
   ========================================================================== */
:root {
  --bg: #F6F5FC;
  --surface: #ffffff;
  --surface-muted: #F3F1FA;
  --ink: #1A1330;
  --ink-muted: #665F80;
  --border: #E7E4F5;

  --brand: #7C3AED;
  --brand-strong: #5B21B6;
  --brand-tint: #F1EBFE;
  --accent-cyan: #22D3EE;
  --accent-pink: #F472B6;
  --space-1: #0F0A2E;
  --space-2: #1E0F4A;

  --ok: #1f7a4d;
  --ok-tint: #e5f4ec;
  --pending: #b6791c;
  --pending-tint: #fbf0dd;
  --late: #b23b2e;
  --late-tint: #fbe8e5;

  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(30, 15, 74, 0.06), 0 4px 14px rgba(30, 15, 74, 0.08);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --tap-min: 44px;
  --tabbar-h: 64px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: contain;
  overflow-x: hidden;
  height: 100%;
}

body.scroll-locked { overflow: hidden; }

.app { min-height: 100vh; min-height: 100dvh; }

button, a, input, textarea, select { touch-action: manipulation; }

h1, h2, h3 { margin: 0 0 4px; line-height: 1.2; }
p { margin: 0 0 16px; }
.muted { color: var(--ink-muted); font-size: 14px; }

button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

/* --- Fundo espacial (Galaxy TV) reutilizado no splash e telas de auth --- */
.boot-splash, .auth-screen {
  background:
    radial-gradient(1.8px 1.8px at 10% 20%, rgba(255,255,255,0.9), transparent 60%),
    radial-gradient(1.6px 1.6px at 85% 15%, rgba(255,255,255,0.7), transparent 60%),
    radial-gradient(1.4px 1.4px at 30% 75%, rgba(255,255,255,0.6), transparent 60%),
    radial-gradient(2px 2px at 68% 55%, rgba(255,255,255,0.55), transparent 60%),
    radial-gradient(1.4px 1.4px at 92% 80%, rgba(255,255,255,0.6), transparent 60%),
    radial-gradient(1.7px 1.7px at 48% 12%, rgba(255,255,255,0.5), transparent 60%),
    radial-gradient(1.4px 1.4px at 15% 92%, rgba(255,255,255,0.45), transparent 60%),
    radial-gradient(55% 60% at 85% 8%, var(--accent-pink) 0%, transparent 55%),
    radial-gradient(60% 65% at 8% 92%, var(--accent-cyan) 0%, transparent 50%),
    linear-gradient(160deg, var(--space-2) 0%, var(--space-1) 55%, #08051a 100%);
  background-blend-mode: normal, normal, normal, normal, normal, normal, normal, soft-light, soft-light, normal;
}

/* --- Splash inicial (antes do JS assumir) --- */
.boot-splash {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px;
}
.boot-mark {
  font-size: 13px; font-weight: 600; color: #fff;
  background: rgba(255,255,255,0.12); padding: 5px 12px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
}
.boot-spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.25); border-top-color: var(--accent-cyan);
  animation: boot-spin 0.8s linear infinite;
}
@keyframes boot-spin { to { transform: rotate(360deg); } }

/* --- Auth screens --- */
.auth-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(24px + var(--safe-top)) calc(24px + var(--safe-right)) calc(24px + var(--safe-bottom)) calc(24px + var(--safe-left));
}
.auth-card {
  width: 100%;
  max-width: 380px;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(8, 5, 26, 0.45);
  padding: 32px 28px;
  position: relative;
  z-index: 1;
}
.brand-mark {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-strong);
  background: var(--brand-tint);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.auth-card h1 { font-size: 22px; }

form { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
label { font-size: 13px; color: var(--ink-muted); display: flex; flex-direction: column; gap: 6px; }
input[type="text"], input[type="tel"], input[type="password"], input[type="email"], textarea, select {
  font-size: 16px; /* 16px+ evita zoom automatico ao focar no iOS */
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--ink);
  min-height: var(--tap-min);
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
  background: var(--surface);
}

.btn {
  font-size: 15px;
  font-weight: 600;
  padding: 12px 16px;
  min-height: var(--tap-min);
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: transform 0.08s ease, opacity 0.08s ease;
}
.btn:active { transform: scale(0.97); opacity: 0.9; }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-strong)); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { background: var(--surface); color: var(--brand); border-color: var(--border); }
.btn-secondary:hover { background: var(--brand-tint); }
.btn-ghost { background: var(--surface-muted); color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { background: var(--border); }
.btn-block { width: 100%; }
.btn-link {
  background: none; border: none; color: var(--brand); font-size: 14px;
  padding: 10px 0; text-align: left; min-height: var(--tap-min); display: inline-flex; align-items: center;
}
.btn-link:active { opacity: 0.6; }

.form-error {
  color: var(--late);
  font-size: 13px;
  min-height: 16px;
}

.pwd-wrap { position: relative; display: flex; }
.pwd-wrap input { flex: 1; padding-right: 44px; }
.pwd-toggle {
  position: absolute; right: 2px; top: 2px; bottom: 2px;
  width: 40px;
  background: none; border: none;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-muted);
  border-radius: var(--radius);
}
.pwd-toggle:active { background: var(--surface-muted); }

.auth-links { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-top: 4px; }

/* --- Shell / navegação --- */
.shell { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(14px + var(--safe-top)) calc(16px + var(--safe-right)) 14px calc(16px + var(--safe-left));
  background: linear-gradient(120deg, var(--space-2), var(--brand-strong) 60%, var(--brand));
  color: #fff;
}
.topbar-title { font-weight: 700; font-size: 15px; }
.topbar-title .wave { margin-left: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 4px; }
.topbar .btn-link { color: #fff; min-height: var(--tap-min); padding: 0 8px; }
.icon-btn {
  position: relative;
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  width: var(--tap-min); height: var(--tap-min);
  border-radius: 999px;
  font-size: 17px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 0.08s ease;
}
.icon-btn:active { transform: scale(0.92); }
.badge {
  position: absolute; top: 2px; right: 2px;
  background: var(--late); color: #fff;
  font-size: 10px; font-weight: 700;
  min-width: 16px; height: 16px; line-height: 16px;
  border-radius: 999px; padding: 0 3px;
}

/* Barra de navegação fixa embaixo — mais fácil de alcançar com o polegar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 6px calc(4px + var(--safe-left)) calc(6px + var(--safe-bottom)) calc(4px + var(--safe-right));
  height: calc(var(--tabbar-h) + var(--safe-bottom));
}
.tab {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: none; border: none;
  padding: 6px 4px;
  color: var(--ink-muted);
  border-radius: var(--radius);
  min-height: var(--tap-min);
}
.tab:active { background: var(--surface-muted); }
.tab-icon { font-size: 20px; line-height: 1; }
.tab-label { font-size: 11px; font-weight: 600; }
.tab.active { color: var(--brand); }

.content {
  flex: 1;
  padding: 20px calc(20px + var(--safe-right)) calc(20px + var(--tabbar-h) + var(--safe-bottom)) calc(20px + var(--safe-left));
  max-width: 640px; width: 100%; margin: 0 auto;
}

/* --- Card de boas-vindas (topo da aba Perfil) --- */
.welcome-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 14px;
  color: #fff;
  background:
    radial-gradient(1.6px 1.6px at 10% 25%, rgba(255,255,255,0.85), transparent 60%),
    radial-gradient(1.3px 1.3px at 30% 70%, rgba(255,255,255,0.6), transparent 60%),
    radial-gradient(1.2px 1.2px at 55% 35%, rgba(255,255,255,0.55), transparent 60%),
    radial-gradient(1.6px 1.6px at 78% 60%, rgba(255,255,255,0.5), transparent 60%),
    radial-gradient(1.3px 1.3px at 90% 20%, rgba(255,255,255,0.6), transparent 60%),
    radial-gradient(60% 140% at 95% -20%, var(--accent-cyan) 0%, transparent 55%),
    radial-gradient(70% 140% at 0% 120%, var(--accent-pink) 0%, transparent 55%),
    linear-gradient(115deg, var(--space-2) 0%, var(--brand-strong) 55%, var(--brand) 100%);
  background-blend-mode: normal, normal, normal, normal, normal, soft-light, soft-light, normal;
  box-shadow: var(--shadow);
}
.welcome-card-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; position: relative; z-index: 1; }
.welcome-card-sub { font-size: 13px; color: rgba(255,255,255,0.85); position: relative; z-index: 1; }

/* --- Cards genéricos --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.card-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; }
.card-row + .card-row { border-top: 1px solid var(--border); }
.field-label { font-size: 12px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.02em; }
.field-value { font-size: 15px; font-weight: 600; }

/* --- Status pills --- */
.pill {
  display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
}
.pill-ok { background: var(--ok-tint); color: var(--ok); }
.pill-pending { background: var(--pending-tint); color: var(--pending); }
.pill-late { background: var(--late-tint); color: var(--late); }

/* --- Faturas --- */
.invoice-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; }
.invoice-item + .invoice-item { border-top: 1px solid var(--border); }
.invoice-meta { display: flex; flex-direction: column; gap: 2px; }
.invoice-value { font-weight: 700; }

.pix-box {
  margin-top: 12px; padding: 14px;
  background: var(--surface-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  font-size: 12px;
}
.pix-code { word-break: break-all; font-family: monospace; background: var(--surface); padding: 8px; border-radius: 6px; margin: 8px 0; display: block; }

/* --- Tickets --- */
.ticket-item { display: block; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; min-height: var(--tap-min); transition: background 0.08s ease; }
.ticket-item:hover { border-color: var(--brand); }
.ticket-item:active { background: var(--surface-muted); }
.ticket-item .field-label { margin-bottom: 4px; }

.msg-list { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; max-height: 320px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.msg { max-width: 80%; padding: 10px 12px; border-radius: var(--radius); font-size: 14px; }
.msg-cliente { align-self: flex-end; background: var(--brand-tint); color: var(--brand-strong); white-space: pre-wrap; }
.msg-revendedor { align-self: flex-start; background: var(--surface-muted); white-space: pre-wrap; }
.assistente-sugestoes { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.assistente-sugestoes .btn { font-size: 12.5px; padding: 7px 12px; }
.msg-bot { align-self: flex-start; background: var(--surface-muted); border: 1px dashed var(--brand); }
.msg-typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; }
.msg-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-muted); opacity: 0.4; animation: msg-typing-blink 1.2s infinite ease-in-out; }
.msg-typing span:nth-child(2) { animation-delay: 0.2s; }
.msg-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes msg-typing-blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 0.9; } }

.suporte-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 720px) { .suporte-grid { grid-template-columns: 1fr; } }
.assistente-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--brand-strong); background: var(--brand-tint); padding: 3px 10px; border-radius: 999px; margin-bottom: 10px; }
.assistente-footer { font-size: 11px; color: var(--ink-muted); text-align: center; margin-top: 8px; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--ink-muted); }

/* --- Drawer de notificações --- */
.drawer { position: fixed; inset: 0; background: rgba(20,38,43,0.35); display: flex; justify-content: flex-end; z-index: 50; animation: drawer-fade 0.15s ease; }
.drawer-card {
  width: 100%; max-width: 360px; background: var(--surface); height: 100%;
  display: flex; flex-direction: column;
  padding-top: var(--safe-top); padding-bottom: var(--safe-bottom); padding-right: var(--safe-right);
  animation: drawer-slide-in 0.2s ease;
}
@keyframes drawer-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes drawer-slide-in { from { transform: translateX(24px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.drawer-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.drawer-header .icon-btn { background: var(--surface-muted); color: var(--ink); }
.drawer-body { padding: 12px 18px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.notif-item { padding: 12px 4px; border-bottom: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; }
.notif-item:active { background: var(--surface-muted); }
.notif-item.unread .field-value { color: var(--brand); }

form.inline { flex-direction: row; gap: 8px; margin-top: 10px; }
form.inline input { flex: 1; }

/* --- Perfil elaborado (espelha a ficha do cliente no dashboard) --- */
.profile-header { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.profile-avatar {
  width: 52px; height: 52px; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--brand));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px; flex-shrink: 0;
}
.profile-name { font-size: 19px; margin: 0; }
.profile-header-meta { display: flex; gap: 8px; align-items: center; margin-top: 4px; flex-wrap: wrap; }

.section-title { font-size: 13px; font-weight: 700; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.02em; margin-bottom: 10px; }

.rating-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius); margin-bottom: 14px;
  background: var(--surface-muted);
}
.rating-card.rating-success { background: var(--ok-tint); }
.rating-card.rating-warning { background: var(--pending-tint); }
.rating-card.rating-danger { background: var(--late-tint); }
.rating-stars { font-size: 18px; letter-spacing: 1px; }
.rating-card.rating-success .rating-stars { color: var(--ok); }
.rating-card.rating-warning .rating-stars { color: var(--pending); }
.rating-card.rating-danger .rating-stars { color: var(--late); }
.rating-card.rating-neutral .rating-stars { color: var(--ink-muted); }
.rating-label { font-weight: 700; font-size: 14px; }
.rating-detail { font-size: 12px; color: var(--ink-muted); }

.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.profile-item { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.profile-item.full { grid-column: 1 / -1; }
.profile-label { font-size: 11px; color: var(--ink-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; }
.profile-value { font-size: 13.5px; font-weight: 500; word-break: break-word; }
.profile-value-strong { font-size: 17px; font-weight: 700; }
.profile-value.mono { font-family: monospace; font-size: 12.5px; }

.discount-banner {
  display: flex; align-items: center; gap: 8px;
  background: var(--ok-tint); color: var(--ok);
  padding: 10px 12px; border-radius: var(--radius);
  font-size: 13px; margin-bottom: 12px;
}

.profile-item.inline {
   flex-direction: row; 
   align-items: baseline; 
   gap: 6px; 
   flex-wrap: wrap; 
  }

.indicacao-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-size: 13.5px; }
.indicacao-row + .indicacao-row { border-top: 1px solid var(--border); }

.history-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; font-size: 13.5px; }
.history-row + .history-row { border-top: 1px solid var(--border); }
.history-meta { display: flex; flex-direction: column; gap: 2px; }

@media (max-width: 480px) {
  .profile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .content { padding: 14px calc(14px + var(--safe-right)) calc(14px + var(--tabbar-h) + var(--safe-bottom)) calc(14px + var(--safe-left)); }
  .auth-card { padding: 26px 20px; }
}

/* ===================================================================
   ABA NOVIDADES — canais do dia + carrosséis de filmes/séries
   (estilo "Netflix": fileiras horizontais de cartões com capa)
=================================================================== */
.novidades-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.novidades-updated {
  font-size: 11.5px;
  color: var(--ink-muted);
  white-space: nowrap;
}

/* --- Canais de hoje (jogos com número do canal) --- */
.novidades-jogos-card { padding: 14px 16px; margin-bottom: 22px; }
.novidades-jogos-title {
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 10px;
}
.novidades-jogo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  font-size: 13px;
}
.novidades-jogo-row + .novidades-jogo-row { border-top: 1px solid var(--border); }
.novidades-jogo-horario {
  font-weight: 700;
  color: var(--brand-strong);
  flex-shrink: 0;
  width: 42px;
  font-variant-numeric: tabular-nums;
}
.novidades-jogo-confronto { flex: 1; min-width: 0; font-weight: 500; }
.novidades-jogo-canais { display: flex; gap: 4px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.canal-chip {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--brand-strong);
  background: var(--brand-tint);
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}

/* --- Fileiras de conteúdo (carrossel horizontal) --- */
.novidades-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 16px;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.novidades-tabs::-webkit-scrollbar { display: none; }
.novidades-tab {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-muted);
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.novidades-tab.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.novidades-row { margin-bottom: 24px; }
.novidades-row-title {
  font-size: 14.5px;
  font-weight: 700;
  margin: 0 0 10px 2px;
}
.novidades-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  margin: 0 -2px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.novidades-carousel::-webkit-scrollbar { display: none; }

.poster-card {
  flex: 0 0 auto;
  width: 118px;
  scroll-snap-align: start;
}
.poster-card-img {
  position: relative;
  width: 118px;
  height: 174px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(150deg, var(--space-2), var(--brand-strong) 55%, var(--brand));
  box-shadow: 0 4px 14px rgba(30, 15, 74, 0.18);
  margin-bottom: 6px;
}
.poster-card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.poster-fallback-emoji {
  position: absolute; inset: 0;
  display: none; align-items: center; justify-content: center;
  font-size: 34px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
}
.poster-card-placeholder { display: block; }
.poster-card-placeholder .poster-fallback-emoji { display: flex; }
.poster-card-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.poster-card-meta {
  font-size: 10.5px;
  color: var(--ink-muted);
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.poster-card-ano {
  font-weight: 500;
  color: var(--ink-muted);
  font-size: 11px;
}

/* Selo "Hoje / Ontem / Há N dias" no canto do pôster */
.poster-badge-novo {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .2px;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(120deg, #ff6b6b, #ff9d3d);
  padding: 3px 7px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}

/* Tags coloridas (gênero / data), no estilo do painel do provedor —
   só aparecem quando o texto colado realmente trouxer esses dados. */
.poster-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.poster-tag {
  font-size: 9px;
  font-weight: 700;
  line-height: 1.5;
  padding: 2px 6px;
  border-radius: 5px;
  white-space: nowrap;
}
.poster-tag-genero { background: #1fa863; color: #fff; }
.poster-tag-data { background: #2f7de1; color: #fff; }

@media (max-width: 380px) {
  .poster-card, .poster-card-img { width: 102px; }
  .poster-card-img { height: 150px; }
}

/* ===================================================================
   ABA JOGOS — "Agenda de Jogos" estilo bilhete/ticket
=================================================================== */
.agenda-header {
  position: relative;
  text-align: center;
  padding: 16px 24px;
  margin-bottom: 16px;
  border-radius: 14px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(1.4px 1.4px at 10% 25%, rgba(255,255,255,0.8), transparent 60%),
    radial-gradient(1.2px 1.2px at 85% 20%, rgba(255,255,255,0.6), transparent 60%),
    radial-gradient(1.3px 1.3px at 50% 75%, rgba(255,255,255,0.5), transparent 60%),
    linear-gradient(160deg, var(--space-2) 0%, var(--space-1) 100%);
}
.agenda-header::before {
  content: '';
  position: absolute; inset: 6px;
  border: 1.5px solid var(--accent-cyan);
  border-radius: 9px;
  opacity: 0.55;
  pointer-events: none;
}
.agenda-eyebrow {
  font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent-cyan); margin-bottom: 5px;
}
.agenda-titulo { font-size: 18px; font-weight: 800; margin-bottom: 3px; }
.agenda-data { font-size: 13.5px; color: rgba(255,255,255,0.82); text-transform: capitalize; }

.agenda-jogo {
  position: relative;
  background: var(--surface);
  border-radius: 14px;
  padding: 14px 14px 12px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.agenda-jogo::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent-cyan) 100%);
  clip-path: polygon(0 0, 100% 0, 0 100%);
  opacity: 0.10;
  pointer-events: none;
}
.agenda-jogo-top {
  position: relative;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  margin-bottom: 10px;
}
.agenda-liga-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 700; color: var(--brand-strong);
  background: var(--brand-tint); padding: 3px 9px; border-radius: 999px;
  max-width: 62%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.agenda-liga-badge img { width: 13px; height: 13px; object-fit: contain; flex-shrink: 0; }
.agenda-horario-badge {
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--space-2), var(--brand-strong));
  color: #fff; font-weight: 800; font-size: 12.5px;
  padding: 5px 11px; border-radius: 8px;
  box-shadow: 0 2px 8px rgba(30,15,74,0.25);
  white-space: nowrap;
}
.agenda-confronto {
  position: relative;
  display: flex; align-items: flex-start; justify-content: center; gap: 12px;
  margin: 4px 0 12px;
}
.agenda-time { flex: 1; max-width: 40%; text-align: center; min-width: 0; }
.agenda-escudo { width: 42px; height: 42px; object-fit: contain; margin: 0 auto 6px; display: block; }
.agenda-escudo-fallback {
  width: 42px; height: 42px; border-radius: 50%; margin: 0 auto 6px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--brand));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; letter-spacing: -0.02em;
}
.agenda-time-nome {
  font-size: 11.5px; font-weight: 700; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.agenda-vs {
  flex-shrink: 0;
  font-size: 12.5px; font-weight: 800; color: var(--ink-muted);
  margin-top: 12px;
  white-space: nowrap;
}
.agenda-jogo-footer {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding-top: 10px; border-top: 1px dashed var(--border);
  font-size: 12px; font-weight: 600; color: var(--ink);
  text-align: center;
}
.agenda-canal-logo { width: 16px; height: 16px; object-fit: contain; flex-shrink: 0; }

/* Card de luta (UFC) — mesma base do card de partida, com um visual
   mais "combate": faixa vermelho/preto e fotos redondas dos lutadores. */
.agenda-luta::before {
  background: linear-gradient(135deg, #b3121f 0%, #1a1a1a 100%);
  opacity: 0.14;
}
.agenda-luta-principal {
  border: 1px solid rgba(179, 18, 31, 0.35);
}
.agenda-luta-categoria {
  position: relative;
  font-size: 10.5px;
  font-weight: 700;
  color: #b3121f;
  text-transform: uppercase;
  letter-spacing: .02em;
  margin: -4px 0 8px;
}
.agenda-lutador-foto { border-radius: 50%; }
.agenda-luta .agenda-vs { color: #b3121f; font-size: 15px; }


/* ===================================================================
   LAYOUT DESKTOP
   Acima de 900px de largura o app deixa de imitar um celular: a barra
   de baixo vira uma barra lateral fixa e o conteúdo ganha mais respiro.
   Isso é decidido pelo tamanho da JANELA (media query), não pelo tipo
   de aparelho — é o jeito certo de fazer essa troca, porque um celular
   e um PC com a janela pequena devem se comportar igual, e um PC com a
   janela maximizada é o que dispara o layout novo. Detectar "é celular
   ou é PC" por outro meio (ex.: user-agent) é menos confiável, porque
   tablet, notebook conversível e janela redimensionada fogem da regra.
   Nenhum JS precisou mudar: os mesmos botões e telas só são
   reorganizados na tela grande via CSS Grid.
=================================================================== */
@media (min-width: 900px) {
  .shell {
    display: grid;
    grid-template-columns: 248px 1fr;
    grid-template-areas: "nav topbar" "nav content";
    min-height: 100vh;
  }

  /* Barra lateral fixa (era a barra de baixo no celular) */
  .tabbar {
    grid-area: nav;
    position: sticky;
    top: 0;
    left: auto; right: auto; bottom: auto;
    height: 100vh;
    width: 248px;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 4px;
    padding: 20px 12px;
    border-top: none;
    border-right: 1px solid var(--border);
  }
  .tabbar::before {
    content: '🛰️ Galaxy TV';
    display: block;
    font-weight: 800;
    font-size: 14px;
    color: var(--brand-strong);
    padding: 8px 10px 18px;
  }
  .tab {
    flex: 0 0 auto;
    flex-direction: row;
    justify-content: flex-start;
    gap: 10px;
    padding: 9px 12px;
    min-height: 0;
    font-size: 13.5px;
    border-radius: 8px;
    color: var(--ink-muted);
  }
  .tab:hover { background: var(--surface-muted); }
  .tab-icon { font-size: 16px; }
  .tab-label { font-size: 13.5px; }
  .tab.active { background: var(--brand-tint); font-weight: 700; }

  .topbar {
    grid-area: topbar;
    padding: 18px 32px;
  }

  .content {
    grid-area: content;
    max-width: 880px;
    padding: 28px 32px 40px;
    margin: 0;
  }

  .auth-screen { padding: 24px; }
}

/* Reforço: garante o tamanho compacto do menu lateral no PC mesmo que
   alguma regra antiga tenha sobrado em outro lugar do arquivo. */
@media (min-width: 900px) {
  .tabbar .tab {
    flex: 0 0 auto !important;
    min-height: 0 !important;
    padding: 9px 12px !important;
  }
}


/* --- Destaque fixado pelo revendedor (aba Novidades) --- */
.poster-badge-destaque {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  font-size: 11px;
  line-height: 1;
  color: #fff;
  background: linear-gradient(120deg, #7c3aed, #a855f7);
  padding: 4px 6px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}

/* --- Modo prévia (o revendedor vendo a tela como o cliente vê) --- */
.preview-banner {
  position: sticky;
  top: 0;
  z-index: 50;
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  background: #4C1D95;
  padding: 8px 12px calc(8px) 12px;
}
.preview-banner span { opacity: .8; font-weight: 400; }

/* ==========================================================================
   Aba Guia de TV
   ========================================================================== */
.guia-topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.guia-titulo { font-size: 20px; margin: 0; }
.guia-sub { color: var(--ink-muted); font-size: 12.5px; margin-top: 2px; }
.guia-secao { font-size: 14px; font-weight: 800; margin: 14px 2px 8px; display: flex; align-items: center; gap: 8px; }
.guia-conta { font-size: 11.5px; font-weight: 700; color: var(--brand-strong); background: var(--brand-tint); border-radius: 999px; padding: 2px 8px; }

.guia-destaques { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 6px; margin: 0 -2px; scroll-snap-type: x proximity; scrollbar-width: none; }
.guia-destaques::-webkit-scrollbar { display: none; }
.guia-dest {
  flex: 0 0 210px; scroll-snap-align: start; text-align: left; cursor: pointer; font: inherit; color: #fff;
  display: flex; flex-direction: column; gap: 6px; padding: 12px 13px; border: none; border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--space-2), #4C1D95 70%, #6D28D9);
  box-shadow: var(--shadow);
}
.guia-dest-topo { display: flex; align-items: center; gap: 8px; }
.guia-dest-nome { font-size: 12.5px; font-weight: 700; opacity: .92; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guia-dest-titulo { font-size: 14.5px; font-weight: 800; line-height: 1.25; min-height: 36px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.guia-dest .guia-barra { background: rgba(255,255,255,.22); }
.guia-dest .guia-barra span { background: var(--accent-cyan); }
.guia-dest .guia-meta { color: rgba(255,255,255,.8); }

.guia-busca { margin: 12px 0 10px; }
.guia-busca input {
  width: 100%; box-sizing: border-box; padding: 12px 14px; font: inherit; font-size: 15px; color: var(--ink);
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
}
.guia-busca input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.guia-chips { margin-bottom: 4px; }

.guia-lista { display: flex; flex-direction: column; gap: 8px; }
.guia-canal {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 11px 12px; box-shadow: var(--shadow);
}
.guia-canal:active { background: var(--surface-muted); }
.guia-canal-corpo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.guia-canal-nome { font-size: 12px; font-weight: 700; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .02em; }
.guia-agora { font-size: 14.5px; font-weight: 700; line-height: 1.25; display: flex; align-items: baseline; gap: 6px; }
.guia-sem { color: var(--ink-muted); font-weight: 500; font-size: 13.5px; }
.guia-pill { flex: none; font-size: 9.5px; font-weight: 800; letter-spacing: .04em; color: #fff; background: #E11D48; border-radius: 5px; padding: 2px 5px; position: relative; top: -1px; }
.guia-barra { display: block; height: 5px; border-radius: 99px; background: var(--surface-muted); overflow: hidden; margin-top: 2px; }
.guia-barra span { display: block; height: 100%; border-radius: 99px; background: var(--brand); }
.guia-meta { font-size: 11.5px; color: var(--ink-muted); }
.guia-depois { font-size: 12.5px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guia-depois b { color: var(--ink); }
.guia-seta { color: var(--ink-muted); font-size: 22px; flex: none; }

.guia-logo { flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; overflow: hidden; background: var(--brand-tint); color: var(--brand-strong); font-weight: 800; border: 1px solid var(--border); }
.guia-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 3px; box-sizing: border-box; }
.guia-logo-m { width: 46px; height: 46px; font-size: 14px; }
.guia-logo-s { width: 28px; height: 28px; font-size: 10px; border-radius: 8px; border-color: transparent; }

.guia-sheet-ov { position: fixed; inset: 0; z-index: 60; background: rgba(15, 10, 46, .55); display: flex; align-items: flex-end; justify-content: center; }
.guia-sheet { width: 100%; max-width: 560px; max-height: 88vh; background: var(--surface); border-radius: 22px 22px 0 0; display: flex; flex-direction: column; box-shadow: 0 -10px 40px rgba(15,10,46,.3); animation: guiaSobe .18s ease; padding-bottom: env(safe-area-inset-bottom, 0px); }
@keyframes guiaSobe { from { transform: translateY(30px); opacity: .4; } to { transform: none; opacity: 1; } }
.guia-sheet-topo { flex: none; display: flex; align-items: center; gap: 12px; padding: 16px 16px 8px; }
.guia-sheet-nome { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.guia-sheet-nome b { font-size: 17px; }
.guia-sheet-nome span { font-size: 12.5px; color: var(--ink-muted); }
.guia-dias { flex: none; display: flex; align-items: center; gap: 8px; padding: 4px 16px 12px; margin: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; min-height: 46px; box-sizing: border-box; }
.guia-dias::-webkit-scrollbar { display: none; }
.guia-dias .novidades-tab { flex: 0 0 auto; height: auto; min-height: 34px; padding: 8px 16px; line-height: 1.2; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; }
.guia-sheet-corpo { min-height: 0; overflow-y: auto; padding: 0 16px 18px; flex: 1; }
.guia-prog { display: flex; gap: 12px; padding: 11px 10px; border-radius: 12px; border-bottom: 1px solid var(--border); }
.guia-prog.passou { opacity: .5; }
.guia-prog.no-ar { background: var(--brand-tint); border-bottom-color: transparent; }
.guia-prog-hora { flex: none; width: 48px; font-weight: 800; font-size: 14px; color: var(--brand-strong); font-variant-numeric: tabular-nums; }
.guia-prog-corpo { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.guia-prog-corpo b { font-size: 14.5px; line-height: 1.3; }
.guia-prog-corpo .guia-pill { align-self: flex-start; }
.guia-prog-desc { font-size: 12.5px; color: var(--ink-muted); line-height: 1.4; }
.guia-vazio { text-align: center; }

@media (min-width: 900px) {
  .guia-sheet-ov { align-items: center; }
  .guia-sheet { border-radius: 22px; max-height: 80vh; }
  .guia-lista { display: grid; grid-template-columns: 1fr 1fr; }
}
/* 6 abas no celular: um pouco mais compactas */
@media (max-width: 899px) { .tabbar .tab { padding: 6px 1px; } .tabbar .tab-label { font-size: 10.5px; } }

.guia-canal.sem-prog { opacity: .72; }
.guia-canal.sem-prog .guia-agora { color: var(--ink-muted); font-weight: 500; font-size: 13px; }

.guia-uf { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.guia-uf label { flex: none; font-size: 13px; font-weight: 700; }
.guia-uf select { flex: 1; min-width: 0; height: 42px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--ink); font-size: 14px; padding: 0 10px; }
.guia-uf-dica { font-size: 12.5px; color: var(--brand-strong); background: var(--brand-tint); border-radius: 10px; padding: 8px 12px; margin: 0 0 10px; }

/* ==========================================================================
   Suporte novo (js/suporte.js) — classes tk-*
   ========================================================================== */
.tab { position: relative; }
.tab.tab-dot::after { content: ''; position: absolute; top: 6px; left: calc(50% + 8px); width: 10px; height: 10px; border-radius: 50%; background: #ef4444; border: 2px solid var(--surface); }
.tk-h { font-size: 17px; margin: 0 0 4px; }
.tk-sub { margin: 0 0 12px; color: var(--ink-muted); font-size: 13.5px; }
.tk-novo { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow); }
.tk-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tk-cat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-muted); min-height: 96px; transition: transform .1s, box-shadow .1s; }
.tk-cat:active { transform: scale(.97); }
.tk-cat b { font-size: 14px; color: var(--ink); line-height: 1.2; }
.tk-cat small { font-size: 11.5px; color: var(--ink-muted); line-height: 1.25; }
.tk-cat-ic { font-size: 22px; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #fff; box-shadow: 0 1px 4px rgba(30,15,74,.12); margin-bottom: 4px; }
.tk-cat-ic.g { margin: 0; }
.tk-cat.conteudo { background: linear-gradient(135deg, #fdf2f8, #f1ebfe); border-color: #e9d5ff; }
.tk-cat.sugestao { background: linear-gradient(135deg, #fffbeb, #fef3c7); border-color: #fde68a; }
.tk-cat.tecnico { background: linear-gradient(135deg, #eff6ff, #e0f2fe); border-color: #bfdbfe; }
.tk-vazio { text-align: center; padding: 26px 12px; color: var(--ink-muted); }
.tk-vazio span { font-size: 34px; display: block; }
.tk-vazio b { display: block; color: var(--ink); margin: 4px 0; }
.tk-vazio.pequeno { padding: 14px; }
.tk-filtros { display: flex; gap: 8px; margin-bottom: 10px; overflow-x: auto; }
.tk-filtros button { white-space: nowrap; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--ink-muted); }
.tk-filtros button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.tk-filtros i { font-style: normal; opacity: .75; margin-left: 4px; }
.tk-lista { display: flex; flex-direction: column; gap: 10px; }
.tk-item { position: relative; display: flex; gap: 12px; text-align: left; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); width: 100%; }
.tk-item.novo { border-color: var(--brand); background: var(--brand-tint); }
.tk-item-ic { font-size: 20px; width: 40px; height: 40px; flex: none; display: grid; place-items: center; background: var(--surface-muted); border-radius: 12px; }
.tk-item-corpo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tk-item-topo { display: flex; justify-content: space-between; gap: 8px; }
.tk-item-topo b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-item-topo time { font-size: 11.5px; color: var(--ink-muted); flex: none; }
.tk-item-previa { font-size: 13px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-item-previa i { color: var(--brand-strong); font-style: normal; font-weight: 700; }
.tk-item-pe { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tk-ponto { position: absolute; top: 10px; right: 10px; width: 10px; height: 10px; border-radius: 50%; background: #ef4444; }
.tk-chip { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--surface-muted); color: var(--ink-muted); }
.tk-chip.wait { background: var(--pending-tint); color: var(--pending); }
.tk-chip.work { background: #e0f2fe; color: #0369a1; }
.tk-chip.done { background: var(--ok-tint); color: var(--ok); }
.tk-mini { font-size: 11.5px; color: var(--ink-muted); }
/* anexos: seletor */
.tk-anx-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.tk-anx-grid:not(:empty) { margin-bottom: 10px; }
.tk-anx-item { position: relative; width: 84px; height: 84px; border-radius: 12px; overflow: hidden; background: #000; border: 2px solid transparent; }
.tk-anx-item img, .tk-anx-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tk-anx-item.ok { border-color: #22c55e; }
.tk-anx-item.erro { border-color: #ef4444; }
.tk-anx-item.enviando img, .tk-anx-item.enviando video { opacity: .55; }
.tk-anx-info { position: absolute; left: 4px; bottom: 4px; font-size: 10px; color: #fff; background: rgba(0,0,0,.6); padding: 1px 5px; border-radius: 6px; }
.tk-anx-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(255,255,255,.35); }
.tk-anx-prog i { display: block; height: 100%; background: var(--accent-cyan); transition: width .15s; }
.tk-anx-pct { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 14px; text-shadow: 0 1px 3px #000; }
.tk-anx-ok { position: absolute; top: 4px; left: 4px; background: #22c55e; color: #fff; width: 18px; height: 18px; border-radius: 50%; font-size: 11px; display: grid; place-items: center; }
.tk-anx-x { position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; }
.tk-anx-erro { position: absolute; inset: 0; background: rgba(127,29,29,.85); color: #fff; font-size: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.tk-anx-erro small { font-size: 9px; padding: 0 4px; text-align: center; line-height: 1.1; }
.tk-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; display: grid; place-items: center; padding-left: 2px; pointer-events: none; }
.tk-anx-btns { display: flex; gap: 8px; }
.tk-anx-btn { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 12px; border: 2px dashed var(--brand); background: var(--brand-tint); color: var(--brand-strong); font-size: 12.5px; font-weight: 700; min-height: 56px; }
.tk-anx-btn span { font-size: 20px; }
.tk-anx-nota { margin-top: 8px; font-size: 12px; color: var(--ink-muted); text-align: center; }
.tk-anx.compacto .tk-anx-btns { display: none; }
.tk-anx.compacto .tk-anx-grid:not(:empty) { margin: 0; padding: 8px 12px 0; }
/* folha de novo chamado */
.tk-sheet-ov { position: fixed; inset: 0; z-index: 90; background: rgba(15,10,46,.55); display: flex; align-items: flex-end; justify-content: center; animation: tkfade .15s; }
@keyframes tkfade { from { opacity: 0; } }
@keyframes tkup { from { transform: translateY(40px); opacity: 0; } }
.tk-sheet { width: 100%; max-width: 560px; max-height: 92vh; background: var(--surface); border-radius: 22px 22px 0 0; display: flex; flex-direction: column; animation: tkup .2s; }
.tk-form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.tk-sheet-topo { display: flex; align-items: center; gap: 12px; padding: 16px; border-bottom: 1px solid var(--border); }
.tk-sheet-topo div { flex: 1; display: flex; flex-direction: column; }
.tk-sheet-topo small { color: var(--ink-muted); font-size: 12.5px; }
.tk-x { width: 36px; height: 36px; border-radius: 50%; background: var(--surface-muted); font-size: 14px; }
.tk-sheet-corpo { padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.tk-sheet-pe { padding: 12px 16px calc(12px + var(--safe-bottom)); border-top: 1px solid var(--border); }
.tk-enviar { width: 100%; font-size: 16px; }
.tk-rot { font-weight: 700; font-size: 15px; }
.tk-in { width: 100%; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-muted); font: inherit; font-size: 15px; color: var(--ink); resize: vertical; }
.tk-in:focus { outline: 2px solid var(--brand); background: var(--surface); }
.tk-seg { display: flex; gap: 6px; background: var(--surface-muted); padding: 4px; border-radius: 12px; }
.tk-seg button { flex: 1; padding: 10px 4px; border-radius: 9px; font-size: 13.5px; font-weight: 700; color: var(--ink-muted); }
.tk-seg button.on { background: #fff; color: var(--brand-strong); box-shadow: 0 1px 4px rgba(30,15,74,.15); }
.tk-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tk-chipb { padding: 7px 12px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--ink-muted); }
.tk-chipb.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.tk-pede { display: flex; gap: 10px; align-items: flex-start; background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; padding: 10px 12px; }
.tk-pede > span { font-size: 22px; }
.tk-pede p { margin: 2px 0 0; font-size: 13px; color: #78350f; line-height: 1.35; }
.tk-opc { font-size: 13px; color: var(--ink-muted); font-weight: 600; }
.tk-erro { color: var(--late); font-size: 13.5px; font-weight: 600; min-height: 0; }
.tk-erro:empty { display: none; }
.tk-nudge { background: var(--brand-tint); border: 1px solid var(--brand); border-radius: 14px; padding: 12px; }
.tk-nudge p { margin: 4px 0 10px; font-size: 13.5px; }
.tk-nudge-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.tk-ok { text-align: center; padding: 30px 20px calc(24px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 8px; align-items: center; }
.tk-ok-ic { font-size: 48px; }
.tk-ok h3 { margin: 0; }
.tk-ok p { margin: 0 0 8px; color: var(--ink-muted); }
/* conversa */
.tk-det { display: flex; flex-direction: column; gap: 10px; }
.tk-det-topo { display: flex; align-items: center; gap: 10px; }
.tk-volta { font-size: 30px; line-height: 1; width: 36px; height: 40px; color: var(--brand); }
.tk-det-tit { display: flex; flex-direction: column; min-width: 0; }
.tk-det-tit b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-det-tit small { color: var(--ink-muted); font-size: 12px; }
.tk-det-status { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tk-link { color: var(--ok); font-weight: 700; font-size: 13px; padding: 6px 8px; }
.tk-chat { display: flex; flex-direction: column; gap: 8px; background: var(--surface-muted); border-radius: 16px; padding: 12px; max-height: 46vh; overflow-y: auto; }
.tk-dia { text-align: center; margin: 4px 0; }
.tk-dia span { font-size: 11.5px; background: rgba(0,0,0,.06); color: var(--ink-muted); padding: 2px 10px; border-radius: 99px; }
.tk-bolha { max-width: 86%; padding: 9px 12px; border-radius: 16px; display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; line-height: 1.4; }
.tk-bolha.meu { align-self: flex-end; background: linear-gradient(135deg, var(--brand), var(--brand-strong)); color: #fff; border-bottom-right-radius: 4px; }
.tk-bolha.suporte { align-self: flex-start; background: #fff; border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.tk-bolha.pede { border-color: #fde68a; background: #fffbeb; }
.tk-bolha time { font-size: 10.5px; opacity: .65; align-self: flex-end; }
.tk-quem { font-size: 11.5px; font-weight: 800; color: var(--brand-strong); }
.tk-txt { white-space: pre-wrap; word-break: break-word; }
.tk-sis { align-self: center; max-width: 92%; text-align: center; font-size: 13px; color: #78350f; background: #fffbeb; border: 1px solid #fde68a; border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; align-items: center; white-space: pre-wrap; }
.tk-midia { display: grid; gap: 4px; grid-template-columns: 1fr; }
.tk-midia.n2, .tk-midia.n3, .tk-midia.n4 { grid-template-columns: 1fr 1fr; }
.tk-midia-item { position: relative; border-radius: 12px; overflow: hidden; background: #111; aspect-ratio: 4/3; min-width: 120px; }
.tk-midia.n1 .tk-midia-item { aspect-ratio: auto; min-height: 120px; max-height: 280px; }
.tk-midia-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tk-midia.n1 .tk-midia-item img { object-fit: contain; max-height: 280px; }
.tk-midia-vazio { color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; min-height: 100px; font-size: 26px; }
.tk-midia-vazio small { font-size: 10px; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-midia-dur { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 6px; }
.tk-compor { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.tk-compor-linha { display: flex; align-items: flex-end; gap: 6px; padding: 8px; }
.tk-clipe { width: 40px; height: 40px; border-radius: 50%; font-size: 20px; background: var(--brand-tint); flex: none; }
.tk-compor-in { flex: 1; border: none; background: var(--surface-muted); border-radius: 18px; padding: 10px 14px; font: inherit; font-size: 15px; resize: none; max-height: 120px; color: var(--ink); }
.tk-env { width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 16px; flex: none; }
.tk-env:disabled { opacity: .5; }
.tk-compor .tk-erro { padding: 0 14px 8px; }
/* visualizador */
.tk-visor { position: fixed; inset: 0; z-index: 120; background: rgba(0,0,0,.94); display: flex; flex-direction: column; }
.tk-visor-topo { display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--safe-top)) 12px 10px; color: #fff; }
.tk-visor-nome { flex: 1; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-visor-nome small { opacity: .65; margin-left: 4px; }
.tk-visor-btn { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.15); color: #fff; display: grid; place-items: center; font-size: 18px; text-decoration: none; }
.tk-visor-palco { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; position: relative; }
.tk-visor-palco img, .tk-visor-palco video { max-width: 100%; max-height: 100%; object-fit: contain; }
.tk-visor-seta { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 60px; color: #fff; font-size: 40px; background: rgba(255,255,255,.1); border-radius: 12px; }
.tk-visor-seta.esq { left: 6px; } .tk-visor-seta.dir { right: 6px; }
.tk-visor-sem { color: #fff; text-align: center; font-size: 44px; }
.tk-visor-sem p { font-size: 15px; }
.tk-visor-pe { text-align: center; color: rgba(255,255,255,.6); font-size: 12px; padding: 8px 0 calc(10px + var(--safe-bottom)); }
.tk-visor-pe a { color: #c4b5fd; }
.btn-sm { padding: 8px 14px; min-height: 38px; font-size: 13.5px; }
