/* Painel Desk — Design Executivo Moderno (Zero Neon) · Desktop & Mobile */
:root {
  --bg: #eef1f6;
  --bg-grad-1: rgba(30, 58, 95, 0.06);
  --bg-grad-2: rgba(180, 132, 62, 0.05);
  --shell: rgba(255, 255, 255, 0.82);
  --surface: #ffffff;
  --surface-soft: #f5f7fb;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.16);
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #64748b;
  --brand: #183153;
  --brand-2: #264c7d;
  --brand-soft: #eaf0f8;
  --ok: #15803d;
  --ok-soft: #eaf7ef;
  --ok-border: #bfe5cd;
  --warn: #b45309;
  --warn-soft: #fef6e7;
  --warn-border: #f4d59a;
  --danger: #b91c1c;
  --danger-soft: #fef2f2;
  --danger-border: #fecaca;
  --hoje-bg: linear-gradient(145deg, #162338 0%, #1d2e47 55%, #18273d 100%);
  --hoje-surface: rgba(255, 255, 255, 0.06);
  --hoje-surface-hover: rgba(255, 255, 255, 0.10);
  --hoje-border: rgba(255, 255, 255, 0.11);
  --hoje-text: #f8fafc;
  --hoje-muted: #9fb1c8;
  --iury: #0284c7;
  --alex: #c28518;
  --leo: #7c3aed;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 30px -10px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-hoje: 0 20px 44px -18px rgba(15, 23, 42, 0.42);
}

.theme-dark {
  --bg: #0e1116;
  --bg-grad-1: rgba(59, 110, 165, 0.10);
  --bg-grad-2: rgba(180, 132, 62, 0.07);
  --shell: rgba(22, 27, 34, 0.88);
  --surface: #161b22;
  --surface-soft: #1d232d;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f1f5f9;
  --text-2: #cbd5e1;
  --text-3: #8b9bb0;
  --brand: #3b6ea5;
  --brand-2: #5288c2;
  --brand-soft: rgba(59, 110, 165, 0.18);
  --ok: #34d399;
  --ok-soft: rgba(16, 185, 129, 0.13);
  --ok-border: rgba(52, 211, 153, 0.28);
  --warn: #f5b942;
  --warn-soft: rgba(245, 185, 66, 0.12);
  --warn-border: rgba(245, 185, 66, 0.30);
  --danger: #f87171;
  --danger-soft: rgba(239, 68, 68, 0.14);
  --danger-border: rgba(248, 113, 113, 0.30);
  --hoje-bg: linear-gradient(145deg, #1b2433 0%, #151c27 60%, #1a212e 100%);
  --hoje-surface: rgba(255, 255, 255, 0.045);
  --hoje-surface-hover: rgba(255, 255, 255, 0.085);
  --hoje-border: rgba(216, 167, 82, 0.20);
  --hoje-text: #f8fafc;
  --hoje-muted: #94a3b8;
  --iury: #38bdf8;
  --alex: #e0a83a;
  --leo: #a78bfa;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 14px 36px -14px rgba(0, 0, 0, 0.55);
  --shadow-hoje: 0 22px 48px -18px rgba(0, 0, 0, 0.65);
}

[hidden] { display: none !important; }
* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px circle at 12% 0%, var(--bg-grad-1), transparent 55%),
    radial-gradient(800px circle at 92% 10%, var(--bg-grad-2), transparent 50%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s ease, color 0.2s ease;
}

/* ── Login ────────────────────────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  width: 100%;
  max-width: 860px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-md);
}
.login-side-brand {
  background: var(--hoje-bg);
  color: var(--hoje-text);
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}
.login-side-form {
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}
@media (max-width: 760px) {
  .login-card { grid-template-columns: 1fr; }
  .login-side-brand { padding: 26px; }
  .login-side-form { padding: 26px; }
}

/* ── Shell principal ──────────────────────────────────────────────────────── */
.app-shell {
  max-width: 1380px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.sidebar-dock {
  width: 264px;
  flex-shrink: 0;
  position: sticky;
  top: 20px;
  background: var(--shell);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
}
.main-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
@media (max-width: 980px) {
  .app-shell {
    flex-direction: column;
    padding: 14px 14px 86px;
    gap: 16px;
  }
  .sidebar-dock {
    width: 100%;
    position: static;
    padding: 14px;
    gap: 14px;
  }
  .sidebar-nav-desktop { display: none; }
}

/* Barra inferior mobile */
.mobile-nav {
  display: none;
}
@media (max-width: 980px) {
  .mobile-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 50;
    padding: 8px;
    border-radius: 18px;
    background: var(--shell);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-md);
  }
  .mobile-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 6px;
    border-radius: 12px;
    border: none;
    background: transparent;
    color: var(--text-2);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
  }
  .mobile-nav button.active {
    background: var(--brand);
    color: #fff;
  }
}

