/* URI Interface Foundation 2026.10.22.28
   Camada visual canônica. Mantém o CSS legado apenas como compatibilidade. */

:root {
  --ui-font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ui-radius-xs: 7px;
  --ui-radius-sm: 10px;
  --ui-radius-md: 14px;
  --ui-radius-lg: 18px;
  --ui-radius-xl: 24px;
  --ui-space-1: 4px;
  --ui-space-2: 8px;
  --ui-space-3: 12px;
  --ui-space-4: 16px;
  --ui-space-5: 20px;
  --ui-space-6: 24px;
  --ui-space-8: 32px;
  --ui-space-10: 40px;
  --ui-fast: 120ms;
  --ui-normal: 180ms;
  --ui-slow: 240ms;
  --ui-ease: cubic-bezier(.2,.8,.2,1);
  --ui-content: 1440px;
  --ui-focus: 0 0 0 3px color-mix(in srgb,var(--orange) 16%,transparent);
}

html[data-theme="light"] {
  --canvas: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #f5f7fa;
  --surface-subtle: #f0f3f7;
  --surface-raised: #ffffff;
  --surface-recessed: #eef2f6;
  --ink: #0b0d12;
  --text: #0b0d12;
  --muted: #596170;
  --line: #e2e7ed;
  --line-strong: #cbd3dd;
  --ui-shadow-1: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.045);
  --ui-shadow-2: 0 16px 44px rgba(15,23,42,.12);
  --ui-overlay: rgba(15,23,42,.44);
}

html[data-theme="dark"] {
  --canvas: #08090b;
  --surface: #111317;
  --surface-soft: #15181d;
  --surface-subtle: #181b21;
  --surface-raised: #1b1e24;
  --surface-recessed: #0d0f12;
  --ink: #f6f7f8;
  --text: #f6f7f8;
  --muted: #9da4af;
  --line: rgba(255,255,255,.075);
  --line-strong: rgba(255,255,255,.14);
  --ui-shadow-1: 0 1px 2px rgba(0,0,0,.18), 0 10px 28px rgba(0,0,0,.18);
  --ui-shadow-2: 0 22px 64px rgba(0,0,0,.42);
  --ui-overlay: rgba(0,0,0,.66);
}

body { font-family: var(--ui-font); }
body.portal-authenticated { background: var(--canvas); color: var(--ink); }
body.portal-authenticated * { scrollbar-color: color-mix(in srgb,var(--muted) 34%,transparent) transparent; }

body.portal-authenticated #portalShell > .content {
  width: 100%;
  max-width: none;
  padding: clamp(28px,3.2vw,48px) clamp(18px,2vw,32px) 104px;
}

body.portal-authenticated #portalShell > .content > :where([data-portal-page],.portal-view-header) {
  width: 100%;
  max-width: 1680px;
  margin-inline: auto;
}

/* Navegação: silenciosa em repouso, precisa em interação. */
body.portal-authenticated #portalShell > .topbar {
  border-right-color: var(--line);
  background: color-mix(in srgb,var(--surface-recessed) 94%,transparent);
  box-shadow: none;
  backdrop-filter: blur(16px) saturate(120%);
}

body.portal-authenticated :where(.user-avatar,.mural-avatar).has-photo {
  padding: 0;
  overflow: hidden;
  background: var(--surface-soft);
}

body.portal-authenticated :where(.user-avatar,.mural-avatar).has-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}

body.portal-authenticated #portalShell > .topbar nav a,
body.portal-authenticated #portalShell > .topbar :where(.notification-bell,.appearance-open,.accessibility-open,.theme-toggle,.logout-button) {
  border-radius: var(--ui-radius-xs);
  transition: background-color var(--ui-fast) ease,color var(--ui-fast) ease,border-color var(--ui-fast) ease;
}

/* Cabeçalho de página único. */
body.portal-authenticated .portal-view-header {
  position: relative;
  display: grid;
  gap: 0;
  margin-bottom: var(--ui-space-8);
  padding: 0 0 var(--ui-space-6) var(--ui-space-5);
  border-bottom: 1px solid var(--line);
  background: transparent;
  background-image: none;
  overflow: visible;
}

body.portal-authenticated .portal-view-header::before {
  content: "";
  position: absolute;
  inset: 2px auto var(--ui-space-6) 0;
  width: 3px;
  border-radius: 999px;
  background: var(--orange);
}

body.portal-authenticated .portal-view-header::after {
  display: none;
}

body.portal-authenticated .portal-view-header .eyebrow {
  margin: 0 0 7px;
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
}

body.portal-authenticated .portal-view-header h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(32px,3vw,46px);
  font-weight: 745;
  line-height: 1.04;
  letter-spacing: -.045em;
}

body.portal-authenticated .portal-view-header p {
  max-width: 720px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

/* Superfícies: estrutura pelo respiro, não por dezenas de caixas. */
body.portal-authenticated :where(.panel,.metric-card,.quick-access-panel,.workspace-launcher,.resource-card,.achievement-card,.personal-analysis,.professional-profiles-admin,.report-full-view,.notification-item,.account-card) {
  border: 1px solid var(--line);
  border-radius: var(--ui-radius-md);
  background: var(--surface);
  box-shadow: none;
}

body.portal-authenticated :where(.panel,.quick-access-panel,.workspace-launcher) {
  padding: clamp(22px,2.2vw,32px);
}

body.portal-authenticated :where(.panel-heading,.resources-heading,.report-center-heading,.mec-center-heading,.mural-header) {
  gap: var(--ui-space-4);
  margin-bottom: var(--ui-space-5);
}

body.portal-authenticated :where(.panel-heading,.resources-heading,.report-center-heading,.mec-center-heading) h2 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: clamp(19px,1.55vw,24px);
  font-weight: 710;
  letter-spacing: -.025em;
}

body.portal-authenticated .eyebrow {
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
}

body.portal-authenticated :where(.panel-note,.data-note) {
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
}

/* Início. */
body.portal-authenticated .dashboard-overview {
  align-items: stretch;
  gap: var(--ui-space-5);
  margin-bottom: var(--ui-space-5);
}

body.portal-authenticated .dashboard-overview .welcome {
  position: relative;
  min-height: 168px;
  padding: clamp(26px,3vw,40px);
  border: 1px solid var(--line);
  border-radius: var(--ui-radius-lg);
  background: var(--surface);
  background-image: none;
  box-shadow: none;
}

body.portal-authenticated .dashboard-overview .welcome::before {
  content: "";
  position: absolute;
  inset: 26px auto 26px 0;
  width: 3px;
  border-radius: 999px;
  background: var(--orange);
}

body.portal-authenticated .welcome h1 { font-weight: 750; letter-spacing: -.055em; }
body.portal-authenticated .update-chip { border-color: var(--line); background: var(--surface-soft); }
body.portal-authenticated .metrics { gap: var(--ui-space-3); }
body.portal-authenticated .metric-card {
  min-height: 128px;
  padding: var(--ui-space-5);
  border-color: var(--line);
  border-radius: var(--ui-radius-md);
  background: var(--surface);
  box-shadow: none;
}
body.portal-authenticated .metric-card::before { width: 2px; opacity: .8; }
body.portal-authenticated .metric-card::after { opacity: .7; }
body.portal-authenticated .metric-card .metric-icon { border-radius: var(--ui-radius-sm); }

/* Ações e atalhos. */
body.portal-authenticated :where(.workspace-actions > *,.quick-access-card,.resource-card,.mec-secondary-tools a,.mec-check-grid article,.connections-list article) {
  border-color: var(--line);
  border-radius: var(--ui-radius-sm);
  background: var(--surface);
  box-shadow: none;
  transition: transform var(--ui-normal) var(--ui-ease),background-color var(--ui-fast) ease,border-color var(--ui-fast) ease,box-shadow var(--ui-normal) ease;
}

@media (hover:hover) {
  body.portal-authenticated :where(.workspace-actions > *,.quick-access-card,.resource-card,.mec-secondary-tools a,.mec-check-grid article,.connections-list article):hover {
    border-color: var(--line-strong);
    background: var(--surface-soft);
    box-shadow: var(--ui-shadow-1);
    transform: translateY(-2px);
  }
}

/* Formulários e filtros. */
body.portal-authenticated :where(input,textarea,select) {
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: var(--ui-radius-sm);
  background: var(--surface);
  color: var(--ink);
  transition: border-color var(--ui-fast) ease,box-shadow var(--ui-fast) ease,background-color var(--ui-fast) ease;
}

body.portal-authenticated :where(input,textarea,select):hover { border-color: color-mix(in srgb,var(--muted) 58%,var(--line)); }
body.portal-authenticated :where(input,textarea,select):focus { border-color: var(--orange); box-shadow: var(--ui-focus); outline: 0; }
body.portal-authenticated :where(input,textarea)::placeholder { color: color-mix(in srgb,var(--muted) 78%,transparent); }
body.portal-authenticated :where(input,textarea,select):disabled { cursor: not-allowed; opacity: .58; }

body.portal-authenticated :where(button,a) { text-underline-offset: 3px; }
body.portal-authenticated :where(button,a):focus-visible { outline: 2px solid color-mix(in srgb,var(--orange) 72%,#fff); outline-offset: 2px; }

/* Tabelas e listas densas. */
body.portal-authenticated table { border-collapse: separate; border-spacing: 0; }
body.portal-authenticated :where(table th,table td) { border-color: var(--line); }
body.portal-authenticated thead th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: .07em;
  text-transform: uppercase;
}
body.portal-authenticated tbody tr { transition: background-color var(--ui-fast) ease; }
body.portal-authenticated tbody tr:hover { background: color-mix(in srgb,var(--surface-soft) 82%,transparent); }

/* Modais, drawers e popovers. */
body.portal-authenticated :where(.appearance-card,.accessibility-card,.push-diagnostics-card,.account-card,.entry-manager-card,.daily-entry-modal-card) {
  border-color: var(--line);
  border-radius: var(--ui-radius-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--ui-shadow-2);
}

body.portal-authenticated :where(.assistant-backdrop,.notification-center-backdrop,.account-modal-backdrop,.entry-manager-backdrop) { background: var(--ui-overlay); }

/* Assistente: presença pequena; conversa é o foco. */
body.portal-authenticated .assistant-fab {
  width: 96px;
  min-width: 96px;
  height: 96px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-raised);
  box-shadow: var(--ui-shadow-2);
  overflow: visible;
}

body.portal-authenticated .assistant-character {
  position: relative;
  display: block;
  width: 90px;
  height: 90px;
}

body.portal-authenticated .assistant-character img {
  position: absolute;
  inset: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  object-fit: contain;
  object-position: center bottom;
  transition: opacity 150ms ease,transform 180ms var(--ui-ease);
  pointer-events: none;
}

body.portal-authenticated .assistant-character-active { opacity: 0; transform: translateY(2px) scale(.94); }
body.portal-authenticated .assistant-fab:is(:hover,:focus-visible) .assistant-character-normal,
body.portal-authenticated .assistant-fab[aria-expanded="true"] .assistant-character-normal { opacity: 0; transform: translateY(2px) scale(.94); }
body.portal-authenticated .assistant-fab:is(:hover,:focus-visible) .assistant-character-active,
body.portal-authenticated .assistant-fab[aria-expanded="true"] .assistant-character-active { opacity: 1; transform: translateY(-1px) scale(1.03); }

body.portal-authenticated .assistant-header-character {
  width: 50px;
  height: 50px;
  object-fit: contain;
  object-position: center top;
}

body.portal-authenticated .assistant-fab.uses-profile-photo .assistant-character img {
  inset: 5px;
  width: calc(100% - 10px);
  height: calc(100% - 10px);
  border-radius: 50%;
  object-fit: cover;
  object-position: center 24%;
}

body.portal-authenticated .assistant-fab.uses-profile-photo:is(:hover,:focus-visible) .assistant-character-active,
body.portal-authenticated .assistant-fab.uses-profile-photo[aria-expanded="true"] .assistant-character-active {
  transform: scale(1.04);
}
body.portal-authenticated .assistant-panel { padding: var(--ui-space-6); background: var(--surface); }
body.portal-authenticated .assistant-conversation { gap: var(--ui-space-3); }
body.portal-authenticated .assistant-conversation p { max-width: 92%; padding: 13px 14px; border-radius: 14px 14px 14px 4px; }
body.portal-authenticated .assistant-conversation p.user { border-radius: 14px 14px 4px 14px; }
body.portal-authenticated .assistant-prompts button { min-height: 34px; padding: 8px 11px; }

/* Feedback e entrada das páginas. */
body.portal-authenticated [data-portal-page]:not([hidden]) { animation: ui-page-enter var(--ui-slow) var(--ui-ease) both; }
@keyframes ui-page-enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

body.portal-authenticated :where(.service-entry-message,.mec-action-status,.account-message,.resources-message) { border-radius: var(--ui-radius-sm); }

@media (max-width: 899px) {
  body.portal-authenticated #portalShell > .content { padding: 76px clamp(14px,4vw,24px) 92px; }
  body.portal-authenticated .portal-view-header { margin-bottom: var(--ui-space-6); padding-left: var(--ui-space-4); }
  body.portal-authenticated .dashboard-overview { gap: var(--ui-space-3); }
  body.portal-authenticated :where(.panel,.quick-access-panel,.workspace-launcher) { padding: var(--ui-space-5); }
}

@media (max-width: 560px) {
  body.portal-authenticated .portal-view-header h1 { font-size: 31px; }
  body.portal-authenticated .portal-view-header p { font-size: 13px; }
  body.portal-authenticated .dashboard-overview .welcome { padding: var(--ui-space-6); }
  body.portal-authenticated .metric-card { padding: var(--ui-space-4); }
}

@media (prefers-reduced-motion: reduce) {
  body.portal-authenticated .assistant-character img { transition: none; }
  body.portal-authenticated [data-portal-page]:not([hidden]) { animation: none; }
  body.portal-authenticated *, body.portal-authenticated *::before, body.portal-authenticated *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Portal 70 — avatares da equipe com tamanho de destaque no perfil */
body.portal-authenticated .avatar.has-photo img,
body.portal-authenticated :where(.user-avatar,.mural-avatar,.personal-profile-avatar).has-photo img {
  object-fit: cover;
  object-position: center top;
}

body.portal-authenticated .personal-analysis-person .avatar.large {
  width: 96px;
  height: 96px;
  flex: 0 0 96px;
  border: 2px solid color-mix(in srgb, var(--orange) 55%, var(--line));
}

body.portal-authenticated .personal-analysis-person { gap: 18px; }

body.portal-authenticated .personal-profile-avatar.has-photo {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  padding: 0;
  overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--orange) 55%, var(--line));
  background: var(--surface-soft);
}

body.portal-authenticated .personal-profile-avatar.has-photo img { display: block; width: 100%; height: 100%; }

body.portal-authenticated :where(.user-avatar,.mural-avatar).has-photo {
  border: 2px solid color-mix(in srgb, var(--orange) 45%, var(--line));
}

@media (min-width: 900px) {
  body.portal-authenticated #portalShell > .topbar .user-menu {
    grid-template-columns: 52px minmax(0, 1fr) auto;
    column-gap: 11px;
  }
  body.portal-authenticated #portalShell > .topbar .user-avatar { width: 52px; height: 52px; }
  body.portal-authenticated #portalShell > .topbar .user-copy strong { font-size: 13px; }
  body.portal-authenticated #portalShell > .topbar .user-copy small { font-size: 12px; }
  body.portal-authenticated #portalShell.sidebar-collapsed > .topbar .user-avatar { width: 40px; height: 40px; }
}

@media (max-width: 640px) {
  body.portal-authenticated .personal-analysis-person .avatar.large { width: 72px; height: 72px; flex-basis: 72px; }
  body.portal-authenticated .personal-profile-avatar.has-photo { width: 60px; height: 60px; flex-basis: 60px; }
}

/* Portal 72 — Central do perfil */
body.portal-authenticated #portalShell > .topbar > :is(#appearanceOpen,#accessibilityOpen,#themeToggle),
body.portal-authenticated #portalShell > .topbar .user-menu .logout-button { display: none !important; }

