/* ── Layout global: sem scroll horizontal ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

:root {
  --portal-app-header-height: 62px;
  --portal-shell-gap: 14px;
}

.portal-admin-body {
  --portal-app-header-height: 62px;
}

.portal-body {
  background: linear-gradient(180deg, #f4f8fd 0%, #edf3fa 100%);
}

.portal-admin-body {
  background: #eef3f7;
}

.portal-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
}

.portal-app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  min-height: var(--portal-app-header-height);
  padding: 0 20px 0 18px;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(14px);
}

.brand--portal-app {
  gap: 12px;
}

.brand--portal-app img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.brand--portal-app .brand-text span {
  color: #7988a3;
}

.portal-app-tabs {
  display: flex;
  align-items: stretch;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.portal-app-tabs::-webkit-scrollbar {
  display: none;
}

.portal-app-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 0 16px;
  border-bottom: 3px solid transparent;
  color: #70829f;
  font-size: 0.94rem;
  font-weight: 700;
  white-space: nowrap;
}

.portal-app-tab:hover,
.portal-app-tab:focus-visible {
  color: #173159;
  background: rgba(15, 23, 42, 0.03);
}

.portal-app-tab.is-active {
  color: #111827;
  border-bottom-color: #111827;
}

.portal-app-tab-icon svg,
.portal-app-icon svg,
.portal-admin-rail-icon svg {
  display: block;
  width: 18px;
  height: 18px;
}

.portal-app-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.portal-app-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(203, 213, 225, 0.65);
  background: rgba(255, 255, 255, 0.92);
  color: #6b7b94;
}

.portal-app-icon:hover,
.portal-app-icon:focus-visible {
  color: #173159;
  border-color: rgba(31, 121, 255, 0.26);
  background: #ffffff;
}

.portal-app-icon.is-positive {
  color: #199c52;
}

.portal-app-icon.is-danger {
  color: #cc4c54;
}

.portal-site-nav {
  display: flex;
  gap: 18px;
}

.portal-auth-main,
.portal-main {
  padding: calc(var(--portal-app-header-height) + 18px) 0 64px;
}

.portal-admin-body .portal-main {
  padding: calc(var(--portal-app-header-height) + 14px) 18px 36px;
  min-width: 0;
  /* overflow-x: clip causava clipping do eixo Y em alguns navegadores; */
  /* min-width: 0 nos grids filhos já previne overflow horizontal */
}

.portal-auth-wrap {
  max-width: 1060px;
}

.portal-auth-card,
.portal-ticket-grid,
.portal-two-column {
  display: grid;
  gap: 24px;
}

.portal-auth-card {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  align-items: start;
}

.portal-auth-copy,
.portal-form-card,
.portal-section-card,
.portal-stat-card,
.portal-sidebar-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(215, 226, 239, 0.92);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(54, 88, 140, 0.09);
}

.portal-auth-copy {
  padding: 32px;
}

.portal-form-card,
.portal-section-card,
.portal-stat-card,
.portal-sidebar-card {
  padding: 24px;
}

.portal-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.portal-admin-shell {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: var(--portal-shell-gap);
  align-items: start;
  width: 100%;
  min-width: 0;
  transition: grid-template-columns 0.22s ease;
}

.portal-admin-body.portal-admin-rail-expanded .portal-admin-shell {
  grid-template-columns: 244px minmax(0, 1fr);
}

.portal-admin-rail {
  position: sticky;
  top: calc(var(--portal-app-header-height) + 14px);
  display: grid;
  gap: 18px;
  align-content: start;
  min-height: calc(100vh - (var(--portal-app-header-height) + 32px));
  padding: 12px 10px;
  border-radius: 0 0 22px 22px;
  background: linear-gradient(180deg, #2f4357 0%, #263748 100%);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
}

.portal-admin-rail-top {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.portal-admin-rail-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 0 10px;
  border-radius: 14px;
  color: #eff6fb;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.portal-admin-rail-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #11b89a 0%, #2f9cff 100%);
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  flex: 0 0 auto;
}

.portal-admin-rail-brand-copy {
  display: none;
  min-width: 0;
}

.portal-admin-rail-brand-copy strong,
.portal-admin-rail-brand-copy small {
  display: block;
  white-space: nowrap;
}

.portal-admin-rail-brand-copy strong {
  color: #f8fbff;
  font-size: 0.92rem;
}

.portal-admin-rail-brand-copy small {
  color: #9bb1c7;
  font-size: 0.74rem;
}

.portal-admin-rail-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #cfe0ec;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.18s;
}

.portal-admin-rail-pin:hover,
.portal-admin-rail-pin:focus-visible {
  color: #ffffff;
  border-color: rgba(17, 184, 154, 0.5);
  background: rgba(17, 184, 154, 0.14);
  transform: translateY(-1px);
}

.portal-admin-rail[data-expanded="true"] .portal-admin-rail-pin {
  background: rgba(17, 184, 154, 0.18);
  color: #ffffff;
  border-color: rgba(17, 184, 154, 0.52);
}

.portal-admin-rail-nav {
  display: grid;
  gap: 8px;
}

.portal-admin-rail-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 14px;
  color: #23c2ab;
  background: transparent;
  border: 1px solid transparent;
}

.portal-admin-rail-link:hover,
.portal-admin-rail-link:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.portal-admin-rail-link.is-active {
  color: #ffffff;
  background: rgba(10, 21, 31, 0.34);
  border-color: rgba(255, 255, 255, 0.06);
}

.portal-admin-rail-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #11b89a;
  color: #ffffff;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

.portal-admin-workspace {
  min-width: 0;
}

.portal-admin-rail-label {
  display: none;
  color: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

.portal-admin-rail[data-expanded="true"] {
  padding-inline: 12px;
}

/* Modo expandido: brand + botão lado a lado no topo */
.portal-admin-rail[data-expanded="true"] .portal-admin-rail-top {
  grid-template-columns: 1fr auto;
  justify-items: start;
  align-items: center;
}

.portal-admin-rail[data-expanded="true"] .portal-admin-rail-brand-copy {
  display: block;
}

.portal-admin-rail[data-expanded="true"] .portal-admin-rail-link {
  justify-content: flex-start;
  width: 100%;
  gap: 14px;
}

.portal-admin-rail[data-expanded="true"] .portal-admin-rail-label {
  display: inline;
}

.portal-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 16px;
}

.portal-kicker {
  display: block;
  margin-bottom: 10px;
  color: #5b7aa6;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.portal-sidebar-card strong {
  display: block;
  color: #173159;
  font-size: 1.05rem;
}

.portal-sidebar-card p {
  margin: 8px 0 0;
  color: #60789e;
  line-height: 1.6;
}

.portal-menu {
  display: grid;
  gap: 10px;
}