/* ── Componentes base ─────────────────────────────────────────────────────── */
.bento {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}
.bento-hoje {
  background: var(--hoje-bg);
  border: 1px solid var(--hoje-border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow-hoje);
  color: var(--hoje-text);
}
.meus-hero-banner {
  background: linear-gradient(135deg, #1e2948 0%, #2a3a66 55%, #23335c 100%);
  border: 1px solid rgba(129, 140, 248, 0.25);
  border-radius: 22px;
  padding: 20px 24px;
  color: #f8fafc;
  box-shadow: 0 18px 36px -18px rgba(30, 41, 72, 0.45);
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 13px;
  border-radius: 13px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: left;
  transition: all 0.16s ease;
}
.nav-btn:hover { background: var(--surface-soft); color: var(--text); }
.nav-btn.active {
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 8px 18px -8px rgba(24, 49, 83, 0.55);
}
.nav-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--surface-soft);
  color: var(--text-2);
}
.nav-btn.active .nav-badge {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: all 0.15s ease;
}
.btn:hover:not(:disabled) { background: var(--surface-soft); border-color: var(--border-strong); transform: translateY(-1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 10px; }
.btn-brand {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 20px -10px rgba(24, 49, 83, 0.65);
}
.btn-brand:hover:not(:disabled) { filter: brightness(1.07); background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.btn-ok { background: var(--ok); color: #fff; border-color: transparent; }
.btn-ok:hover:not(:disabled) { filter: brightness(1.07); background: var(--ok); }
.btn-warn { background: var(--warn); color: #fff; border-color: transparent; }
.btn-warn:hover:not(:disabled) { filter: brightness(1.07); background: var(--warn); }
.btn-ia {
  background: linear-gradient(135deg, #4f46e5, #6d28d9);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 8px 18px -10px rgba(79, 70, 229, 0.6);
}
.btn-ia:hover:not(:disabled) { filter: brightness(1.08); background: linear-gradient(135deg, #4f46e5, #6d28d9); }
.btn-hoje {
  background: rgba(255, 255, 255, 0.10);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.btn-hoje:hover:not(:disabled) { background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.28); }
.btn-hoje-gold {
  background: linear-gradient(135deg, #d8a752, #b9832c);
  color: #161108;
  border: none;
  font-weight: 700;
}
.btn-hoje-gold:hover:not(:disabled) { filter: brightness(1.06); background: linear-gradient(135deg, #e2b564, #c58d34); }
.btn-hoje-danger {
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.28);
}
.btn-hoje-danger:hover:not(:disabled) { background: rgba(239, 68, 68, 0.26); border-color: rgba(248, 113, 113, 0.5); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-2);
}

.input-ui {
  width: 100%;
  padding: 10px 13px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.input-ui:focus { border-color: var(--brand); background: var(--surface); }

.avatar-ring {
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 16px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}
.avatar-ring img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-ring.ativo { box-shadow: 0 0 0 2.5px var(--surface), 0 0 0 5px var(--ok); }

/* ── Palco animado do rodízio ─────────────────────────────────────────────── */
.rodizio-grid-3 { display: grid; grid-template-columns: 1.22fr auto 1fr auto 1fr; gap: 12px; align-items: stretch; }
.rodizio-grid-2 { display: grid; grid-template-columns: 1.15fr auto 1fr; gap: 12px; align-items: stretch; }
.rodizio-grid-1 { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (max-width: 780px) {
  .rodizio-grid-3, .rodizio-grid-2 { grid-template-columns: 1fr; }
  .flow-arrow { display: none !important; }
}
.rodizio-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: all 0.2s ease;
}
.rodizio-card.na-vez {
  border: 2px solid var(--ok);
  background: linear-gradient(155deg, var(--ok-soft) 0%, var(--surface) 64%);
  box-shadow: 0 18px 36px -18px rgba(21, 128, 61, 0.35);
  transform: translateY(-2px);
}
.rodizio-card.modo-solo {
  border: 2px solid #0ea5e9;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.16) 0%, rgba(16, 185, 129, 0.10) 48%, var(--surface) 100%);
  box-shadow: 0 22px 44px -18px rgba(14, 165, 233, 0.42);
  padding: 22px 26px;
}
.solo-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0284c7, #10b981);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 10px 20px -10px rgba(2, 132, 199, 0.7);
}
@keyframes bouncePointer { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes pulseBadge {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(21, 128, 61, 0.34); }
  50% { transform: scale(1.03); box-shadow: 0 0 0 8px rgba(21, 128, 61, 0); }
}
@keyframes floatArrow { 0%, 100% { transform: translateX(0); opacity: 0.45; } 50% { transform: translateX(4px); opacity: 0.95; } }
.vez-pointer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--ok);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  animation: pulseBadge 2s ease-in-out infinite;
}
.vez-hand { display: inline-block; animation: bouncePointer 1.1s ease-in-out infinite; font-size: 14px; }
.flow-arrow { display: flex; align-items: center; justify-content: center; color: var(--text-3); animation: floatArrow 1.8s ease-in-out infinite; }

.ausentes-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px dashed var(--border-strong);
  font-size: 12px;
  color: var(--text-3);
}
.ausente-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 5px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ausente-chip:hover { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }

/* ── Card condicional Ivanti Pendente ─────────────────────────────────────── */
.ivanti-alert-banner {
  background: linear-gradient(135deg, var(--warn-soft) 0%, var(--surface) 72%);
  border: 1.5px solid var(--warn-border);
  border-radius: 20px;
  padding: 16px 20px;
  box-shadow: 0 14px 30px -18px rgba(180, 83, 9, 0.32);
}

/* ── Placar Scoreboard + Timeline + Fila de Hoje ──────────────────────────── */
.scoreboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
@media (max-width: 760px) { .scoreboard-grid { grid-template-columns: 1fr; } }
.scoreboard-card {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  padding: 15px 16px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.scoreboard-card:hover { background: rgba(255, 255, 255, 0.095); transform: translateY(-2px); }
.scoreboard-card.na-vez {
  background: linear-gradient(155deg, rgba(16, 185, 129, 0.18) 0%, rgba(255, 255, 255, 0.06) 70%);
  border-color: rgba(52, 211, 153, 0.42);
}
.scoreboard-card.filtro-ativo { outline: 2px solid #e2b564; outline-offset: 1px; }
.score-num { font-size: 36px; font-weight: 800; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; color: #fff; }
.slot-dot { width: 9px; height: 9px; border-radius: 999px; display: inline-block; }

.corte-bar {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  padding: 14px 18px;
}
.timeline-track { position: relative; height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.10); }
.timeline-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #38bdf8 0%, #818cf8 55%, #e2b564 100%); transition: width 0.5s ease; }
.timeline-now-pin { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 16px; height: 16px; border-radius: 999px; background: #fff; border: 3px solid #e2b564; box-shadow: 0 0 0 4px rgba(226, 181, 100, 0.25); }
.timeline-cut-pin { position: absolute; top: -4px; bottom: -4px; width: 2px; background: #e2b564; border-radius: 2px; }

.hoje-head-cols, .hoje-item {
  display: grid;
  grid-template-columns: 38px 1.45fr 1fr 1.05fr 0.9fr 86px;
  align-items: center;
  gap: 12px;
}
.hoje-head-cols {
  padding: 4px 16px 2px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--hoje-muted);
}
.hoje-item {
  background: var(--hoje-surface);
  border: 1px solid var(--hoje-border);
  border-radius: 14px;
  padding: 11px 16px;
  transition: all 0.16s ease;
}
.hoje-item:hover { filter: brightness(1.09); transform: translateX(2px); }
.hoje-item.analista-iury {
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.24) 0%, rgba(2, 132, 199, 0.09) 46%, rgba(15, 23, 42, 0.15) 100%);
  border-color: rgba(56, 189, 248, 0.26);
}
.hoje-item.analista-leo {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.25) 0%, rgba(109, 40, 217, 0.09) 46%, rgba(15, 23, 42, 0.15) 100%);
  border-color: rgba(167, 139, 250, 0.28);
}
.hoje-item.analista-alex {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.24) 0%, rgba(5, 150, 105, 0.09) 46%, rgba(15, 23, 42, 0.15) 100%);
  border-color: rgba(52, 211, 153, 0.26);
}
.hoje-item.analista-ontem {
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.14) 0%, rgba(148, 163, 184, 0.04) 50%, rgba(15, 23, 42, 0.12) 100%);
}
@media (max-width: 760px) {
  .hoje-head-cols { display: none; }
  .hoje-item { grid-template-columns: 1fr auto; gap: 10px; }
}

