/* =====================================================================
 * LEGADO 360 — Design System (HTML5 / CSS3 / Vanilla JS)
 * Plataforma educacional + gamificação — Senac
 *
 * Azul = cor estrutural. Verde = moedas/ranking. Laranja = conquista/PIN.
 * Magenta = evidências/criativo. Superfícies com profundidade sutil,
 * cantos arredondados generosos, tipografia Inter.
 *
 * Tema: [data-theme="light"|"dark"] na tag <html> (default segue o SO).
 * ===================================================================== */

/* ---------------------------------------------------------------------
 * TOKENS — Light Mode (padrão em :root)
 * ------------------------------------------------------------------ */
:root {
  /* Cores funcionais */
  --color-primary: #2E5BFF;
  --color-primary-hover: #2547D6;
  --color-primary-soft: #E8EDFF;
  --color-secondary: #131C33;
  --color-secondary-soft: #EEF0F6;

  --color-success: #16A34A;
  --color-success-soft: #E4F7EA;
  --color-warning: #F59E0B;
  --color-warning-soft: #FEF3DC;
  --color-danger: #DC3545;
  --color-danger-soft: #FBE7E9;
  --color-pink: #E0227E;
  --color-pink-soft: #FCE4F1;
  --color-info: #2568B0;
  --color-info-soft: #E7F0FA;

  /* Fundos e superfícies */
  --bg-primary: #F3F5FB;
  --bg-secondary: #EBEEF8;
  --surface: #FFFFFF;
  --surface-2: #F7F8FC;
  --surface-hover: #F1F3FA;
  --sidebar-bg: #FFFFFF;

  /* Texto */
  --text-primary: #12172B;
  --text-secondary: #616B82;
  --text-muted: #9AA1B1;
  --text-on-primary: #FFFFFF;

  /* Bordas */
  --border: #E7EAF2;
  --border-strong: #D7DCE8;

  /* Raios */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 999px;

  /* Sombras */
  --shadow-sm: 0 1px 2px rgba(20, 29, 64, 0.05);
  --shadow-md: 0 10px 24px rgba(20, 29, 64, 0.07);
  --shadow-lg: 0 18px 40px rgba(20, 29, 64, 0.12);

  /* PINs (medalhas) */
  --pin-bronze: #B36A3C;
  --pin-prata: #8A93A6;
  --pin-ouro: #DB9A1F;
  --pin-mestre: #7A4FC2;
  --pin-embaixador: #2E5BFF;

  /* Tipografia e layout */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --sidebar-w: 250px;
  --sidebar-w-collapsed: 84px;
  --content-max: 1180px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------------------------------------------------------------------
 * TOKENS — Dark Mode
 * Hierarquia de superfícies em azul-marinho (não preto puro): bg → sidebar
 * → surface → surface-2 → hover, cada degrau mais claro. Destaques ficam
 * mais vibrantes para manter contraste.
 * ------------------------------------------------------------------ */
:root[data-theme="dark"] {
  --color-primary: #4C7CFF;
  --color-primary-hover: #6B92FF;
  --color-primary-soft: rgba(76, 124, 255, 0.18);
  --color-secondary-soft: #1B2540;

  --color-success: #34D399;
  --color-success-soft: rgba(52, 211, 153, 0.16);
  --color-warning: #FBBF24;
  --color-warning-soft: rgba(251, 191, 36, 0.16);
  --color-danger: #F0576A;
  --color-danger-soft: rgba(240, 87, 106, 0.16);
  --color-pink: #F0459A;
  --color-pink-soft: rgba(240, 69, 154, 0.16);
  --color-info: #4C9CE0;
  --color-info-soft: rgba(76, 156, 224, 0.16);

  --bg-primary: #0A1120;
  --bg-secondary: #0D1526;
  --surface: #131C30;
  --surface-2: #182238;
  --surface-hover: #1C2740;
  --sidebar-bg: #0D1526;

  --text-primary: #F3F5FA;
  --text-secondary: #9BA6C2;
  --text-muted: #6C7793;
  --text-on-primary: #FFFFFF;

  --border: #22304C;
  --border-strong: #2C3C5C;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 10px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 45px rgba(0, 0, 0, 0.45);

  --pin-bronze: #C98354;
  --pin-prata: #A6AFC2;
  --pin-ouro: #E8B93B;
}

/* Sem escolha explícita, segue a preferência do sistema operacional. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-primary: #4C7CFF;
    --color-primary-hover: #6B92FF;
    --color-primary-soft: rgba(76, 124, 255, 0.18);
    --color-secondary-soft: #1B2540;

    --color-success: #34D399;
    --color-success-soft: rgba(52, 211, 153, 0.16);
    --color-warning: #FBBF24;
    --color-warning-soft: rgba(251, 191, 36, 0.16);
    --color-danger: #F0576A;
    --color-danger-soft: rgba(240, 87, 106, 0.16);
    --color-pink: #F0459A;
    --color-pink-soft: rgba(240, 69, 154, 0.16);
    --color-info: #4C9CE0;
    --color-info-soft: rgba(76, 156, 224, 0.16);

    --bg-primary: #0A1120;
    --bg-secondary: #0D1526;
    --surface: #131C30;
    --surface-2: #182238;
    --surface-hover: #1C2740;
    --sidebar-bg: #0D1526;

    --text-primary: #F3F5FA;
    --text-secondary: #9BA6C2;
    --text-muted: #6C7793;
    --text-on-primary: #FFFFFF;

    --border: #22304C;
    --border-strong: #2C3C5C;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 10px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 20px 45px rgba(0, 0, 0, 0.45);

    --pin-bronze: #C98354;
    --pin-prata: #A6AFC2;
    --pin-ouro: #E8B93B;
  }
}

/* ---------------------------------------------------------------------
 * RESET
 * ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
  /* Notch / Dynamic Island — requer viewport-fit=cover no <meta viewport> */
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0 0 0.5rem; color: var(--text-primary); font-weight: 700; letter-spacing: -0.01em; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--color-primary-soft); color: var(--color-primary); }
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* ---------------------------------------------------------------------
 * SHELL — sidebar + main
 * ------------------------------------------------------------------ */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
  transition: width 0.22s var(--ease), transform 0.22s var(--ease);
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.6rem 1.75rem;
}
.sidebar__brand-mark {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  /*background: linear-gradient(135deg, var(--color-primary), var(--color-success));*/
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.sidebar__brand-text { min-width: 0; overflow: hidden; }
.sidebar__logo {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.sidebar__logo strong { color: var(--color-primary); }
.sidebar__subtitle {
  display: block;
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-top: 0.15rem;
  white-space: nowrap;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar__sep { height: 1px; background: var(--border); margin: 0.6rem 0.4rem; border: 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.68rem 0.8rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.89rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.nav-item svg { flex: 0 0 auto; }
.nav-item span { white-space: normal; line-height: 1.2; }
.nav-item:hover { background: var(--surface-hover); color: var(--text-primary); }
.nav-item--active { background: var(--color-primary); color: var(--text-on-primary); box-shadow: var(--shadow-sm); }
.nav-item--active:hover { background: var(--color-primary); color: var(--text-on-primary); }

.sidebar__footer { border-top: 1px solid var(--border); padding-top: 0.85rem; margin-top: 0.85rem; }
.sidebar__profile {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.4rem 0.6rem 0.7rem;
}
.sidebar__profile-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar__profile-role {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-item--logout { color: var(--color-danger); }
.nav-item--logout:hover { background: var(--color-danger-soft); color: var(--color-danger); }

.avatar {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), #6B8CFF);
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
}
.avatar--sm { width: 32px; height: 32px; font-size: 0.72rem; }

/* Main */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: calc(0.95rem + env(safe-area-inset-top)) 1.75rem 0.95rem;
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--bg-primary) 82%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
}
.topbar__start { display: flex; align-items: center; gap: 0.75rem; }
.topbar__title { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }
.topbar__actions { display: flex; align-items: center; gap: 0.5rem; }

.topbar__user {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.3rem 0.85rem 0.3rem 0.3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface);
  cursor: pointer;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.topbar__user:hover { background: var(--surface-hover); }
.topbar__user-info { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.topbar__user-name { font-size: 0.82rem; font-weight: 700; color: var(--text-primary); white-space: nowrap; }
.topbar__user-role { font-size: 0.72rem; color: var(--text-secondary); white-space: nowrap; }

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease), transform 0.1s var(--ease);
}
.icon-btn:hover { background: var(--surface-hover); color: var(--text-primary); }
.icon-btn:active { transform: scale(0.93); }
.icon-btn__dot {
  position: absolute; top: 8px; right: 9px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-pink); border: 2px solid var(--surface);
}
/* Ícone de tema: mostra lua no claro, sol no escuro */
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: inline-flex; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-moon { display: none; }
  :root:not([data-theme="light"]) .icon-sun { display: inline-flex; }
}