.portal-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(215, 226, 239, 0.8);
  color: #48658d;
  font-weight: 700;
}

.portal-menu a.is-active,
.portal-menu a:hover,
.portal-menu a:focus-visible {
  color: #173159;
  background: #ffffff;
  border-color: rgba(31, 121, 255, 0.25);
  box-shadow: 0 12px 30px rgba(54, 88, 140, 0.08);
}

.portal-menu-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1f79ff 0%, #175ed8 100%);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: 0 10px 24px rgba(31, 121, 255, 0.22);
}

.portal-menu a.is-active .portal-menu-badge {
  background: linear-gradient(135deg, #173159 0%, #1f79ff 100%);
}

.portal-panel {
  display: grid;
  gap: 24px;
  min-width: 0;
}

.portal-admin-panel {
  gap: 18px;
}

.portal-page-head,
.portal-section-head,
.portal-form-actions,
.portal-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.portal-page-head {
  flex-wrap: wrap;
}

.portal-admin-body .portal-page-head {
  align-items: flex-start;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(209, 217, 228, 0.85);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.portal-admin-body .portal-page-head h1 {
  font-size: clamp(1.7rem, 2vw, 2.45rem);
  line-height: 1.08;
}

.portal-admin-body .portal-page-head .eyebrow {
  color: #7b8aa3;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.portal-page-head h1,
.portal-section-head h2,
.portal-section-card h2 {
  margin: 0;
  color: #173159;
}

.portal-page-head h1 {
  font-size: clamp(2rem, 3vw, 3rem);
}

.portal-section-head p,
.portal-section-card p {
  margin: 8px 0 0;
  color: #60789e;
  line-height: 1.7;
}

.portal-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.portal-admin-body .portal-stats-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.portal-stat-card span {
  display: block;
  color: #5b7aa6;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.portal-stat-card strong {
  display: block;
  margin-top: 12px;
  font-size: 2rem;
  color: #173159;
  letter-spacing: -0.03em;
}

.portal-stat-card p {
  margin: 10px 0 0;
  color: #60789e;
  line-height: 1.6;
}

.portal-admin-body .portal-stat-card,
.portal-admin-body .portal-kpi-card,
.portal-admin-body .portal-section-card,
.portal-admin-body .portal-ticket-summary-card {
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.05);
}

.portal-admin-body .portal-stat-card,
.portal-admin-body .portal-kpi-card {
  position: relative;
}

.portal-admin-body .portal-stat-card::before,
.portal-admin-body .portal-kpi-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 14px 0 0 14px;
  background: linear-gradient(180deg, #1f79ff 0%, #173159 100%);
}

.portal-admin-body .portal-kpi-card.is-alert::before,
.portal-admin-body .portal-stat-card--alert::before {
  background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
}

.portal-table-wrap {
  overflow-x: auto;
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
}

.portal-table th,
.portal-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(215, 226, 239, 0.75);
  vertical-align: top;
  text-align: left;
  color: #48658d;
}

.portal-table th {
  color: #5b7aa6;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.portal-table td strong {
  color: #173159;
}

.portal-table tbody tr:last-child td {
  border-bottom: 0;
}

.portal-table a {
  color: inherit;
}

.portal-table-ops tbody tr:hover {
  background: rgba(248, 251, 255, 0.76);
}

.portal-admin-body .portal-table th {
  color: #8a97ab;
  font-size: 0.74rem;
}

.portal-admin-body .portal-table td {
  padding: 16px 12px;
}

.portal-ticket-cell {
  display: grid;
  gap: 4px;
}

.portal-ticket-cell strong {
  color: #173159;
}

.portal-ticket-cell span {
  color: #48658d;
  line-height: 1.45;
}

.portal-ticket-cell small {
  color: #60789e;
  font-size: 0.8rem;
}

.portal-owner-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(232, 241, 255, 0.86);
  border: 1px solid rgba(31, 121, 255, 0.14);
  color: #173159;
  font-size: 0.8rem;
  font-weight: 700;
}

.portal-owner-chip.is-empty {
  background: rgba(245, 248, 253, 0.9);
  border-color: rgba(191, 208, 228, 0.9);
  color: #60789e;
}

.portal-inline-action {
  min-height: 38px;
}

.portal-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.priority-low {
  background: rgba(15, 160, 106, 0.11);
  color: #0a8658;
  border-color: rgba(15, 160, 106, 0.18);
}

.priority-normal {
  background: rgba(31, 121, 255, 0.1);
  color: #175ed8;
  border-color: rgba(31, 121, 255, 0.18);
}

.priority-high {
  background: rgba(245, 158, 11, 0.12);
  color: #b66b00;
  border-color: rgba(245, 158, 11, 0.18);
}

.priority-critical {
  background: rgba(225, 29, 72, 0.12);
  color: #b0103b;
  border-color: rgba(225, 29, 72, 0.18);
}

.status-open,
.status-active {
  background: rgba(31, 121, 255, 0.1);
  color: #175ed8;
  border-color: rgba(31, 121, 255, 0.18);
}

.status-in_progress {
  background: rgba(79, 167, 215, 0.12);
  color: #0f6f9f;
  border-color: rgba(79, 167, 215, 0.18);
}

.status-waiting_client {
  background: rgba(245, 158, 11, 0.12);
  color: #b66b00;
  border-color: rgba(245, 158, 11, 0.18);
}

.status-waiting_vendor {
  background: rgba(139, 92, 246, 0.12);
  color: #6d28d9;
  border-color: rgba(139, 92, 246, 0.2);
}

.status-resolved {
  background: rgba(15, 160, 106, 0.11);
  color: #0a8658;
  border-color: rgba(15, 160, 106, 0.18);
}

.status-closed {
  background: rgba(148, 163, 184, 0.15);
  color: #5c6b84;
  border-color: rgba(148, 163, 184, 0.2);
}

.portal-form-card {
  display: grid;
  gap: 18px;
}

.portal-form-wide,
.portal-form-inline {
  padding: 28px;
}

.portal-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field-span-2 {
  grid-column: span 2;
}

.field-span-4 {
  grid-column: 1 / -1;
}

.portal-form-actions {
  justify-content: flex-start;
}

.portal-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #48658d;
  font-weight: 600;
}

.portal-check input {
  width: 16px;
  height: 16px;
}

.portal-field-help {
  display: block;
  margin-top: 8px;
  color: #60789e;
  font-size: 0.85rem;
  line-height: 1.5;
}

.portal-filter-bar {
  justify-content: flex-start;
  flex-wrap: wrap;
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(215, 226, 239, 0.92);
  border-radius: 18px;
}

.portal-admin-body .portal-filter-bar {
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.04);
}

.portal-filter-bar .field {
  min-width: 220px;
}