.tag-etiqueta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 118px;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 4px 10px -4px rgba(0, 0, 0, 0.35);
}
.tag-sol { background: linear-gradient(135deg, rgba(217, 155, 42, 0.34), rgba(161, 98, 7, 0.24)); border: 1px solid rgba(245, 198, 102, 0.42); color: #fde68a; }
.tag-task { background: linear-gradient(135deg, rgba(14, 165, 233, 0.30), rgba(3, 105, 161, 0.24)); border: 1px solid rgba(125, 211, 252, 0.38); color: #bae6fd; }
.tag-inc { background: linear-gradient(135deg, rgba(239, 68, 68, 0.30), rgba(185, 28, 28, 0.24)); border: 1px solid rgba(252, 165, 165, 0.38); color: #fecaca; }

.hora-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 6px 11px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 2px 6px rgba(0, 0, 0, 0.22);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #ffffff;
}

/* ── Meus Chamados (Lista larga + Fluxo Guiado + Flags/Switches modernos) ── */
.status-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 13px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.16s ease;
}
.status-tab:hover { border-color: var(--border-strong); background: var(--surface-soft); }
.status-tab.active { background: var(--brand); color: #fff; border-color: transparent; box-shadow: 0 10px 22px -12px rgba(24, 49, 83, 0.65); }
.st-count { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; background: var(--surface-soft); color: var(--text-2); }
.status-tab.active .st-count { background: rgba(255, 255, 255, 0.22); color: #fff; }

.ticket-wide-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px 20px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.18s ease;
}
.ticket-wide-card:hover { border-color: var(--brand); box-shadow: var(--shadow-md); }

.theme-dark .btn-ok,
.theme-dark .vez-pointer {
  color: #052e16;
  font-weight: 800;
}
.theme-dark .btn-warn {
  color: #1c1004;
  font-weight: 800;
}
.rodizio-portrait {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  flex-shrink: 0;
  border: 2.5px solid var(--border-strong);
  box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.35);
}
.rodizio-portrait.na-vez {
  border-color: var(--ok);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.18), 0 16px 32px -12px rgba(16, 185, 129, 0.45);
}
.rodizio-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