.menu-btn {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.menu-btn:hover { background: var(--surface-hover); color: var(--text-primary); }
.menu-btn--mobile { display: none; }

.content {
  padding: 0.5rem 1.75rem 2.5rem;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
}

.drawer-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(6, 11, 24, 0.55);
  z-index: 39;
}

/* Sidebar colapsada (desktop) */
.shell--collapsed .sidebar { width: var(--sidebar-w-collapsed); flex-basis: var(--sidebar-w-collapsed); }
.shell--collapsed .sidebar__brand-text,
.shell--collapsed .sidebar__profile-info,
.shell--collapsed .nav-item span { display: none; }
.shell--collapsed .nav-item,
.shell--collapsed .sidebar__profile { justify-content: center; }
.shell--collapsed .sidebar__brand { justify-content: center; padding-left: 0; padding-right: 0; }
.shell--collapsed .sidebar__profile { padding-left: 0; padding-right: 0; }

/* ---------------------------------------------------------------------
 * PAGE HEADER (título grande + subtítulo dentro do conteúdo)
 * ------------------------------------------------------------------ */
.page-head { margin: 0.75rem 0 1.5rem; }
.page-head h1 { font-size: 1.6rem; margin-bottom: 0.3rem; }
.page-head p { color: var(--text-secondary); margin: 0; }
.wave { display: inline-block; transform-origin: 70% 70%; animation: wave 2.2s ease-in-out 1; }
@keyframes wave {
  0%,60%,100% { transform: rotate(0); }
  10%,30% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  40% { transform: rotate(-4deg); }
}