.portal-field-search {
  flex: 1 1 320px;
}

.portal-field-search input {
  width: 100%;
}

.portal-queue-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.portal-admin-body .portal-queue-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.portal-kpi-card {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(215, 226, 239, 0.92);
  box-shadow: 0 14px 34px rgba(54, 88, 140, 0.08);
}

.portal-kpi-card span {
  color: #5b7aa6;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.portal-kpi-card strong {
  color: #173159;
  font-size: 1.9rem;
  line-height: 1;
}

.portal-kpi-card small {
  color: #60789e;
  line-height: 1.5;
}

.portal-kpi-card.is-alert {
  border-color: rgba(225, 29, 72, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 243, 245, 0.96) 100%);
}

.portal-quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.portal-filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(215, 226, 239, 0.92);
  color: #48658d;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(54, 88, 140, 0.06);
}

.portal-filter-chip.is-active {
  background: #ffffff;
  border-color: rgba(31, 121, 255, 0.24);
  color: #173159;
}

.portal-filter-chip.is-critical {
  border-color: rgba(225, 29, 72, 0.16);
  color: #b0103b;
}

.portal-filter-chip.is-critical.is-active {
  background: rgba(255, 243, 245, 0.96);
}

.portal-filter-chip.is-neutral {
  background: rgba(245, 248, 253, 0.92);
  color: #60789e;
}

.portal-status-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.portal-status-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(215, 226, 239, 0.92);
  color: #48658d;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(54, 88, 140, 0.06);
}

.portal-status-tab strong {
  color: #173159;
  font-size: 0.82rem;
}

.portal-status-tab span {
  color: #60789e;
  font-size: 0.78rem;
}

.portal-status-tab.is-active {
  background: #ffffff;
  border-color: rgba(31, 121, 255, 0.24);
}

.portal-dashboard-duo {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 18px;
}

.portal-queue-summary--triple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portal-project-preview-list,
.portal-agenda-mini-list,
.portal-agenda-list {
  display: grid;
  gap: 12px;
}

.portal-project-preview {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(215, 226, 239, 0.86);
  background: #fbfdff;
}

.portal-project-preview header,
.portal-project-preview footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.portal-project-preview strong,
.portal-project-preview span,
.portal-project-preview small {
  display: block;
}

.portal-project-preview header strong {
  color: #173159;
  font-size: 0.94rem;
}

.portal-project-preview header span,
.portal-project-preview footer small {
  color: #60789e;
  font-size: 0.8rem;
}

.portal-project-preview footer strong {
  color: #173159;
  font-size: 0.9rem;
}

.portal-project-method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(31, 121, 255, 0.08);
  border: 1px solid rgba(31, 121, 255, 0.16);
  color: #175ed8;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.portal-project-progress,
.portal-project-progress-top {
  display: grid;
  gap: 8px;
}

.portal-project-progress-top {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.portal-project-progress-top strong,
.portal-project-progress-top span {
  color: #173159;
}

.portal-project-progress-top strong {
  font-size: 0.94rem;
}

.portal-project-progress-top span {
  font-weight: 800;
}

.portal-project-progress small {
  color: #60789e;
  font-size: 0.82rem;
}

.portal-project-progress-bar {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: #dce6f3;
  overflow: hidden;
}

.portal-project-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0dbb9c 0%, #1f79ff 100%);
}

.portal-agenda-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 18px;
}

.portal-agenda-calendar-card {
  gap: 20px;
}

.portal-agenda-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  background: rgba(215, 226, 239, 0.9);
  border: 1px solid rgba(215, 226, 239, 0.9);
  border-radius: 14px;
  overflow: hidden;
}

.portal-agenda-weekday {
  display: grid;
  place-items: center;
  min-height: 42px;
  background: #15b49e;
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 800;
}

.portal-agenda-day {
  min-height: 144px;
  padding: 10px;
  background: #ffffff;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
}

.portal-agenda-day.is-outside {
  background: #f6f9fc;
}

.portal-agenda-day.is-today {
  box-shadow: inset 0 0 0 2px rgba(31, 121, 255, 0.3);
}

.portal-agenda-day header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.portal-agenda-day header strong {
  color: #173159;
  font-size: 0.92rem;
}

.portal-agenda-day header span {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(31, 121, 255, 0.08);
  color: #175ed8;
  font-size: 0.72rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.portal-agenda-day-events {
  display: grid;
  gap: 6px;
  align-content: start;
}

.portal-agenda-event {
  display: grid;
  gap: 2px;
  padding: 8px;
  border-radius: 10px;
  border-left: 3px solid transparent;
  background: #f8fbff;
}

.portal-agenda-event small,
.portal-agenda-list-item small {
  color: #60789e;
  font-size: 0.72rem;
}

.portal-agenda-event strong,
.portal-agenda-list-item strong {
  color: #173159;
  font-size: 0.8rem;
  line-height: 1.3;
}

.portal-agenda-event span,
.portal-agenda-list-item p {
  color: #48658d;
  font-size: 0.76rem;
  line-height: 1.35;
  margin: 0;
}

.portal-agenda-event.is-ticket,
.portal-agenda-dot.is-ticket {
  border-color: #1f79ff;
}

.portal-agenda-event.is-project,
.portal-agenda-dot.is-project {
  border-color: #11b89a;
}

.portal-agenda-event.is-ceremony,
.portal-agenda-dot.is-ceremony {
  border-color: #f59e0b;
}

.portal-agenda-list-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid rgba(215, 226, 239, 0.72);
}

.portal-agenda-list-item:last-child {
  border-bottom: 0;
}

.portal-agenda-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 7px;
  background: currentColor;
}

.portal-delivery-patterns {
  display: grid;
  gap: 12px;
}

.portal-pattern-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 12px;
  background: #f8fbff;
  border: 1px solid rgba(215, 226, 239, 0.8);
}

.portal-pattern-card strong {
  color: #173159;
}

.portal-pattern-card p {
  margin: 0;
  color: #48658d;
  line-height: 1.6;
}

.portal-project-toolbar {
  padding: 20px 22px;
}

.portal-project-toolbar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.portal-project-list {
  display: grid;
  gap: 18px;
}

.portal-project-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(215, 226, 239, 0.92);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.portal-project-card.health-risk {
  border-left: 4px solid #ef4444;
}

.portal-project-card.health-attention {
  border-left: 4px solid #f59e0b;
}

.portal-project-card.health-healthy {
  border-left: 4px solid #11b89a;
}

.portal-project-card-head,
.portal-project-card-badges,
.portal-project-card-grid,
.portal-project-bottom,
.portal-project-actions {
  display: flex;
  gap: 14px;
}

.portal-project-card-head,
.portal-project-bottom {
  justify-content: space-between;
  align-items: flex-start;
}