/* ── Card vivo da Extensão + Turnos da Equipe na Sidebar ──────────────────── */
@keyframes extPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
  50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}
.ext-card {
  padding: 13px 14px;
  border-radius: 16px;
  background: var(--surface-soft);
  border: 1.5px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition: all 0.2s ease;
}
.ext-card.online {
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.16) 0%, rgba(14, 165, 233, 0.08) 100%);
  border-color: rgba(52, 211, 153, 0.45);
  box-shadow: 0 10px 24px -16px rgba(16, 185, 129, 0.55);
}
.ext-card.offline {
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.14) 0%, rgba(180, 83, 9, 0.06) 100%);
  border-color: rgba(245, 185, 66, 0.45);
}
.ext-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
  margin-right: 5px;
  background: var(--warn);
}
.ext-card.online .ext-dot {
  background: #10b981;
  animation: extPulse 2s ease-in-out infinite;
}
.ext-ivanti-pill {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.10);
  color: var(--text-2);
}
.ext-card.online .ext-ivanti-pill {
  background: rgba(16, 185, 129, 0.22);
  color: #10b981;
}
.theme-dark .ext-card.online .ext-ivanti-pill { color: #6ee7b7; }

.side-turnos-box {
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.side-turno-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
}
.side-turno-nome { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--text); }
.side-turno-dot { width: 7px; height: 7px; border-radius: 999px; flex-shrink: 0; }