body.portal-authenticated #portalShell > .topbar .user-menu {
  cursor: pointer;
  border-radius: 12px;
  transition: background-color 150ms ease;
}
body.portal-authenticated #portalShell > .topbar .user-menu:hover,
body.portal-authenticated #portalShell > .topbar .user-menu[aria-expanded="true"] { background: var(--surface-soft); }
body.portal-authenticated #portalShell > .topbar .user-menu:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
body.portal-authenticated .user-menu-chevron { display: grid; place-items: center; align-self: center; color: var(--muted); }
body.portal-authenticated .user-menu-chevron .sidebar-icon { width: 16px; height: 16px; transition: transform 150ms ease; }
body.portal-authenticated .user-menu[aria-expanded="true"] .user-menu-chevron .sidebar-icon { transform: rotate(-90deg); }
body.portal-authenticated #portalShell.sidebar-collapsed > .topbar .user-menu-chevron { display: none; }

.profile-center-backdrop { position: fixed; inset: 0; z-index: 118; border: 0; background: transparent; }
.profile-center {
  --profile-center-left: 246px;
  position: fixed;
  left: var(--profile-center-left);
  bottom: 16px;
  z-index: 120;
  width: min(380px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  display: grid;
  gap: 14px;
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface-raised, var(--surface));
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(0,0,0,.28);
  animation: profile-center-in 160ms ease-out;
}
.profile-center[hidden] { display: none; }
@keyframes profile-center-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.profile-center-header { display: grid; grid-template-columns: 72px minmax(0,1fr) auto; align-items: center; gap: 14px; }
.profile-center-avatar {
  width: 72px; height: 72px; display: grid; place-items: center; overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--orange) 55%, var(--line)); border-radius: 50%;
  background: var(--surface-soft); color: var(--orange); font-size: 20px; font-weight: 850;
}
.profile-center-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center top; }
.profile-center-identity { min-width: 0; display: grid; gap: 2px; }
.profile-center-identity strong { font-size: 17px; line-height: 1.2; }
.profile-center-identity span { color: var(--ink); font-size: 12px; opacity: .85; }
.profile-center-identity small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.profile-center-close { align-self: start; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.profile-center-close:hover { color: var(--ink); background: var(--surface-soft); }

.profile-center-intro { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.profile-center-label { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.profile-center-intro p { margin: 0; font-size: 13px; line-height: 1.45; }
.profile-center-intro-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-center-primary { min-height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: var(--orange); color: #fff; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.profile-center-primary:hover { filter: brightness(1.06); }
.profile-center-feedback { color: var(--teal, var(--orange)); font-size: 12px; font-weight: 700; }

.profile-center-section { display: grid; gap: 8px; }
.profile-center-section[hidden] { display: none; }
.profile-center-section h3 { margin: 0; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.profile-center-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.profile-center-link { border: 0; background: none; color: var(--orange); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.profile-center-count { min-width: 20px; padding: 2px 7px; border-radius: 999px; background: var(--orange); color: #fff; font-size: 12px; font-weight: 800; text-align: center; }
.profile-center-count[hidden] { display: none; }

.profile-center-stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.profile-center-stats span { display: grid; gap: 3px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.profile-center-stats small { color: var(--muted); font-size: 12px; }
.profile-center-stats strong { overflow: hidden; font-size: 18px; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.profile-center-note { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 12px; }

.profile-center-pending { display: grid; gap: 6px; }
.profile-center-pending button { display: grid; gap: 3px; width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.profile-center-pending button:hover { border-color: color-mix(in srgb, var(--orange) 45%, var(--line)); background: var(--surface-soft); }
.profile-center-pending strong { font-size: 12.5px; }
.profile-center-pending small { overflow: hidden; color: var(--muted); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.profile-center-pending em { width: fit-content; padding: 2px 7px; border-radius: 999px; background: var(--orange-soft); color: var(--orange); font-size: 12px; font-style: normal; font-weight: 800; }
.profile-center-done { margin: 0; padding: 10px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 12px; text-align: center; }

.profile-center-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px; }
.profile-center-grid button,
.profile-center-list button,
.profile-center-footer button {
  min-height: 38px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px;
  background: transparent; color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 650; text-align: left; cursor: pointer;
}
.profile-center-grid button:hover,
.profile-center-list button:hover,
.profile-center-footer button:hover { background: var(--surface-soft); border-color: var(--line-strong); }
.profile-center-grid button:disabled { opacity: .6; cursor: progress; }
.profile-center-list { display: grid; gap: 6px; }
.profile-center-list button { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.profile-center-list strong { color: var(--muted); font-size: 12.5px; font-weight: 700; }
.profile-center-push .push-device-status { margin: 0; }
.profile-center-footer { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.profile-center-footer button { text-align: center; }
.profile-center-footer .profile-center-logout { color: var(--orange); }
.profile-center button:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

@media (max-width: 899px) {
  .profile-center-backdrop:not([hidden]) { background: rgba(0,0,0,.5); }
  .profile-center {
    left: 0; right: 0; bottom: 0;
    width: 100%;
    max-height: 88dvh;
    border-radius: 18px 18px 0 0;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) { .profile-center { animation: none; } }

/* Portal 73 — ritmo da barra lateral: navegação no topo, notificações e perfil fixos no rodapé */
@media (min-width: 900px) {
  body.portal-authenticated #portalShell > .topbar > #notificationBell { margin-top: auto; }

  body.portal-authenticated #portalShell.sidebar-collapsed > .topbar nav { row-gap: 0; }
  body.portal-authenticated #portalShell.sidebar-collapsed > .topbar nav a { min-height: 38px; height: 38px; }
  body.portal-authenticated #portalShell.sidebar-collapsed > .topbar nav .nav-group-label:not(:first-child):not([hidden]) {
    display: block !important;
    height: 1px;
    min-height: 0;
    margin: 7px 14px;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: var(--line);
    font-size: 0;
    line-height: 0;
    color: transparent;
  }
  body.portal-authenticated #portalShell.sidebar-collapsed > .topbar nav .nav-group-label:first-child { display: none !important; }
}

/* Portal 74 — tipografia Inter hospedada no portal (mesma letra em qualquer computador) */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/inter-latin-v4.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/inter-latin-ext-v4.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

body,
body :where(h1,h2,h3,h4,.brand-copy strong,.metric-card strong,.report-preview > strong,button,input,select,textarea) {
  font-family: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body { font-feature-settings: "cv11", "ss01"; }
body :where(.metric-card strong, .profile-center-stats strong, .personal-analysis-stats strong) { font-variant-numeric: tabular-nums; }

/* Portal 74 — barra lateral com texto mais escuro e legível */
html[data-theme="light"] body.portal-authenticated #portalShell > .topbar nav a:not(.active),
html[data-theme="light"] body.portal-authenticated #portalShell > .topbar #notificationBell { color: #1f2430; }
html[data-theme="light"] body.portal-authenticated #portalShell > .topbar nav a:not(.active):hover { color: #0b0d12; }
html[data-theme="light"] body.portal-authenticated #portalShell > .topbar .nav-group-label { color: #4a5160; opacity: 1; }
html[data-theme="light"] body.portal-authenticated #portalShell > .topbar .user-copy small { color: #3f4654; }
html[data-theme="dark"] body.portal-authenticated #portalShell > .topbar nav a:not(.active),
html[data-theme="dark"] body.portal-authenticated #portalShell > .topbar #notificationBell { color: #d4d7dd; }
html[data-theme="dark"] body.portal-authenticated #portalShell > .topbar .nav-group-label { color: #9aa1ad; opacity: 1; }

@media (min-width: 900px) {
  body.portal-authenticated #portalShell > .topbar nav a { font-size: 12.5px; font-weight: 600; }
  body.portal-authenticated #portalShell > .topbar #notificationBell { font-size: 12.5px; font-weight: 650; }
  body.portal-authenticated #portalShell > .topbar .nav-group-label { font-size: 11.5px; font-weight: 750; letter-spacing: .1em; }

  /* Barra recolhida: todos os itens no mesmo eixo central */
  body.portal-authenticated #portalShell.sidebar-collapsed > .topbar { scrollbar-gutter: auto; scrollbar-width: none; }
  body.portal-authenticated #portalShell.sidebar-collapsed > .topbar::-webkit-scrollbar { display: none; }
  body.portal-authenticated #portalShell.sidebar-collapsed > .topbar :is(nav a, #notificationBell) {
    width: 44px;
    margin-inline: auto;
    padding-inline: 0;
    justify-content: center;
  }
  body.portal-authenticated #portalShell.sidebar-collapsed > .topbar .user-menu {
    width: 48px;
    margin-inline: auto;
    padding: 6px 0;
    grid-template-columns: 1fr;
    justify-items: center;
  }
  body.portal-authenticated #portalShell.sidebar-collapsed > .topbar .user-avatar { width: 38px; height: 38px; }
}

/* Portal 75 — página Gestão (administração e supervisão) */
#portalShell [data-management-only][hidden],
#portalShell [data-weights-editor-only][hidden],
#portalShell .view-as-banner[hidden] { display: none !important; }

/* Portal 76 — aviso para perfis que não pontuam */
.entry-non-scoring-note { margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); color: var(--ink); font-size: 12.5px; line-height: 1.45; }
.entry-non-scoring-note[hidden] { display: none; }

/* Portal 77 — lançamento em lote */
.service-entry-form .entry-field[hidden], .entry-batch[hidden], .entry-batch-results[hidden] { display: none !important; }
.entry-mode-switch { grid-column: 1 / -1; display: inline-flex; width: fit-content; padding: 3px; gap: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.entry-mode-switch button { min-height: 32px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.entry-mode-switch button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.entry-batch { grid-column: 1 / -1; display: grid; gap: 10px; }
.entry-batch textarea#entryBatchProtocols { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; line-height: 1.5; resize: vertical; }
.entry-batch-summary { color: var(--muted); font-size: 12.5px; }
.entry-batch-summary strong { color: var(--ink); }
.entry-batch-summary .is-error { color: #d64545; font-weight: 700; }
.entry-batch-secondary { width: fit-content; min-height: 32px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.entry-batch-secondary:disabled { opacity: .5; cursor: not-allowed; }
.entry-batch-results { display: grid; gap: 4px; max-height: 220px; margin: 0; padding: 8px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; list-style: none; }
.entry-batch-results li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 6px; border-radius: 6px; font-size: 12.5px; }
.entry-batch-results li span { color: var(--muted); text-align: right; }
.entry-batch-results .is-ok span { color: #168a5b; font-weight: 700; }
.entry-batch-results .is-error { background: color-mix(in srgb, #d64545 8%, transparent); }
.entry-batch-results .is-error span { color: #d64545; font-weight: 700; }

/* Portal 77 — pontuação detalhada por colaborador */
.points-breakdown { grid-column: 1 / -1; display: grid; gap: 14px; margin-top: 4px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.points-breakdown-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.points-breakdown-heading > span { display: grid; gap: 2px; }
.points-breakdown-heading strong { font-size: 15px; }
.points-breakdown-heading small { color: var(--muted); font-size: 12px; }
.points-breakdown-periods { display: inline-flex; padding: 3px; gap: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.points-breakdown-periods button { min-height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.points-breakdown-periods button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.points-breakdown-summary { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
.points-breakdown-summary span { display: grid; gap: 3px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.points-breakdown-summary small { color: var(--muted); font-size: 12px; }
.points-breakdown-summary strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.points-breakdown-columns { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; }
.points-breakdown-block { display: grid; align-content: start; gap: 8px; }
.points-breakdown-block h4 { margin: 4px 0 0; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.points-breakdown-bars { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.points-breakdown-bars li { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 3px 10px; }
.points-breakdown-label { display: grid; min-width: 0; }
.points-breakdown-label strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.points-breakdown-label small { color: var(--muted); font-size: 12.5px; }
.points-breakdown-value { align-self: center; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.points-breakdown-bars i { grid-column: 1 / -1; display: block; height: 6px; overflow: hidden; border-radius: 999px; background: var(--surface-soft); }
.points-breakdown-bars b { display: block; height: 100%; border-radius: inherit; background: var(--orange); }
.points-breakdown-bars b.is-mensageria { background: #5b7bd5; }
.points-breakdown-days { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding-top: 16px; }
.points-breakdown-days span { position: relative; flex: 1 1 0; min-width: 8px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; }
.points-breakdown-days i { width: 100%; max-width: 26px; border-radius: 5px 5px 2px 2px; background: color-mix(in srgb, var(--orange) 75%, transparent); }
.points-breakdown-days small { color: var(--muted); font-size: 12px; text-transform: capitalize; }
.points-breakdown-days.is-dense em { display: none; }
.points-breakdown-days em { position: absolute; top: 0; color: var(--muted); font-size: 11.5px; font-style: normal; font-variant-numeric: tabular-nums; }
/* Portal 79 — editor de pesos (administradores) */
.management-admin-grid { display: grid; gap: 14px; }
.management-admin-tool { display: grid; gap: 10px; }
.management-admin-tool h3 { margin: 0; font-size: 16px; }
.management-admin-tool > p { margin: 0; color: var(--muted); font-size: 12.5px; }
.management-admin-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.weights-editor { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.weights-group { display: grid; align-content: start; gap: 4px; margin: 0; padding: 10px 12px 12px; border: 1px solid var(--line); border-radius: 12px; }
.weights-group legend { padding: 0 6px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.weights-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 6px; border-radius: 8px; }
.weights-row > span:first-child { display: grid; min-width: 0; }
.weights-row small { color: var(--muted); font-size: 12px; }
.weights-row strong { font-size: 13px; }
.weights-row em { color: var(--orange); font-size: 12px; font-style: normal; font-weight: 700; }
.weights-row.is-changed { background: var(--orange-soft); }
.weights-stepper { display: inline-flex; align-items: center; flex: 0 0 auto; border: 1px solid var(--line-strong); border-radius: 9px; overflow: hidden; }
.weights-stepper button { width: 30px; height: 32px; border: 0; background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.weights-stepper button:disabled { opacity: .35; cursor: not-allowed; }
.weights-stepper input { width: 42px; height: 32px; border: 0; border-inline: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 800; text-align: center; -moz-appearance: textfield; }
.weights-stepper input::-webkit-outer-spin-button, .weights-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.weights-history { color: var(--muted); font-size: 12.5px; }
.weights-history summary { cursor: pointer; font-weight: 700; }
.weights-history ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.weights-history li strong { color: var(--ink); }

/* Portal 78 — Evolução da equipe */
.evolution-page { display: grid; gap: 18px; }
.evolution-page[hidden] { display: none; }
.evolution-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.evolution-toolbar label { display: grid; gap: 4px; }
.evolution-toolbar label span { color: var(--muted); font-size: 12px; font-weight: 700; }
.evolution-toolbar select { min-height: 36px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; }
.evolution-toolbar .profile-center-primary { min-height: 36px; }
.evolution-highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.evolution-highlight { display: grid; gap: 3px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.evolution-highlight > span { font-size: 20px; }
.evolution-highlight small { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.evolution-highlight em { color: var(--muted); font-size: 12px; font-style: normal; }
.evolution-highlight.is-warning { border-color: color-mix(in srgb, var(--orange) 45%, var(--line)); }
.evolution-page [data-evolution-person] { padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: 14px; font-weight: 750; text-align: left; cursor: pointer; }
.evolution-page [data-evolution-person]:hover { color: var(--orange); text-decoration: underline; }
.evolution-table td { vertical-align: middle; font-variant-numeric: tabular-nums; }
.evolution-table th button { padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.evolution-table tr.is-selected td { background: color-mix(in srgb, var(--orange) 7%, transparent); }
.evolution-spark { display: inline-flex; align-items: flex-end; gap: 2px; width: 120px; height: 28px; }
.evolution-spark i { flex: 1 1 0; min-width: 4px; border-radius: 2px 2px 0 0; background: var(--orange); }
.evolution-spark i.is-current { background: color-mix(in srgb, var(--orange) 35%, transparent); }
.evolution-pill { display: inline-flex; align-items: baseline; gap: 5px; padding: 2px 8px; border-radius: 999px; background: var(--surface-soft); font-weight: 800; }
.evolution-pill small { font-size: 12px; font-weight: 700; }
.evolution-pill.is-good { background: color-mix(in srgb, #1fa971 15%, transparent); color: #168a5b; }
.evolution-pill.is-mid { background: var(--orange-soft); color: var(--orange); }
.evolution-pill.is-low { background: color-mix(in srgb, #d64545 12%, transparent); color: #c03a3a; }
.evolution-trend { font-weight: 800; white-space: nowrap; }
.evolution-trend.is-up { color: #168a5b; }
.evolution-trend.is-down { color: #c03a3a; }
.evolution-trend.is-flat { color: var(--muted); }
.evolution-help { color: var(--muted); font-size: 12.5px; }
.evolution-help summary { cursor: pointer; font-weight: 700; }
.evolution-help ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.evolution-detail[hidden] { display: none; }
.evolution-detail-actions { display: flex; gap: 8px; }
.evolution-chart-wrap { padding: 8px 0; }
.evolution-chart { width: 100%; height: auto; max-height: 240px; }
html[data-theme="dark"] .evolution-chart line { stroke: #2c2f36; }
.evolution-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.evolution-legend span { display: inline-block; width: 18px; height: 3px; margin-right: -8px; border-radius: 2px; }
.evolution-legend .is-person { background: #f36c21; }
.evolution-legend .is-team { background: repeating-linear-gradient(90deg, #9aa1ad 0 5px, transparent 5px 9px); }
.evolution-legend .is-open { width: 9px; height: 9px; border: 2px solid #f36c21; border-radius: 50%; background: transparent; }
.evolution-open { color: var(--orange); font-weight: 700; }
.evolution-types h4 { margin: 4px 0 8px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }

@media print {
  body.printing-weekly-report .evolution-print { font-family: "Inter", "Segoe UI", Arial, sans-serif; color: #111; font-size: 11.5px; }
  .evolution-print header { margin-bottom: 14px; padding-bottom: 10px; border-bottom: 3px solid #f36c21; }
  .evolution-print header span { color: #f36c21; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
  .evolution-print header h1 { margin: 4px 0 2px; font-size: 22px; }
  .evolution-print header p { margin: 0; color: #555; }
  .evolution-print h2 { margin: 16px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: #333; }
  .evolution-print h4 { margin: 14px 0 6px; font-size: 12px; }
  .evolution-print-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .evolution-print-cards div { display: grid; gap: 2px; padding: 8px 10px; border: 1px solid #ddd; border-radius: 8px; }
  .evolution-print-cards small { color: #666; font-size: 9.5px; }
  .evolution-print-cards strong { font-size: 18px; }
  .evolution-print-cards em { color: #666; font-size: 9.5px; font-style: normal; }
  .evolution-print table { width: 100%; border-collapse: collapse; margin-top: 4px; }
  .evolution-print th { padding: 5px 6px; border-bottom: 2px solid #333; font-size: 9.5px; text-align: left; text-transform: uppercase; }
  .evolution-print td { padding: 5px 6px; border-bottom: 1px solid #e3e3e3; }
  .evolution-print tr { break-inside: avoid; }
  .evolution-print-highlights { margin: 0; padding-left: 16px; display: grid; gap: 3px; }
  .evolution-print-note { color: #666; font-size: 9.5px; }
  .evolution-print .evolution-chart { width: 100%; max-height: none; }
  .evolution-print .points-breakdown-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
  .evolution-print .points-breakdown-bars li { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; }
  .evolution-print .points-breakdown-bars i { grid-column: 1 / -1; display: block; height: 5px; background: #eee; border-radius: 3px; }
  .evolution-print .points-breakdown-bars b { display: block; height: 100%; background: #f36c21; border-radius: 3px; }
  .evolution-print .points-breakdown-label { display: grid; }
  .evolution-print .points-breakdown-label small { color: #666; }
  .evolution-print-lines { display: grid; gap: 22px; margin-top: 10px; }
  .evolution-print-lines i { display: block; border-bottom: 1px solid #bbb; }
  .evolution-print footer { margin-top: 18px; padding-top: 8px; border-top: 1px solid #ddd; color: #888; font-size: 9px; }
}

@media (max-width: 900px) {
  .points-breakdown-summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .points-breakdown-columns { grid-template-columns: 1fr; }
}

.management-page { display: grid; gap: 18px; }
.management-page[hidden] { display: none; }
.management-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.management-updated { color: var(--muted); font-size: 12px; }
.management-refresh { min-height: 34px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.management-refresh:hover { border-color: var(--orange); color: var(--orange); }
.management-refresh:disabled { opacity: .6; cursor: progress; }
.management-card { display: grid; align-content: start; gap: 14px; }
.management-card-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.management-card-heading h2 { margin: 2px 0 0; font-size: 20px; }
.management-card-heading small { color: var(--muted); font-size: 12px; }
.management-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.management-empty { margin: 0; padding: 14px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); font-size: 13px; text-align: center; }
.management-empty.is-ok { border-style: solid; border-color: color-mix(in srgb, var(--teal, #0f9d8a) 35%, var(--line)); color: var(--teal, #0f9d8a); }

.management-alerts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.management-alert { display: grid; align-content: start; gap: 10px; padding: 14px; border: 1px solid var(--line); border-left-width: 4px; border-radius: 12px; background: var(--surface); }
.management-alert.is-danger { border-left-color: #d64545; }
.management-alert.is-warning { border-left-color: var(--orange); }
.management-alert.is-info { border-left-color: #5b7bd5; }
.management-alert header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.management-alert header strong { font-size: 14px; }
.management-alert header span { min-width: 24px; padding: 2px 8px; border-radius: 999px; background: var(--surface-soft); font-size: 12px; font-weight: 800; text-align: center; }
.management-alert ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.management-alert li { display: grid; gap: 1px; }
.management-alert small { color: var(--muted); font-size: 12.5px; }
.management-page [data-management-person] { padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; text-align: left; cursor: pointer; }
.management-page [data-management-person]:hover { color: var(--orange); text-decoration: underline; }

.management-table-wrap { overflow-x: auto; }
.management-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.management-table th { padding: 8px 10px; border-bottom: 1px solid var(--line-strong); color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.management-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.management-table code { font-size: 12px; font-variant-numeric: tabular-nums; }
.management-missing { color: #d64545; font-weight: 700; }

.management-access ul, .management-health ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.management-access li { display: grid; grid-template-columns: 10px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.management-access li:last-child { border-bottom: 0; }
.management-access strong { font-size: 13px; }
.management-access small { color: var(--muted); font-size: 12px; }
.management-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.management-access .is-online .management-dot { background: #1fa971; box-shadow: 0 0 0 3px color-mix(in srgb, #1fa971 20%, transparent); }
.management-access .is-today .management-dot { background: var(--orange); }

.management-health li { display: grid; grid-template-columns: auto minmax(0,1fr); grid-template-areas: "status title" "status detail"; column-gap: 12px; row-gap: 2px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.management-health li:last-child { border-bottom: 0; }
.management-status { grid-area: status; align-self: center; min-width: 64px; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 800; text-align: center; }
.management-health .is-ok .management-status { background: color-mix(in srgb, #1fa971 16%, transparent); color: #168a5b; }
.management-health .is-warning .management-status { background: var(--orange-soft); color: var(--orange); }
.management-health strong { grid-area: title; font-size: 13px; }
.management-health small { grid-area: detail; color: var(--muted); font-size: 12px; }

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

/* Portal 86 — tela de entrada minimalista: preto liso, só a luz branca que acompanha o mouse */
.auth-shell { background: #000; }
.auth-shell .auth-orb,
.auth-shell .auth-grid { display: none; }
.auth-shell::before {
  background: radial-gradient(circle 390px at var(--auth-x) var(--auth-y), rgba(255, 255, 255, 0.07), transparent 68%);
}
@media (max-width: 720px) {
  .auth-shell::before { background: radial-gradient(circle 330px at 50% 12%, rgba(255, 255, 255, 0.05), transparent 72%); }
}
/* Preenchimento automático do navegador sem deixar os campos brancos. */
.auth-form input:-webkit-autofill,
.auth-form input:-webkit-autofill:hover,
.auth-form input:-webkit-autofill:focus {
  -webkit-text-fill-color: #f5f5f5;
  caret-color: #f5f5f5;
  -webkit-box-shadow: 0 0 0 1000px #070708 inset;
  box-shadow: 0 0 0 1000px #070708 inset;
  transition: background-color 9999s ease-out 0s;
}
.auth-form input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #09090a inset, 0 0 0 3px rgba(255, 106, 26, 0.12);
  box-shadow: 0 0 0 1000px #09090a inset, 0 0 0 3px rgba(255, 106, 26, 0.12);
}

/* Portal 85 — tela de entrada: logo, frase e título no mesmo alinhamento; mascote na demonstração */
.auth-intro .auth-intro-logo {
  display: block;
  width: auto;
  height: 62px;
  margin: 0 0 26px;
  object-fit: contain;
  object-position: left center;
}
.auth-intro .auth-kicker { display: block; margin: 0 0 14px; }
.auth-demo-button { justify-content: flex-start; gap: 12px; padding-block: 6px; overflow: hidden; }
.auth-demo-button > span:last-child { margin-left: auto; }
.auth-demo-button > span:not(:last-child) { display: grid; gap: 3px; text-align: left; }
.auth-demo-mascot {
  flex: 0 0 auto;
  width: 34px;
  height: 48px;
  margin-bottom: -10px;
  object-fit: contain;
  object-position: center bottom;
  transition: transform 200ms ease;
}
.auth-demo-button:hover .auth-demo-mascot,
.auth-demo-button:focus-visible .auth-demo-mascot { transform: translateY(-3px); }
@media (max-width: 720px) {
  .auth-intro .auth-intro-logo { height: 52px; margin: 0 auto 20px; object-position: center; }
}
@media (prefers-reduced-motion: reduce) { .auth-demo-mascot { transition: none; } }

/* Portal 83 — logos nos Acessos rápidos */
body.portal-authenticated .quick-access-card.has-logo { grid-template-columns: 66px minmax(0, 1fr) 18px; }
body.portal-authenticated .quick-access-icon.has-logo {
  width: 66px;
  height: 46px;
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
body.portal-authenticated .quick-access-icon.has-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
html[data-theme="dark"] body.portal-authenticated .quick-access-icon.has-logo { border-color: rgba(255, 255, 255, .14); }

/* Portal 82 — Assistente virtual em pé: sem círculo, com sombra suave sob os pés.
   Quem usa foto de perfil (sem arte própria) continua com o círculo. */
body.portal-authenticated #assistantFab.assistant-fab:not(.uses-profile-photo) {
  right: 22px;
  bottom: 8px;
  width: 102px;
  min-width: 102px;
  height: 170px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  box-shadow: none;
}
body.portal-authenticated #assistantFab.assistant-fab:not(.uses-profile-photo):hover,
body.portal-authenticated #assistantFab.assistant-fab:not(.uses-profile-photo):focus-visible {
  border: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}
body.portal-authenticated #assistantFab.assistant-fab:not(.uses-profile-photo):focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; }

/* Sombra oval no "chão" (o ::after é o balão de dica). */
body.portal-authenticated #assistantFab.assistant-fab:not(.uses-profile-photo)::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 1px;
  z-index: 0;
  width: 74px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(15, 23, 42, .34) 0%, rgba(15, 23, 42, .16) 42%, rgba(15, 23, 42, 0) 72%);
  transform: translateX(-50%);
  transition: transform 200ms var(--ui-ease, ease), opacity 200ms ease;
  pointer-events: none;
}
html[data-theme="dark"] body.portal-authenticated #assistantFab.assistant-fab:not(.uses-profile-photo)::before {
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, .75) 0%, rgba(0, 0, 0, .35) 45%, rgba(0, 0, 0, 0) 72%);
}

body.portal-authenticated #assistantFab.assistant-fab:not(.uses-profile-photo) .assistant-character {
  position: absolute;
  inset: 0 0 6px;
  z-index: 1;
  width: auto;
  height: auto;
}
body.portal-authenticated #assistantFab.assistant-fab:not(.uses-profile-photo) .assistant-character img {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  transform-origin: center bottom;
  filter: drop-shadow(0 4px 6px rgba(15, 23, 42, .16));
}
html[data-theme="dark"] body.portal-authenticated #assistantFab.assistant-fab:not(.uses-profile-photo) .assistant-character img {
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .55)) drop-shadow(0 0 1px rgba(255, 255, 255, .25));
}

/* Ao passar o mouse: dá um pequeno "pulo", troca para a pose apontando e a sombra encolhe. */
body.portal-authenticated #assistantFab.assistant-fab:not(.uses-profile-photo) .assistant-character-normal { opacity: 1; transform: none; }
body.portal-authenticated #assistantFab.assistant-fab:not(.uses-profile-photo) .assistant-character-active { opacity: 0; transform: translateY(0) scale(.98); }
body.portal-authenticated #assistantFab.assistant-fab:not(.uses-profile-photo):is(:hover, :focus-visible, [aria-expanded="true"]) .assistant-character-normal { opacity: 0; transform: translateY(-5px); }
body.portal-authenticated #assistantFab.assistant-fab:not(.uses-profile-photo):is(:hover, :focus-visible, [aria-expanded="true"]) .assistant-character-active { opacity: 1; transform: translateY(-5px); }
body.portal-authenticated #assistantFab.assistant-fab:not(.uses-profile-photo):is(:hover, :focus-visible, [aria-expanded="true"])::before { transform: translateX(-50%) scale(.82); opacity: .75; }

@media (max-width: 760px) {
  body.portal-authenticated #assistantFab.assistant-fab:not(.uses-profile-photo) { right: 10px; bottom: 6px; width: 74px; min-width: 74px; height: 124px; }
  body.portal-authenticated #assistantFab.assistant-fab:not(.uses-profile-photo)::before { width: 54px; height: 10px; }
}

/* Rodapé no "chão" da tela e espaço para o Assistente: a área de conteúdo tem no mínimo a altura
   da tela, o rodapé fica preso ao fundo dela e o espaço livre fica acima dele — assim os últimos
   cartões terminam antes do Assistente e o texto do rodapé para antes dele. */
body.portal-authenticated #portalShell main.content {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: 200px;
}
body.portal-authenticated #portalShell main.content > footer {
  position: absolute;
  left: clamp(18px, 2vw, 32px);
  right: calc(clamp(18px, 2vw, 32px) + 130px);
  bottom: 16px;
  align-items: center;
  margin: 0;
  padding: 14px 0 0 4px;
  border-top: 1px solid var(--line);
}
@media (max-width: 760px) {
  body.portal-authenticated #portalShell main.content { padding-bottom: 150px; }
  body.portal-authenticated #portalShell main.content > footer {
    left: 14px;
    right: auto;
    max-width: calc(100% - 116px);
    bottom: 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 0 0 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.portal-authenticated #assistantFab.assistant-fab:not(.uses-profile-photo) .assistant-character img,
  body.portal-authenticated #assistantFab.assistant-fab:not(.uses-profile-photo)::before { transition: none; }
}

/* Portal 87 — tela de entrada redesenhada: coluna única, preto, linhas finas e um único destaque laranja */
.auth-shell.lx {
  place-items: stretch;
  align-items: stretch;
  --lx-line: #27272a;
  --lx-line-strong: #3f3f46;
  --lx-text: #fafafa;
  --lx-muted: #a1a1aa;
  --lx-field: #09090b;
  --lx-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  background: #000;
  color: var(--lx-text);
  overflow-x: hidden;
}
/* Grade de pontos bem sutil, que some nas bordas: dá o ar tecnológico sem poluir. */
.auth-shell.lx::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 55% at 50% 45%, #000 0%, transparent 75%);
}
.lx-top, .lx-main, .lx-foot { position: relative; z-index: 1; }

.lx-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid #18181b;
}
.lx-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 650; letter-spacing: -0.01em; }
.lx-brand img { width: 38px; height: auto; filter: invert(1); }
.lx-status,
.lx-kicker,
.lx-foot,
.lx-divider { font-family: var(--lx-mono); }
.lx-status { display: inline-flex; align-items: center; gap: 8px; color: var(--lx-muted); font-size: 12px; }
.lx-status i { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18); }

.lx-main { flex: 1; display: grid; place-items: center; padding: 32px 16px; }
.lx-panel { width: min(100%, 384px); }
.lx-kicker { margin: 0 0 14px; color: #ff8a3d; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.lx-kicker::before { content: "> "; color: var(--lx-muted); }
.lx-panel h1,
.lx-panel h2 { margin: 0; font-size: clamp(28px, 3.2vw, 34px); font-weight: 700; line-height: 1.12; letter-spacing: -0.035em; color: var(--lx-text); }
.lx-sub { margin: 10px 0 0; color: var(--lx-muted); font-size: 15px; line-height: 1.5; }

.lx .lx-form { display: grid; gap: 16px; margin-top: 28px; }
.lx .lx-field { display: grid; gap: 8px; }
.lx .lx-field > span:first-child { color: #e4e4e7; font-size: 13px; font-weight: 600; }
.lx-label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lx-link {
  border: 0;
  padding: 0;
  background: none;
  color: var(--lx-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.lx-link:hover { color: var(--lx-text); text-decoration: underline; text-underline-offset: 3px; }
.lx-link:disabled { opacity: 0.6; cursor: wait; }
.lx .lx-form input {
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--lx-line);
  border-radius: 8px;
  background: var(--lx-field);
  box-shadow: none;
  color: var(--lx-text);
  font-size: 15px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.lx .lx-form input::placeholder { color: #8b8b94; }
.lx .lx-form input:hover:not(:disabled) { border-color: var(--lx-line-strong); background: var(--lx-field); }
.lx .lx-form input:focus { border-color: #e4e4e7; background: var(--lx-field); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1); }
.lx-input-wrap { position: relative; display: block; }
.lx .lx-input-wrap input { padding-right: 84px; }
.lx-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--lx-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.lx-toggle:hover { background: #18181b; color: var(--lx-text); }

/* Mensagem só ocupa espaço quando existe. */
.lx .auth-message { min-height: 0; margin: 0; font-size: 13px; line-height: 1.45; }
.lx .auth-message:empty { display: none; }
.lx .auth-message:not(:empty) {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 8px;
  background: rgba(127, 29, 29, 0.22);
  color: #fca5a5;
}
.lx .auth-message:not(:empty)::before {
  content: "!";
  flex: none;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f87171;
  color: #000;
  font-size: 12px;
  font-weight: 800;
}
.lx .auth-message.success:not(:empty) { border-color: rgba(74, 222, 128, 0.35); background: rgba(20, 83, 45, 0.25); color: #86efac; }
.lx .auth-message.success:not(:empty)::before { content: "✓"; background: #4ade80; }
.lx .lx-form.has-error input { border-color: #f87171; }
.lx .lx-form.has-error input:focus { box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.18); }

.lx-primary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 46px;
  margin-top: 4px;
  border: 0;
  border-radius: 8px;
  background: #ff6a1a;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  transition: background-color 150ms ease;
}
.lx-primary:hover:not(:disabled) { background: #ff7d36; }
.lx-primary:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.lx-primary > span:last-child { transition: transform 150ms ease; }
.lx-primary:hover:not(:disabled) > span:last-child { transform: translateX(3px); }
.lx-primary:disabled { cursor: wait; opacity: 0.85; }
.lx-primary.is-loading > span:last-child { display: none; }
.lx-primary.is-loading::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: lxSpin 700ms linear infinite;
}
@keyframes lxSpin { to { transform: rotate(360deg); } }

.lx-divider { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--lx-muted); font-size: 12px; }
.lx-divider::before,
.lx-divider::after { content: ""; flex: 1; height: 1px; background: var(--lx-line); }

.lx-secondary {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 14px 9px 9px;
  border: 1px solid var(--lx-line);
  border-radius: 8px;
  background: transparent;
  color: var(--lx-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease;
}
.lx-secondary:hover { border-color: var(--lx-line-strong); background: #0c0c0e; }
.lx-secondary:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.lx-secondary img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #18181b; }
.lx-secondary > span:nth-child(2) { flex: 1; display: grid; gap: 2px; }
.lx-secondary strong { font-size: 14px; font-weight: 600; }
.lx-secondary small { color: var(--lx-muted); font-size: 12px; }
.lx-secondary > span:last-child { color: var(--lx-muted); transition: transform 150ms ease, color 150ms ease; }
.lx-secondary:hover > span:last-child { color: var(--lx-text); transform: translateX(3px); }

.lx-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 16px clamp(16px, 4vw, 40px);
  border-top: 1px solid #18181b;
  color: var(--lx-muted);
  font-size: 12px;
}

@media (max-width: 720px) {
  .auth-shell.lx { display: flex; padding: 0; }
  .lx-top { padding: 14px 16px; }
  .lx-main { place-items: start center; padding: 36px 16px 28px; }
  .lx-foot { flex-direction: column; padding: 16px; }
}
@media (max-height: 760px) and (min-width: 721px) {
  .lx-main { padding: 18px 16px; }
  .lx .lx-form { margin-top: 22px; }
  .lx-divider { margin: 18px 0; }
}

/* Portal 88 — identidade de volta: frase do portal, logo como marca d'água e campos escuros mesmo com preenchimento automático */
.lx-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: -1;
  width: min(1100px, 92vw);
  transform: translate(-50%, -50%);
  filter: invert(1);
  opacity: 0.045;
  pointer-events: none;
  user-select: none;
}
.lx-main { isolation: isolate; overflow: hidden; }
.lx-panel h1 { font-size: clamp(30px, 3.4vw, 38px); }
.lx-panel h1 em { font-style: normal; color: #ff7a2d; }
.lx .lx-form input:-webkit-autofill,
.lx .lx-form input:-webkit-autofill:hover,
.lx .lx-form input:-webkit-autofill:focus,
.lx .lx-form input:autofill {
  -webkit-text-fill-color: #fafafa;
  caret-color: #fafafa;
  -webkit-box-shadow: 0 0 0 1000px #09090b inset;
  box-shadow: 0 0 0 1000px #09090b inset;
  transition: background-color 9999s ease-out 0s;
}
.lx .lx-form input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #09090b inset, 0 0 0 3px rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 1000px #09090b inset, 0 0 0 3px rgba(255, 255, 255, 0.1);
}
@media (max-width: 720px) {
  .lx-watermark { top: 38%; width: 150vw; }
}

/* Portal 89 — luz do mouse mais forte */
.auth-shell.lx::before {
  background: radial-gradient(circle 440px at var(--auth-x) var(--auth-y), rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.04) 45%, transparent 72%);
}

/* Portal 90 — marca d'água inclina de leve acompanhando o mouse */
.lx-watermark {
  transform: translate(-50%, -50%) perspective(1400px) rotateX(var(--wm-rx, 0deg)) rotateY(var(--wm-ry, 0deg));
  transition: transform 900ms cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: transform;
}

/* Portal 92 — botão Sair do portal, fora da central do perfil, logo abaixo do cartão do usuário */
.sidebar-logout { display: none; }
body.portal-authenticated #portalShell > .topbar .sidebar-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  margin-top: 4px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--ui-radius-xs, 8px);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
body.portal-authenticated #portalShell > .topbar .sidebar-logout .sidebar-icon { width: 18px; height: 18px; flex: none; }
body.portal-authenticated #portalShell > .topbar .sidebar-logout:hover,
body.portal-authenticated #portalShell > .topbar .sidebar-logout:focus-visible {
  border-color: color-mix(in srgb, #ef4444 35%, transparent);
  background: color-mix(in srgb, #ef4444 10%, transparent);
  color: #ef4444;
  outline: none;
}
html[data-theme="dark"] body.portal-authenticated #portalShell > .topbar .sidebar-logout:is(:hover, :focus-visible) { color: #f87171; }
body.portal-authenticated #portalShell.sidebar-collapsed > .topbar .sidebar-logout {
  width: 44px;
  margin-inline: auto;
  padding: 0;
  justify-content: center;
}
body.portal-authenticated #portalShell.sidebar-collapsed > .topbar .sidebar-logout > span { display: none; }

/* Portal 94 — origem Aluno (R.A. + número do requerimento) */
.diary-origin-aluno { background: color-mix(in srgb, #16a34a 12%, transparent); color: #15803d; }
html[data-theme="dark"] .diary-origin-aluno { color: #4ade80; }
.points-breakdown-bars b.is-aluno { background: #22a35a; }
.entry-mode-switch[hidden] { display: none !important; }
/* R.A. começa uma nova linha, com o número do requerimento ao lado. */
.service-entry-form .entry-ra-field { grid-column: 1; }

/* Portal 96 — Marcar tudo como lido */
.notification-center-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px 0; }
.notification-center-toolbar .notification-center-status { flex: 1; min-width: 0; padding: 0; }
.notification-mark-all {
  flex: none;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--orange);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.notification-mark-all:hover, .notification-mark-all:focus-visible { background: var(--orange-soft, rgba(255,106,26,.1)); border-color: var(--orange); outline: none; }
.notification-mark-all[hidden] { display: none; }

/* Portal 97 — exportar fila de repetidos */
.management-card-heading > div:first-child small { display: block; margin-top: 4px; }
.management-export { display: flex; gap: 8px; }
.management-export button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
}
.management-export button:hover:not(:disabled) { border-color: var(--orange); color: var(--orange); }
.management-export button:disabled { opacity: .5; cursor: not-allowed; }

/* Portal 98 — retorno do aluno x repetido */
.entry-duplicate-badge.is-return { background: color-mix(in srgb, #2563eb 12%, transparent); color: #2563eb; border-color: color-mix(in srgb, #2563eb 30%, transparent); }
html[data-theme="dark"] .entry-duplicate-badge.is-return { color: #93b4ff; }
.duplicate-history { display: grid; gap: 6px; margin: 4px 0 2px; padding: 0; list-style: none; }
.duplicate-history[hidden] { display: none; }
.duplicate-history li { display: grid; grid-template-columns: minmax(0, auto) auto 1fr; align-items: baseline; gap: 4px 10px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 12.5px; }
.duplicate-history li strong { color: var(--ink); }
.duplicate-history li span { color: var(--muted); font-variant-numeric: tabular-nums; }
.duplicate-history li small { justify-self: end; color: var(--muted); font-size: 12px; }
.duplicate-history li.is-own strong { color: var(--orange); }
.duplicate-reason-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.duplicate-reason-chips[hidden] { display: none; }
.duplicate-reason-chips button { min-height: 30px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.duplicate-reason-chips button:hover, .duplicate-reason-chips button:focus-visible { border-color: var(--orange); color: var(--orange); outline: none; }

/* Portal 102 — fila de repetidos minimizada e por colaborador */
.duplicates-queue > summary,
.duplicates-person > summary { display: flex; align-items: center; gap: 12px; list-style: none; cursor: pointer; }
.duplicates-queue > summary::-webkit-details-marker,
.duplicates-person > summary::-webkit-details-marker { display: none; }
.duplicates-queue > summary { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.duplicates-queue > summary > span { flex: 1; display: grid; gap: 2px; }
.duplicates-queue > summary small,
.duplicates-person-name small { color: var(--muted); font-size: 12px; }
.duplicates-queue[open] > summary { margin-bottom: 10px; }
.duplicates-queue .entry-chevron svg,
.duplicates-person .entry-chevron svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform 150ms ease; }
.duplicates-queue[open] > summary .entry-chevron svg,
.duplicates-person[open] > summary .entry-chevron svg { transform: rotate(180deg); }
.duplicates-queue-groups { display: grid; gap: 8px; }
.duplicates-person { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.duplicates-person > summary { padding: 10px 14px; }
.duplicates-person > summary:hover { background: var(--surface-soft); border-radius: 10px; }
.duplicates-person-name { flex: 1; display: grid; gap: 2px; }
.duplicates-person-count { min-width: 28px; padding: 2px 8px; border-radius: 999px; background: var(--orange-soft, rgba(255,106,26,.12)); color: var(--orange); font-weight: 750; font-size: 12.5px; text-align: center; font-variant-numeric: tabular-nums; }
.duplicates-person .management-table-scroll { padding: 0 14px; overflow-x: auto; }
.duplicates-person-actions { margin: 8px 14px 12px; }
.duplicates-person-actions button { border: 0; padding: 0; background: none; color: var(--orange); font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer; }
.duplicates-person-actions button:hover { text-decoration: underline; }

/* Portal 102 — logo do URI nos PDFs da Evolução e da fila de repetidos */
.evolution-print .evolution-print-brand { display: flex; align-items: center; gap: 16px; }
.evolution-print .evolution-print-logo { width: 84px; height: auto; flex: none; }
.evolution-print .evolution-print-heading { display: grid; }

/* Portal 104 — celular mais fluido: barra superior fixa, atalhos embaixo, menu com fechar, conteúdo mais leve */
.mobile-appbar, .mobile-tabbar, .mobile-drawer-close { display: none; }

@media (max-width: 899px) {
  body.portal-authenticated { --mobile-appbar: 56px; --mobile-tabbar: 62px; }
  body.portal-authenticated #mobileSidebarToggle { display: none !important; }

  body.portal-authenticated .mobile-appbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 85;
    display: flex; align-items: center; gap: 4px;
    height: calc(var(--mobile-appbar) + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 6px 0;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 90%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
  .mobile-appbar button {
    position: relative; display: grid; place-items: center;
    width: 44px; height: 44px; border: 0; border-radius: 12px;
    background: transparent; color: var(--ink); cursor: pointer;
  }
  .mobile-appbar button:active { background: var(--surface-soft); }
  .mobile-appbar .sidebar-icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .mobile-appbar-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
  .mobile-appbar-bell b, .mobile-tabbar a b {
    position: absolute; top: 6px; right: 6px; min-width: 17px; height: 17px; padding: 0 4px;
    border-radius: 999px; background: var(--orange); color: #fff; font-size: 12px; font-weight: 800; line-height: 17px; text-align: center;
  }
  .mobile-appbar-bell b[hidden], .mobile-tabbar a b[hidden] { display: none; }

  body.portal-authenticated .mobile-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 85;
    display: grid; grid-template-columns: repeat(5, 1fr);
    height: calc(var(--mobile-tabbar) + env(safe-area-inset-bottom));
    padding: 4px 4px env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
  .mobile-tabbar a, .mobile-tabbar button {
    position: relative; display: grid; place-items: center; align-content: center; gap: 3px;
    min-width: 0; border: 0; border-radius: 12px; background: transparent;
    color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; text-decoration: none; cursor: pointer;
  }
  .mobile-tabbar .sidebar-icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .mobile-tabbar a.active { color: var(--orange); }
  .mobile-tabbar a.active .sidebar-icon { stroke-width: 2.1; }
  .mobile-tabbar a b { top: 2px; right: calc(50% - 22px); }

  /* Menu lateral: ocupa a altura toda, com botão de fechar próprio. */
  body.portal-authenticated #portalShell > .topbar { z-index: 95; padding-top: 58px; width: min(300px, 86vw); }
  body.portal-authenticated .sidebar-backdrop:not([hidden]) { z-index: 94; }
  body.portal-authenticated .mobile-drawer-close {
    position: absolute; top: 10px; right: 10px; display: grid; place-items: center;
    width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 12px;
    background: var(--surface); color: var(--ink); cursor: pointer;
  }
  .mobile-drawer-close .sidebar-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
  body.portal-authenticated #portalShell > .topbar .user-menu { grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; }
  body.portal-authenticated #portalShell > .topbar .user-avatar { width: 44px; height: 44px; }

  /* Conteúdo: espaço para as barras e respiros mais leves. */
  body.portal-authenticated #portalShell > .content {
    padding: calc(var(--mobile-appbar) + env(safe-area-inset-top) + 14px) 14px calc(var(--mobile-tabbar) + env(safe-area-inset-bottom) + 24px);
    min-height: 100dvh;
  }
  body.portal-authenticated .portal-view-header { margin-bottom: 16px; padding: 0 0 14px 12px; }
  body.portal-authenticated .portal-view-header > span { display: none; }
  body.portal-authenticated .portal-view-header h1 { font-size: 24px; }
  body.portal-authenticated .portal-view-header p { font-size: 13px; line-height: 1.45; }
  body.portal-authenticated :where(.panel, .quick-access-panel, .workspace-launcher, .management-card) { padding: 16px; border-radius: 16px; }
  body.portal-authenticated .dashboard-overview { gap: 12px; }
  body.portal-authenticated .dashboard-overview .welcome { padding: 18px; }
  body.portal-authenticated .dashboard-overview .welcome h1 { font-size: 28px; }

  /* Indicadores do início lado a lado, compactos. */
  body.portal-authenticated .metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  body.portal-authenticated .metrics .metric-card { min-height: 0; padding: 14px; }
  body.portal-authenticated .metrics .metric-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  body.portal-authenticated .metrics .metric-icon { display: none; }
  body.portal-authenticated .metrics .metric-card { display: block; }
  body.portal-authenticated .metrics .metric-copy { display: grid; gap: 4px; width: 100%; max-width: none; padding: 0; margin: 0; }
  body.portal-authenticated .metrics .metric-copy small { max-width: none; }
  body.portal-authenticated .metrics .metric-copy strong { font-size: 24px; }

  /* Assistente: só o rosto, num botão redondo acima dos atalhos. */
  body.portal-authenticated #assistantFab.assistant-fab:not(.uses-profile-photo) {
    right: 14px; bottom: calc(var(--mobile-tabbar) + env(safe-area-inset-bottom) + 12px);
    width: 54px; height: 54px; padding: 0; overflow: hidden;
    border: 2px solid color-mix(in srgb, var(--orange) 55%, var(--line)); border-radius: 50%;
    background: var(--surface); box-shadow: 0 8px 20px rgba(0, 0, 0, .28);
  }
  body.portal-authenticated #assistantFab.assistant-fab:not(.uses-profile-photo)::before { display: none; }
  body.portal-authenticated #assistantFab.assistant-fab:not(.uses-profile-photo) .assistant-character { position: absolute; inset: 0; width: 100%; height: 100%; }
  body.portal-authenticated #assistantFab.assistant-fab:not(.uses-profile-photo) .assistant-character img {
    position: absolute; left: 50%; top: 0; width: 150%; height: auto; max-width: none; transform: translateX(-50%);
  }

  /* Aviso do modo exibição logo abaixo da barra. */
  body.portal-authenticated .demo-mode-badge { top: calc(var(--mobile-appbar) + env(safe-area-inset-top) + 6px); right: 50%; transform: translateX(50%); font-size: 12px; white-space: nowrap; }
}

/* Portal 105 — celular: assistente com a logo do URI e diário recolhido */
@media (max-width: 899px) {
  body.portal-authenticated #assistantFab.assistant-fab:not(.uses-profile-photo),
  body.portal-authenticated #assistantFab.assistant-fab.uses-profile-photo {
    right: 14px; bottom: calc(var(--mobile-tabbar) + env(safe-area-inset-bottom) + 12px);
    width: 54px; height: 54px; min-width: 54px; min-height: 54px; padding: 0; overflow: hidden;
    border: 1px solid var(--line); border-radius: 50%;
    background: var(--surface) url("assets/uri-logo-sidebar.png?v=20261023") center / 40px auto no-repeat;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
  }
  html[data-theme="dark"] body.portal-authenticated #assistantFab.assistant-fab { background-color: #f4f4f5; }
  body.portal-authenticated #assistantFab.assistant-fab::before,
  body.portal-authenticated #assistantFab.assistant-fab .assistant-character,
  body.portal-authenticated #assistantFab.assistant-fab > img,
  body.portal-authenticated #assistantFab.assistant-fab > span { display: none !important; }

  .diary-compact-day { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
  .diary-compact-day + .diary-compact-day { margin-top: 8px; }
  .diary-compact-day > summary,
  .diary-compact-entry > summary { display: flex; align-items: center; gap: 10px; list-style: none; cursor: pointer; }
  .diary-compact-day > summary::-webkit-details-marker,
  .diary-compact-entry > summary::-webkit-details-marker { display: none; }
  .diary-compact-day > summary { padding: 12px 14px; }
  .diary-compact-day > summary > span { flex: 1; display: grid; gap: 2px; }
  .diary-compact-day > summary strong { font-size: 14px; text-transform: capitalize; }
  .diary-compact-day > summary small { color: var(--muted); font-size: 12px; }
  .diary-compact-day > summary em { font-style: normal; font-weight: 700; font-size: 13px; color: var(--ink); }
  .diary-compact-day .entry-chevron svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform 150ms ease; }
  .diary-compact-day[open] > summary .entry-chevron svg { transform: rotate(180deg); }
  .diary-compact-list { display: grid; padding: 0 10px 10px; }
  .diary-compact-entry { border-top: 1px solid var(--line); }
  .diary-compact-entry > summary { padding: 10px 4px; }
  .diary-compact-entry > summary .diary-origin { flex: none; }
  .diary-compact-copy { flex: 1; min-width: 0; display: grid; gap: 1px; }
  .diary-compact-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
  .diary-compact-copy small { color: var(--muted); font-size: 12px; }
  .diary-compact-entry > summary b { flex: none; font-size: 13px; color: var(--ink); }
  .diary-compact-entry.is-duplicate > summary b { color: var(--orange); }
  .diary-compact-detail { display: grid; gap: 8px; margin: 0 4px 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-soft); }
  .diary-compact-detail div { display: grid; gap: 2px; }
  .diary-compact-detail dt { color: var(--muted); font-size: 12.5px; font-weight: 600; }
  .diary-compact-detail dd { margin: 0; font-size: 13.5px; overflow-wrap: anywhere; color: var(--ink); }
  .diary-compact-entry .diary-history-button { width: calc(100% - 8px); margin: 0 4px 10px; min-height: 40px; }
}

/* Portal 106 — celular: assistente em tela cheia com botão de fechar visível; avisos acima dos atalhos */
@media (max-width: 899px) {
  body.portal-authenticated .assistant-drawer { z-index: 110; }
  body.portal-authenticated .assistant-panel {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 16px calc(12px + env(safe-area-inset-bottom));
    border-left: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  body.portal-authenticated .assistant-panel > header {
    position: sticky; top: 0; z-index: 2;
    margin: 0 -16px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
    background: inherit;
  }
  body.portal-authenticated .assistant-panel > header > button[data-close-assistant] {
    flex: none; width: 44px; height: 44px; min-width: 44px; border-radius: 12px; font-size: 24px; line-height: 1;
  }
  body.portal-authenticated .assistant-panel > header .assistant-alien { width: 40px; height: 40px; flex: none; }
  body.portal-authenticated .assistant-panel > header strong { font-size: 18px; }
  body.portal-authenticated .assistant-prompts { display: flex; flex-wrap: wrap; gap: 8px; }
  body.portal-authenticated .assistant-prompts button { min-height: 38px; padding: 0 12px; font-size: 13px; }
  body.portal-authenticated .assistant-conversation { flex: 1 0 auto; min-height: 120px; margin: 0; }
  body.portal-authenticated .assistant-form {
    position: sticky; bottom: 0; z-index: 2;
    margin: 0 -16px; padding: 10px 16px calc(6px + env(safe-area-inset-bottom));
    background: inherit; border-top: 1px solid var(--line);
  }
  body.portal-authenticated .assistant-disclaimer { margin: 0; font-size: 12px; }

  body.portal-authenticated :where(#portalToastRegion, #pushPermissionCard) {
    left: 12px; right: 12px; width: auto;
    bottom: calc(var(--mobile-tabbar) + env(safe-area-inset-bottom) + 12px);
  }
  body.portal-authenticated #portalToastRegion { top: auto; }
}

/* Portal 106 — a animação de entrada das páginas termina sem "transform": assim janelas fixas
   dentro da página (ex.: detalhes do dia no Registrar) voltam a abrir centralizadas na tela. */
@keyframes ui-page-enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes portalPageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Portal 107 — celular: logo do URI flutuando (sem círculo branco) e assistente com a logo no topo */
@keyframes uri-logo-float { from { transform: translateY(0); } to { transform: translateY(-5px); } }
@media (max-width: 899px) {
  html body.portal-authenticated #assistantFab#assistantFab.assistant-fab,
  html[data-theme="dark"] body.portal-authenticated #assistantFab#assistantFab.assistant-fab {
    width: 66px; height: 46px; min-width: 66px; min-height: 46px;
    border: 0; border-radius: 0; box-shadow: none;
    background: transparent url("assets/uri-logo-sidebar.png?v=20261023") center / contain no-repeat;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .28));
    animation: uri-logo-float 2.6s ease-in-out infinite alternate;
  }
  /* Logo é preta: no tema escuro fica branca. */
  html[data-theme="dark"] body.portal-authenticated #assistantFab#assistantFab.assistant-fab {
    filter: invert(1) drop-shadow(0 6px 12px rgba(0, 0, 0, .55));
  }
  body.portal-authenticated #assistantFab.assistant-fab:hover,
  body.portal-authenticated #assistantFab.assistant-fab:focus-visible { background-color: transparent; transform: none; }

  /* Topo do assistente: a logo no lugar do personagem. */
  body.portal-authenticated .assistant-panel > header .assistant-alien {
    width: 52px; height: 40px; border: 0; border-radius: 0;
    background: transparent url("assets/uri-logo-sidebar.png?v=20261023") center / contain no-repeat;
  }
  html[data-theme="dark"] body.portal-authenticated .assistant-panel > header .assistant-alien { filter: invert(1); }
  body.portal-authenticated .assistant-panel > header .assistant-alien img { display: none; }

  /* Sem o vão entre as sugestões e a conversa; o campo de pergunta continua preso embaixo. */
  body.portal-authenticated .assistant-conversation { flex: 0 0 auto; min-height: 0; }
  body.portal-authenticated .assistant-form { margin-top: auto; }
}
@media (max-width: 899px) and (prefers-reduced-motion: reduce) {
  body.portal-authenticated #assistantFab.assistant-fab { animation: none; }
}

/* Portal 108 — atalho Registrar só para quem pontua */
#portalShell [data-scoring-only][hidden] { display: none !important; }

/* Portal 109 — Guia de atendimento na Biblioteca URI */
.service-guide { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.service-guide-heading h3 { margin: 4px 0 4px; font-size: 22px; letter-spacing: -.02em; }
.service-guide-heading p { margin: 0; color: var(--muted); font-size: 13.5px; }
.service-guide-tools { display: grid; grid-template-columns: minmax(0, 1fr) 240px; align-items: end; gap: 12px; margin-top: 16px; }
.service-guide-search { position: relative; display: block; }
.service-guide-search svg { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 1.8; }
.service-guide-tools input {
  width: 100%; min-height: 44px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 14px;
}
.service-guide-search input { padding-left: 40px; }
.service-guide-tools input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 15%, transparent); }
.service-guide-name { display: grid; gap: 4px; }
.service-guide-name span { color: var(--muted); font-size: 12.5px; font-weight: 650; }
.service-guide-name { align-self: end; }
.service-guide-categories { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.service-guide-categories button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink);
  font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.service-guide-categories button small { color: var(--muted); font-weight: 700; }
.service-guide-categories button[aria-pressed="true"] { border-color: var(--orange); background: color-mix(in srgb, var(--orange) 12%, var(--surface)); color: var(--orange); }
.service-guide-list { display: grid; gap: 8px; }
.service-guide-empty { margin: 8px 0; color: var(--muted); }
.guide-item { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.guide-item > summary { display: flex; align-items: center; gap: 12px; padding: 13px 16px; list-style: none; cursor: pointer; }
.guide-item > summary::-webkit-details-marker { display: none; }
.guide-item > summary:hover { background: var(--surface-soft); border-radius: 12px; }
.guide-item-icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--surface-soft); font-size: 17px; }
.guide-item-title { flex: 1; min-width: 0; display: grid; gap: 2px; }
.guide-item-title strong { font-size: 14.5px; }
.guide-item-title small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.guide-item .entry-chevron svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform 150ms ease; }
.guide-item[open] > summary .entry-chevron svg { transform: rotate(180deg); }
.guide-item-body { display: grid; gap: 14px; padding: 4px 16px 16px 64px; }
.guide-item-body h4 { margin: 0 0 6px; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--orange); }
.guide-item-body :where(ol, ul) { margin: 0; padding-left: 20px; display: grid; gap: 5px; font-size: 13.5px; line-height: 1.5; }
.guide-templates { display: grid; gap: 10px; }
.guide-template { border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.guide-template header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.guide-template header strong { font-size: 12.5px; }
.guide-template header button {
  min-height: 30px; padding: 0 12px; border: 1px solid var(--orange); border-radius: 8px;
  background: var(--orange); color: #fff; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.guide-template header button.is-copied { background: #16a34a; border-color: #16a34a; }
.guide-template p { margin: 0; padding: 10px 12px; font-size: 13.5px; line-height: 1.55; }
.guide-template mark { padding: 0 3px; border-radius: 4px; background: color-mix(in srgb, var(--orange) 18%, transparent); color: inherit; }
.guide-avoid li::marker { color: #dc2626; }
.guide-escalate { margin: 0; padding: 10px 12px; border-left: 3px solid var(--orange); border-radius: 0 8px 8px 0; background: color-mix(in srgb, var(--orange) 8%, transparent); font-size: 13px; line-height: 1.5; }
@media (max-width: 899px) {
  .service-guide-tools { grid-template-columns: 1fr; }
  .service-guide-categories { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .service-guide-categories::-webkit-scrollbar { display: none; }
  .service-guide-categories button { flex: none; }
  .guide-item > summary { padding: 12px; }
  .guide-item-body { padding: 4px 12px 14px; }
}

.service-guide-agent { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; }

/* Portal 113 — sugestões do Guia de atendimento */
.guide-suggest-link { justify-self: start; padding: 6px 10px; border: 1px dashed var(--line); border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer; }
.guide-suggest-link:hover { border-color: var(--orange); color: var(--orange); }
.guide-suggest { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr); gap: 18px; margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--orange) 5%, var(--surface)); }
.guide-suggest-intro { display: flex; gap: 12px; align-items: flex-start; }
.guide-suggest-icon { display: grid; place-items: center; flex: 0 0 40px; height: 40px; border-radius: 12px; background: color-mix(in srgb, var(--orange) 14%, transparent); font-size: 20px; }
.guide-suggest h4, .guide-inbox h4 { margin: 0 0 4px; font-size: 16px; }
.guide-suggest p, .guide-inbox header p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.guide-suggest-form { display: grid; gap: 10px; }
.guide-suggest-form label { display: grid; gap: 4px; }
.guide-suggest-form label > span { color: var(--muted); font-size: 12.5px; font-weight: 650; }
.guide-suggest-form :where(select, textarea), .guide-inbox select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; }
.guide-suggest-form textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
.guide-suggest-form :where(select, textarea):focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 15%, transparent); }
.guide-suggest-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.guide-suggest-actions small { margin-right: auto; font-size: 12.5px; color: var(--muted); }
.guide-suggest-actions small[data-tone="ok"] { color: #1f9d55; font-weight: 650; }
.guide-suggest-actions small[data-tone="error"] { color: #d64545; font-weight: 650; }
.guide-inbox { margin-top: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.guide-inbox > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.guide-inbox h4 small { margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--orange); color: #fff; font-size: 12px; font-weight: 700; vertical-align: middle; }
.guide-inbox h4 small:empty { display: none; }
.guide-inbox-tools { display: flex; gap: 8px; }
.guide-inbox-tools select { width: auto; padding: 8px 10px; font-size: 13px; }
.guide-inbox-tools button, .guide-inbox-actions button { padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer; }
.guide-inbox-tools button:hover, .guide-inbox-actions button:hover { border-color: var(--orange); color: var(--orange); }
.guide-inbox-list { display: grid; gap: 10px; }
.guide-suggest-submit { padding: 10px 18px; border: 0; border-radius: 999px; background: var(--orange); color: #fff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.guide-suggest-submit:hover { filter: brightness(1.06); }
.guide-suggest-submit:disabled { opacity: .6; cursor: wait; }
.guide-inbox-empty { margin: 4px 0; color: var(--muted); font-size: 13.5px; }
.guide-inbox-item { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--orange); border-radius: 12px; }
.guide-inbox-item:not([data-status="nova"]) { border-left-color: var(--line); }
.guide-inbox-item[data-status="arquivada"] { opacity: .7; }
.guide-inbox-item header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.guide-inbox-item header small { margin-left: auto; color: var(--muted); font-size: 12px; }
.guide-inbox-chip { padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--orange) 14%, transparent); color: var(--orange); font-size: 12px; font-weight: 700; }
.guide-inbox-chip[data-status="vista"] { background: color-mix(in srgb, var(--muted) 16%, transparent); color: var(--muted); }
.guide-inbox-chip[data-status="incluida"] { background: color-mix(in srgb, #1f9d55 15%, transparent); color: #1f9d55; }
.guide-inbox-chip[data-status="arquivada"] { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.guide-inbox-topic { margin: 0; color: var(--orange); font-size: 12px; font-weight: 700; }
.guide-inbox-message { margin: 0; font-size: 14px; line-height: 1.55; white-space: normal; overflow-wrap: anywhere; }
.guide-inbox-actions { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 899px) {
  .guide-suggest { grid-template-columns: 1fr; padding: 14px; }
  .guide-inbox { padding: 14px; }
  .guide-inbox-tools { width: 100%; }
  .guide-inbox-tools select { flex: 1; }
  .guide-inbox-item header small { margin-left: 0; width: 100%; }
}

/* Portal 115 — Destaque semanal (story) */
.weekly-story-intro { margin: -4px 0 16px; color: var(--muted); font-size: 13.5px; }
.weekly-story-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.weekly-story-form { display: grid; gap: 12px; }
.weekly-story-form label { display: grid; gap: 4px; min-width: 0; }
.weekly-story-form label > span { color: var(--muted); font-size: 12.5px; font-weight: 650; }
.weekly-story-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.weekly-story-row-3 { grid-template-columns: repeat(3, 1fr); }
.weekly-story-form :where(input[type=text], select, textarea) { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; }
.weekly-story-form textarea { resize: vertical; line-height: 1.45; }
.weekly-story-form :where(input, select, textarea):focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 15%, transparent); }
.weekly-story-status { min-height: 18px; color: var(--muted); font-size: 12.5px; }
.weekly-story-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.weekly-story-primary, .weekly-story-secondary { padding: 11px 20px; border-radius: 999px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.weekly-story-primary { border: 0; background: var(--orange); color: #fff; }
.weekly-story-secondary { border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.weekly-story-preview { margin: 0; display: grid; gap: 8px; justify-items: center; }
.weekly-story-preview canvas { width: 100%; max-width: 300px; aspect-ratio: 9 / 16; border-radius: 14px; background: #0e1c36; box-shadow: 0 18px 40px rgba(0,0,0,.25); }
.weekly-story-preview figcaption { color: var(--muted); font-size: 12px; text-align: center; }
@media (max-width: 899px) {
  .weekly-story-layout { grid-template-columns: 1fr; }
  .weekly-story-preview { order: -1; }
  .weekly-story-preview canvas { max-width: 240px; }
  .weekly-story-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Portal 116 — Destaque da semana, hall e aro dourado */
.avatar.is-champion { border-color: #e2b13c; box-shadow: 0 0 0 2px #c99a2e; }
.avatar.large.is-champion { box-shadow: 0 0 0 3px #c99a2e; }
.champion-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 28px; margin-top: 18px; padding: 22px; }
.champion-panel[hidden] { display: none; }
.champion-hero { display: flex; gap: 20px; align-items: center; }
.champion-hero canvas { flex: 0 0 auto; width: 150px; aspect-ratio: 9 / 16; border-radius: 10px; box-shadow: 0 10px 24px rgba(0, 0, 0, .18); background: #0e1c36; }
.champion-copy { display: grid; gap: 6px; min-width: 0; }
.champion-copy h2 { margin: 2px 0 0; font-size: 26px; letter-spacing: -.02em; }
.champion-copy p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.champion-times { color: var(--ink) !important; font-weight: 600; }
.champion-download { justify-self: start; margin-top: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.champion-download:hover { border-color: var(--orange); color: var(--orange); }
.champion-hall { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-content: start; }
.champion-hall h3 { margin: 0 0 2px; font-size: 14px; }
.champion-hall p { margin: 0 0 10px; color: var(--muted); font-size: 12.5px; }
.champion-hall-list, .champion-timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.champion-hall-list li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.champion-hall-list li:last-child, .champion-timeline li:last-child { border-bottom: 0; }
.champion-hall-list li .avatar { width: 28px; height: 28px; flex: 0 0 auto; font-size: 12px; }
.champion-hall-list li > span { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.champion-hall-list b { color: var(--muted); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.champion-timeline li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.champion-timeline span { grid-column: 1 / -1; color: var(--muted); font-size: 12.5px; }
.champion-timeline strong { font-size: 13.5px; font-weight: 600; }
.champion-timeline em { color: var(--muted); font-size: 12px; font-style: normal; }
@media (max-width: 1100px) { .champion-panel { grid-template-columns: 1fr; } }
@media (max-width: 899px) {
  .champion-panel { padding: 16px; gap: 18px; }
  .champion-hero { align-items: flex-start; }
  .champion-hero canvas { width: 120px; }
  .champion-copy h2 { font-size: 22px; }
  .champion-hall { grid-template-columns: 1fr; }
}
.gold-medal { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; vertical-align: middle; background: radial-gradient(circle at 35% 30%, #fff6c4, #f5c542 45%, #b07d0c); box-shadow: inset 0 0 0 2px rgba(154, 107, 6, .75), 0 3px 8px rgba(0, 0, 0, .2); color: #7a5200; font: 800 16px/1 Inter, sans-serif; font-style: normal; }
.gold-medal.small { width: 18px; height: 18px; font-size: 0; }
.champion-hall-list b em { margin-left: 4px; }

.champion-thumb { position: relative; flex: 0 0 auto; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 10px; }
.champion-thumb canvas { display: block; }
.champion-hero .champion-thumb canvas { width: 190px; }
.champion-thumb span { position: absolute; right: 8px; bottom: 18px; padding: 3px 9px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 12.5px; font-weight: 650; opacity: 0; transition: opacity .15s; }
.champion-thumb:hover span, .champion-thumb:focus-visible span { opacity: 1; }
.champion-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.champion-actions .champion-download { margin-top: 0; }
.champion-report { display: inline-flex; gap: 6px; align-items: center; }
.champion-report[hidden] { display: none; }
.champion-report select { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; }
.champion-report-status { min-height: 16px; color: var(--muted); font-size: 12px; }
.champion-preview { padding: 0; border: 0; border-radius: 16px; background: transparent; max-height: 94vh; overflow: visible; }
.champion-preview::backdrop { background: rgba(0, 0, 0, .72); }
.champion-preview img { display: block; height: min(86vh, 960px); width: auto; border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.champion-preview button { display: block; margin: 12px auto 0; padding: 8px 18px; border: 0; border-radius: 999px; background: #fff; color: #111; font: inherit; font-weight: 700; cursor: pointer; }
@media (max-width: 899px) { .champion-hero .champion-thumb canvas { width: 130px; } .champion-preview img { height: auto; width: min(92vw, 420px); } }
.champion-report { flex-wrap: wrap; } .champion-report button { white-space: nowrap; }

/* Portal 126 — Pontuação detalhada recolhível e detalhe por item */
.points-breakdown-more { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.points-breakdown-more > summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; cursor: pointer; list-style: none; color: var(--orange); font-size: 13.5px; font-weight: 700; }
.points-breakdown-more > summary::-webkit-details-marker { display: none; }
.points-breakdown-more > summary::before { content: "▸"; display: inline-block; transition: transform .15s; }
.points-breakdown-more[open] > summary::before { transform: rotate(90deg); }
.points-breakdown-more > summary small { color: var(--muted); font-size: 12px; font-weight: 500; }
.points-breakdown-more[open] > summary { margin-bottom: 12px; }
.points-breakdown-bars li.is-clickable { cursor: pointer; padding: 4px 6px; margin: -4px -6px; border-radius: 8px; }
.points-breakdown-bars li.is-clickable:hover, .points-breakdown-bars li.is-clickable:focus-visible, .points-breakdown-bars li[aria-expanded="true"] { background: color-mix(in srgb, var(--orange) 8%, transparent); outline: none; }
.points-breakdown-days span.is-clickable { cursor: pointer; border-radius: 8px; }
.points-breakdown-days span.is-clickable:hover i, .points-breakdown-days span[aria-expanded="true"] i { filter: brightness(1.08); box-shadow: 0 0 0 2px color-mix(in srgb, var(--orange) 35%, transparent); }
.points-breakdown-bars li.bd-detail-row { display: block; }
.bd-detail { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: color-mix(in srgb, var(--ink) 3%, var(--surface)); }
.bd-detail > strong { display: block; margin-bottom: 8px; font-size: 13px; }
.bd-detail-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.bd-detail h5 { margin: 0 0 4px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.bd-detail ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.bd-detail li { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.bd-detail li b { color: var(--muted); font-weight: 600; white-space: nowrap; }
.bd-detail-empty { margin: 0; color: var(--muted); font-size: 12.5px; }
.points-breakdown-day-detail { margin-top: 8px; }

/* Portal 127 — Diário recolhível em todas as telas, agrupado por tipo de demanda */
.diary-compact-day { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.diary-compact-day + .diary-compact-day { margin-top: 8px; }
.diary-compact-day > summary,
.diary-compact-entry > summary { display: flex; align-items: center; gap: 10px; list-style: none; cursor: pointer; }
.diary-compact-day > summary::-webkit-details-marker,
.diary-compact-entry > summary::-webkit-details-marker { display: none; }
.diary-compact-day > summary { padding: 12px 14px; }
.diary-compact-day > summary > span { flex: 1; display: grid; gap: 2px; }
.diary-compact-day > summary strong { font-size: 14px; text-transform: capitalize; }
.diary-compact-day > summary small { color: var(--muted); font-size: 12px; }
.diary-compact-day > summary em { font-style: normal; font-weight: 700; font-size: 13px; color: var(--ink); }
.diary-compact-day .entry-chevron svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform 150ms ease; }
.diary-compact-day[open] > summary .entry-chevron svg { transform: rotate(180deg); }
.diary-compact-list { display: grid; padding: 0 10px 10px; }
.diary-compact-entry { border-top: 1px solid var(--line); }
.diary-compact-entry > summary { padding: 10px 4px; }
.diary-compact-entry > summary .diary-origin { flex: none; }
.diary-compact-copy { flex: 1; min-width: 0; display: grid; gap: 1px; }
.diary-compact-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.diary-compact-copy small { color: var(--muted); font-size: 12px; }
.diary-compact-entry > summary b { flex: none; font-size: 13px; color: var(--ink); }
.diary-compact-entry.is-duplicate > summary b { color: var(--orange); }
.diary-compact-detail { display: grid; gap: 8px; margin: 0 4px 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-soft); }
.diary-compact-detail div { display: grid; gap: 2px; }
.diary-compact-detail dt { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.diary-compact-detail dd { margin: 0; font-size: 13.5px; overflow-wrap: anywhere; color: var(--ink); }
.diary-compact-entry .diary-history-button { width: calc(100% - 8px); margin: 0 4px 10px; min-height: 40px; }
.diary-compact-day > summary .entry-chevron { color: var(--muted); }
.diary-type-group { border-top: 1px solid var(--line); }
.diary-type-group > summary { display: flex; align-items: center; gap: 12px; padding: 10px 4px; list-style: none; cursor: pointer; }
.diary-type-group > summary::-webkit-details-marker { display: none; }
.diary-type-copy { flex: 1; min-width: 0; display: grid; gap: 1px; }
.diary-type-copy strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.diary-type-copy small { color: var(--muted); font-size: 12px; }
.diary-type-count { flex: none; color: var(--muted); font-size: 12.5px; }
.diary-type-group > summary b { flex: none; min-width: 52px; text-align: right; font-size: 13px; color: var(--ink); }
.diary-type-group .entry-chevron svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; transition: transform 150ms ease; }
.diary-type-group[open] > summary .entry-chevron svg { transform: rotate(180deg); }
.diary-type-group[open] > summary { background: color-mix(in srgb, var(--orange) 6%, transparent); border-radius: 8px; }
.diary-type-list { padding: 0 0 6px 14px; border-left: 2px solid color-mix(in srgb, var(--orange) 35%, transparent); margin: 2px 0 8px 8px; }
.diary-type-list .diary-compact-entry:first-child { border-top: 0; }
/* Aro dourado do destaque: espaço para não encostar no nome ao lado. */
.avatar.is-champion { margin-right: 4px; }
/* Diário — linha do dia */
.diary-compact-day { overflow: hidden; transition: box-shadow .15s, border-color .15s; }
.diary-compact-day:hover { border-color: color-mix(in srgb, var(--orange) 35%, var(--line)); }
.diary-compact-day[open] { box-shadow: 0 8px 22px rgba(15, 23, 42, .06); }
.diary-compact-day > summary { gap: 14px; padding: 12px 16px; }
.diary-day-date { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: color-mix(in srgb, var(--orange) 10%, var(--surface)); color: var(--orange); line-height: 1; }
.diary-day-date b { font-size: 18px; font-weight: 800; }
.diary-day-date small { margin-top: -6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.diary-compact-day > summary .diary-day-copy { flex: 1; min-width: 0; display: grid; gap: 2px; }
.diary-compact-day > summary .diary-day-copy strong { font-size: 14.5px; text-transform: none; }
.diary-compact-day > summary .diary-day-copy small { color: var(--muted); font-size: 12.5px; }
.diary-day-points { flex: none; display: grid; justify-items: end; gap: 1px; line-height: 1.1; }
.diary-day-points b { font-size: 17px; font-weight: 800; color: var(--ink); }
.diary-day-points small { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.diary-compact-day[open] > summary { border-bottom: 1px solid var(--line); }
.diary-compact-day .diary-compact-list { padding: 6px 14px 12px; }
.diary-compact-day .diary-type-group:first-child { border-top: 0; }
@media (max-width: 899px) { .diary-day-date { width: 40px; height: 40px; } .diary-day-date b { font-size: 16px; } .diary-compact-day > summary { gap: 10px; padding: 10px 12px; } }
.diary-compact-day > summary > .diary-day-date { flex: 0 0 46px; }
.diary-compact-day > summary > .diary-day-points { flex: 0 0 auto; }
.diary-compact-day > summary > .diary-day-copy { flex: 1 1 auto; }
.diary-type-list .diary-compact-detail { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 18px; }
.diary-type-list .diary-compact-entry .diary-history-button { width: auto; min-height: 32px; margin: 0 4px 10px auto; display: block; padding: 6px 14px; font-size: 12.5px; }
@media (max-width: 899px) { .diary-compact-day > summary > .diary-day-date { flex-basis: 40px; } }
/* Portal 127 — textos que cortavam */
/* Ranking da semana (Panorama): nome em cima e pontos embaixo, sem cortar o nome. */
.panorama-ranking-row { grid-template-columns: 24px 32px minmax(0, 1fr); grid-template-rows: auto auto; row-gap: 0; }
.panorama-ranking-row b, .panorama-ranking-row .avatar { grid-row: 1 / 3; }
.panorama-ranking-row strong { grid-column: 3; grid-row: 1; white-space: normal; overflow: visible; overflow-wrap: anywhere; line-height: 1.25; font-size: 12.5px; }
.panorama-ranking-row small { grid-column: 3; grid-row: 2; font-size: 12px; }
@media (max-width: 899px) {
  /* Período do Panorama: a data inteira cabe no campo. */
  #panoramaPeriodSelect { font-size: 13.5px; padding-right: 28px; }
  /* Diário: nome do tipo de demanda em linha própria, contagem e pontos embaixo. */
  .diary-type-group > summary { flex-wrap: wrap; row-gap: 2px; }
  .diary-type-copy { flex: 1 1 100%; order: 0; }
  .diary-type-copy strong { white-space: normal; }
  .diary-type-count { order: 1; }
  .diary-type-group > summary b { order: 2; margin-left: auto; min-width: 0; }
  .diary-type-group .entry-chevron { order: 3; }
  .diary-type-list { padding-left: 8px; margin-left: 2px; }
}
/* Acessos rápidos: no computador, o card nunca fica estreito a ponto de cortar o título. */
@media (min-width: 900px) {
  body.portal-authenticated .quick-access-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}
body.portal-authenticated .quick-access-copy strong { white-space: normal; overflow: visible; overflow-wrap: anywhere; line-height: 1.25; }
@media (min-width: 900px) {
  body.portal-authenticated .quick-access-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}

/* Portal 128 — barra lateral preenche toda a altura (sem vão entre o menu e o rodapé) */
@media (min-width: 900px) {
  body.portal-authenticated #portalShell > .topbar { display: flex; flex-direction: column; }
  /* O menu cresce para ocupar a altura livre, mas nunca encolhe abaixo do conteúdo (em tela baixa, a barra rola). */
  body.portal-authenticated #portalShell > .topbar > nav { flex: 1 0 auto; display: flex; flex-direction: column; }
  body.portal-authenticated #portalShell > .topbar > nav > a { flex: 1 0 auto; min-height: 38px; max-height: 58px; align-items: center; }
  body.portal-authenticated #portalShell > .topbar > nav > a .sidebar-icon { width: 21px; height: 21px; }
  body.portal-authenticated #portalShell > .topbar > nav > a > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
/* Portal 128 — fontes que ainda ficavam pequenas */
body.portal-authenticated .panorama-evolution-item small { font-size: 12px; }
body.portal-authenticated .panorama-evolution-item em { font-size: 12px; }
body.portal-authenticated .diary-origin { font-size: 11.5px; }
body.portal-authenticated .entry-duplicate-badge { font-size: 11.5px; }
body.portal-authenticated .metric-copy small { font-size: 12px; }
body.portal-authenticated .performance-diary-heading em { font-size: 13px; }
body.portal-authenticated .mural-pinned-label, body.portal-authenticated .mural-priority { font-size: 11.5px; }

body.portal-authenticated .performance-diary-heading strong, body.portal-authenticated .points-breakdown-heading strong { font-size: 16px; }
body.portal-authenticated .performance-diary-heading small, body.portal-authenticated .points-breakdown-heading small { font-size: 13px; }
/* Portal 129 — listas do destaque na mesma linha e altura; pílulas sem quebra */
.champion-hall-list li, .champion-timeline li { min-height: 52px; box-sizing: border-box; padding: 6px 0; }
.champion-timeline li { align-content: center; }
.champion-hall-list .avatar.is-champion { margin-right: 0; }
.champion-hall-list li .avatar { width: 32px; height: 32px; }
body.portal-authenticated .personal-movement { white-space: nowrap; }
body.portal-authenticated .professional-profile-badge { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
body.portal-authenticated .profession-calendar-heading { flex-wrap: wrap; row-gap: 10px; }

/* Portal 131 — item ativo do menu igual para todos e laranja URI sempre presente.
   A cor escolhida em Aparência pinta o fundo e o ícone; a barrinha do item ativo,
   o ponto "● Ir para o início" e a faixa do título da página continuam no laranja URI. */
@media (min-width: 900px) {
  html body.portal-authenticated #portalShell > .topbar nav a { position: relative; border: 1px solid transparent; }
  html body.portal-authenticated #portalShell > .topbar nav a:not(.active):hover,
  html body.portal-authenticated #portalShell > .topbar nav a:not(.active):focus-visible {
    border-color: var(--line);
    background: color-mix(in srgb, var(--ink) 4%, transparent);
    color: var(--ink);
  }
  html body.portal-authenticated #portalShell > .topbar nav a:not(.active):hover::before,
  html body.portal-authenticated #portalShell > .topbar nav a:not(.active):focus-visible::before { content: none; }
  html body.portal-authenticated #portalShell > .topbar nav a.active,
  html[data-theme] body.portal-authenticated #portalShell > .topbar nav a.active {
    border-color: color-mix(in srgb, var(--accent, var(--orange)) 28%, var(--line));
    background: color-mix(in srgb, var(--accent, var(--orange)) 10%, var(--surface));
    color: var(--ink);
    font-weight: 700;
  }
  html body.portal-authenticated #portalShell > .topbar nav a.active > i,
  html body.portal-authenticated #portalShell > .topbar nav a.active .sidebar-icon { color: var(--accent, var(--orange)); stroke: var(--accent, var(--orange)); }
  html body.portal-authenticated #portalShell > .topbar nav a.active::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 50%;
    width: 3px;
    height: 18px;
    transform: translateY(-50%);
    border-radius: 0 3px 3px 0;
    background: var(--brand-orange, #f36c21);
    display: block;
  }
  html body.portal-authenticated #portalShell > .topbar nav a.active::after { content: none; }
}
html body.portal-authenticated .portal-view-header::before { background: var(--brand-orange, #f36c21); }
html body.portal-authenticated .dashboard-overview .welcome::before { background: var(--brand-orange, #f36c21); }
html[data-theme] body.portal-authenticated .dashboard-overview .welcome::before,
html[data-theme] body.portal-authenticated .portal-view-header::before { background: var(--brand-orange, #f36c21); }
@media (min-width: 900px) {
  html body.portal-authenticated #portalShell > .topbar nav a.active::before { z-index: 2; opacity: 1; left: 0; width: 3px; }
}
/* Portal 132 — repetidos/retornos por item na Pontuação detalhada */
.bd-repeat { color: #c2410c; font-weight: 700; }
.bd-return { color: #2563eb; font-weight: 700; }
html[data-theme="dark"] .bd-repeat { color: #fb923c; }
html[data-theme="dark"] .bd-return { color: #7aa7ff; }
.points-breakdown-days span { position: relative; }
.bd-day-repeat { position: absolute; top: -6px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #c2410c; color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--surface); }
.bd-day-repeat { right: auto; left: calc(50% + 8px); top: -8px; }

/* Portal 133 — celular: ajustes depois do aumento das fontes */
@media (max-width: 899px) {
  /* Barra de baixo: rótulos sem encostar um no outro. */
  .mobile-tabbar a, .mobile-tabbar button { font-size: 11px; letter-spacing: -.01em; }
  .mobile-tabbar a span, .mobile-tabbar button span { white-space: nowrap; }

  /* Desempenho: posição desce para baixo do nome em vez de sobrepor. */
  body.portal-authenticated .personal-analysis-header { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
  body.portal-authenticated .personal-analysis-person { flex: 1 1 220px; min-width: 0; }
  body.portal-authenticated .personal-analysis-person > span { min-width: 0; }
  body.portal-authenticated .personal-analysis-position { flex: 0 0 auto; }

  /* Destaque da semana: story em cima, texto embaixo, tudo dentro do cartão. */
  body.portal-authenticated .champion-panel { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  body.portal-authenticated .champion-hero { flex-direction: column; align-items: stretch; gap: 14px; }
  body.portal-authenticated .champion-hero .champion-thumb { align-self: center; }
  body.portal-authenticated .champion-hero .champion-thumb canvas { width: 150px; }
  body.portal-authenticated .champion-copy { width: 100%; }
  body.portal-authenticated .champion-copy p { overflow-wrap: anywhere; }
  body.portal-authenticated .champion-actions { width: 100%; }
  body.portal-authenticated .champion-report { width: 100%; flex-wrap: wrap; }
  body.portal-authenticated .champion-report select { flex: 0 0 auto; }
  body.portal-authenticated .champion-report button { flex: 1 1 auto; white-space: normal; }
  body.portal-authenticated .champion-hall { grid-template-columns: minmax(0, 1fr); }
  body.portal-authenticated .champion-hall-list li > span:not(.avatar) { flex: 1 1 auto; }
  body.portal-authenticated .champion-hall-list li > .avatar { flex: 0 0 32px; width: 32px; height: 32px; }
  body.portal-authenticated .champion-hall-list b { flex: 0 0 auto; }
}
@media (max-width: 400px) {
  .mobile-tabbar a, .mobile-tabbar button { font-size: 10.5px; letter-spacing: -.02em; }
}
@media (max-width: 899px) {
  /* Selos longos: no celular podem quebrar linha, com cantos menos arredondados (não empurram a página). */
  body.portal-authenticated .profession-calendar-heading > * { min-width: 0; max-width: 100%; }
  body.portal-authenticated .professional-profile-badge { white-space: normal; border-radius: 10px; text-align: left; line-height: 1.35; padding-block: 5px; }
  body.portal-authenticated .connections-heading :where(.connections-badge, span[class*="badge"]), body.portal-authenticated .connections-official { border-radius: 10px; line-height: 1.35; }
}
@media (max-width: 899px) { body.portal-authenticated .panel-note { border-radius: 10px; line-height: 1.35; white-space: normal; } }

/* Portal 134 — relatório individual por dia e tipo de demanda */
body.portal-authenticated .report-full-summary { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
#reportRepeatedTotal small { color: var(--muted); font-size: 12px; font-weight: 600; }
.report-full-days { margin-top: 18px; }
.report-full-days h4 { margin: 0 0 2px; }
.report-full-days > .report-full-note { margin: 0 0 10px; }
.report-days { display: grid; gap: 8px; }
.report-day { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.report-day > summary { display: grid; grid-template-columns: minmax(110px, 1.2fr) repeat(4, minmax(70px, 1fr)) 18px; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; list-style: none; }
.report-day > summary::-webkit-details-marker { display: none; }
.report-day > summary::after { content: "▾"; color: var(--muted); justify-self: end; transition: transform .15s; }
.report-day[open] > summary::after { transform: rotate(180deg); }
.report-day[open] > summary { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--ink) 3%, transparent); }
.report-day > summary span { display: grid; gap: 1px; }
.report-day > summary small { color: var(--muted); font-size: 12px; }
.report-day > summary strong { font-size: 15px; }
.report-day[data-empty] > summary { opacity: .65; }
.report-day .report-demand-table { margin: 6px 14px 12px; width: calc(100% - 28px); }
.report-demand-table td:not(:first-child), .report-demand-table th:not(:first-child) { text-align: right; white-space: nowrap; }
.report-repeat { color: #c2410c; }
html[data-theme="dark"] .report-repeat { color: #fb923c; }
.print-report-days h3 { margin: 10px 0 4px; font-size: 12pt; }
@media (max-width: 899px) {
  .report-day > summary { grid-template-columns: 1fr 1fr 1fr 18px; row-gap: 8px; }
  .report-day > summary .report-day-name { grid-column: 1 / -1; }
  .report-day > summary span:nth-child(5) { display: none; }
  .report-day .report-demand-table { margin: 6px 8px 10px; width: calc(100% - 16px); font-size: 12px; }
}

.report-groups { display: grid; gap: 6px; padding: 8px 14px 12px; }
.report-group { border: 1px solid var(--line); border-radius: 8px; }
.report-group > summary { padding: 8px 12px; cursor: pointer; font-size: 13.5px; font-weight: 600; }
.report-group[open] > summary { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--orange) 5%, transparent); }
.report-entry-table { width: 100%; font-size: 12.5px; }
.report-entry-table td, .report-entry-table th { padding: 6px 12px; white-space: nowrap; }
.report-entry-table td:nth-child(4), .report-entry-table th:nth-child(4) { text-align: right; }
.report-return { color: #2563eb; font-weight: 700; }
html[data-theme="dark"] .report-return { color: #7aa7ff; }
.print-report-days h4 { margin: 8px 0 3px; font-size: 10pt; font-weight: 700; }
@media (max-width: 899px) {
  .report-groups { padding: 6px 8px 10px; }
  .report-group { overflow-x: auto; }
  .report-entry-table td, .report-entry-table th { padding: 5px 8px; }
}

/* Portal 135 — abas Repetidos / Retornos / Todos no relatório individual */
.report-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 0; }
.report-tab { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.report-tab b { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 8%, transparent); font-size: 12px; text-align: center; }
.report-tab[aria-selected="true"] { border-color: var(--ink); background: var(--ink); color: var(--surface); }
.report-tab[aria-selected="true"] b { background: color-mix(in srgb, var(--surface) 22%, transparent); }
.report-tab-repetidos b { color: #c2410c; }
.report-tab-retornos b { color: #2563eb; }
.report-tab-repetidos[aria-selected="true"] { border-color: #c2410c; background: #c2410c; color: #fff; }
.report-tab-retornos[aria-selected="true"] { border-color: #2563eb; background: #2563eb; color: #fff; }
.report-tab[aria-selected="true"] b { color: inherit; }
.report-tab-panel { padding: 8px 14px 12px; }
.report-tab-panel .report-groups { padding: 0; }
.report-repeat-table td.report-justification { white-space: normal; min-width: 220px; color: var(--ink); }
.print-repeat-title { color: #c2410c; }
.print-return-title { color: #2563eb; }
@media (max-width: 899px) {
  .report-tabs { padding: 8px 8px 0; }
  .report-tab-panel { padding: 6px 8px 10px; overflow-x: auto; }
}

/* Portal 136 — aluno com mais de um curso */
.duplicate-multicourse { display: grid; gap: 8px; margin: 10px 0; padding: 10px 12px; border: 1px dashed color-mix(in srgb, var(--orange) 45%, var(--line)); border-radius: 10px; background: var(--surface); }
.duplicate-multicourse-toggle { display: flex !important; align-items: flex-start; gap: 10px; cursor: pointer; }
.duplicate-multicourse-toggle input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--orange); flex: none; }
.duplicate-multicourse-toggle span { display: grid; gap: 2px; }
.duplicate-multicourse-toggle strong { font-size: 13.5px; color: var(--ink); }
.duplicate-multicourse-toggle small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.duplicate-multicourse-field { display: grid; gap: 4px; }
.duplicate-multicourse-field[hidden] { display: none; }
.duplicate-multicourse-field span { font-size: 12px; font-weight: 650; color: var(--muted); }
.duplicate-multicourse-field input { width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; }
.duplicate-multicourse-field input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 15%, transparent); }
.duplicate-justification-field[hidden] { display: none; }
.duplicate-protocol-alert > .duplicate-multicourse { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; }
.duplicate-multicourse-toggle small { font-weight: 400; }

/* Portal 137 — imagem do Mural inteira e ampliável */
.mural-post-image-open { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 10px; }
body.portal-authenticated .mural-post-image { width: 100%; max-height: 520px; object-fit: contain; background: color-mix(in srgb, var(--ink) 4%, var(--surface)); }
.mural-post-image-hint { position: absolute; right: 10px; bottom: 10px; padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px; font-weight: 650; opacity: 0; transition: opacity .15s; }
.mural-post-image-open:hover .mural-post-image-hint, .mural-post-image-open:focus-visible .mural-post-image-hint { opacity: 1; }
.mural-image-dialog { max-width: 96vw; max-height: 96vh; padding: 0; border: 0; background: transparent; overflow: visible; }
.mural-image-dialog::backdrop { background: rgba(0, 0, 0, .8); }
.mural-image-dialog img { display: block; max-width: 94vw; max-height: 86vh; width: auto; height: auto; border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); background: #fff; }
.mural-image-dialog button { display: block; margin: 12px auto 0; padding: 8px 20px; border: 0; border-radius: 999px; background: #fff; color: #111; font: inherit; font-weight: 700; cursor: pointer; }
@media (max-width: 899px) { .mural-post-image-hint { opacity: 1; } }

/* Portal 138 — Consulta MEC */
.mec-steps { list-style: none; padding: 0; }
.mec-steps > li { display: grid; grid-template-columns: 35px minmax(0, 1fr); gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.mec-steps > li > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--orange) 14%, var(--surface)); color: var(--orange); font-weight: 800; font-size: 14px; }
.mec-steps h4 { margin: 0 0 4px; font-size: 14px; }
.mec-steps p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.mec-steps a { display: inline-block; margin-top: 7px; color: var(--orange); font-size: 12.5px; font-weight: 800; text-decoration: none; }
.mec-step-links { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.mec-how { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.mec-how strong { color: var(--ink); }
#diplomaCodeGuidance { font-size: 13px; line-height: 1.55; }
.mec-acervo-card .mec-primary-link { white-space: normal; height: auto; min-height: 46px; padding: 10px 18px; line-height: 1.3; text-align: center; }
@media (max-width: 720px) {
  .mec-acervo-card .mec-primary-link { width: 100%; }
}

/* Portal 140 — ações do Destaque da semana em ordem e junto da arte */
body.portal-authenticated .champion-hero { justify-content: flex-start; gap: 22px; }
body.portal-authenticated .champion-copy { flex: 0 1 auto; max-width: 420px; }
body.portal-authenticated .champion-actions { display: grid; gap: 8px; justify-items: start; margin-top: 10px; }
body.portal-authenticated .champion-report { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
body.portal-authenticated .champion-report[hidden] { display: none; }
body.portal-authenticated .champion-report select { width: auto; min-width: 96px; height: 38px; padding: 0 12px; border-radius: 999px; font-size: 13px; }
body.portal-authenticated .champion-actions .champion-download { height: 38px; padding: 0 16px; white-space: nowrap; }
@media (max-width: 899px) {
  body.portal-authenticated .champion-copy { max-width: none; }
  body.portal-authenticated .champion-actions { justify-items: stretch; }
  body.portal-authenticated .champion-report button { flex: 1 1 auto; }
}
@media (min-width: 900px) {
  body.portal-authenticated .champion-report { flex-wrap: nowrap; width: max-content; }
}
@media (max-width: 899px) {
  body.portal-authenticated .champion-report { flex-wrap: nowrap; }
  body.portal-authenticated .champion-report select { flex: 0 0 auto; }
  body.portal-authenticated .champion-report button { flex: 1 1 auto; white-space: normal; }
  body.portal-authenticated .champion-actions .champion-download-story { width: 100%; }
}
body.portal-authenticated .champion-report select[hidden] { display: none; }

/* Portal 142 — uso das páginas e copiar link do e-MEC */
.management-usage .management-card-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.management-usage select { height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; }
.management-usage-note { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.management-usage-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.management-usage-list li { display: grid; grid-template-columns: minmax(170px, 1.2fr) minmax(0, 2fr) 90px; align-items: center; gap: 14px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.management-usage-list .usage-name { display: grid; gap: 1px; min-width: 0; }
.management-usage-list .usage-name strong { font-size: 14px; }
.management-usage-list .usage-name small { color: var(--muted); font-size: 12px; }
.management-usage-list .usage-bar { height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 7%, transparent); overflow: hidden; }
.management-usage-list .usage-bar b { display: block; height: 100%; border-radius: inherit; background: var(--accent, var(--orange)); }
.management-usage-list .usage-count { display: grid; justify-items: end; line-height: 1.1; }
.management-usage-list .usage-count strong { font-size: 16px; }
.management-usage-list .usage-count small { color: var(--muted); font-size: 11px; }
.management-usage-list li.is-low { border-style: dashed; }
.management-usage-list li.is-low .usage-name small { color: #c2410c; font-weight: 600; }
.mec-copy-link { min-height: 48px; padding: 0 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.mec-copy-link:hover { border-color: var(--orange); color: var(--orange); }
body.portal-authenticated .mec-search-form > div { display: flex; flex-wrap: wrap; gap: 8px; }
body.portal-authenticated .mec-search-form > div > input { flex: 1 1 260px; min-width: 0; }
@media (max-width: 899px) {
  .management-usage-list li { grid-template-columns: minmax(0, 1fr) 70px; }
  .management-usage-list .usage-bar { grid-column: 1 / -1; grid-row: 2; }
  body.portal-authenticated .mec-search-form > div > button { flex: 1 1 100%; }
}
body.portal-authenticated .management-usage select { width: auto; min-width: 170px; }
body.portal-authenticated .mec-search-form .mec-copy-link,
body.portal-authenticated .mec-search-form > div > button.mec-copy-link { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: none; font-weight: 700; }
body.portal-authenticated .mec-search-form .mec-copy-link:hover { border-color: var(--orange); color: var(--orange); filter: none; transform: none; }

/* Portal 143 — barra lateral preta: opção em Aparência (data-sidebar="dark"), só no tema claro. */
html[data-theme="light"][data-sidebar="dark"] body.portal-authenticated #portalShell > .topbar {
  --sb-bg: #121418; --sb-ink: #f2f3f5; --sb-muted: #9aa0ab; --sb-line: rgba(255, 255, 255, .08); --sb-hover: rgba(255, 255, 255, .07);
  background: var(--sb-bg);
  border-right-color: var(--sb-line);
  color: var(--sb-ink);
  backdrop-filter: none;
}
html[data-theme="light"][data-sidebar="dark"] body.portal-authenticated #portalShell > .topbar nav a:not(.active),
html[data-theme="light"][data-sidebar="dark"] body.portal-authenticated #portalShell > .topbar #notificationBell,
html[data-theme="light"][data-sidebar="dark"] body.portal-authenticated #portalShell > .topbar :where(.logout-button, .sidebar-collapse-toggle, .theme-toggle, .appearance-open, .accessibility-open, .mobile-drawer-close) { color: #d9dce2; }
html[data-theme="light"][data-sidebar="dark"] body.portal-authenticated #portalShell > .topbar nav a:not(.active) :where(i, .sidebar-icon),
html[data-theme="light"][data-sidebar="dark"] body.portal-authenticated #portalShell > .topbar #notificationBell .sidebar-icon { color: #d9dce2; stroke: #d9dce2; }
html[data-theme="light"][data-sidebar="dark"] body.portal-authenticated #portalShell > .topbar nav a:not(.active):is(:hover, :focus-visible),
html[data-theme="light"][data-sidebar="dark"] body.portal-authenticated #portalShell > .topbar #notificationBell:is(:hover, :focus-visible) { color: #fff; background: var(--sb-hover); border-color: transparent; }
html[data-theme="light"][data-sidebar="dark"] body.portal-authenticated #portalShell > .topbar nav a:not(.active):is(:hover, :focus-visible) :where(i, .sidebar-icon) { color: #fff; stroke: #fff; }
html[data-theme="light"][data-sidebar="dark"] body.portal-authenticated #portalShell > .topbar .nav-group-label { color: var(--sb-muted); }
html[data-theme="light"][data-sidebar="dark"] body.portal-authenticated #portalShell > .topbar nav a.active,
html[data-theme="light"][data-sidebar="dark"][data-theme] body.portal-authenticated #portalShell > .topbar nav a.active {
  background: color-mix(in srgb, var(--accent, var(--orange)) 22%, var(--sb-bg));
  border-color: color-mix(in srgb, var(--accent, var(--orange)) 45%, transparent);
  color: #fff;
}
html[data-theme="light"][data-sidebar="dark"] body.portal-authenticated #portalShell > .topbar nav a.active :where(i, .sidebar-icon) { color: #fff; stroke: #fff; }
html[data-theme="light"][data-sidebar="dark"] body.portal-authenticated #portalShell > .topbar .brand strong { color: #fff; }
html[data-theme="light"][data-sidebar="dark"] body.portal-authenticated #portalShell > .topbar .brand small { color: var(--sb-muted); }
html[data-theme="light"][data-sidebar="dark"] body.portal-authenticated #portalShell > .topbar .brand img { filter: invert(1) brightness(1.6); }
html[data-theme="light"][data-sidebar="dark"] body.portal-authenticated #portalShell > .topbar :where(.brand, .user-menu) { background: transparent; border-color: var(--sb-line); }
html[data-theme="light"][data-sidebar="dark"] body.portal-authenticated #portalShell > .topbar .user-copy strong { color: #fff; }
html[data-theme="light"][data-sidebar="dark"] body.portal-authenticated #portalShell > .topbar .user-copy small { color: var(--sb-muted); }
html[data-theme="light"][data-sidebar="dark"] body.portal-authenticated #portalShell > .topbar .user-menu:is(:hover, :focus-visible) { background: var(--sb-hover); }
html[data-theme="light"][data-sidebar="dark"] body.portal-authenticated #portalShell > .topbar :where(hr, .sidebar-divider) { border-color: var(--sb-line); }
html[data-theme="light"][data-sidebar="dark"] body.portal-authenticated #portalShell > .topbar .sidebar-collapse-toggle:is(:hover, :focus-visible) { color: #fff; background: var(--sb-hover); }
html[data-theme="light"][data-sidebar="dark"] body.portal-authenticated #portalShell > .topbar ::-webkit-scrollbar-thumb { background: #3a3d44; }
html[data-theme="light"][data-sidebar="dark"] body.portal-authenticated #portalShell > .topbar #sidebarLogoutButton { color: #c9cdd4; }
html[data-theme="light"][data-sidebar="dark"] body.portal-authenticated #portalShell > .topbar #sidebarLogoutButton :where(svg, .sidebar-icon) { color: #c9cdd4; stroke: #c9cdd4; }
html[data-theme="light"][data-sidebar="dark"] body.portal-authenticated #portalShell > .topbar #sidebarLogoutButton:is(:hover, :focus-visible) { color: #fff; background: var(--sb-hover); }
html[data-theme="light"][data-sidebar="dark"] body.portal-authenticated #portalShell > .topbar #notificationBell { background: transparent; border-color: transparent; box-shadow: none; }
html[data-theme="light"][data-sidebar="dark"] body.portal-authenticated #portalShell > .topbar .mobile-drawer-close { background: rgba(255, 255, 255, .08); border-color: var(--sb-line); color: #fff; }

/* Portal 144 — barra lateral branca (padrão do tema claro) com letras mais escuras */
html[data-sidebar="light"][data-theme] body.portal-authenticated #portalShell > .topbar { background: #ffffff; }
html[data-sidebar="light"][data-theme] body.portal-authenticated #portalShell > .topbar nav a:not(.active),
html[data-sidebar="light"][data-theme] body.portal-authenticated #portalShell > .topbar #notificationBell,
html[data-sidebar="light"][data-theme] body.portal-authenticated #portalShell > .topbar #sidebarLogoutButton { color: #0d0f14; }
html[data-sidebar="light"][data-theme] body.portal-authenticated #portalShell > .topbar nav a:not(.active) :where(i, .sidebar-icon),
html[data-sidebar="light"][data-theme] body.portal-authenticated #portalShell > .topbar #notificationBell .sidebar-icon,
html[data-sidebar="light"][data-theme] body.portal-authenticated #portalShell > .topbar #sidebarLogoutButton .sidebar-icon { color: #0d0f14; stroke: #0d0f14; }
html[data-sidebar="light"][data-theme] body.portal-authenticated #portalShell > .topbar .nav-group-label { color: #2b303b; }
html[data-sidebar="light"][data-theme] body.portal-authenticated #portalShell > .topbar .brand small,
html[data-sidebar="light"][data-theme] body.portal-authenticated #portalShell > .topbar .user-copy small { color: #2b303b; }

/* Portal 145 — Aparência: cada caixa de opções divide o espaço igualmente pelo número de opções. */
body .appearance-modal .appearance-segmented,
body .appearance-segmented,
body .appearance-section:last-of-type .appearance-segmented { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }

/* Portal 146 — barra branca também no modo escuro (quando a pessoa escolhe "Branca") */
html[data-theme="dark"][data-sidebar="light"] body.portal-authenticated #portalShell > .topbar {
  background: #ffffff; border-right-color: #e3e6eb; color: #0d0f14; backdrop-filter: none;
}
html[data-theme="dark"][data-sidebar="light"] body.portal-authenticated #portalShell > .topbar :where(.brand, .user-menu) { background: #ffffff; border-color: #e3e6eb; }
html[data-theme="dark"][data-sidebar="light"] body.portal-authenticated #portalShell > .topbar .brand strong,
html[data-theme="dark"][data-sidebar="light"] body.portal-authenticated #portalShell > .topbar .user-copy strong { color: #0d0f14; }
html[data-theme="dark"][data-sidebar="light"] body.portal-authenticated #portalShell > .topbar .brand img { filter: none; }
html[data-theme="dark"][data-sidebar="light"] body.portal-authenticated #portalShell > .topbar :where(.sidebar-collapse-toggle, .logout-button, .theme-toggle, .appearance-open, .accessibility-open, .mobile-drawer-close, .user-menu-chevron) { color: #2b303b; }
html[data-theme="dark"][data-sidebar="light"] body.portal-authenticated #portalShell > .topbar nav a:not(.active):is(:hover, :focus-visible),
html[data-theme="dark"][data-sidebar="light"] body.portal-authenticated #portalShell > .topbar #notificationBell:is(:hover, :focus-visible),
html[data-theme="dark"][data-sidebar="light"] body.portal-authenticated #portalShell > .topbar .user-menu:is(:hover, :focus-visible) { background: #f1f3f6; color: #0d0f14; border-color: transparent; }
html[data-theme="dark"][data-sidebar="light"] body.portal-authenticated #portalShell > .topbar nav a.active,
html[data-theme="dark"][data-sidebar="light"][data-theme] body.portal-authenticated #portalShell > .topbar nav a.active {
  background: color-mix(in srgb, var(--accent, var(--orange)) 12%, #ffffff);
  border-color: color-mix(in srgb, var(--accent, var(--orange)) 35%, #e3e6eb);
  color: #0d0f14;
}
html[data-theme="dark"][data-sidebar="light"] body.portal-authenticated #portalShell > .topbar nav a.active :where(i, .sidebar-icon) { color: var(--accent, var(--orange)); stroke: var(--accent, var(--orange)); }
html[data-theme="dark"][data-sidebar="light"] body.portal-authenticated #portalShell > .topbar :where(hr, .sidebar-divider) { border-color: #e3e6eb; }
html[data-theme="dark"][data-sidebar="light"] body.portal-authenticated #portalShell > .topbar ::-webkit-scrollbar-thumb { background: #c9ced6; }

/* Portal 148 — Desempenho: nome e posição sem sobrepor no cartão estreito */
body.portal-authenticated .personal-analysis-header { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
body.portal-authenticated .personal-analysis-person { flex: 1 1 260px; min-width: 0; overflow: hidden; }
body.portal-authenticated .personal-analysis-person > span { flex: 1 1 auto; min-width: 0; }
body.portal-authenticated .personal-analysis-person small { white-space: normal; line-height: 1.3; }
body.portal-authenticated .personal-analysis-person .personal-movement { justify-self: start; max-width: 100%; }
body.portal-authenticated .personal-analysis-position { flex: 0 0 auto; margin-left: auto; }
/* Ranking e produção bruta no celular: coluna do valor cabe "92% do líder"; nome longo vira reticências. */
@media (max-width: 520px) {
  body.portal-authenticated .ranking-row,
  body.portal-authenticated .history-ranking .ranking-row { grid-template-columns: 22px 36px minmax(0, 1fr) max-content; }
  body.portal-authenticated .quantity-row { grid-template-columns: 22px 36px minmax(0, 1fr) max-content; }
  body.portal-authenticated :where(.ranking-row, .quantity-row) > strong { min-width: 0; }
  body.portal-authenticated :where(.ranking-points, .quantity-value) { display: grid; justify-items: end; white-space: nowrap; }
}
@media (max-width: 520px) {
  body.portal-authenticated :where(.ranking-row, .quantity-row) .avatar { width: 34px; height: 34px; flex: none; }
}