.portal-project-card-title {
  display: grid;
  gap: 6px;
}

.portal-project-code {
  color: #1f79ff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.portal-project-card-title h2 {
  margin: 0;
  color: #173159;
  font-size: 1.32rem;
}

.portal-project-card-title p {
  margin: 0;
  color: #60789e;
}

.portal-project-card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.95fr);
  align-items: start;
}

.portal-project-summary,
.portal-project-governance,
.portal-project-meta {
  display: grid;
  gap: 14px;
}

.portal-project-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.portal-project-meta span,
.portal-project-governance-card span {
  display: block;
  color: #7c8ea9;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.portal-project-meta strong,
.portal-project-governance-card strong {
  color: #173159;
}

.portal-project-governance {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.portal-project-governance-card {
  padding: 14px 16px;
  border-radius: 12px;
  background: #f8fbff;
  border: 1px solid rgba(215, 226, 239, 0.8);
}

.portal-project-governance-card small {
  display: block;
  margin-top: 6px;
  color: #60789e;
}

.portal-project-stagebar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-radius: 999px;
  overflow: hidden;
  background: #d8e0ea;
}

.portal-project-stagebar span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 10px;
  color: #5c6b84;
  font-size: 0.82rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.65);
}

.portal-project-stagebar span.is-done {
  background: #15b49e;
  color: #ffffff;
}

.portal-project-stagebar span.is-current {
  background: #1f79ff;
  color: #ffffff;
}

.portal-project-risks strong {
  display: block;
  margin-bottom: 10px;
  color: #173159;
}

.portal-project-risks ul {
  margin: 0;
  padding-left: 18px;
  color: #48658d;
}

.portal-project-risks li + li {
  margin-top: 8px;
}

.portal-project-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.portal-project-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  gap: 18px;
}

.portal-project-detail-main,
.portal-project-detail-side {
  padding: 22px;
}

.portal-project-related-list {
  display: grid;
  gap: 12px;
}

.portal-project-related-item {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(215, 226, 239, 0.8);
  background: #f8fbff;
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.portal-project-related-item:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 121, 255, 0.32);
  box-shadow: 0 10px 20px rgba(31, 121, 255, 0.08);
}

.portal-project-related-item strong {
  display: block;
  color: #173159;
  margin-bottom: 4px;
}

.portal-project-related-item span {
  color: #48658d;
  line-height: 1.5;
}

.portal-project-related-item small {
  color: #7c8ea9;
}

.portal-ticket-row.is-overdue {
  background: linear-gradient(90deg, rgba(255, 244, 246, 0.9) 0%, rgba(255, 255, 255, 0) 18%);
}

.portal-ticket-row.is-critical td:first-child {
  box-shadow: inset 4px 0 0 rgba(225, 29, 72, 0.7);
}

.portal-ticket-row.is-unassigned td:first-child {
  position: relative;
}

.portal-ticket-row.is-unassigned td:first-child::after {
  content: 'Sem dono';
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  color: #b66b00;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.portal-ticket-grid,
.portal-two-column {
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
}

.portal-admin-body .portal-ticket-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.9fr);
}

.portal-ticket-control-shell {
  position: sticky;
  top: calc(var(--portal-app-header-height) + 14px);
  z-index: 31;
  margin-bottom: 14px;
}

.portal-ticket-control-alert {
  margin-bottom: 14px;
}

.portal-ticket-control-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.portal-ticket-control-note {
  margin-top: 2px;
}

.portal-ticket-control-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
}

.portal-section-stack {
  display: grid;
  gap: 24px;
}

.portal-section-head-tight {
  margin-bottom: 18px;
}

.portal-section-head-tight p {
  max-width: 52ch;
}

.portal-ticket-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.portal-admin-body .portal-ticket-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.portal-ticket-summary-card {
  display: grid;
  gap: 8px;
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(215, 226, 239, 0.92);
  box-shadow: 0 14px 34px rgba(54, 88, 140, 0.08);
}

.portal-ticket-summary-card span {
  color: #5b7aa6;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.portal-ticket-summary-card strong {
  color: #173159;
  font-size: 1.05rem;
  line-height: 1.35;
}

.portal-ticket-summary-card strong .portal-badge {
  vertical-align: middle;
}

.portal-ticket-summary-card small {
  color: #60789e;
  line-height: 1.55;
}

.portal-activity-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.portal-activity-item {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(248, 251, 255, 0.92);
  border: 1px solid rgba(215, 226, 239, 0.86);
}

.portal-activity-item span {
  color: #5b7aa6;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.portal-activity-item strong {
  color: #173159;
  font-size: 1.2rem;
  line-height: 1;
}

.portal-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.portal-meta-grid span {
  display: block;
  margin-bottom: 8px;
  color: #5b7aa6;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.portal-meta-grid strong {
  color: #173159;
}

.portal-opening-card {
  margin-bottom: 22px;
  padding: 18px 20px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(247, 250, 255, 0.98) 0%, rgba(239, 245, 253, 0.96) 100%);
  border: 1px solid rgba(215, 226, 239, 0.92);
}

.portal-opening-card header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.portal-opening-card strong {
  color: #173159;
}

.portal-opening-card p {
  margin: 0;
  color: #36516f;
  line-height: 1.8;
}

.portal-admin-body .portal-opening-card {
  border-radius: 14px;
}

.portal-closure-card {
  border-color: rgba(31, 121, 255, 0.18);
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.98) 0%, rgba(239, 245, 253, 0.96) 100%);
}

.portal-closure-card header {
  align-items: flex-start;
}

.portal-closure-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.portal-timeline {
  display: grid;
  gap: 14px;
}

.portal-comment {
  position: relative;
  padding: 18px 18px 16px;
  border-radius: 16px;
  border: 1px solid rgba(215, 226, 239, 0.86);
  background: #f8fbff;
}

.portal-admin-body .portal-comment {
  border-radius: 14px;
}

.portal-comment.is-admin {
  background: rgba(232, 241, 255, 0.78);
}

.portal-comment.is-internal {
  background: rgba(245, 248, 253, 0.92);
  border-style: dashed;
}

.portal-comment header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.portal-comment-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.portal-comment header strong {
  color: #173159;
}

.portal-comment-role {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(215, 226, 239, 0.52);
  color: #48658d;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.portal-comment header span,
.portal-muted {
  color: #60789e;
  font-size: 0.88rem;
}

.portal-comment p {
  margin: 0;
  color: #36516f;
  line-height: 1.7;
}

.portal-comment.is-admin::before,
.portal-comment.is-client::before,
.portal-comment.is-internal::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 24px;
  width: 4px;
  height: calc(100% - 48px);
  border-radius: 999px;
}