/* ── Ticket Hero Gamificado + Relato Auto-Resize ──────────────────────────── */
.ticket-hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ticket-hero-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, #0284c7, #38bdf8);
}
.ticket-hero-card.tipo-sol::before { background: linear-gradient(90deg, #d97706, #fbbf24); }
.ticket-hero-card.tipo-inc::before { background: linear-gradient(90deg, #dc2626, #f87171); }
.ticket-hero-card.tipo-task { background: linear-gradient(145deg, rgba(14, 165, 233, 0.11) 0%, var(--surface) 52%); border-color: rgba(56, 189, 248, 0.30); }
.ticket-hero-card.tipo-sol { background: linear-gradient(145deg, rgba(245, 158, 11, 0.12) 0%, var(--surface) 52%); border-color: rgba(251, 191, 36, 0.32); }
.ticket-hero-card.tipo-inc { background: linear-gradient(145deg, rgba(239, 68, 68, 0.12) 0%, var(--surface) 52%); border-color: rgba(248, 113, 113, 0.32); }

.ticket-num-hero {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}
.ticket-num-hero:hover { opacity: 0.85; }
.ticket-chip-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--surface-soft);
  border: 1px solid var(--border-strong);
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s ease;
}
.ticket-chip-info:hover { border-color: var(--brand); color: var(--text); }

.mission-progress-bar {
  height: 7px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  overflow: hidden;
}
.mission-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease, background 0.3s ease;
  background: linear-gradient(90deg, #0284c7, #38bdf8);
}

.relato-card {
  border-radius: 16px;
  padding: 14px 16px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-left: 4px solid #0ea5e9;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.relato-textarea {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.6;
  resize: none;
  overflow: hidden;
  outline: none;
  padding: 0;
  min-height: 44px;
}

/* ── Stepper Colorido por Etapa (Contato · Espera · Encerramento · IA) ─────── */
.stepper-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 820px) { .stepper-grid { grid-template-columns: repeat(2, 1fr); } }
.stepper-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: left;
}
.stepper-pill:hover { transform: translateY(-2px); }
.stepper-num { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-size: 13px; font-weight: 900; flex-shrink: 0; }