/* ---------------------------------------------------------------------
 * CARDS / GRID
 * ------------------------------------------------------------------ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
  /* Itens de grid/flex têm min-width:auto por padrão — isso impede o card
     de encolher abaixo da largura intrínseca do que está dentro dele
     (ex.: uma tabela larga). Sem isso, .table-wrap { overflow-x:auto }
     nunca chega a agir: quem estoura primeiro é o .card inteiro, e a
     página inteira ganha scroll horizontal. Foi o que quebrava o
     Passaporte da Excelência no mobile (tabela de Extrato de XS/ML). */
  min-width: 0;
}
.card__title { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.card__title svg { color: var(--color-primary); }
.card__link { margin-left: auto; font-size: 0.82rem; font-weight: 600; color: var(--color-primary); display: inline-flex; align-items: center; gap: 0.3rem; }

.grid { display: grid; gap: 1.15rem; }
.grid--stats { grid-template-columns: repeat(4, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--main { grid-template-columns: 1fr 340px; align-items: start; }

@media (max-width: 1080px) { .grid--stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 960px)  { .grid--main { grid-template-columns: 1fr; } }
@media (max-width: 720px)  { .grid--3 { grid-template-columns: 1fr; } }
/* No mobile os stats permanecem em 2 colunas (2 por linha). */

/* ---------------------------------------------------------------------
 * HERO / BANNER
 * ------------------------------------------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--surface, #131C30);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 16px);
  padding: 2.25rem 2.25rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}
:root[data-theme="dark"] .hero { background: #131C30; border: 1px solid rgba(255, 255, 255, 0.08); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero { background: #131C30; border: 1px solid rgba(255, 255, 255, 0.08); }
}
.hero__body { flex: 1 1 380px; min-width: 0; position: relative; z-index: 2; }
.hero__badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px;
  background: #2563EB; color: #fff;
  margin-bottom: 1.25rem; box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}
.hero__title { font-size: 1.6rem; font-weight: 800; line-height: 1.2; margin-bottom: 0.75rem; color: var(--text-primary, #FFFFFF); }
.hero__text { color: var(--text-secondary, #94A3B8); max-width: 48ch; margin: 0 0 1.5rem; line-height: 1.55; font-size: 0.9rem; }

.hero__art {
  flex: 0 0 auto;
  position: relative;
  bottom: -36px;
  left: -30px;
  width: 380px;
  align-self: stretch;
}
.hero__art img {
  position: absolute;
  filter: drop-shadow(0 12px 18px rgba(20, 29, 64, 0.18));
}
.hero__art img:nth-child(1) { left: 4%;  z-index: 2; }
.hero__art img:nth-child(2) { left: 22%; z-index: 4; bottom: 6px; }
.hero__art img:nth-child(3) { left: 44%; z-index: 3; }
.hero__art img:nth-child(4) { left: 64%; z-index: 2; bottom: 2px; }
.hero__art img:nth-child(5) { left: 82%; z-index: 1; }
/* Confete decorativo */
.hero__confetti { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero__confetti span {
  position: absolute; width: 9px; height: 9px; border-radius: 2px; opacity: 0.85;
}

@media (max-width: 860px) {
  .hero { flex-direction: column; align-items: stretch; padding: 1.5rem 1.5rem 0; }
  /* Em coluna, flex-basis vira altura — sem isso o body herdava 380px de
     altura mínima (o valor pensado para a largura no layout em linha) e
     sobrava um vão vazio entre o botão e a ilustração. */
  .hero__body { flex: 0 0 auto; padding-bottom: 1.25rem; }
  /* No mobile as ilustrações viram uma faixa flex que escala com a largura,
     ancorada na base do hero — sem posicionamento absoluto (que cortava). */
  .hero__art {
    position: relative;
    width: 100%;
    height: auto;
    display: flex;
    align-items: flex-end;
    justify-content: center;
  }
  .hero__art img {
    position: static;
    left: auto;
    bottom: auto;
    width: auto;
    height: clamp(88px, 23vw, 124px);
  }
  .hero__art img + img { margin-left: -6px; }
  /* Confete escondido no mobile para não pontilhar o espaço vazio. */
  .hero__confetti { display: none; }
}

/* ---------------------------------------------------------------------
 * STAT CARDS (XP / Moedas / PIN / Evidências)
 * ------------------------------------------------------------------ */
.stat {
  position: relative;
  overflow: hidden;
  background: var(--surface, #131C30);
  border: 1px solid var(--c-border, var(--c, var(--border)));
  border-radius: var(--radius-lg, 16px);
  padding: 1.35rem 1.4rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease), border-color 0.16s var(--ease);
}
.stat:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  border-color: var(--c);
}
.stat__icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-soft, rgba(59, 130, 246, 0.2)); color: var(--c, #3B82F6);
  margin-bottom: 0.85rem;
}
.stat__value {
  font-size: 1.85rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; color: var(--text-primary, #FFFFFF);
}
.stat__label {
  font-size: 0.82rem; color: var(--text-secondary, #94A3B8); margin-top: 0.35rem; font-weight: 500;
}
/* Marca d'água do ícone ao fundo */
.stat__ghost {
  position: absolute; right: 14px; bottom: 8px;
  color: var(--c, #3B82F6);
  opacity: 0.14;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat__ghost svg {
  width: 64px; height: 64px;
}

.stat--xp  { --c: #3B82F6; --c-border: rgba(59, 130, 246, 0.45); --c-soft: rgba(59, 130, 246, 0.2); }
.stat--ml  { --c: #10B981; --c-border: rgba(16, 185, 129, 0.45); --c-soft: rgba(16, 185, 129, 0.2); }
.stat--pin { --c: #F59E0B; --c-border: rgba(245, 158, 11, 0.45); --c-soft: rgba(245, 158, 11, 0.2); }
.stat--ev  { --c: #8B5CF6; --c-border: rgba(139, 92, 246, 0.45); --c-soft: rgba(139, 92, 246, 0.2); }

/* ---------------------------------------------------------------------
 * SEÇÃO / ACESSO RÁPIDO
 * ------------------------------------------------------------------ */
.section-title { font-size: 1.05rem; font-weight: 700; margin: 2rem 0 0.85rem; color: var(--text-primary, #FFFFFF); }

.quick {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface, #131C30);
  border: 1px solid var(--c-border, var(--c, var(--border)));
  border-radius: var(--radius-lg, 16px);
  padding: 1.1rem 1.25rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease), border-color 0.16s var(--ease);
}
.quick:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  border-color: var(--c);
}
.quick__art {
  flex: 0 0 auto;
  width: 48px; height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--c-dark, #0B132B);
  border: 1px solid var(--c-border, rgba(255, 255, 255, 0.1));
  display: flex; align-items: center; justify-content: center;
}
.quick__art img { width: 32px; height: 32px; object-fit: contain; }
.quick__body { flex: 1; min-width: 0; }
.quick__title { display: block; font-weight: 700; font-size: 0.95rem; margin-bottom: 0.2rem; color: var(--text-primary, #FFFFFF); }
.quick__desc { display: block; font-size: 0.78rem; color: var(--text-secondary, #94A3B8); line-height: 1.4; }
.quick__arrow {
  flex: 0 0 auto;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--c, #2563EB); color: #fff;
  transition: transform 0.15s var(--ease);
}
.quick:hover .quick__arrow { transform: translateX(3px); }
.quick--blue   { --c: #2563EB; --c-border: rgba(37, 99, 235, 0.45); --c-dark: #0B132B; --c-soft: rgba(37, 99, 235, 0.2); }
.quick--orange { --c: #F59E0B; --c-border: rgba(245, 158, 11, 0.45); --c-dark: #1E1708; --c-soft: rgba(245, 158, 11, 0.2); }
.quick--pink   { --c: #EC4899; --c-border: rgba(236, 72, 153, 0.45); --c-dark: #210B19; --c-soft: rgba(236, 72, 153, 0.2); }
.quick--green  { --c: #10B981; --c-border: rgba(16, 185, 129, 0.45); --c-dark: #081C14; --c-soft: rgba(16, 185, 129, 0.2); }

/* ---------------------------------------------------------------------
 * ATIVIDADE RECENTE
 * ------------------------------------------------------------------ */
.activity { display: flex; flex-direction: column; }
.activity__item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 0.6rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color 0.15s var(--ease);
}
.activity__item:hover { background: var(--surface-hover); }
.activity__item + .activity__item { border-top: 1px solid var(--border); }
.activity__icon {
  flex: 0 0 auto;
  width: 38px; height: 38px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-soft, var(--color-success-soft)); color: var(--c, var(--color-success));
}
.activity__body { flex: 1; min-width: 0; }
.activity__title { display: block; font-size: 0.9rem; font-weight: 600; line-height: 1.35; }
.activity__time { display: block; font-size: 0.76rem; color: var(--text-muted); margin-top: 0.15rem; }
.activity__chevron { flex: 0 0 auto; color: var(--text-muted); }
.activity--green  { --c: var(--color-success); --c-soft: var(--color-success-soft); }
.activity--blue   { --c: var(--color-primary); --c-soft: var(--color-primary-soft); }
.activity--orange { --c: var(--color-warning); --c-soft: var(--color-warning-soft); }
.activity--pink   { --c: var(--color-pink);    --c-soft: var(--color-pink-soft); }

/* ---------------------------------------------------------------------
 * RANKING
 * ------------------------------------------------------------------ */
.rank { display: flex; flex-direction: column; gap: 0.4rem; }
.rank__row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.8rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color 0.15s var(--ease);
}
.rank__row:hover { background: var(--surface-hover); }
.rank__row--1 { background: linear-gradient(90deg, var(--color-warning-soft), transparent); }
.rank__row--2 { background: linear-gradient(90deg, var(--color-secondary-soft), transparent); }
.rank__row--3 { background: linear-gradient(90deg, rgba(215,154,102,0.16), transparent); }
.rank__pos {
  flex: 0 0 auto;
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 800;
  background: var(--color-secondary-soft); color: var(--text-secondary);
}
.rank__row--1 .rank__pos { background: #D97706; color: #FFFFFF; }
.rank__row--2 .rank__pos { background: #64748B; color: #FFFFFF; }
.rank__row--3 .rank__pos { background: #B45309; color: #FFFFFF; }
.rank__body { flex: 1; min-width: 0; }
.rank__name { display: block; font-size: 0.9rem; font-weight: 700; line-height: 1.25; color: var(--text-primary, #FFFFFF); }
.rank__unit { display: block; font-size: 0.76rem; color: var(--text-muted, #64748B); margin-top: 0.1rem; }
.rank__value { flex: 0 0 auto; text-align: right; font-weight: 800; color: #3B82F6; white-space: nowrap; font-size: 1.05rem; }
.rank__value small { display: inline; font-weight: 600; color: #64748B; font-size: 0.75rem; margin-left: 0.25rem; }
.rank__footer { margin-top: 1rem; }

/* ---------------------------------------------------------------------
 * BADGES / PROGRESSO / BOTÕES (utilitários do sistema)
 * ------------------------------------------------------------------ */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.22rem 0.65rem; border-radius: var(--radius-full);
  font-size: 0.72rem; font-weight: 700; white-space: nowrap;
}
.badge--success { background: var(--color-success-soft); color: var(--color-success); }
.badge--warning { background: var(--color-warning-soft); color: var(--color-warning); }
.badge--danger  { background: var(--color-danger-soft);  color: var(--color-danger); }
.badge--info    { background: var(--color-info-soft);    color: var(--color-info); }
.badge--neutral { background: var(--color-secondary-soft); color: var(--text-secondary); }

.btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 0.7rem 1.3rem; font-size: 0.9rem; font-weight: 600; cursor: pointer;
  background: var(--surface); color: var(--text-primary);
  transition: background-color 0.15s var(--ease), transform 0.1s var(--ease), box-shadow 0.15s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--color-primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--color-primary-hover); box-shadow: var(--shadow-md); }
.btn--ghost { border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--surface-hover); }
.btn--danger { color: var(--color-danger); border-color: var(--color-danger-soft); }
.btn--danger:hover { background: var(--color-danger-soft); }
.btn--sm { padding: 0.42rem 0.85rem; font-size: 0.8rem; }
.btn--block { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.l360-oculto { display: none !important; }

/* ---------------------------------------------------------------------
 * GRIDS extra (páginas internas)
 * ------------------------------------------------------------------ */
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--panel { grid-template-columns: 360px 1fr; align-items: start; }
.grid--list-panel { grid-template-columns: 1fr 380px; align-items: start; }

/* ---------------------------------------------------------------------
 * TABELA
 * ------------------------------------------------------------------ */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.87rem; }
.table th {
  text-align: left; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-muted); padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td { padding: 0.85rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--surface-hover); }
.table tr.is-me td { background: var(--color-primary-soft); }

/* ---------------------------------------------------------------------
 * FORMULÁRIOS
 * ------------------------------------------------------------------ */
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem; }
.field__help { font-size: 0.78rem; color: var(--text-secondary); margin-top: 0.35rem; }
.field__error { font-size: 0.8rem; color: var(--color-danger); margin-top: 0.4rem; font-weight: 600; }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem; font-size: 0.9rem; font-family: inherit;
  background: var(--surface); color: var(--text-primary);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-soft);
}
.textarea { resize: vertical; min-height: 110px; }
.checkbox-row { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.85rem; line-height: 1.4; }
.checkbox-row input { margin-top: 0.2rem; }

/* ---------------------------------------------------------------------
 * ABAS (tabs)
 * ------------------------------------------------------------------ */
.tabs { display: inline-flex; gap: 0.3rem; padding: 0.3rem; background: var(--surface-2); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.tab {
  border: none; background: transparent; padding: 0.5rem 1rem; border-radius: 7px;
  font-size: 0.84rem; font-weight: 600; color: var(--text-secondary); cursor: pointer;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.tab:hover { color: var(--text-primary); }
.tab.is-active { background: var(--surface); color: var(--color-primary); box-shadow: var(--shadow-sm); }

/* ---------------------------------------------------------------------
 * FILTROS / chips de busca
 * ------------------------------------------------------------------ */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.filters .input, .filters .select { width: auto; min-width: 170px; }
.chip {
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.42rem 0.9rem;
  border-radius: var(--radius-full); border: 1px solid var(--border); background: var(--surface);
  font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); cursor: pointer;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.chip:hover { background: var(--surface-hover); }
.chip.is-active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* ---------------------------------------------------------------------
 * PAGINAÇÃO
 * ------------------------------------------------------------------ */
.pagination { display: flex; align-items: center; justify-content: space-between; margin-top: 1.1rem; }
.pagination__info { font-size: 0.82rem; color: var(--text-secondary); }

/* ---------------------------------------------------------------------
 * PIN (medalhão)
 * ------------------------------------------------------------------ */
.pin {
  width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 0.72rem; flex: 0 0 auto; box-shadow: var(--shadow-sm);
}
.pin--iniciante { background: var(--text-muted); }
.pin--bronze { background: #B36A3C; }
.pin--prata { background: #8A93A6; }
.pin--ouro { background: #DB9A1F; }
.pin--mestre { background: #7A4FC2; }
.pin--embaixador { background: var(--color-primary); }
.pin--lg { width: 64px; height: 64px; font-size: 0.85rem; }
.pin--sm { width: 30px; height: 30px; font-size: 0.55rem; }
/* PIN anterior: já conquistado, mas sem chamar atenção — opacidade reduzida. */
.pin--muted { opacity: 0.5; box-shadow: none; }
/* Próximo PIN: ainda não conquistado — contorno tracejado em vez de preenchido,
   pra não parecer uma conquista já obtida (evita falso positivo visual). */
.pin--outline {
  background: transparent !important; color: var(--text-secondary);
  border: 2px dashed var(--border-strong); box-shadow: none;
}
.pin-track { display: flex; align-items: center; justify-content: center; gap: 0.6rem; margin: 0 auto; }
.pin-track__step { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; }
.pin-track__label { font-size: 0.62rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.pin-track__arrow { color: var(--border-strong); flex: 0 0 auto; }

/* ---------------------------------------------------------------------
 * PROGRESSO
 * ------------------------------------------------------------------ */
.progress { height: 9px; background: var(--color-secondary-soft); border-radius: var(--radius-full); overflow: hidden; }
.progress__bar { height: 100%; background: var(--color-primary); border-radius: var(--radius-full); transition: width 0.5s var(--ease); }

/* ---------------------------------------------------------------------
 * ESTADOS (carregando / vazio / erro)
 * ------------------------------------------------------------------ */
.state { text-align: center; padding: 3rem 1.5rem; color: var(--text-secondary); }
.state__icon { font-size: 2rem; margin-bottom: 0.75rem; }
.state__title { font-weight: 700; color: var(--text-primary); margin-bottom: 0.35rem; }
.spinner {
  width: 30px; height: 30px; border: 3px solid var(--border); border-top-color: var(--color-primary);
  border-radius: 50%; animation: spin 0.7s linear infinite; margin: 0 auto 0.85rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------------
 * GALERIA — cards de evidência (Observatório)
 * ------------------------------------------------------------------ */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.15rem; }
.obs-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
  display: flex; flex-direction: column;
}
.obs-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.obs-card__media {
  height: 148px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.6rem;
  background: var(--c-soft, var(--color-primary-soft));
}
.obs-card__media img { height: 66%; width: auto; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(20, 29, 64, 0.15)); }
/* Legenda dentro da própria área do ícone (grupo ícone+nome, como no
   design original) — mas como HTML real, não texto desenhado dentro da
   imagem, então herda --text-primary e fica escura no tema claro e
   clara no tema escuro automaticamente, em vez de sumir num dos dois. */
.obs-card__media-label {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  color: var(--text-primary); text-align: center; line-height: 1.25; max-width: 92%;
}
.obs-card__body { padding: 1.1rem 1.15rem 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.obs-card__title { font-weight: 700; font-size: 0.95rem; line-height: 1.3; }
.obs-card__meta { font-size: 0.78rem; color: var(--text-secondary); }
.obs-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 0.5rem; }
.obs-card--saude    { --c-soft: var(--color-success-soft); }
.obs-card--cabeleireiro { --c-soft: var(--color-pink-soft); }
.obs-card--web_mobile   { --c-soft: var(--color-primary-soft); }

/* ---------------------------------------------------------------------
 * Chip de categoria/modalidade ilustrado
 * ------------------------------------------------------------------ */
.category-chip {
  display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.2rem 0.65rem 0.2rem 0.2rem;
  border-radius: var(--radius-full); background: var(--surface-2); border: 1px solid var(--border);
  font-size: 0.76rem; font-weight: 600; color: var(--text-secondary);
}
.category-chip img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }

/* ---------------------------------------------------------------------
 * UPLOAD (dropzone)
 * ------------------------------------------------------------------ */
.dropzone {
  border: 2px dashed var(--border-strong); border-radius: var(--radius-md); padding: 1.75rem;
  text-align: center; color: var(--text-secondary); cursor: pointer; transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}
.dropzone:hover, .dropzone.is-drag { border-color: var(--color-primary); background: var(--color-primary-soft); }
.dropzone input[type="file"] { display: none; }
.dropzone svg { color: var(--color-primary); margin-bottom: 0.5rem; }
.file-list { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1rem; }
.file-row {
  display: flex; align-items: center; gap: 0.65rem; padding: 0.55rem 0.75rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.83rem;
}
.file-row__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row__remove { color: var(--color-danger); cursor: pointer; background: none; border: none; padding: 0.2rem; }

/* ---------------------------------------------------------------------
 * CENA RV (visor de módulo imersivo)
 * ------------------------------------------------------------------ */
.rv-cena {
  position: relative; height: 340px; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
}
.rv-hotspot {
  position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border: none; border-radius: 50%; background: rgba(255,255,255,0.35);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  backdrop-filter: blur(2px); transition: transform 0.15s var(--ease);
}
.rv-hotspot span { width: 12px; height: 12px; border-radius: 50%; background: var(--color-primary); box-shadow: 0 0 0 4px rgba(46,91,255,0.25); }
.rv-hotspot:hover { transform: scale(1.15); }
.rv-hotspot.is-active span { background: var(--color-danger); box-shadow: 0 0 0 5px rgba(220,53,69,0.3); }

/* ---------------------------------------------------------------------
 * WIZARD (passos)
 * ------------------------------------------------------------------ */
.steps { display: flex; align-items: center; gap: 0.5rem; margin: 1rem 0 1.5rem; flex-wrap: wrap; }
.step {
  display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; font-weight: 600; color: var(--text-muted);
}
.step__circle {
  width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--border); font-size: 0.76rem; font-weight: 700;
}
.step.is-active { color: var(--text-primary); }
.step.is-active .step__circle { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.step.is-done .step__circle { background: var(--color-success); border-color: var(--color-success); color: #fff; }
.step__sep { width: 22px; height: 1px; background: var(--border); }

/* ---------------------------------------------------------------------
 * BARRAS SIMPLES (indicadores) — sem lib de gráfico
 * ------------------------------------------------------------------ */
.barlist { display: flex; flex-direction: column; gap: 0.75rem; }
.barlist__row { display: grid; grid-template-columns: 120px 1fr 48px; align-items: center; gap: 0.75rem; font-size: 0.83rem; }
.barlist__label { color: var(--text-secondary); }
.barlist__track { height: 10px; border-radius: var(--radius-full); background: var(--color-secondary-soft); overflow: hidden; }
.barlist__fill { height: 100%; border-radius: var(--radius-full); background: var(--color-primary); }
.barlist__value { text-align: right; font-weight: 700; }

/* ---------------------------------------------------------------------
 * Painel dividido (Fila de Validação / Auditoria)
 * ------------------------------------------------------------------ */
.queue-row {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem 0.75rem; border-radius: var(--radius-sm);
  cursor: pointer; border: 1px solid transparent; transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.queue-row:hover { background: var(--surface-hover); }
.queue-row.is-selected { background: var(--color-primary-soft); border-color: var(--color-primary); }
.queue-row + .queue-row { border-top: 1px solid var(--border); border-radius: 0; }
.queue-row.is-selected + .queue-row, .queue-row.is-selected { border-radius: var(--radius-sm); border-top: none; }
.queue-row__body { flex: 1; min-width: 0; }
.queue-row__title { font-weight: 700; font-size: 0.88rem; }
.queue-row__meta { font-size: 0.76rem; color: var(--text-muted); margin-top: 0.15rem; }

/* ---------------------------------------------------------------------
 * RESPONSIVO — sidebar vira drawer
 * ------------------------------------------------------------------ */
@media (max-width: 992px) {
  .menu-btn--desktop { display: none; }
  .menu-btn--mobile { display: inline-flex; }

  .sidebar {
    position: fixed; left: 0; top: 0; height: 100vh;
    width: 270px; flex-basis: 270px;
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }
  .shell--menu-open .sidebar { transform: translateX(0); }
  .shell--menu-open .drawer-backdrop { display: block; }
  /* No mobile o colapso não se aplica */
  .shell--collapsed .sidebar { width: 270px; flex-basis: 270px; }
  .shell--collapsed .sidebar__brand-text,
  .shell--collapsed .nav-item span,
  .shell--collapsed .sidebar__profile-info { display: initial; }
  .shell--collapsed .nav-item,
  .shell--collapsed .sidebar__profile { justify-content: flex-start; }
  .shell--collapsed .sidebar__brand { justify-content: flex-start; padding-left: 0.6rem; }

  .topbar { padding: 0.85rem 1.15rem; }
  .content { padding: 0.5rem 1.15rem 2rem; }

  .grid--panel, .grid--list-panel, .grid--2 { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .barlist__row { grid-template-columns: 92px 1fr 40px; gap: 0.5rem; }
}

@media (max-width: 560px) {
  .topbar { padding: 0.75rem 0.9rem; }
  .topbar__title { font-size: 0.98rem; }
  .content { padding: 0.5rem 0.9rem 1.75rem; }
  .page-head h1 { font-size: 1.35rem; }
  .hero__title { font-size: 1.3rem; }
  .gallery { grid-template-columns: 1fr; }
  .filters { flex-direction: column; align-items: stretch; }
  .filters .input, .filters .select { width: 100%; min-width: 0; }
  .steps { gap: 0.35rem; }
  .step span.step__label { display: none; }
  .pagination { flex-direction: column; gap: 0.75rem; align-items: stretch; text-align: center; }
  .topbar__user { padding: 0; border: none; background: none; }
  .topbar__user-info { display: none; }
}

/* ---------------------------------------------------------------------
 * ANIMAÇÕES DE ENTRADA
 * ------------------------------------------------------------------ */
/* ---------------------------------------------------------------------
 * ALTO CONTRASTE
 * Portado de assets/css/auth.css para manter o mesmo nível de suporte
 * de acessibilidade nas páginas internas (antes só existia no login).
 * ------------------------------------------------------------------ */
@media (prefers-contrast: more) {
  :root { --border: #94a3b8; --border-strong: #64748b; --text-secondary: #3f4a5a; }
  .input, .select, .textarea, .btn { border-width: 2px; }
  .btn--primary { outline: 2px solid transparent; }
  .btn--primary:focus-visible, .btn--ghost:focus-visible { outline-width: 3px; }
}

/* Modo de Alto Contraste do Windows: o navegador substitui cores por um
 * conjunto restrito de cores do sistema. Sem isso, controles que dependem
 * só de background-color (chip ativo, botão primário) somem visualmente. */
@media (forced-colors: active) {
  .btn--primary, .chip.is-active, .input, .select, .textarea {
    forced-color-adjust: none;
    border: 1px solid CanvasText;
  }
  .btn--primary { background: ButtonText; color: ButtonFace; }
  .chip.is-active { background: Highlight; color: HighlightText; border-color: Highlight; }
  a:focus-visible, button:focus-visible, input:focus-visible, .nav-item:focus-visible {
    outline: 3px solid Highlight;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: reveal 0.4s var(--ease) both; }
  .reveal:nth-child(2) { animation-delay: 0.05s; }
  .reveal:nth-child(3) { animation-delay: 0.1s; }
  .reveal:nth-child(4) { animation-delay: 0.15s; }
}
@keyframes reveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------------------------------------------
 * FAQ (página Suporte) — <details>/<summary> nativos: acessível por
 * padrão (teclado, leitor de tela) sem precisar de JS pra abrir/fechar.
 * ------------------------------------------------------------------ */
.faq-list { display: flex; flex-direction: column; gap: 0.6rem; }
.faq-item {
  border: 1px solid var(--border); border-radius: var(--radius-md, 10px);
  padding: 0.85rem 1rem;
}
.faq-item summary {
  cursor: pointer; font-weight: 600; font-size: 0.9rem; color: var(--text-primary);
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ''; flex: 0 0 auto; width: 9px; height: 9px;
  border-right: 2px solid var(--text-secondary); border-bottom: 2px solid var(--text-secondary);
  transform: rotate(45deg); transition: transform 0.15s var(--ease);
}
.faq-item[open] summary::after { transform: rotate(-135deg); }
.faq-item p { margin: 0.7rem 0 0; font-size: 0.87rem; color: var(--text-secondary); line-height: 1.55; }

/* ---------------------------------------------------------------------
 * Avisos — lista de notificações
 * ------------------------------------------------------------------ */
.aviso-item {
  display: flex; gap: 0.85rem; padding: 1rem 0.25rem;
  border-bottom: 1px solid var(--border);
}
.aviso-item:last-child { border-bottom: none; }
.aviso-item__icone {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.aviso-item--nao-lido { background: color-mix(in srgb, var(--color-primary) 5%, transparent); }
.aviso-item__titulo { font-weight: 700; font-size: 0.9rem; display: flex; align-items: center; gap: 0.4rem; }
.aviso-item__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--color-primary); flex: 0 0 auto; }
.aviso-item__desc { font-size: 0.85rem; color: var(--text-secondary); margin: 0.2rem 0 0.3rem; line-height: 1.45; }
.aviso-item__tempo { font-size: 0.75rem; color: var(--text-muted); }
.aviso-vazio { text-align: center; padding: 2.5rem 1rem; color: var(--text-secondary); }

/* =====================================================================
 * BARRA DE ROLAGEM CUSTOMIZADA - SIDEBAR
 * ===================================================================== */

/* 1. Comportamento suave e suporte ao Firefox */
.sidebar__nav {
  scroll-behavior: smooth;
  scrollbar-width: thin; /* Barra mais fina no Firefox */
  scrollbar-color: transparent transparent; /* Invisível por padrão */
  transition: scrollbar-color 0.3s ease;
}

/* Firefox: Revela a barra com a cor do sistema ao passar o mouse */
.sidebar__nav:hover {
  scrollbar-color: rgba(43, 68, 156, 0.3) transparent;
}
[data-theme="dark"] .sidebar__nav:hover {
  scrollbar-color: rgba(74, 110, 224, 0.3) transparent;
}

/* 2. Chrome, Edge e Safari */
.sidebar__nav::-webkit-scrollbar {
  width: 6px; /* Barra bem mais fina */
}

.sidebar__nav::-webkit-scrollbar-track {
  background: transparent; /* Fundo da trilha invisível */
}

.sidebar__nav::-webkit-scrollbar-thumb {
  background-color: transparent; /* Invisível por padrão */
  border-radius: 10px; /* Bordas arredondadas e suaves */
  transition: background-color 0.3s ease;
}

/* Revela a barra (Azul do Legado com transparência) quando interage com o menu */
.sidebar__nav:hover::-webkit-scrollbar-thumb {
  background-color: rgba(43, 68, 156, 0.3);
}

/* Cor ajustada para garantir contraste no Dark Mode */
[data-theme="dark"] .sidebar__nav:hover::-webkit-scrollbar-thumb {
  background-color: rgba(74, 110, 224, 0.3);
}

/* Intensifica a cor caso o usuário clique ou passe o mouse exatamente sobre a barra */
.sidebar__nav::-webkit-scrollbar-thumb:hover {
  background-color: rgba(43, 68, 156, 0.6) !important;
}
[data-theme="dark"] .sidebar__nav::-webkit-scrollbar-thumb:hover {
  background-color: rgba(74, 110, 224, 0.6) !important;
}

/* ---------------------------------------------------------------------
 * FILTROS & CHIPS (Evidências)
 * ------------------------------------------------------------------ */
.filters { display: flex; align-items: center; gap: 0.65rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.chip {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.5rem 1.3rem; border-radius: 9999px;
  font-size: 0.88rem; font-weight: 600; cursor: pointer;
  background: var(--surface-2); color: var(--text-secondary);
  border: 1px solid var(--border); transition: all 0.18s var(--ease);
  user-select: none; text-decoration: none;
}
.chip:hover {
  background: var(--surface-hover); color: var(--text-primary); border-color: var(--border-strong);
}
.chip.is-active {
  background: #2563eb !important; color: #ffffff !important; border-color: #2563eb !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

/* ---------------------------------------------------------------------
 * STATUS BADGES (Evidências)
 * ------------------------------------------------------------------ */
.badge {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
  padding: 0.35rem 1.15rem; border-radius: 9999px;
  font-size: 0.8rem; font-weight: 600; line-height: 1.2; text-align: center; white-space: nowrap;
  letter-spacing: 0.01em;
}
.badge--success, .badge--aprovada {
  background: rgba(16, 185, 129, 0.12); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge--primary, .badge--validacao {
  background: rgba(59, 130, 246, 0.12); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3);
}
.badge--info, .badge--auditoria {
  background: rgba(99, 102, 241, 0.12); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.3);
}
.badge--warning, .badge--ressalvas {
  background: rgba(245, 158, 11, 0.12); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3);
}
.badge--danger, .badge--indeferida {
  background: rgba(239, 68, 68, 0.12); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ---------------------------------------------------------------------
 * ITENS DE LISTA DE EVIDÊNCIAS
 * ------------------------------------------------------------------ */
.evidence-item {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.35rem 0.85rem; border-bottom: 1px solid var(--border);
  text-decoration: none; transition: background-color 0.15s var(--ease);
}
.evidence-item:last-child { border-bottom: none; }
.evidence-item:hover {
  background: rgba(255, 255, 255, 0.025);
  border-radius: 8px;
}
.evidence-item:hover .evidence-item__title { color: #60a5fa; }
.evidence-item__title {
  font-size: 1.05rem; font-weight: 700; color: var(--text-primary); transition: color 0.15s;
}
.evidence-item__sub {
  font-size: 0.85rem; color: var(--text-muted); margin-top: 0.35rem;
}

/* ---------------------------------------------------------------------
 * MÍDIAS COMPROBATÓRIAS (Detalhes)
 * ------------------------------------------------------------------ */
.media-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; margin-top: 1rem;
}
.media-card {
  height: 200px; border-radius: var(--radius-md); background: var(--surface-2);
  border: 1px solid var(--border); display: flex; flex-direction: column;
  align-items: center; justify-content: center; color: var(--text-muted);
  overflow: hidden; position: relative; transition: transform 0.2s var(--ease), border-color 0.2s;
  text-decoration: none;
}
.media-card:hover {
  transform: translateY(-2px); border-color: var(--color-primary); color: var(--text-primary);
}
.media-card img, .media-card video {
  width: 100%; height: 100%; object-fit: cover;
}
.media-card__icon {
  display: flex; align-items: center; justify-content: center; width: 48px; height: 48px;
  border-radius: 50%; background: var(--surface); color: var(--text-muted); margin-bottom: 0.5rem;
}

/* Sucesso do Wizard */
.wizard-success-icon {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 1.25rem;
  background: rgba(52, 211, 153, 0.15); color: #34d399;
  display: flex; align-items: center; justify-content: center;
}