.portal-comment.is-admin::before {
  background: rgba(31, 121, 255, 0.42);
}

.portal-comment.is-client::before {
  background: rgba(15, 160, 106, 0.36);
}

.portal-comment.is-internal::before {
  background: rgba(148, 163, 184, 0.42);
}

.portal-comment.is-admin .portal-comment-role {
  background: rgba(31, 121, 255, 0.1);
  color: #175ed8;
}

.portal-comment.is-client .portal-comment-role {
  background: rgba(15, 160, 106, 0.1);
  color: #0a8658;
}

.portal-comment.is-internal .portal-comment-role {
  background: rgba(148, 163, 184, 0.18);
  color: #5c6b84;
}

.portal-attachments {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.portal-attachment {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(215, 226, 239, 0.9);
  background: rgba(255, 255, 255, 0.94);
  color: #36516f;
}

.portal-attachment img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  background: #eef4fb;
}

.portal-attachment span {
  color: #173159;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
  word-break: break-word;
}

.portal-attachment small {
  color: #60789e;
  font-size: 0.78rem;
}

.portal-sla-live {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
  margin-top: 6px;
}

.portal-sla-live-running {
  background: rgba(31, 121, 255, 0.1);
  color: #175ed8;
  border-color: rgba(31, 121, 255, 0.18);
}

.portal-sla-live-overdue {
  background: rgba(225, 29, 72, 0.12);
  color: #b0103b;
  border-color: rgba(225, 29, 72, 0.18);
}

.portal-sla-live-stopped {
  background: rgba(148, 163, 184, 0.15);
  color: #5c6b84;
  border-color: rgba(148, 163, 184, 0.2);
}

.portal-sla-live-none {
  background: rgba(215, 226, 239, 0.5);
  color: #60789e;
  border-color: rgba(215, 226, 239, 0.8);
}

.portal-alert {
  padding: 14px 16px;
  border-radius: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  background: #fff;
}

.portal-alert-success {
  color: #0a8658;
  border-color: rgba(15, 160, 106, 0.2);
  background: rgba(15, 160, 106, 0.08);
}

.portal-alert-error {
  color: #b0103b;
  border-color: rgba(225, 29, 72, 0.18);
  background: rgba(225, 29, 72, 0.08);
}

.portal-alert-info {
  color: #175ed8;
  border-color: rgba(31, 121, 255, 0.18);
  background: rgba(31, 121, 255, 0.08);
}

.portal-auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.portal-auth-links a,
.button.tertiary {
  color: #175ed8;
  font-weight: 700;
}

.portal-footer {
  margin-top: 0;
}

.portal-footer--admin {
  margin-top: 16px;
  background: transparent;
  border-top: 0;
}

.portal-footer--admin .footer-grid {
  padding-top: 0;
}

.portal-footer--admin .footer-brand {
  opacity: 0.72;
}

.portal-chat-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.portal-chat-layout-single {
  grid-template-columns: minmax(0, 1fr);
}

.portal-chat-list,
.portal-chat-window {
  display: grid;
  gap: 18px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(215, 226, 239, 0.92);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(54, 88, 140, 0.09);
}

.portal-chat-thread-list {
  display: grid;
  gap: 12px;
}

.portal-chat-thread {
  display: grid;
  gap: 4px;
  padding: 16px;
  border-radius: 16px;
  background: #f8fbff;
  border: 1px solid rgba(215, 226, 239, 0.86);
  color: #36516f;
}

.portal-chat-thread strong {
  color: #173159;
}

.portal-chat-thread span,
.portal-chat-thread small {
  color: #60789e;
}

.portal-chat-unread-dot {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(31, 121, 255, 0.12);
  color: #175ed8;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.portal-stat-link {
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.portal-stat-link:hover,
.portal-stat-link:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(31, 121, 255, 0.22);
  box-shadow: 0 18px 42px rgba(54, 88, 140, 0.12);
}

.portal-chat-thread p {
  margin: 4px 0 0;
  color: #48658d;
  line-height: 1.5;
}

.portal-chat-thread.is-active,
.portal-chat-thread:hover,
.portal-chat-thread:focus-visible {
  background: #ffffff;
  border-color: rgba(31, 121, 255, 0.25);
  box-shadow: 0 12px 30px rgba(54, 88, 140, 0.08);
}

.portal-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(215, 226, 239, 0.75);
}

.portal-chat-header strong {
  display: block;
  color: #173159;
  font-size: 1.1rem;
}

.portal-chat-header span {
  color: #60789e;
}

.portal-chat-feed {
  display: grid;
  gap: 12px;
  min-height: 200px;
  max-height: none;
  padding-right: 6px;
  overflow-y: auto;
}

.portal-chat-bubble {
  max-width: min(78%, 640px);
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(215, 226, 239, 0.86);
  background: #f8fbff;
}

.portal-chat-bubble.is-self {
  justify-self: end;
  background: linear-gradient(135deg, #1f79ff, #0d63f2);
  border-color: rgba(13, 99, 242, 0.25);
}

.portal-chat-bubble.is-other {
  justify-self: start;
  background: #f8fbff;
}

.portal-chat-bubble header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.portal-chat-bubble.is-self header strong,
.portal-chat-bubble.is-self header span,
.portal-chat-bubble.is-self p {
  color: #ffffff;
}

.portal-chat-bubble.is-other header strong {
  color: #173159;
}

.portal-chat-bubble.is-other header span,
.portal-chat-bubble.is-other p {
  color: #48658d;
}

.portal-chat-bubble p {
  margin: 0;
  line-height: 1.7;
  white-space: pre-wrap;
}

.portal-chat-attachments {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.portal-chat-attachment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.portal-chat-bubble.is-other .portal-chat-attachment {
  background: rgba(248, 251, 255, 0.95);
  border-color: rgba(215, 226, 239, 0.8);
}

.portal-chat-attachment span {
  color: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  word-break: break-word;
}

.portal-chat-attachment small {
  color: inherit;
  opacity: 0.82;
  font-size: 0.78rem;
}

.portal-chat-composer {
  display: grid;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(215, 226, 239, 0.75);
}

.portal-chat-composer textarea {
  min-height: 72px;
  max-height: 132px;
  resize: vertical;
}

body.portal-modal-open {
  overflow: hidden;
}

.portal-chat-cta {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 18px;
  margin-bottom: 22px;
  border-radius: 18px;
  background: linear-gradient(135deg, #17c964 0%, #0ea55f 100%);
  box-shadow: 0 18px 38px rgba(23, 201, 100, 0.22);
}

.portal-chat-cta-inline {
  margin-bottom: 0;
}

.portal-aside-stack {
  display: grid;
  gap: 24px;
}

.portal-chat-panel,
.portal-ticket-update-card {
  display: grid;
  gap: 18px;
}

.portal-chat-panel-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.portal-chat-panel-meta small {
  color: #60789e;
  font-size: 0.88rem;
  font-weight: 700;
}

.portal-chat-cta-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.16);
}

.portal-chat-cta-icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.portal-chat-cta strong,
.portal-chat-cta p {
  color: #ffffff;
}

.portal-chat-cta strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.portal-chat-cta p {
  margin: 0;
  line-height: 1.6;
  opacity: 0.94;
}

.portal-chat-cta-button {
  justify-self: start;
  margin-left: 72px;
  background: #ffffff;
  color: #0f7f4c;
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.portal-chat-cta-button:hover,
.portal-chat-cta-button:focus-visible {
  background: #f5fff9;
  color: #0d7446;
}

.portal-chat-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
}

.portal-chat-modal.is-open {
  display: block;
}

.portal-chat-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 23, 44, 0.42);
  backdrop-filter: blur(8px);
}