/* Cores individuais por passo */
.stepper-pill[data-passo="contato"] { border-color: rgba(14, 165, 233, 0.30); background: linear-gradient(145deg, rgba(14, 165, 233, 0.10), var(--surface) 70%); }
.stepper-pill[data-passo="contato"] .stepper-num { background: rgba(14, 165, 233, 0.20); color: #0284c7; }
.theme-dark .stepper-pill[data-passo="contato"] .stepper-num { color: #38bdf8; }
.stepper-pill[data-passo="contato"].active { background: linear-gradient(135deg, #0284c7, #2563eb); color: #fff; border-color: transparent; box-shadow: 0 12px 24px -12px rgba(2, 132, 199, 0.8); }
.stepper-pill[data-passo="contato"].active .stepper-num { background: rgba(255,255,255,0.22); color: #fff; }

.stepper-pill[data-passo="espera"] { border-color: rgba(245, 158, 11, 0.32); background: linear-gradient(145deg, rgba(245, 158, 11, 0.10), var(--surface) 70%); }
.stepper-pill[data-passo="espera"] .stepper-num { background: rgba(245, 158, 11, 0.20); color: #b45309; }
.theme-dark .stepper-pill[data-passo="espera"] .stepper-num { color: #fbbf24; }
.stepper-pill[data-passo="espera"].active { background: linear-gradient(135deg, #d97706, #f59e0b); color: #fff; border-color: transparent; box-shadow: 0 12px 24px -12px rgba(217, 119, 6, 0.8); }
.stepper-pill[data-passo="espera"].active .stepper-num { background: rgba(255,255,255,0.22); color: #fff; }

.stepper-pill[data-passo="encerramento"] { border-color: rgba(16, 185, 129, 0.32); background: linear-gradient(145deg, rgba(16, 185, 129, 0.10), var(--surface) 70%); }
.stepper-pill[data-passo="encerramento"] .stepper-num { background: rgba(16, 185, 129, 0.20); color: #047857; }
.theme-dark .stepper-pill[data-passo="encerramento"] .stepper-num { color: #34d399; }
.stepper-pill[data-passo="encerramento"].active { background: linear-gradient(135deg, #059669, #10b981); color: #fff; border-color: transparent; box-shadow: 0 12px 24px -12px rgba(5, 150, 105, 0.8); }
.stepper-pill[data-passo="encerramento"].active .stepper-num { background: rgba(255,255,255,0.22); color: #fff; }

.stepper-pill[data-passo="ia"] { border-color: rgba(139, 92, 246, 0.34); background: linear-gradient(145deg, rgba(139, 92, 246, 0.12), var(--surface) 70%); }
.stepper-pill[data-passo="ia"] .stepper-num { background: rgba(139, 92, 246, 0.22); color: #6d28d9; }
.theme-dark .stepper-pill[data-passo="ia"] .stepper-num { color: #c4b5fd; }
.stepper-pill[data-passo="ia"].active { background: linear-gradient(135deg, #6d28d9, #8b5cf6); color: #fff; border-color: transparent; box-shadow: 0 12px 24px -12px rgba(109, 40, 217, 0.8); }
.stepper-pill[data-passo="ia"].active .stepper-num { background: rgba(255,255,255,0.22); color: #fff; }

/* Cartão de etapa com cor de topo correspondente */
.stage-card { border-top: 3px solid #0284c7; transition: border-color 0.2s ease; }
.stage-card.stage-contato { border-top-color: #0ea5e9; }
.stage-card.stage-espera { border-top-color: #f59e0b; }
.stage-card.stage-encerramento { border-top-color: #10b981; }
.stage-card.stage-ia { border-top-color: #8b5cf6; }
.stage-card.stage-fluxo { border-top-color: #f59e0b; }

/* Layout 2 colunas no Desktop para o Passo 1 (Contato) */
.contato-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 18px;
  align-items: start;
}
@media (max-width: 980px) { .contato-split { grid-template-columns: 1fr; } }

/* Flags / Switches modernos coloridos quando ativos */
.flags-grid { display: grid; grid-template-columns: 1fr; gap: 9px; }
.flag-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--surface-soft);
  cursor: pointer;
  user-select: none;
  transition: all 0.16s ease;
}
.flag-card:hover { border-color: rgba(14, 165, 233, 0.45); }
.flag-card.ativo {
  border-color: #0ea5e9;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.16), rgba(37, 99, 235, 0.08));
}
.flag-switch {
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: var(--border-strong);
  position: relative;
  flex-shrink: 0;
  transition: background 0.18s ease;
}
.flag-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.18s ease;
}
.flag-card.ativo .flag-switch { background: #0ea5e9; }
.flag-card.ativo .flag-switch::after { transform: translateX(18px); }

.preview-box {
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--surface-soft);
  border: 1.5px solid var(--border);
  border-left: 4px solid #0ea5e9;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text);
}
.stage-encerramento .preview-box { border-left-color: #10b981; }
.stage-fluxo .preview-box { border-left-color: #f59e0b; }
.preview-box blockquote {
  margin: 10px 0;
  padding: 10px 14px;
  border-left: 3px solid var(--brand);
  background: var(--surface);
  border-radius: 0 10px 10px 0;
  color: var(--text-2);
}
.preview-box code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 700;
  font-size: 12px;
}

/* ── Botão de Ditado por Voz (🎤 Falar) nos campos de texto ───────────────── */
@keyframes vozPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}
.voz-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}
.voz-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-soft);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.voz-btn:hover { border-color: var(--brand); color: var(--text); }
.voz-btn.ouvindo {
  background: rgba(239, 68, 68, 0.16);
  border-color: #ef4444;
  color: #ef4444;
  animation: vozPulse 1.4s ease-in-out infinite;
}

/* ── Overlay animado de tela cheia para ações no Ivanti (Executando → Verde OK) ── */
@keyframes acaoSpin { to { transform: rotate(360deg); } }
@keyframes acaoPop {
  0% { transform: scale(0.45); opacity: 0; }
  70% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.acao-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 15, 26, 0.72);
  backdrop-filter: blur(10px);
  transition: background 0.35s ease;
}
.acao-overlay.sucesso {
  background: linear-gradient(145deg, rgba(4, 120, 87, 0.96) 0%, rgba(16, 185, 129, 0.96) 100%);
  backdrop-filter: blur(12px);
}
.acao-overlay.erro {
  background: linear-gradient(145deg, rgba(153, 27, 27, 0.95) 0%, rgba(220, 38, 38, 0.94) 100%);
  backdrop-filter: blur(12px);
}
.acao-overlay.turno {
  background: linear-gradient(145deg, rgba(24, 49, 83, 0.96) 0%, rgba(14, 116, 144, 0.95) 55%, rgba(15, 23, 42, 0.96) 100%);
  backdrop-filter: blur(14px);
}
.score-bar-track {
  height: 7px;
  width: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  margin-top: 8px;
}
.score-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}
.acao-overlay-box {
  width: 100%;
  max-width: 420px;
  text-align: center;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.acao-spinner {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  border: 5px solid rgba(255, 255, 255, 0.18);
  border-top-color: #38bdf8;
  animation: acaoSpin 0.85s linear infinite;
}
.acao-badge-icon {
  width: 96px;
  height: 96px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.20);
  border: 3px solid rgba(255, 255, 255, 0.85);
  display: grid;
  place-items: center;
  font-size: 48px;
  font-weight: 900;
  color: #ffffff;
  animation: acaoPop 0.38s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  box-shadow: 0 20px 44px -14px rgba(0, 0, 0, 0.35);
}
.acao-titulo {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0;
  color: #ffffff;
}
.acao-sub {
  font-size: 14.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
  margin: 0;
}

/* ── Overlay de progresso da leitura (blur + % grande) ────────────────────── */
.leitura-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 15, 26, 0.62);
  backdrop-filter: blur(8px);
}
.leitura-modal-card {
  width: 100%;
  max-width: 340px;
  padding: 28px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
  box-shadow: var(--shadow-md);
}
.leitura-pct {
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--brand);
}

/* ── Modais ───────────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(10, 15, 26, 0.58);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-box {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.analyst-pick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.analyst-pick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
}
.analyst-pick-btn.selected {
  border-color: var(--brand);
  background: var(--brand-soft);
}

/* Toast */
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: all 0.2s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.ok { background: var(--ok); }
.toast.erro { background: var(--danger); }
@media (max-width: 980px) { .toast { bottom: 86px; left: 14px; right: 14px; text-align: center; } }

/* Utilitários rápidos */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 780px) { .grid-2 { grid-template-columns: 1fr; } }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.muted { color: var(--text-3); }
.text-xs { font-size: 12px; }
.text-sm { font-size: 13.5px; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.w-full { width: 100%; }
.text-center { text-align: center; }

/* Imagens do chamado (guardadas só no navegador pela extensão) */
.anexos-grade { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.anexo-thumb { width: 112px; height: 84px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border, #e2e8f0);
  background: var(--surface-2, #f1f5f9); cursor: zoom-in; padding: 0; display: flex; align-items: center; justify-content: center; }
.anexo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.anexo-thumb.sem-imagem { cursor: default; font-size: 11px; color: var(--text-2, #64748b); text-align: center; padding: 6px; }

/* Aviso de versão da extensão */
.versao-ext-banner { border-radius: 18px; padding: 14px 18px; margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12) 0%, var(--surface) 72%); border: 1.5px solid rgba(14, 165, 233, 0.35); }
.versao-ext-banner.desatualizada { background: linear-gradient(135deg, var(--warn-soft) 0%, var(--surface) 72%); border-color: var(--warn-border); }