.portal-chat-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100vw - 32px));
  margin: min(6vh, 48px) auto;
  max-height: calc(100vh - 28px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(215, 226, 239, 0.96);
  border-radius: 26px;
  box-shadow: 0 28px 70px rgba(15, 34, 62, 0.22);
}

.portal-chat-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.portal-chat-modal-head h2 {
  margin: 0;
  color: #173159;
  font-size: clamp(1.55rem, 2vw, 2rem);
}

.portal-chat-modal-head p:not(.eyebrow) {
  margin: 8px 0 0;
  color: #60789e;
  line-height: 1.65;
}

.portal-chat-modal-close {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 1px solid rgba(215, 226, 239, 0.92);
  background: #ffffff;
  color: #48658d;
  box-shadow: 0 12px 26px rgba(54, 88, 140, 0.08);
}

.portal-chat-modal-close span {
  font-size: 1.75rem;
  line-height: 1;
}

.portal-chat-modal-close:hover,
.portal-chat-modal-close:focus-visible {
  color: #173159;
  border-color: rgba(31, 121, 255, 0.25);
}

.portal-chat-modal-body {
  min-height: 0;
  overflow: hidden;
}

.portal-chat-window-modal {
  min-height: 0;
  height: min(66vh, 680px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.portal-chat-window-inline {
  min-height: 320px;
  max-height: 480px;
  display: flex;
  flex-direction: column;
}

.portal-chat-window-inline .portal-chat-feed {
  flex: 1;
  min-height: 0;
  max-height: 300px;
}

.portal-chat-composer-inline {
  border-top: 1px solid rgba(215, 226, 239, 0.7);
  padding-top: 14px;
  margin-top: 0;
  gap: 10px;
}

.portal-chat-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

/* ─── Reports ────────────────────────────────────────────────────────────── */
.portal-report-card {
  padding: 20px 22px;
  min-width: 0;
  overflow: hidden;
}

.portal-report-card h2 {
  margin: 0 0 20px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--title);
}

.portal-report-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  min-width: 0;
}

.portal-report-row > * {
  min-width: 0;
}

.portal-report-screen {
  display: grid;
  gap: 18px;
  min-width: 0;
  width: 100%;
  overflow-x: hidden;
}

.portal-report-screen > * {
  min-width: 0;
}

.portal-stats-grid--reports {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.portal-chart-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  height: 300px;
}

.portal-chart-wrap--timeline {
  height: 280px;
}

.portal-chart-wrap--half {
  height: 260px;
}

.portal-chart-wrap--medium {
  height: 300px;
}

.portal-chart-wrap--donut {
  max-width: 440px;
  margin: 0 auto;
}

.portal-chart-wrap canvas {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
}

.portal-stat-card--alert {
  border-color: rgba(239, 68, 68, 0.35) !important;
  background: rgba(239, 68, 68, 0.05) !important;
}

.portal-stat-card--alert strong {
  color: #dc2626 !important;
}

/* ─── Timer / Time-tracking card ────────────────────────────────────────── */
.portal-timer-section {
  display: grid;
  gap: 14px;
}

.portal-timer-section + .portal-timer-section {
  padding-top: 18px;
  border-top: 1px solid rgba(215, 226, 239, 0.7);
}

.portal-timer-assign {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.portal-timer-assign strong {
  color: #173159;
}

.portal-timer-assign span {
  color: #60789e;
  font-size: 0.9rem;
}

.portal-timer-start-btn {
  width: 100%;
  justify-content: center;
}

.portal-timer-running {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 160, 106, 0.07);
  border: 1px solid rgba(15, 160, 106, 0.18);
}

.portal-timer-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #0fa06a;
  flex: 0 0 10px;
  animation: portal-timer-pulse 1.4s ease-in-out infinite;
}

@keyframes portal-timer-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.85); }
}

.portal-timer-live {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #0a8658;
  letter-spacing: 0.02em;
  font-size: 1.05rem;
}

.portal-timer-stop-form {
  display: grid;
  gap: 10px;
}

.portal-timer-stop-form .field {
  margin: 0;
}

.portal-timer-history-label {
  display: block;
  margin-bottom: 8px;
  color: #5b7aa6;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.portal-timer-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(31, 121, 255, 0.06);
  border: 1px solid rgba(31, 121, 255, 0.14);
  font-size: 0.88rem;
  color: #48658d;
  font-weight: 600;
}

.portal-time-highlight {
  color: #0f6f9f;
  font-weight: 800;
}

.portal-table-compact th,
.portal-table-compact td {
  padding: 9px 10px;
  font-size: 0.88rem;
}

.portal-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.portal-form-row .field {
  flex: 1 1 180px;
}

/* ─── Empty chat ─────────────────────────────────────────────────────────── */
.portal-empty-chat {
  padding: 24px;
  border-radius: 16px;
  background: #f8fbff;
  border: 1px dashed rgba(191, 208, 228, 0.9);
  color: #60789e;
  line-height: 1.7;
}

.portal-empty-chat-large {
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

@media (max-width: 980px) {
  .portal-admin-body {
    --portal-app-header-height: 122px;
  }

  .portal-app-header {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px 16px;
  }

  .portal-app-tabs {
    order: 3;
    border-top: 1px solid rgba(209, 217, 228, 0.8);
    padding-top: 8px;
  }

  .portal-app-actions {
    justify-content: flex-end;
  }

  .portal-admin-shell {
    grid-template-columns: 1fr;
  }

  .portal-admin-rail {
    position: static;
    grid-auto-flow: column;
    grid-auto-columns: 56px;
    overflow-x: auto;
    padding-bottom: 6px;
    min-height: auto;
    border-radius: 18px;
  }

  .portal-admin-body.portal-admin-rail-expanded .portal-admin-shell {
    grid-template-columns: 1fr;
  }

  .portal-admin-rail-top {
    grid-auto-flow: column;
    justify-content: space-between;
    align-items: center;
  }

  .portal-admin-rail[data-expanded="true"] .portal-admin-rail-brand-copy,
  .portal-admin-rail[data-expanded="true"] .portal-admin-rail-label {
    display: none;
  }

  .portal-admin-rail[data-expanded="true"] .portal-admin-rail-link {
    width: 56px;
    justify-content: center;
    gap: 0;
  }

  .portal-shell,
  .portal-auth-card,
  .portal-ticket-grid,
  .portal-two-column,
  .portal-stats-grid,
  .portal-dashboard-duo,
  .portal-queue-summary,
  .portal-ticket-summary-grid,
  .portal-activity-summary,
  .portal-chat-layout,
  .portal-agenda-grid,
  .portal-project-detail-grid,
  .portal-project-card-grid,
  .portal-project-toolbar-grid,
  .portal-project-governance,
  .portal-project-meta,
  .portal-report-row,
  .portal-form-grid {
    grid-template-columns: 1fr;
  }

  .portal-ticket-control-shell {
    position: static;
  }

  .portal-ticket-control-form {
    grid-template-columns: 1fr;
  }

  .portal-ticket-control-actions {
    justify-content: stretch;
  }

  .portal-ticket-control-actions .button {
    width: 100%;
    justify-content: center;
  }

  .field-span-2 {
    grid-column: span 1;
  }

  .portal-sidebar {
    position: static;
  }

  .portal-chat-cta {
    grid-template-columns: 1fr;
  }

  .portal-chat-cta-button {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }

  .portal-chat-modal-dialog {
    width: calc(100vw - 20px);
    margin: 10px auto;
    max-height: calc(100vh - 20px);
    padding: 14px;
    border-radius: 20px;
  }

  .portal-chat-modal-head {
    align-items: center;
  }

  .portal-chat-window-modal {
    height: calc(100vh - 170px);
  }

  .portal-chat-modal-actions {
    justify-content: stretch;
  }

  .portal-chat-modal-actions .button {
    width: 100%;
    justify-content: center;
  }

  .portal-project-card-head,
  .portal-project-bottom {
    grid-template-columns: 1fr;
    display: grid;
  }

  .portal-project-actions {
    justify-content: flex-start;
  }

  .portal-project-stagebar {
    grid-template-columns: 1fr;
    border-radius: 12px;
    overflow: hidden;
  }

  .portal-agenda-calendar {
    overflow-x: auto;
  }
}

@media (max-width: 900px) {
  .portal-admin-body .portal-stats-grid,
  .portal-admin-body .portal-queue-summary,
  .portal-stats-grid--reports,
  .portal-stats-grid--agenda,
  .portal-stats-grid--projects,
  .portal-ticket-control-form,
  .portal-ticket-summary-grid,
  .portal-activity-summary,
  .portal-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .portal-admin-body .portal-stats-grid,
  .portal-admin-body .portal-queue-summary,
  .portal-stats-grid--reports,
  .portal-ticket-control-form,
  .portal-ticket-summary-grid,
  .portal-activity-summary,
  .portal-meta-grid {
    grid-template-columns: 1fr;
  }

  .portal-app-tab {
    min-height: 56px;
    padding: 0 12px;
  }
}

@media (max-width: 1440px) and (min-width: 901px) {
  .portal-stats-grid--reports {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) and (min-width: 721px) {
  .portal-report-row {
    grid-template-columns: 1fr;
  }

  .portal-chart-wrap--medium {
    height: 280px;
  }

  .portal-chart-wrap--donut {
    max-width: 400px;
  }
}

/* ─── Sidebar rail: seta rotativa ──────────────────────────────────────────── */
.portal-admin-rail-pin svg {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.25s ease;
  transform: rotate(0deg);
}
.portal-admin-rail[data-expanded="true"] .portal-admin-rail-pin svg {
  transform: rotate(180deg);
}

.portal-admin-rail-pin svg path:first-child {
  opacity: 0.45;
}

.portal-admin-rail-pin svg path:last-child {
  filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0));
}

/* ─── Portal cliente: header chip + rail teal ──────────────────────────────── */
.portal-client-header-mid {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.portal-client-company-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  background: rgba(17,184,154,.1);
  border: 1px solid rgba(17,184,154,.22);
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 700;
  color: #0a7c69;
}
.portal-client-company-chip svg {
  width: 15px;
  height: 15px;
  color: #11b89a;
  flex-shrink: 0;
}
.portal-app-new-ticket {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  font-size: .82rem;
  border-radius: 999px;
  white-space: nowrap;
}
.portal-app-new-ticket svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* Rail do cliente: acento teal no item ativo */
.portal-client-rail .portal-admin-rail-link.is-active {
  background: rgba(17,184,154,.22);
  color: #fff;
}
.portal-client-rail .portal-admin-rail-link.is-active::before {
  background: #11b89a;
}

/* Rodapé do rail do cliente */
.portal-client-rail-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
  overflow: hidden;
  min-width: 0;
}
.portal-client-rail-user {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  overflow: hidden;
  min-width: 0;
}
/* No estado recolhido: ocultar nome e email */
.portal-client-rail-user strong,
.portal-client-rail-user small {
  display: none;
}
.portal-client-rail-user strong {
  font-size: .78rem;
  font-weight: 700;
  color: #f0f7ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.portal-client-rail-user small {
  font-size: .68rem;
  color: #7fa8c4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Em modo expandido: mostrar nome e email */
.portal-admin-rail[data-expanded="true"] .portal-client-rail-footer {
  padding-inline: 4px;
}
.portal-admin-rail[data-expanded="true"] .portal-client-rail-user {
  align-items: flex-start;
}
.portal-admin-rail[data-expanded="true"] .portal-client-rail-user strong,
.portal-admin-rail[data-expanded="true"] .portal-client-rail-user small {
  display: block;
  text-align: left;
}

/* ─── Agenda: eventos do calendário mais legíveis ──────────────────────────── */
.portal-agenda-event {
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s, background 0.15s;
  overflow: hidden;
}
.portal-agenda-event:hover,
.portal-agenda-event:focus-visible {
  background: #eef5ff;
  outline: none;
}
.portal-agenda-event.is-selected {
  background: #e8f4ff;
  box-shadow: 0 0 0 2px rgba(31,121,255,0.35);
}
.portal-agenda-event small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  font-size: 0.68rem;
}
.portal-agenda-event strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.76rem;
  line-height: 1.25;
}
.portal-agenda-event span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  font-size: 0.7rem;
}
.portal-agenda-day {
  min-height: 120px;
}
.portal-agenda-event {
  padding: 5px 7px;
  gap: 1px;
}

/* ─── Agenda: lista de próximos compromissos compacta ──────────────────────── */
.portal-agenda-list-item {
  padding: 8px 0;
  gap: 10px;
}
.portal-agenda-list-item strong {
  font-size: 0.82rem;
  line-height: 1.3;
}
.portal-agenda-list-item small {
  font-size: 0.7rem;
  line-height: 1.4;
}
.portal-agenda-list-item p {
  font-size: 0.72rem;
  margin: 2px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── Agenda: painel de detalhe do evento ──────────────────────────────────── */
.portal-agenda-detail-card {
  gap: 10px;
  padding: 16px 18px;
  border-left: 4px solid #1f79ff;
  animation: agenda-detail-in 0.2s ease;
}
.portal-agenda-detail-card.is-ticket { border-color: #1f79ff; }
.portal-agenda-detail-card.is-project { border-color: #11b89a; }
.portal-agenda-detail-card.is-ceremony { border-color: #f59e0b; }

@keyframes agenda-detail-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.portal-agenda-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.portal-agenda-detail-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(215,226,239,0.9);
  background: #fff;
  color: #60789e;
  flex-shrink: 0;
}
.portal-agenda-detail-close:hover { color: #b0103b; border-color: rgba(225,29,72,0.3); }

.portal-agenda-detail-date {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: #7988a3;
  font-weight: 600;
}
.portal-agenda-detail-title {
  display: block;
  font-size: 0.96rem;
  color: #173159;
  line-height: 1.4;
}
.portal-agenda-detail-subtitle {
  margin: 6px 0 0;
  font-size: 0.84rem;
  color: #48658d;
  line-height: 1.5;
}
.portal-agenda-detail-info {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: #7988a3;
  font-weight: 600;
}
.portal-badge-event-type {
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 99px;
  background: rgba(31,121,255,0.1);
  color: #175ed8;
  border: 1px solid rgba(31,121,255,0.18);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Gestão do Conhecimento — estilos específicos
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Tabs de navegação ─────────────────────────────────────────────────────── */
.portal-tabs-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  border-bottom: 2px solid rgba(15,23,42,.09);
  margin-bottom: 24px;
}
.portal-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: .92rem;
  font-weight: 700;
  color: #6b7a99;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  text-decoration: none;
}
.portal-tab-btn.is-active {
  color: #111827;
  border-bottom-color: #111827;
}
.portal-tab-btn:hover { color: #173159; background: rgba(15,23,42,.03); }
.portal-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  padding: 1px 6px;
  background: rgba(15,23,42,.09);
  border-radius: 99px;
  font-size: .76rem;
  font-weight: 800;
}

/* ── Formulário inline de dados cadastrais ─────────────────────────────────── */
.portal-divider { border: none; border-top: 1px solid rgba(15,23,42,.08); margin: 14px 0; }
.portal-field-group-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #7988a3; margin-bottom: 10px; }
.portal-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Cards de acesso e credencial ──────────────────────────────────────────── */
.portal-access-card {
  border: 1px solid rgba(15,23,42,.09);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
  background: #fff;
}
.portal-access-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.portal-access-card-head > div:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.portal-access-card-actions { display: flex; gap: 6px; flex-shrink: 0; }
.portal-access-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 8px;
  align-items: start;
  padding: 5px 0;
  border-top: 1px solid rgba(15,23,42,.05);
  font-size: .9rem;
}
.portal-access-row > span:first-child { font-size: .8rem; color: #7988a3; font-weight: 600; padding-top: 2px; }
.portal-access-row--notes > span:last-child { white-space: pre-wrap; }
.portal-access-row--meta { opacity: .6; font-size: .8rem; }

/* ── Reveal/hide de campos secretos ────────────────────────────────────────── */
.portal-secret-field { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.portal-secret-mask  { font-size: 1.1rem; letter-spacing: 3px; color: #999; }
.portal-secret-value { font-size: .88rem; background: #f5f5f5; padding: 2px 6px; border-radius: 4px; word-break: break-all; }
.portal-copy-btn { font-size: .78rem; padding: 2px 8px; }

/* ── Badges de tipo e ambiente de acesso ───────────────────────────────────── */
.portal-badge-access {
  font-size: .72rem;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(15,23,42,.07);
  color: #374151;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.portal-badge-env {
  font-size: .72rem;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(37,99,235,.09);
  color: #1d4ed8;
  font-weight: 600;
}
.portal-badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(15,23,42,.08);
  font-size: .8rem;
  font-weight: 700;
  color: #374151;
}

/* ── Cards de notas operacionais ───────────────────────────────────────────── */
.portal-note-card {
  border: 1px solid rgba(15,23,42,.09);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
  background: #fff;
}
.portal-note-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.portal-note-head > strong { font-size: 1rem; }
.portal-note-body {
  font-size: .9rem;
  line-height: 1.7;
  color: #374151;
  white-space: pre-wrap;
  word-break: break-word;
}
.portal-note-meta {
  margin-top: 10px;
  font-size: .8rem;
  color: #9ca3af;
  border-top: 1px solid rgba(15,23,42,.06);
  padding-top: 8px;
}

/* ── KPI card de aviso de criptografia ─────────────────────────────────────── */
.portal-kpi-card.is-warning { border-left: 3px solid #f59e0b; }

/* ── Linha de filtro + dropdown de acesso rápido ───────────────────────────── */
.kb-filter-row {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}
.kb-quick-select-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}
.kb-quick-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .78rem;
  font-weight: 700;
  color: #5b7aa6;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.kb-quick-label svg { width: 14px; height: 14px; color: #1f79ff; }
.kb-quick-select {
  appearance: none;
  -webkit-appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M6 8l4 4 4-4' stroke='%235b7aa6' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1px solid rgba(215,226,239,0.9);
  border-radius: 8px;
  padding: 9px 36px 9px 12px;
  font-size: .88rem;
  font-weight: 600;
  color: #173159;
  min-width: 240px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.kb-quick-select:focus {
  outline: none;
  border-color: #1f79ff;
  box-shadow: 0 0 0 3px rgba(31,121,255,.12);
}
.kb-search-form { flex: 1 1 320px; }

/* ── Highlight ao navegar via dropdown ─────────────────────────────────────── */
@keyframes kb-flash {
  0%   { box-shadow: 0 0 0 3px rgba(31,121,255,.0); background: transparent; }
  25%  { box-shadow: 0 0 0 3px rgba(31,121,255,.35); background: rgba(31,121,255,.05); }
  75%  { box-shadow: 0 0 0 3px rgba(31,121,255,.25); background: rgba(31,121,255,.04); }
  100% { box-shadow: none; background: transparent; }
}
tr.kb-highlight td {
  animation: kb-flash 1.8s ease forwards;
}
