/* Final responsive and release-safe overrides. */
/* Visual language refinement v1 */
.feature-flags-modal {
  max-width: 620px;
}

.feature-flags-list {
  display: grid;
  gap: 0;
  margin: 0 0 1.25rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.feature-flag-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
}

.feature-flag-row + .feature-flag-row {
  border-top: 1px solid var(--line);
}

.feature-flag-row span {
  display: grid;
  gap: 0.2rem;
}

.feature-flag-row small {
  color: var(--muted);
}

.feature-flag-row input {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--accent);
}

:root {
  --shadow: 0 18px 44px rgba(24, 50, 53, 0.08);
  --shadow-soft: 0 5px 18px rgba(24, 50, 53, 0.045);
  --shadow-breath: 0 8px 22px rgba(24, 50, 53, 0.045);
}

body {
  background: var(--bg);
}

.app-shell {
  grid-template-columns: 72px minmax(0, 1fr);
}

body.sidebar-pinned .app-shell {
  grid-template-columns: 224px minmax(0, 1fr);
}

.sidebar {
  width: 72px;
  padding: 18px 10px;
  gap: 18px;
  background: #123f44;
  color: rgba(255, 255, 255, 0.82);
  border-right: 0;
  box-shadow: none;
}

.sidebar:hover,
body.sidebar-pinned .sidebar {
  width: 224px;
  padding: 18px 14px;
  box-shadow: 18px 0 40px rgba(18, 63, 68, 0.16);
}

.brand {
  min-width: 196px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(72, 219, 219, 0.34);
  background: rgba(72, 219, 219, 0.14);
  color: var(--accent);
}

.auth-brand,
.sidebar .brand strong {
  color: #ffffff;
}

.sidebar .brand span,
.sidebar-footer {
  color: rgba(255, 255, 255, 0.56);
}

.sidebar-pin {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.68);
}

.sidebar-pin[aria-pressed="true"] {
  border-color: rgba(72, 219, 219, 0.42);
  background: rgba(72, 219, 219, 0.13);
  color: var(--accent);
}

.side-nav {
  gap: 4px;
}

.nav-item {
  min-height: 38px;
  padding: 9px 11px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.62);
  font-weight: 650;
}

.nav-icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: transparent;
  color: rgba(255, 255, 255, 0.64);
}

.nav-icon svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.8;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
}

.nav-item.active {
  background: transparent;
  color: #ffffff;
}

.nav-item.active::after {
  inset: 9px auto 9px 0;
  width: 3px;
  background: var(--accent);
}

.nav-item.active .nav-icon {
  background: transparent;
  color: #ffffff;
  box-shadow: none;
}

.topbar {
  min-height: 66px;
  align-items: center;
  padding: 12px 28px;
  background: rgba(248, 249, 250, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.72);
  box-shadow: none;
}

.topbar-actions {
  gap: 8px;
}

.quiet-clock {
  color: var(--muted);
  font-size: 0.92rem;
  padding: 0 2px;
}

.search-box {
  height: 40px;
  width: min(480px, 40vw);
  border-color: rgba(229, 231, 235, 0.92);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(31, 41, 55, 0.03);
}

.search-box:focus-within {
  border-color: rgba(19, 174, 179, 0.42);
  box-shadow: var(--focus-ring);
}

.content {
  padding: 28px 34px 44px;
}

h1 {
  font-size: clamp(2rem, 3vw, 2.7rem);
  letter-spacing: -0.035em;
}

.cockpit-brief {
  margin-bottom: 18px;
}

.cockpit-brief h2 {
  font-size: clamp(1.45rem, 2vw, 1.95rem);
  letter-spacing: -0.03em;
}

.eyebrow,
.section-kicker {
  color: var(--muted);
  letter-spacing: 0.16em;
  font-size: 0.7rem;
  font-weight: 750;
}

.dashboard-grid {
  gap: 16px;
}

.panel,
.table-card,
.kanban-column,
.large-calendar,
.property-card,
.process-card,
.document-row,
.detail-card,
.integration-card,
.detail-decision-panel,
.commercial-flow-panel,
.commercial-summary .metric,
.document-summary .metric {
  background: var(--surface);
  border: 1px solid rgba(229, 231, 235, 0.86);
  border-radius: 12px;
  box-shadow: 0 3px 14px rgba(31, 41, 55, 0.035);
}

.panel {
  padding: 18px;
}

.panel-header,
.module-header {
  margin-bottom: 14px;
}

.module-header {
  padding: 0 0 14px;
  border-bottom-color: rgba(229, 231, 235, 0.72);
}

.module-header h2 {
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.priority-panel {
  min-height: 74px;
  padding: 15px 18px 15px 24px;
  border-color: rgba(19, 174, 179, 0.28);
}

.priority-panel::before {
  inset: 15px auto 15px 0;
  width: 3px;
  background: var(--accent);
}

.important-dates-panel,
.work-diary-panel,
.activity-panel,
.commercial-flow-panel {
  background: var(--surface);
}

.decision-list-main {
  padding-top: 2px;
}

.decision-list-main strong {
  font-size: 0.96rem;
}

.decision-person {
  color: var(--ink);
  text-decoration-color: rgba(75, 85, 99, 0.35);
}

.decision-list-main small,
.decision-explain {
  color: var(--muted);
}

.metrics-panel {
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid rgba(229, 231, 235, 0.86);
  box-shadow: 0 3px 14px rgba(31, 41, 55, 0.035);
}

.metric {
  min-height: 104px;
  padding: 16px 18px;
  border-right-color: rgba(229, 231, 235, 0.72);
}

.metric::before {
  border-top-width: 2px;
}

.metric span {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
}

.metric strong,
.big-number {
  margin: 4px 0;
  font-size: 2rem;
}

.metric small {
  font-size: 0.78rem;
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button {
  min-height: 34px;
  border-radius: 999px;
  font-weight: 700;
}

.primary-button {
  background: var(--accent-soft-2);
  border-color: rgba(19, 174, 179, 0.45);
  color: #08383c;
  box-shadow: 0 8px 18px rgba(19, 174, 179, 0.12);
}

.secondary-button,
.ghost-button,
.icon-button {
  background: var(--surface);
  border-color: rgba(229, 231, 235, 0.95);
  color: var(--slate);
  box-shadow: none;
}

.secondary-button:hover,
.secondary-button:focus-visible,
.ghost-button:hover,
.ghost-button:focus-visible,
.icon-button:hover,
.icon-button:focus-visible {
  background: var(--surface-2);
  border-color: var(--line-strong);
  color: var(--ink);
}

.tool-menu-panel,
.global-search-results,
.modal {
  border-color: rgba(229, 231, 235, 0.92);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(31, 41, 55, 0.12);
}

.modal {
  border-radius: 18px;
}

.modal-header {
  padding: 16px 22px 14px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom-color: rgba(229, 231, 235, 0.78);
}

.modal-actions {
  padding: 12px 22px;
  border-top-color: rgba(229, 231, 235, 0.78);
}

input,
select,
textarea {
  min-height: 36px;
  border-color: rgba(229, 231, 235, 0.96);
  background: var(--surface);
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--line-strong);
}

.view-tabs {
  gap: 8px;
  margin-bottom: 14px;
}

.view-tabs button {
  min-height: 30px;
  border-color: rgba(229, 231, 235, 0.96);
  background: var(--surface);
}

.view-tabs button.active {
  border-color: rgba(19, 174, 179, 0.32);
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.contact-radar-row {
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid rgba(229, 231, 235, 0.82);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  border-bottom-color: rgba(229, 231, 235, 0.82);
  box-shadow: 0 1px 2px rgba(24, 50, 53, 0.018);
}

.contact-radar-row:hover,
.contact-radar-row:focus-visible,
.contact-radar-row:focus-within {
  background: var(--surface-muted);
  border-color: rgba(19, 174, 179, 0.18);
  box-shadow: 0 2px 10px rgba(24, 50, 53, 0.035);
}

.property-grid,
.process-grid,
.report-grid {
  gap: 16px;
}

.property-card,
.process-card {
  overflow: hidden;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.property-card:hover,
.process-card:hover,
.kanban-card:hover,
.document-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(31, 41, 55, 0.06);
}

.property-body {
  padding: 14px;
  gap: 6px;
}

.property-body > strong {
  font-size: 1rem;
}

.property-specs,
.property-description,
.property-location,
.subtle,
.muted {
  color: var(--muted);
}

.process-card {
  padding: 14px;
}

.week-day {
  min-height: 58px;
}

.time-row div,
.task-list li,
.activity-item,
.kanban-card {
  background: var(--surface);
  border-color: rgba(229, 231, 235, 0.84);
  padding: 10px 12px;
}

.work-diary-compact div,
.work-diary-row,
.detail-card,
.signal-card,
.dependency-row,
.check-row,
.integration-card {
  border-color: rgba(229, 231, 235, 0.86);
}

table th,
table td {
  padding: 11px 14px;
  border-bottom-color: rgba(229, 231, 235, 0.74);
}

th {
  background: var(--surface-muted);
}

.contact-status-badge,
.pill {
  background: var(--surface-2);
  color: var(--muted);
}

.detail-decision-panel {
  background: var(--surface);
}

.attachment-upload,
.live-timeline-tools,
.role-picker .inline-check {
  background: var(--surface);
}

/* Properties list view */
.property-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 3px 14px rgba(31, 41, 55, 0.035);
}

.property-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) minmax(136px, auto);
  gap: 18px;
  align-items: center;
  min-height: 118px;
  padding: 16px 18px;
  border: 0;
  border-bottom: 1px solid rgba(229, 231, 235, 0.86);
  border-radius: 0;
  box-shadow: none;
  background: var(--surface);
}

.property-card:last-child {
  border-bottom: 0;
}

.property-card:hover,
.property-card:focus-visible {
  transform: none;
  outline: none;
  background: var(--surface-muted);
  box-shadow: none;
}

.property-image {
  width: 72px;
  height: 72px;
  aspect-ratio: auto;
  border-radius: 12px;
  border: 1px solid rgba(229, 231, 235, 0.95);
  background: #eaf6f5;
  justify-self: center;
}

.property-image img {
  border-radius: inherit;
}

.property-placeholder {
  gap: 3px;
  font-size: 0;
}

.property-placeholder span {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 1rem;
}

.property-placeholder strong {
  display: none;
}

.property-body {
  min-width: 0;
  padding: 0;
  gap: 5px;
}

.property-body > strong {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 760;
  line-height: 1.25;
  overflow-wrap: anywhere;
  white-space: normal;
}

.property-location {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
}

.property-specs,
.property-description {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.property-specs {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.property-description {
  -webkit-line-clamp: 1;
}

.property-action {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  background: rgba(255, 247, 237, 0.92);
  color: var(--ink);
  font-size: var(--text-small);
  font-weight: 780;
  line-height: 1.3;
  padding: 5px 9px;
  overflow-wrap: anywhere;
}

.property-price-column {
  display: grid;
  justify-items: end;
  gap: 5px;
  min-width: 136px;
  color: var(--muted);
  text-align: right;
}

.property-price-column strong {
  color: var(--pop-hover);
  font-size: 1.08rem;
  font-weight: 760;
  white-space: nowrap;
}

.property-price-column span {
  color: var(--soft);
  font-size: var(--text-caption);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.property-price-badge,
.property-meta,
.property-card-footer {
  display: none;
}

/* Fresh turquoise visual refinement */
body {
  background: #f5fbfb;
}

.app-shell {
  background: #f5fbfb;
}

.sidebar,
.sidebar:hover,
body.sidebar-pinned .sidebar {
  background: #123f44;
}

.brand-mark {
  border-color: rgba(72, 219, 219, 0.38);
  background: rgba(72, 219, 219, 0.16);
  color: var(--accent);
}

.nav-item {
  color: rgba(255, 255, 255, 0.64);
}

.nav-icon {
  color: rgba(255, 255, 255, 0.68);
}

.nav-item:hover {
  background: rgba(72, 219, 219, 0.09);
}

.nav-item.active {
  color: #ffffff;
}

.nav-item.active .nav-icon {
  color: #ffffff;
}

.topbar {
  background: rgba(245, 251, 251, 0.94);
}

.search-box {
  background: #ffffff;
  border-color: rgba(229, 231, 235, 0.88);
}

.search-box:focus-within {
  border-color: rgba(19, 174, 179, 0.55);
  box-shadow: 0 0 0 4px rgba(19, 174, 179, 0.14);
}

.cockpit-brief {
  padding: 6px 2px 2px;
}

.cockpit-brief .eyebrow,
.module-header .eyebrow {
  color: var(--slate);
}

.info-dot:hover,
.info-dot:focus-visible,
.info-dot[aria-expanded="true"] {
  color: var(--tech-hover);
  border-color: var(--tech-soft-2);
  background: var(--tech-soft);
}

.priority-panel {
  background: #ffffff;
  border-color: rgba(19, 174, 179, 0.28);
}

.important-dates-panel {
  background: #ffffff;
  border-color: rgba(229, 231, 235, 0.9);
  border-top: 3px solid rgba(63, 143, 218, 0.28);
}

.important-date-row time,
.decision-person {
  color: var(--pop-hover);
}

.decision-list-main:hover strong,
.decision-list-main:focus-visible strong,
.decision-explain:hover,
.decision-explain:focus-visible,
.decision-explain[aria-expanded="true"] {
  color: var(--pop-hover);
}

.decision-list-main:focus-visible {
  box-shadow: inset 2px 0 0 var(--pop);
}

.metrics-panel {
  background: #ffffff;
}

.metric:nth-child(1) {
  --metric-tint: #ffffff;
  --metric-line: rgba(19, 174, 179, 0.23);
}

.metric:nth-child(2) {
  --metric-tint: #ffffff;
  --metric-line: rgba(63, 143, 218, 0.22);
}

.metric:nth-child(3) {
  --metric-tint: #ffffff;
  --metric-line: rgba(19, 174, 179, 0.16);
}

.metric:nth-child(4) {
  --metric-tint: #ffffff;
  --metric-line: rgba(220, 38, 38, 0.14);
}

.work-diary-panel {
  background: #ffffff;
}

.activity-panel {
  background: #f7fcfb;
}

.view-tabs button.active {
  border-color: rgba(19, 174, 179, 0.44);
  background: var(--accent-soft);
  color: var(--ink);
}

.secondary-button:hover,
.secondary-button:focus-visible,
.ghost-button:hover,
.ghost-button:focus-visible,
.icon-button:hover,
.icon-button:focus-visible {
  background: var(--accent-soft);
  border-color: var(--accent-soft-2);
  color: var(--ink);
}

.property-grid {
  border-color: rgba(229, 231, 235, 0.78);
}

.property-card {
  position: relative;
  overflow: visible;
}

.property-card::before {
  content: "";
  position: absolute;
  inset: 16px auto 16px 0;
  width: 3px;
  border-radius: 999px;
  background: var(--tech);
  opacity: 0;
  transition: opacity 140ms ease;
}

.property-card:hover::before,
.property-card:focus-visible::before {
  opacity: 1;
}

.property-card:hover,
.property-card:focus-visible {
  background: #f2fbf9;
}

.property-price-column strong {
  color: var(--tech-hover);
}

.property-placeholder span {
  background: var(--tech-soft);
  color: var(--tech-hover);
}

.timeline-dot,
.commercial-flow-bar span,
.readiness-bar span {
  background: var(--pop);
}

.time-row span,
.contact-quick-actions button:hover,
.contact-quick-actions button:focus-visible {
  color: var(--tech-hover);
}

.contact-type-badge.partner::before,
.contact-type-badge.service::before {
  background: var(--tech);
}

.detail-decision-panel {
  background: #ffffff;
  border-color: rgba(19, 174, 179, 0.24);
}

.detail-summary-strip {
  background: #f2fbf9;
}

@media (max-width: 1040px) {
  .app-shell,
  body.sidebar-pinned .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .sidebar:hover,
  body.sidebar-pinned .sidebar {
    width: auto;
    padding: 8px;
    background: #123f44;
  }

  .nav-item {
    min-width: 82px;
  }

  .side-nav {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(76px, 92px);
    grid-template-columns: none;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
  }

  .property-grid {
    border-radius: 12px;
  }

  .property-card {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    min-height: 104px;
    padding: 14px;
  }

  .property-image {
    width: 56px;
    height: 56px;
  }

  .property-price-column {
    grid-column: 2;
    justify-items: start;
    text-align: left;
    min-width: 0;
  }

  .property-price-column strong {
    font-size: 0.98rem;
  }
}

@media (max-width: 980px) {
  .ficha360-header {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .ficha360-header-meta,
  .ficha360-decision-grid,
  .ficha360-memory-grid {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ficha360-insights-card,
  .ficha360-memory-grid > div:first-child {
    grid-column: 1 / -1;
  }

  .property-360-header {
    grid-template-columns: minmax(130px, 180px) minmax(0, 1fr);
  }

  .property-360-executive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .property-readiness-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .property-readiness-title { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
  .property-readiness-compact button:nth-child(odd) { border-right: 0; }

  .property-360-action {
    grid-column: 1 / -1;
  }

  .property-360-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .property-360-strip div:nth-child(3n) {
    border-right: 0;
  }

  .property-participants-table .property-compact-head,
  .property-participants-table .property-compact-row,
  .property-references-table .property-compact-head,
  .property-references-table .property-compact-row {
    grid-template-columns: minmax(150px, 1fr) minmax(120px, 0.8fr) minmax(120px, 0.8fr);
  }

  .document-readiness-row {
    grid-template-columns: minmax(150px, 1fr) 112px 140px 72px minmax(110px, 0.8fr);
    min-width: 680px;
  }

  .property-participants-table .property-compact-head span:nth-child(4),
  .property-participants-table .property-compact-row span:nth-child(4),
  .property-references-table .property-compact-head span:nth-child(4),
  .property-references-table .property-compact-row span:nth-child(4) {
    display: none;
  }
}

@media (max-width: 640px) {
  .ficha360-header,
  .ficha360-decision-grid,
  .ficha360-memory-grid {
    grid-template-columns: 1fr;
  }

  .ficha360-header-meta,
  .ficha360-facts,
  .ficha360-documents-compact,
  .contact-trust-summary {
    grid-template-columns: 1fr;
  }

  .contact-completeness-factors > div {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .contact-completeness-factors small {
    grid-column: 2;
    text-align: left;
  }

  .ficha360-media img,
  .ficha360-placeholder {
    height: 170px;
  }

  .property-360-header,
  .property-360-v2 .property-360-header,
  .property-360-strip {
    grid-template-columns: 1fr;
  }

  .property-360-executive-grid,
  .property-relationship-columns,
  .property-readiness-compact { grid-template-columns: 1fr; }
  .property-readiness-title { grid-column: auto; }
  .property-readiness-compact button,
  .property-readiness-compact button:nth-child(odd) { border-right: 0; border-top: 1px solid var(--line); }

  .property-360-strip div,
  .property-360-strip div:nth-child(3n) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .property-360-strip div:last-child {
    border-bottom: 0;
  }

  .property-360-media img,
  .property-360-media .property-detail-placeholder {
    max-height: none;
  }

  .property-compact-table {
    overflow-x: auto;
  }

  .document-readiness-index {
    grid-template-columns: 1fr;
  }

  .document-readiness-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .document-readiness-summary div:nth-child(2n) {
    border-right: 0;
  }

  .document-readiness-index button {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .document-readiness-index button:last-child {
    border-bottom: 0;
  }

  .property-participants-table .property-compact-head,
  .property-participants-table .property-compact-row,
  .property-references-table .property-compact-head,
  .property-references-table .property-compact-row {
    min-width: 560px;
  }
}

.agenda-actions .icon-button svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.diary-date-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.diary-date-controls .pill {
  min-width: 72px;
  justify-content: center;
  text-align: center;
}

@media (max-width: 760px) {
  .app-shell,
  body.sidebar-pinned .app-shell {
    display: block;
    min-height: 100dvh;
  }

  .sidebar,
  .sidebar:hover,
  body.sidebar-pinned .sidebar {
    position: fixed;
    inset: auto 0 0 0;
    width: 100%;
    height: 64px;
    min-height: 64px;
    max-height: 64px;
    padding: 6px max(8px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    overflow: hidden;
    z-index: 40;
    border-radius: 0;
    box-shadow: 0 -10px 28px rgba(18, 63, 68, 0.18);
  }

  .side-nav {
    height: 52px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 54px;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0;
    scrollbar-width: none;
  }

  .side-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    width: 54px;
    min-width: 54px;
    min-height: 52px;
    padding: 6px;
    gap: 0;
  }

  .nav-label {
    display: none;
  }

  .nav-icon {
    width: 32px;
    height: 32px;
  }

  .workspace {
    min-width: 0;
  }

  .content {
    padding-bottom: calc(86px + env(safe-area-inset-bottom));
  }

  .topbar {
    gap: 10px;
    padding: 10px 12px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-end;
    gap: 6px;
  }

  .search-box {
    min-width: 0;
    flex: 1 1 150px;
  }

  .agenda-actions,
  .diary-date-controls {
    justify-content: flex-start;
  }

  .agenda-actions .icon-button,
  .diary-date-controls .icon-button {
    width: 36px;
    height: 36px;
  }

  .status-toast {
    top: auto;
    right: 10px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    left: 10px;
    max-width: none;
  }
}

/* Agenda real e agrupamento temporal das tarefas. */
#view-tasks .kanban {
  grid-template-columns: repeat(3, minmax(240px, 1fr));
}

.kanban-quick-task {
  position: relative;
  display: flex;
  align-items: center;
  margin: -4px 0 12px;
}

.kanban-quick-task input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 7px 36px 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-muted);
  color: var(--ink);
  font: inherit;
  font-size: var(--text-small);
}

.kanban-quick-task button {
  position: absolute;
  right: 5px;
  width: 26px;
  min-width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--accent-hover);
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
}

.kanban-quick-task button:hover,
.kanban-quick-task button:focus-visible {
  background: var(--accent-soft);
}

.main-calendar-panel {
  display: grid;
  gap: 14px;
}

.calendar-main-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}

.calendar-main-day-header h3 {
  margin-top: 3px;
  text-transform: capitalize;
}

.main-calendar-feed {
  display: grid;
  gap: 8px;
}

.integration-capabilities .integration-live {
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 28%, var(--line));
  background: color-mix(in srgb, var(--success) 8%, var(--surface));
}

.integration-capabilities .integration-planned {
  color: var(--muted);
  border-style: dashed;
  background: var(--surface-muted);
}

@media (max-width: 1040px) {
  #view-tasks .kanban {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .calendar-main-day-header {
    align-items: flex-start;
  }
}

/* Oportunidades: quadro de decisão compacto com detalhe progressivo. */
#view-commercial .opportunity-summary {
  gap: 8px;
  margin-bottom: 10px;
}

#view-commercial .opportunity-summary button {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 9px 12px;
  border-radius: 10px;
}

#view-commercial .opportunity-summary button span {
  color: var(--muted);
  font-size: var(--text-small);
  font-weight: 750;
}

#view-commercial .opportunity-summary button strong {
  font-size: 1.15rem;
}

#view-commercial .opportunity-table {
  min-width: 1180px;
  table-layout: fixed;
}

#view-commercial .opportunity-table th:nth-child(1) { width: 118px; }
#view-commercial .opportunity-table th:nth-child(2) { width: 210px; }
#view-commercial .opportunity-table th:nth-child(3) { width: 170px; }
#view-commercial .opportunity-table th:nth-child(4) { width: 180px; }
#view-commercial .opportunity-table th:nth-child(5) { width: 225px; }
#view-commercial .opportunity-table th:nth-child(6) { width: 145px; }
#view-commercial .opportunity-table th:nth-child(7) { width: 118px; }

#view-commercial .opportunity-main-row {
  cursor: pointer;
  transition: background .16s ease, box-shadow .16s ease;
}

#view-commercial .opportunity-main-row:hover,
#view-commercial .opportunity-main-row:focus-visible,
#view-commercial .opportunity-main-row.expanded {
  background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface));
  outline: none;
}

#view-commercial .opportunity-main-row:focus-visible {
  box-shadow: inset 3px 0 0 var(--accent);
}

#view-commercial .opportunity-main-row td {
  vertical-align: middle;
  padding: 12px 10px;
}

.opportunity-priority-cell {
  display: grid;
  gap: 3px;
}

.opportunity-priority-cell > strong {
  font-size: 1.2rem;
  line-height: 1;
}

.opportunity-priority-cell > span {
  color: var(--muted);
  font-size: .7rem;
  font-weight: 750;
}

.opportunity-priority-cell > i {
  display: block;
  width: 76px;
  height: 4px;
  margin-top: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

.opportunity-priority-cell > i > b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.opportunity-subject-cell,
.opportunity-buyer-cell,
.opportunity-next-cell {
  overflow-wrap: anywhere;
}

.opportunity-subject-cell > strong,
.opportunity-buyer-cell > strong,
.opportunity-next-cell > strong {
  display: block;
  color: var(--ink);
  line-height: 1.28;
}

.opportunity-subject-cell > small,
.opportunity-buyer-cell > small,
.opportunity-next-cell > small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: .73rem;
  line-height: 1.3;
}

.opportunity-subject-cell > .pill {
  display: inline-flex;
  margin-top: 6px;
  padding: 3px 7px;
  font-size: .67rem;
}

.opportunity-buyer-cell > span {
  display: inline-block;
  margin-top: 5px;
  color: var(--accent-strong);
  font-size: .72rem;
  font-weight: 750;
}

.opportunity-signal-cell > span {
  display: inline-block;
  padding: 6px 8px;
  color: var(--slate);
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.35;
  background: var(--slate-tint);
  border-radius: 8px;
}

.opportunity-next-cell > .compact-button {
  min-height: 28px;
  margin-top: 7px;
  padding: 4px 8px;
  font-size: .7rem;
}

.opportunity-status-cell select {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 5px 25px 5px 7px;
  color: var(--slate);
  font-size: .72rem;
  font-weight: 700;
  background-color: var(--surface-muted);
  border-color: var(--line);
}

.opportunity-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.opportunity-more-menu {
  position: relative;
}

.opportunity-more-menu > summary {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--muted);
  font-size: 1.2rem;
  font-weight: 850;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}

.opportunity-more-menu > summary::-webkit-details-marker {
  display: none;
}

.opportunity-more-menu[open] > summary {
  color: var(--accent-strong);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.opportunity-more-menu-panel {
  position: absolute;
  z-index: 12;
  top: calc(100% + 5px);
  right: 0;
  width: 220px;
  max-height: 310px;
  padding: 7px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 16px 38px rgba(18, 63, 68, .16);
}

.opportunity-more-menu-panel button {
  width: 100%;
  justify-content: flex-start;
  margin: 1px 0;
  border-color: transparent;
  text-align: left;
}

.opportunity-more-menu-panel .danger-action {
  color: var(--danger);
}

.opportunity-expanded-row > td {
  padding: 0 10px 14px !important;
  background: color-mix(in srgb, var(--surface-muted) 72%, var(--surface));
}

.opportunity-inline-detail {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.opportunity-inline-scores {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.opportunity-inline-scores article {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-muted);
}

.opportunity-inline-scores article.final {
  color: var(--accent-strong);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.opportunity-inline-scores span,
.opportunity-inline-scores small {
  color: var(--muted);
  font-size: .7rem;
}

.opportunity-inline-scores strong {
  font-size: 1.05rem;
}

.opportunity-inline-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr);
  gap: 12px;
}

.opportunity-inline-grid > section,
.opportunity-inline-buyers {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-muted);
}

.opportunity-inline-detail h4 {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: .82rem;
}

.opportunity-explanation-list {
  display: grid;
  gap: 4px;
}

.opportunity-explanation-list + .opportunity-explanation-list {
  margin-top: 6px;
}

.opportunity-explanation-list p {
  display: flex;
  gap: 7px;
  margin: 0;
  color: var(--muted);
  font-size: .74rem;
}

.opportunity-explanation-list span {
  width: 14px;
  color: var(--success);
  font-weight: 850;
}

.opportunity-explanation-list.negative span { color: var(--danger); }
.opportunity-explanation-list.missing span { color: var(--warning); }

.opportunity-inline-recommendation {
  margin-top: 9px;
  color: var(--slate);
  font-size: .76rem;
  line-height: 1.45;
}

.opportunity-inline-facts {
  display: grid;
  gap: 5px;
  margin: 0;
}

.opportunity-inline-facts div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 8px;
  font-size: .73rem;
}

.opportunity-inline-facts dt { color: var(--muted); }
.opportunity-inline-facts dd { margin: 0; color: var(--ink); font-weight: 700; }

.opportunity-inline-buyers .opportunity-buyers-table {
  min-width: 680px;
}

.opportunity-inline-buyers th,
.opportunity-inline-buyers td {
  padding: 7px 8px;
  font-size: .72rem;
}

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

  .opportunity-inline-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  #view-commercial .opportunity-summary,
  .opportunity-inline-scores {
    grid-template-columns: 1fr;
  }
}

/* Mantém a densidade final da nova lista depois das regras de compatibilidade. */
#view-contacts .contact-radar-row {
  min-height: 66px;
  padding: 9px 12px;
}

/* Identidade Su 4.2: logótipo fornecido pela utilizadora. */
.brand-mark.brand-logo-mark {
  width: 42px;
  height: 46px;
  flex: 0 0 42px;
  padding: 4px;
  overflow: hidden;
  border-color: rgba(255, 255, 255, .28);
  border-radius: 11px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(6, 24, 43, .16);
}

.brand-mark.brand-logo-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-brand .brand-mark.brand-logo-mark {
  border-color: rgba(18, 63, 68, .12);
  box-shadow: 0 4px 14px rgba(6, 24, 43, .08);
}

.auth-submit-button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.auth-submit-spinner { display: none; width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; }
.auth-submit-button.is-loading .auth-submit-spinner { display: inline-block; animation: auth-spin .7s linear infinite; }
@keyframes auth-spin { to { transform: rotate(360deg); } }

/* Centro de Atenção */
.attention-today-summary {
  position: relative;
  z-index: 1;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 20px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .78);
}
.attention-today-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: 0 0 auto; }
.attention-today-actions .compact-button { white-space: nowrap; }
#view-today > .dashboard-grid { position: relative; z-index: 0; clear: both; }

.attention-today-title { display: flex; align-items: center; gap: 9px; min-width: 210px; }
.attention-today-title > div { display: grid; gap: 1px; }
.attention-today-title span { color: var(--ink); font-size: .76rem; font-weight: 780; }
.attention-today-title small { color: var(--muted); font-size: .64rem; }
.attention-today-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--surface-muted);
  color: var(--accent-strong);
}
.attention-today-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.attention-today-counts { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.attention-today-counts span { display: inline-flex; align-items: center; gap: 4px; color: var(--slate); font-size: .69rem; white-space: nowrap; }
.attention-today-counts i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.attention-today-counts .critical { color: #c64d55; }
.attention-today-counts .pending { color: #d77830; }
.attention-today-counts .followup { color: #c49a19; }
.attention-today-counts strong { color: var(--ink); }

.attention-center-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--slate);
}

.attention-center-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.attention-center-toggle-label {
  font-size: .76rem;
  font-weight: 780;
}

.attention-center-toggle strong {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: .67rem;
}

.attention-center-toggle.has-items {
  border-color: rgba(201, 79, 79, .25);
  background: rgba(255, 248, 247, .96);
}

.smart-capture-fab {
  position: fixed;
  z-index: 70;
  right: 20px;
  bottom: 18px;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  cursor: pointer;
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1;
  box-shadow: 0 16px 38px rgba(18, 89, 94, .28);
}

.smart-capture-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(18, 89, 94, .34);
}

.smart-capture-backdrop {
  z-index: 85;
}

.smart-capture-modal {
  width: min(640px, 100%);
}

.smart-capture-main-field textarea {
  min-height: 132px;
  resize: vertical;
  font-size: 1.05rem;
  line-height: 1.5;
}

.smart-capture-context {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.smart-capture-context > summary {
  padding: 11px 13px;
  cursor: pointer;
  color: var(--slate);
  font-weight: 760;
}

.smart-capture-context-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 13px 13px;
}

.smart-capture-context-grid label {
  display: grid;
  gap: 5px;
}

.smart-capture-rule-note {
  margin: 0;
  color: var(--muted);
  font-size: .76rem;
}

.inbox-capture-context {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}

.inbox-capture-context span {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: .68rem;
}

.attention-center-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 31, 34, .28);
  backdrop-filter: blur(2px);
}

.attention-center-drawer {
  position: absolute;
  inset: 0 0 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(520px, 100vw);
  height: 100%;
  overflow: hidden;
  border-left: 1px solid var(--line);
  background: #f8fbfb;
  box-shadow: -24px 0 60px rgba(18, 63, 68, .16);
  animation: attention-drawer-in 180ms ease-out;
}

@keyframes attention-drawer-in {
  from { transform: translateX(24px); opacity: .72; }
  to { transform: translateX(0); opacity: 1; }
}

.attention-center-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 22px 17px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .92);
}

.attention-center-header h2 { margin: 3px 0 5px; font-size: 1.25rem; }
.attention-center-header p { margin: 0; }

.attention-center-body {
  overflow-y: auto;
  padding: 17px 18px 30px;
}

.attention-v1-section + .attention-v1-section {
  margin-top: 22px;
}

.attention-v1-section > header {
  margin-bottom: 9px;
}

.attention-v1-section > header h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--ink);
  font-size: .84rem;
}

.attention-v1-section > header h3 strong {
  display: inline-grid;
  min-width: 1.45rem;
  min-height: 1.45rem;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: .68rem;
}

.attention-v1-section > header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: .7rem;
}

.attention-v1-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(24, 50, 53, .035);
}

.attention-v1-card + .attention-v1-card {
  margin-top: 8px;
}

.attention-v1-card-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.attention-v1-type,
.attention-v1-next span {
  color: var(--muted);
  font-size: .62rem;
  font-weight: 760;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.attention-v1-card-main strong {
  overflow: hidden;
  color: var(--ink);
  font-size: .86rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attention-v1-card-main p {
  margin: 0;
  color: var(--slate);
  font-size: .72rem;
  line-height: 1.4;
}

.attention-v1-card > time {
  color: var(--muted);
  font-size: .66rem;
  white-space: nowrap;
}

.attention-v1-next {
  display: grid;
  grid-column: 1 / -1;
  gap: 2px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
}

.attention-v1-next strong {
  color: var(--ink);
  font-size: .73rem;
}

.attention-v1-card .attention-alert-actions {
  grid-column: 1 / -1;
  margin-top: 0;
}

.attention-priority-group + .attention-priority-group { margin-top: 22px; }
.attention-priority-group > h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 9px;
  color: var(--ink);
  font-size: .82rem;
  letter-spacing: .02em;
}
.attention-priority-group > h3 > span { font-size: .68rem; }
.attention-priority-group > h3 > strong {
  margin-left: auto;
  color: var(--muted);
  font-size: .72rem;
}
.attention-priority-group.critical > h3 > span { color: #c64d55; }
.attention-priority-group.pending > h3 > span { color: #d77830; }
.attention-priority-group.followup > h3 > span { color: #d0a41f; }
.attention-priority-group.suggestion > h3 > span { color: #347bb8; }

.attention-alert-card {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(24, 50, 53, .035);
}
.attention-alert-card + .attention-alert-card { margin-top: 8px; }
.attention-alert-card.critical { border-left-color: #c64d55; }
.attention-alert-card.pending { border-left-color: #d77830; }
.attention-alert-card.followup { border-left-color: #d0a41f; }
.attention-alert-card.suggestion { border-left-color: #347bb8; }

.attention-alert-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}
.attention-alert-heading strong { color: var(--ink); font-size: .86rem; line-height: 1.3; }
.attention-alert-heading p { margin: 3px 0 0; color: var(--slate); font-size: .75rem; line-height: 1.45; }
.attention-alert-heading > span { color: var(--muted); font-size: .66rem; white-space: nowrap; }

.attention-alert-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.attention-alert-meta span {
  padding: 3px 6px;
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: .64rem;
  font-weight: 700;
}

.attention-explanation { margin-top: 8px; }
.attention-explanation summary {
  color: var(--accent-strong);
  cursor: pointer;
  font-size: .68rem;
  font-weight: 740;
  list-style: none;
}
.attention-explanation summary::-webkit-details-marker { display: none; }
.attention-explanation p {
  margin: 6px 0 0;
  padding: 8px 9px;
  border-radius: 7px;
  background: var(--surface-muted);
  color: var(--slate);
  font-size: .7rem;
  line-height: 1.45;
}

.attention-alert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 11px;
}
.attention-alert-actions > button,
.attention-snooze-menu > summary {
  min-height: 29px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--slate);
  cursor: pointer;
  font-size: .66rem;
  font-weight: 720;
  list-style: none;
}
.attention-action-complete { color: var(--success) !important; }
.attention-open-source { margin-left: auto; color: var(--accent-strong) !important; }
.attention-snooze-menu { position: relative; }
.attention-snooze-menu > summary::-webkit-details-marker { display: none; }
.attention-snooze-menu > div {
  position: absolute;
  z-index: 4;
  top: 34px;
  right: auto;
  left: var(--attention-snooze-inline-offset, 0px);
  display: grid;
  gap: 4px;
  width: 230px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}
.attention-snooze-menu button {
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-size: .7rem;
  text-align: left;
}
.attention-snooze-menu button:hover { background: var(--surface-muted); }
.attention-snooze-menu form { display: grid; gap: 6px; padding-top: 5px; border-top: 1px solid var(--line); }
.attention-snooze-menu label { display: grid; gap: 4px; color: var(--muted); font-size: .65rem; }
.attention-snooze-menu input { min-height: 33px; font-size: .7rem; }
.attention-snooze-menu form button { border: 1px solid var(--line); text-align: center; }

.attention-center-history {
  max-height: 190px;
  overflow: auto;
  border-top: 1px solid var(--line);
  background: #fff;
}
.attention-center-history > summary {
  display: flex;
  gap: 7px;
  padding: 13px 18px;
  color: var(--slate);
  cursor: pointer;
  font-size: .74rem;
  font-weight: 760;
}
.attention-center-history > summary strong { margin-left: auto; }
.attention-center-history > div { padding: 0 18px 14px; }
.attention-center-history article { display: grid; gap: 2px; padding: 7px 0; border-top: 1px solid var(--line); }
.attention-center-history article strong { font-size: .72rem; }
.attention-center-history article span,
.attention-center-history article small { color: var(--muted); font-size: .65rem; }

.attention-empty {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 54px 20px;
  color: var(--muted);
  text-align: center;
}
.attention-empty > span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--success-soft); color: var(--success); font-size: 1.2rem; }
.attention-empty strong { color: var(--ink); }
.attention-empty p { margin: 0; font-size: .76rem; }
body.attention-center-open { overflow: hidden; }

@media (max-width: 980px) {
  .attention-today-summary { align-items: flex-start; flex-wrap: wrap; }
  .attention-today-summary > button { margin-left: 0; }
  .attention-center-toggle-label { display: none; }
  .attention-center-toggle { padding-inline: 9px; }
}

@media (max-width: 620px) {
  .attention-today-summary { gap: 10px; }
  .attention-today-title { min-width: 100%; }
  .attention-today-counts { gap: 9px; }
  .attention-today-summary > button { width: 100%; }
  .attention-center-drawer { width: 100%; }
  .attention-center-header { padding: 18px 16px 14px; }
  .attention-center-body { padding: 14px 12px 24px; }
  .attention-alert-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .attention-alert-actions > button,
  .attention-snooze-menu > summary { width: 100%; text-align: center; }
  .attention-open-source { margin-left: 0; }
  .attention-snooze-menu > div { width: min(270px, calc(100vw - 44px)); }
  .attention-v1-card { grid-template-columns: minmax(0, 1fr); }
  .attention-v1-card > time { grid-row: 2; }
}

/* Fase 5 — reaplicação final para prevalecer sobre a folha histórica. */
html, body { width: 100%; max-width: 100%; }
.topbar { display: grid; grid-template-columns: minmax(230px, 1fr) auto; gap: 20px; min-height: 76px; padding: 10px 28px; }
.topbar-identity { min-width: 0; position: relative; padding-right: 118px; }
.topbar-identity h1 { margin: 0; font-size: 1.45rem; line-height: 1.15; letter-spacing: -.025em; }
.topbar-identity .welcome-message { position: absolute; top: 2px; right: 0; margin: 0; font-size: .74rem; justify-content: flex-start; }
.topbar-description-line { display: flex; align-items: center; gap: 7px; min-width: 0; }
.topbar-description-line p { margin: 2px 0 0; color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-description-line .info-dot { width: 18px; height: 18px; min-width: 18px; font-size: .68rem; }
.topbar-description-line .info-popover { top: calc(100% + 8px); left: 0; z-index: 80; }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; min-width: 0; flex-wrap: nowrap; }
.topbar-actions .primary-button { white-space: nowrap; }
.topbar-actions .topbar-brain-capture { width: 42px; min-width: 42px; max-width: 42px; flex: 0 0 42px; }
.tool-menu-panel { width: 264px; max-height: min(70vh, 560px); overflow-y: auto; padding: 8px; }
.tool-menu-heading { display: block; padding: 9px 10px 4px; color: var(--muted); font-size: .66rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; border-top: 1px solid var(--line); }
.tool-menu-heading:first-child { border-top: 0; padding-top: 4px; }
.tool-menu-heading.critical, #reset-empty-data { color: var(--danger); }
.view > .module-header > div:first-child { display: none; }
.view > .module-header { justify-content: flex-end; min-height: 0; padding: 0; margin: 0 0 12px; }
#view-growth > .view-header { display: none; }
.app-shell,
.workspace,
.topbar,
.content,
.view {
  min-width: 0;
  max-width: 100%;
}
.dashboard-grid,
.dashboard-grid > *,
.kanban,
.kanban > *,
.property-grid,
.property-grid > *,
.process-grid,
.process-grid > * {
  min-width: 0;
}
.app-shell,
.content,
.view {
  width: 100%;
}
.content { padding-top: 18px; }

.module-error-boundary {
  display: grid;
  gap: 3px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(181, 74, 74, 0.22);
  border-radius: 12px;
  background: #fff8f7;
  color: var(--ink);
}

.module-error-boundary strong {
  color: var(--danger);
}

.module-error-boundary span {
  color: var(--muted);
  font-size: var(--text-small);
}

@media (max-width: 1080px) {
  .topbar { grid-template-columns: minmax(190px, 1fr) auto; padding-inline: 20px; gap: 12px; }
  .search-box { width: min(300px, 30vw); }
  .quiet-clock { display: none; }
  .attention-center-toggle-label { display: none; }
}

@media (max-width: 760px) {
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .topbar { grid-template-columns: minmax(0, 1fr); min-height: auto; padding: 9px 14px; }
  .topbar-identity { padding-right: 0; }
  .topbar-identity h1 { font-size: 1.25rem; }
  .topbar-identity .welcome-message { position: static; margin-bottom: 2px; }
  .topbar-description-line p { max-width: calc(100vw - 58px); }
  .topbar-actions { width: 100%; gap: 5px; }
  .search-box { width: 42px; padding-inline: 10px; }
  .search-box input { width: 0; opacity: 0; padding: 0; pointer-events: none; }
  .search-box:focus-within { position: absolute; inset: auto 14px 8px 14px; width: auto; z-index: 90; }
  .search-box:focus-within input { width: 100%; opacity: 1; padding: initial; pointer-events: auto; }
  #quick-create-open { padding-inline: 10px; }
  .tool-menu-panel { position: fixed; top: 64px; right: 10px; left: auto; width: min(300px, calc(100vw - 20px)); }
}

/* Motor de Oportunidades Inteligente v1 */
.opportunity-sync-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 3px 14px rgba(31, 41, 55, .035);
}
.opportunity-sync-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.opportunity-sync-heading > div { display: grid; grid-template-columns: auto auto; align-items: baseline; gap: 2px 9px; }
.opportunity-sync-heading span, .opportunity-sync-heading small { color: var(--muted); font-size: .72rem; }
.opportunity-sync-heading small { grid-column: 1 / -1; }
.opportunity-sync-metrics { display: grid; grid-template-columns: repeat(8, minmax(74px, 1fr)); gap: 1px; overflow-x: auto; }
.opportunity-sync-metrics > span { display: grid; gap: 2px; min-width: 74px; padding: 7px 9px; border-left: 1px solid var(--line); }
.opportunity-sync-metrics > span:first-child { border-left: 0; }
.opportunity-sync-metrics small { color: var(--muted); font-size: .64rem; }
.opportunity-sync-metrics strong { font-size: .95rem; }
.opportunity-sync-progress { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .72rem; }
.opportunity-sync-progress i { width: 12px; height: 12px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: opportunity-spin .8s linear infinite; }
@keyframes opportunity-spin { to { transform: rotate(360deg); } }
.today-opportunity-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: -4px 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.today-opportunity-strip > span { display: grid; gap: 2px; padding: 8px 12px; border-left: 1px solid var(--line); }
.today-opportunity-strip > span:first-child { border-left: 0; }
.today-opportunity-strip small { color: var(--muted); font-size: .65rem; }
.today-opportunity-strip strong { font-size: .82rem; }
.opportunity-score-breakdown { display: grid; gap: 5px; margin-top: 8px; }
.opportunity-score-breakdown span { display: flex; justify-content: space-between; gap: 12px; font-size: .72rem; }
.opportunity-score-breakdown b { color: var(--accent); }

@media (max-width: 900px) {
  .opportunity-sync-metrics { grid-template-columns: repeat(4, minmax(90px, 1fr)); }
  .today-opportunity-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .opportunity-sync-heading { align-items: stretch; flex-direction: column; }
  .opportunity-sync-heading button { width: 100%; }
  .opportunity-sync-metrics { grid-template-columns: repeat(2, minmax(110px, 1fr)); }
  .today-opportunity-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Navegação lateral v2 — áreas de trabalho, sem alterar destinos internos. */
.side-nav {
  flex: 1 1 auto;
  align-content: start;
  gap: 5px;
  min-height: 0;
  overflow-x: clip;
  overflow-y: auto;
  scrollbar-width: none;
}

.side-nav::-webkit-scrollbar { display: none; }

.nav-group {
  display: grid;
  gap: 2px;
  min-width: 196px;
}

.nav-group-toggle,
.nav-action-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 38px;
  padding: 8px 11px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.64);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  font-weight: 650;
  transition: background 140ms ease, color 140ms ease;
}

.nav-group-toggle:hover,
.nav-action-item:hover,
.nav-group.has-active-view > .nav-group-toggle {
  background: rgba(72, 219, 219, 0.08);
  color: #ffffff;
}

.nav-group.has-active-view > .nav-group-toggle .nav-icon {
  color: var(--accent);
}

.nav-group-toggle .nav-label,
.nav-action-item .nav-label {
  flex: 1;
}

.nav-chevron {
  opacity: 0;
  transform: rotate(0deg);
  color: rgba(255, 255, 255, 0.42);
  font-size: 1.05rem;
  transition: opacity 140ms ease, transform 160ms ease;
}

.sidebar:hover .nav-chevron,
body.sidebar-pinned .nav-chevron { opacity: 1; }
.nav-group.expanded .nav-chevron { transform: rotate(90deg); }

.nav-children {
  display: grid;
  gap: 1px;
  padding: 1px 0 4px 38px;
  overflow: hidden;
  animation: sidebar-children-in 140ms ease both;
}

.nav-group:not(.expanded) .nav-children { display: none; }
body:not(.sidebar-pinned) .sidebar:not(:hover) .nav-children { display: none; }

.nav-children .nav-item,
.nav-children .nav-action-item {
  min-height: 31px;
  padding: 5px 8px;
  gap: 8px;
  border-radius: 8px;
  font-size: 0.79rem;
  font-weight: 600;
}

.nav-children .nav-item.active {
  background: rgba(72, 219, 219, 0.11);
}

.nav-children .nav-item.active::after { display: none; }

.nav-child-dot {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
}

.nav-children .nav-item.active .nav-child-dot { background: var(--accent); }

.nav-badge {
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.64rem;
  line-height: 18px;
  text-align: center;
}

.nav-home { margin-bottom: 5px; }
.nav-home::before {
  content: "";
  position: absolute;
  right: 9px;
  bottom: -5px;
  left: 9px;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-footer {
  display: grid;
  gap: 9px;
  width: 100%;
  padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 0.74rem;
}

.sidebar-profile-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 196px;
}

.sidebar-profile-row > span:last-child {
  display: grid;
  opacity: 0;
  transition: opacity 140ms ease;
}

.sidebar-profile-row strong { color: #ffffff; font-size: 0.78rem; }
.sidebar-profile-row small { color: rgba(255, 255, 255, 0.48); }

.sidebar-avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(72, 219, 219, 0.28);
  border-radius: 10px;
  background: rgba(72, 219, 219, 0.12);
  color: #ffffff;
  font-weight: 800;
}

.sidebar-system-meta {
  display: none;
  gap: 5px;
  padding-left: 2px;
}

.sidebar-system-meta > span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.46);
}

.sidebar-system-meta .status-dot { width: 6px; height: 6px; flex: 0 0 6px; }

.sidebar-settings {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 31px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.7);
  text-align: left;
}

.sidebar:hover .sidebar-profile-row > span:last-child,
body.sidebar-pinned .sidebar-profile-row > span:last-child { opacity: 1; }
.sidebar:hover .sidebar-system-meta,
.sidebar:hover .sidebar-settings,
body.sidebar-pinned .sidebar-system-meta,
body.sidebar-pinned .sidebar-settings { display: grid; }
.sidebar:hover .sidebar-settings,
body.sidebar-pinned .sidebar-settings { display: flex; }

.topbar {
  grid-template-columns: minmax(300px, 1fr) auto;
  min-height: 82px;
  padding: 11px 28px 12px;
}

.topbar-identity { padding-right: 0; }

.topbar-context-line {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 20px;
}

.topbar-area-label {
  color: var(--slate);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.topbar-identity .welcome-message {
  position: static;
  margin: 0;
  padding-left: 11px;
  border-left: 1px solid var(--line);
  font-size: 0.72rem;
}

.topbar-heading-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-width: 0;
}

.topbar-heading-row h1 {
  flex: 0 0 auto;
  font-size: 1.7rem;
}

.topbar-heading-row .topbar-description-line { min-width: 0; }
.topbar-heading-row .topbar-description-line p { margin-top: 0; }

@keyframes sidebar-children-in {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1040px) {
  .nav-group { min-width: 74px; }
  .nav-group-toggle { min-width: 74px; justify-content: center; }
  .nav-group-toggle .nav-label,
  .nav-group-toggle .nav-chevron { display: none !important; }
  .nav-children { display: none !important; }
  .nav-group.expanded .nav-children {
    position: fixed;
    top: 64px;
    right: 8px;
    left: 8px;
    z-index: 70;
    display: flex !important;
    gap: 5px;
    padding: 8px;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: #123f44;
    box-shadow: 0 16px 36px rgba(18, 63, 68, 0.24);
  }
  .nav-group.expanded .nav-children .nav-item,
  .nav-group.expanded .nav-children .nav-action-item { flex: 0 0 auto; min-width: max-content; }
  .nav-group.expanded .nav-children .nav-label { opacity: 1; transform: none; }
  .sidebar-footer { display: none; }
}

@media (max-width: 760px) {
  .topbar { grid-template-columns: minmax(0, 1fr); min-height: auto; }
  .topbar-context-line { justify-content: space-between; }
  .topbar-heading-row { display: grid; gap: 2px; }
  .topbar-heading-row h1 { font-size: 1.35rem; }
  .topbar-identity .welcome-message { margin: 0; }
}

@media (max-width: 360px) {
  .topbar-context-line,
  .topbar-identity .welcome-message { min-width: 0; }
  .topbar-identity .welcome-message { white-space: normal; }
  .topbar-identity .welcome-message #welcome-copy { min-width: 0; overflow-wrap: anywhere; }
}

/* Posicionamento final do Hoje v2: mantém precedência sobre os temas históricos. */
#view-today .dashboard-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; align-items: start; }
#view-today .today-attention-panel { grid-column: 1 / span 8; grid-row: 1; }
#view-today .important-dates-panel { grid-column: 9 / -1; grid-row: 1; }
#view-today .work-diary-panel { grid-column: 1 / -1; grid-row: 2; }
#view-today .metrics-panel { grid-column: 1 / -1; grid-row: 3; grid-template-columns: repeat(5, minmax(0, 1fr)); }
#view-today .agenda-panel { grid-column: 1 / span 8; grid-row: 4; }
#view-today .tasks-panel { grid-column: 9 / -1; grid-row: 4; }
#view-today .today-objectives-panel { grid-column: 1 / span 6; grid-row: 5; }
#view-today .today-reading-panel { grid-column: 7 / -1; grid-row: 5; }

@media (max-width: 1120px) {
  #view-today .today-attention-panel,
  #view-today .agenda-panel { grid-column: 1 / span 7; }
  #view-today .important-dates-panel,
  #view-today .tasks-panel { grid-column: 8 / -1; }
  #view-today .metrics-panel { grid-template-columns: repeat(5, minmax(150px, 1fr)); overflow-x: auto; }
}

@media (max-width: 820px) {
  #view-today .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  #view-today .today-attention-panel,
  #view-today .important-dates-panel,
  #view-today .agenda-panel,
  #view-today .tasks-panel,
  #view-today .work-diary-panel,
  #view-today .metrics-panel,
  #view-today .today-objectives-panel,
  #view-today .today-reading-panel { grid-column: 1; grid-row: auto; }
  #view-today .today-attention-panel { order: 1; }
  #view-today .important-dates-panel { order: 2; }
  #view-today .work-diary-panel { order: 3; }
  #view-today .metrics-panel { order: 4; }
  #view-today .agenda-panel { order: 5; }
  #view-today .tasks-panel { order: 6; }
  #view-today .today-objectives-panel { order: 7; }
  #view-today .today-reading-panel { order: 8; }
}
/* Sprint UX — Contactos, Oportunidades, Brain Dump e Documentos */
.contact-knowledge-intro { margin: 0 0 14px; }
.contact-knowledge-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.contact-knowledge-grid textarea { min-height: 88px; resize: vertical; }
.business-card-confirmation { margin-top: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-soft, #f8fbfb); }
.business-card-confirmation h3 { margin: 2px 0 4px; }
.business-card-associate { margin-top: 12px; }
.opportunity-mode-tabs { margin-bottom: 16px; }
.opportunity-engine-configuration { padding: 20px; }
.opportunity-config-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.opportunity-config-grid article { display: grid; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft, #f8fbfb); }
.opportunity-config-grid span { color: var(--muted); font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.opportunity-config-grid small { color: var(--muted); line-height: 1.45; }
.brain-temporary-banner { display: flex; align-items: center; gap: 14px; margin: 0 0 16px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft, #f8fbfb); }
.brain-temporary-banner span { font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.brain-temporary-banner small { margin-left: auto; color: var(--muted); }
.brain-processed-group { margin-top: 12px; }
.brain-processed-group > summary { cursor: pointer; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font-weight: 700; }
.brain-processed-group[open] > summary { margin-bottom: 10px; }
.brain-two-lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.brain-stream { padding: 18px; }
.brain-stream .panel-header { align-items: flex-start; }
.brain-stream .panel-header > strong { min-width: 34px; padding: 6px 9px; border-radius: 999px; background: var(--surface-soft, #f1f7f7); text-align: center; }
.brain-quick-form { display: grid; grid-template-columns: minmax(0, 1fr) 38px; gap: 8px; margin: 14px 0; }
.brain-quick-form input { min-height: 40px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.brain-quick-form button { border: 0; border-radius: 10px; background: var(--primary, #176d70); color: #fff; font-size: 1.25rem; cursor: pointer; }
.brain-stream-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.brain-list-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; min-height: 46px; padding: 7px 4px 7px 2px; border-bottom: 1px solid var(--line); background: transparent; }
.brain-list-row.processed { opacity: .72; }
.brain-row-content { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 9px; align-items: center; min-width: 0; }
.brain-row-content strong { min-width: 0; overflow: hidden; color: var(--ink); font-size: .86rem; text-overflow: ellipsis; white-space: nowrap; }
.brain-row-content time { color: var(--muted); font-size: .67rem; white-space: nowrap; }
.brain-row-kind { padding: 3px 6px; border-radius: 999px; background: var(--surface-soft, #f1f7f7); color: var(--muted); font-size: .62rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.brain-row-expanded { grid-column: 1 / -1; display: grid; gap: 5px; min-width: 0; }
.brain-row-expanded:empty { display: none; }
.brain-row-menu { position: relative; justify-self: end; }
.brain-row-menu > summary { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); cursor: pointer; font-size: 1.3rem; font-weight: 800; list-style: none; line-height: 1; }
.brain-row-menu > summary::-webkit-details-marker { display: none; }
.brain-row-menu > summary:hover, .brain-row-menu[open] > summary { background: var(--surface-soft, #f1f7f7); color: var(--ink); }
.brain-row-menu-popover { position: absolute; z-index: 30; top: 34px; right: 0; width: 210px; display: grid; padding: 6px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: 0 14px 32px rgba(24, 50, 53, .16); }
.brain-row-menu-popover > small { padding: 6px 9px 8px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .65rem; line-height: 1.35; overflow-wrap: anywhere; }
.brain-row-menu-popover > button, .brain-convert-menu > summary { min-height: 34px; padding: 7px 9px; border: 0; border-radius: 7px; background: transparent; color: var(--ink); cursor: pointer; font: inherit; font-size: .76rem; font-weight: 700; text-align: left; }
.brain-row-menu-popover > button:hover, .brain-convert-menu > summary:hover { background: var(--surface-soft, #f1f7f7); }
.brain-row-menu-popover .brain-menu-danger { color: #a43d44; }
.brain-inline-edit { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 7px; margin-top: 10px; }
.brain-inline-edit[hidden] { display: none; }
.brain-inline-edit input { min-height: 38px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; }
.brain-convert-menu { position: relative; }
.brain-convert-menu > summary { list-style: none; }
.brain-convert-menu > summary::-webkit-details-marker { display: none; }
.brain-convert-menu > div { display: grid; gap: 2px; margin: 2px 0 4px; padding: 5px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft, #f8fbfb); }
.brain-convert-menu > div button { min-height: 30px; padding: 5px 7px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); cursor: pointer; font-size: .72rem; font-weight: 700; text-align: left; }
.brain-convert-menu > div button:hover { background: #fff; }
.brain-convert-menu span { align-self: center; color: var(--muted); font-size: .72rem; }
.brain-processed-full { grid-column: 1 / -1; }
.brain-processed-full #brain-processed-list { display: grid; gap: 8px; }
.brain-empty-stream { padding: 12px 4px; }
.document-upload-form { display: grid; grid-template-columns: 1.2fr 1fr 1fr auto; align-items: end; gap: 12px; margin-bottom: 16px; padding: 18px; }
.document-upload-form > div:first-child, .document-upload-form .field-wide, .document-upload-form .form-status { grid-column: 1 / -1; }
.document-filters { grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(150px, .55fr)); }
.document-row strong::before { content: ""; }

@media (max-width: 960px) {
  .contact-knowledge-grid, .opportunity-config-grid { grid-template-columns: 1fr 1fr; }
  .document-upload-form { grid-template-columns: 1fr 1fr; }
  .document-filters { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .contact-knowledge-grid, .opportunity-config-grid, .document-upload-form, .document-filters { grid-template-columns: 1fr; }
  .brain-temporary-banner { align-items: flex-start; flex-direction: column; gap: 4px; }
  .brain-temporary-banner small { margin-left: 0; }
  .brain-two-lists { grid-template-columns: 1fr; }
  .brain-row-content { grid-template-columns: auto minmax(0, 1fr); }
  .brain-row-content time { display: none; }
  .brain-inline-edit { grid-template-columns: 1fr 1fr; }
  .brain-inline-edit input { grid-column: 1 / -1; }
}
/* Planeamento editorial mensal */
.editorial-calendar-panel { margin-top: 18px; }
.editorial-weekdays, .editorial-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.editorial-weekdays span { padding: 8px; color: var(--muted, #687783); font-size: .72rem; font-weight: 700; text-align: center; text-transform: uppercase; }
.editorial-grid { border-top: 1px solid var(--line, #e2e8ec); border-left: 1px solid var(--line, #e2e8ec); }
.editorial-month-summary { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.editorial-month-summary span { padding: 3px 7px; border-radius: 999px; background: #eef6f6; color: var(--muted, #687783); font-size: .67rem; font-weight: 700; }
.editorial-day { min-height: 104px; padding: 6px; border: 0; border-right: 1px solid var(--line, #e2e8ec); border-bottom: 1px solid var(--line, #e2e8ec); background: #fff; color: inherit; text-align: left; overflow: hidden; }
.editorial-day:hover { background: #f3fbfb; }
.editorial-day.selected { background: #eaf8f8; box-shadow: inset 0 0 0 2px #76ced0; }
.editorial-day.outside { background: #fafbfb; }
.editorial-day-head { display: flex; flex-direction: column; width: 100%; min-height: 35px; padding: 2px; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.editorial-day-head > span { margin-bottom: 3px; font-weight: 800; }
.editorial-day-head em { color: #a66500; font-size: .65rem; font-style: normal; font-weight: 700; line-height: 1.2; }
.editorial-day-items { display: grid; gap: 3px; }
.editorial-item-chip, .editorial-more { display: block; width: 100%; padding: 3px 5px; border: 0; border-radius: 6px; background: #eaf8f8; color: #1b6266; cursor: pointer; font: inherit; font-size: .65rem; font-weight: 700; text-align: left; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.editorial-item-chip.status-pronto { background: #e8f5eb; color: #26683a; }
.editorial-item-chip.status-publicado { background: #ece9fb; color: #55449a; }
.editorial-item-chip.status-em-preparacao { background: #fff3dc; color: #8b5e0c; }
.editorial-more { background: transparent; color: var(--muted, #687783); }
.editorial-day-panel { margin-top: 14px; padding: 16px; border: 1px solid #cfe2e2; border-radius: 14px; background: #f8fbfb; }
.editorial-day-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.editorial-day-panel-head h4 { margin: 2px 0 0; text-transform: capitalize; }
.editorial-date-theme { display: inline-block; margin-top: 6px; color: #a66500; font-size: .76rem; font-weight: 700; }
.editorial-day-workspace { display: grid; grid-template-columns: minmax(260px, .75fr) minmax(420px, 1.25fr); gap: 16px; align-items: start; }
.editorial-day-list { display: grid; gap: 7px; }
.editorial-day-list > strong { margin-bottom: 2px; font-size: .8rem; }
.editorial-plan-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto 32px 32px; gap: 8px; align-items: center; padding: 9px; border: 1px solid var(--line, #e2e8ec); border-radius: 10px; background: #fff; }
.editorial-plan-row.is-editing { border-color: #64bec1; background: #f0fbfb; }
.editorial-plan-row.is-creating { border-color: #756ad0; background: #f5f3ff; }
.editorial-plan-row > div { display: grid; min-width: 0; }
.editorial-plan-row > div strong, .editorial-plan-row > div small { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.editorial-plan-row > div strong { font-size: .78rem; }
.editorial-plan-row > div small { color: var(--muted, #687783); font-size: .67rem; }
.editorial-plan-time { color: #1b6266; font-size: .72rem; font-weight: 800; }
.editorial-plan-row .icon-button { width: 30px; min-width: 30px; height: 30px; min-height: 30px; padding: 0; border-radius: 8px; font-size: .9rem; }
.editorial-plan-row .icon-button.danger { color: #a43d44; }
.editorial-create-content { min-height: 30px; padding: 5px 9px; color: #4f459e; }
.editorial-plan-actions { display: flex; gap: 5px; }
.editorial-finalize-content { min-height: 30px; padding: 5px 9px; color: #17686d; }
.editorial-quick-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: end; margin: 0; padding: 14px; border-radius: 12px; background: #eef6f6; }
.editorial-quick-form label { display: grid; gap: 5px; }
.editorial-quick-form label span { color: var(--muted, #687783); font-size: .72rem; font-weight: 700; text-transform: uppercase; }
.editorial-quick-form input, .editorial-quick-form select { min-height: 38px; padding: 8px 10px; border: 1px solid var(--line, #dbe3e7); border-radius: 9px; background: #fff; }
.editorial-quick-form .field-wide { grid-column: 1 / -1; }
.editorial-channels { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; border: 0; }
.editorial-channels legend { width: 100%; margin-bottom: 3px; color: var(--muted, #687783); font-size: .72rem; font-weight: 700; text-transform: uppercase; }
.editorial-channels label { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: 5px; padding: 5px 8px; border: 1px solid var(--line, #dbe3e7); border-radius: 999px; background: #fff; cursor: pointer; }
.editorial-channels label span { color: var(--ink); font-size: .68rem; text-transform: none; }
.editorial-channels input { width: 14px; min-height: auto; margin: 0; padding: 0; }
.editorial-studio { margin-top: 16px; padding: 16px; border: 1px solid #d7d2f2; border-radius: 14px; background: #fbfaff; }
.editorial-studio-head, .editorial-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.editorial-studio-head { margin-bottom: 16px; }
.editorial-studio-head h4 { margin: 2px 0; }
.editorial-studio-head span, .editorial-section-head small { color: var(--muted, #687783); font-size: .72rem; }
.editorial-studio-form { display: grid; gap: 16px; }
.editorial-studio-main { display: grid; grid-template-columns: 1fr; gap: 10px; }
.editorial-studio-main > label, .editorial-studio-pair label, .editorial-slide-row label { display: grid; gap: 5px; }
.editorial-studio-main label > span, .editorial-studio-pair label > span, .editorial-slide-row label > span { color: var(--muted, #687783); font-size: .7rem; font-weight: 700; text-transform: uppercase; }
.editorial-studio-main input, .editorial-studio-main textarea, .editorial-slide-row input, .editorial-slide-row textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--line, #dbe3e7); border-radius: 9px; background: #fff; font: inherit; resize: vertical; }
.editorial-studio-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.editorial-slide-editor, .editorial-image-editor { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid #e0ddef; }
.editorial-section-head > div:first-child { display: grid; gap: 2px; }
.editorial-section-head > div:first-child > span { font-size: .82rem; font-weight: 800; }
.editorial-slides { display: grid; gap: 8px; }
.editorial-slide-row { display: grid; grid-template-columns: 30px minmax(160px, .55fr) minmax(220px, 1fr) 32px; gap: 8px; align-items: end; padding: 10px; border: 1px solid var(--line, #e2e8ec); border-radius: 10px; background: #fff; }
.editorial-slide-row > span { align-self: center; color: #5b50a5; font-size: .9rem; font-weight: 900; text-align: center; }
.editorial-image-upload { position: relative; overflow: hidden; cursor: pointer; }
.editorial-image-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.editorial-image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.editorial-image-grid label { position: relative; display: grid; gap: 4px; padding: 6px; border: 1px solid var(--line, #e2e8ec); border-radius: 10px; background: #fff; cursor: pointer; }
.editorial-image-grid label:has(input:checked) { border-color: #756ad0; box-shadow: inset 0 0 0 1px #756ad0; }
.editorial-image-grid input { position: absolute; top: 9px; right: 9px; z-index: 1; }
.editorial-image-grid img { width: 100%; height: 82px; border-radius: 7px; object-fit: cover; background: #eef1f3; }
.editorial-image-grid span { color: var(--muted, #687783); font-size: .65rem; font-weight: 700; text-align: center; }
.editorial-no-images { margin: 0; }
.editorial-studio-actions { display: flex; align-items: center; gap: 12px; padding-top: 14px; border-top: 1px solid #e0ddef; }
.editorial-studio-actions span { color: var(--muted, #687783); font-size: .72rem; }
.growth-slide-preview { display: grid; gap: 8px; margin: 0; padding-left: 24px; }
.growth-slide-preview li { padding: 9px 11px; border: 1px solid var(--line, #e2e8ec); border-radius: 9px; background: #fff; }
.growth-slide-preview li strong, .growth-slide-preview li span { display: block; }
.growth-slide-preview li span { margin-top: 3px; color: var(--muted, #687783); font-size: .78rem; }
.growth-content-image-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.growth-content-image-preview img { width: 100%; height: 110px; border-radius: 9px; object-fit: cover; background: #eef1f3; }
.editorial-finalizer { margin-top: 16px; padding: 16px; border: 1px solid #bcdedf; border-radius: 14px; background: #f8fcfc; }
.editorial-final-layout { display: grid; grid-template-columns: minmax(330px, .75fr) minmax(380px, 1.25fr); gap: 18px; align-items: start; }
.editorial-final-controls { display: grid; gap: 14px; }
.editorial-final-controls > section, .editorial-final-controls > fieldset, .editorial-final-controls > label { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.editorial-final-controls legend, .editorial-control-title, .editorial-final-controls > label > span { color: var(--muted, #687783); font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.editorial-final-controls textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--line, #dbe3e7); border-radius: 9px; background: #fff; font: inherit; resize: vertical; }
.editorial-readiness-list { display: grid; gap: 5px; }
.editorial-readiness-list > div { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 7px; align-items: center; padding: 7px 9px; border: 1px solid var(--line, #e2e8ec); border-radius: 8px; background: #fff; }
.editorial-readiness-list span { font-weight: 900; text-align: center; }
.editorial-readiness-list strong { font-size: .75rem; }
.editorial-readiness-list small { color: var(--muted, #687783); font-size: .64rem; }
.editorial-readiness-list .ready span { color: #27804a; }
.editorial-readiness-list .missing { border-color: #efc8c8; background: #fff8f8; }
.editorial-readiness-list .missing span { color: #aa3940; }
.editorial-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.editorial-choice-grid label { position: relative; display: block; cursor: pointer; }
.editorial-choice-grid input { position: absolute; opacity: 0; pointer-events: none; }
.editorial-choice-grid label > span { display: grid; gap: 2px; min-height: 58px; padding: 9px; border: 1px solid var(--line, #dbe3e7); border-radius: 9px; background: #fff; }
.editorial-choice-grid input:checked + span { border-color: #4b9ea2; box-shadow: inset 0 0 0 1px #4b9ea2; background: #eefafa; }
.editorial-choice-grid strong { font-size: .75rem; }
.editorial-choice-grid small { color: var(--muted, #687783); font-size: .64rem; line-height: 1.3; }
.editorial-final-output { display: grid; gap: 10px; min-width: 0; }
.editorial-final-preview { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.editorial-final-preview article { position: relative; aspect-ratio: var(--editorial-preview-ratio, 4 / 5); min-width: 0; overflow: hidden; border: 1px solid var(--editorial-brand-primary, #d9e4e5); border-radius: 13px; background: linear-gradient(145deg, var(--editorial-brand-paper, #e9f8f8), var(--editorial-brand-white, #fff)); box-shadow: 0 8px 20px rgba(26, 71, 75, .08); }
.editorial-final-preview article::before { position: absolute; z-index: 2; inset: 0 auto 0 0; width: 5px; background: var(--editorial-brand-primary, #d4af37); content: ""; }
.editorial-final-preview article img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.editorial-preview-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 10%; background: linear-gradient(transparent 22%, rgba(12, 45, 48, .9)); color: #fff; }
.editorial-preview-overlay > span { margin-bottom: auto; color: var(--editorial-brand-primary, currentColor); font-size: .58rem; font-weight: 900; letter-spacing: .14em; }
.editorial-preview-overlay strong { font-size: clamp(.9rem, 1.7vw, 1.35rem); line-height: 1.1; }
.editorial-preview-overlay p { display: -webkit-box; margin: 6px 0 0; overflow: hidden; font-size: .67rem; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 5; }
.editorial-preview-overlay em { margin-top: 9px; font-size: .65rem; font-style: normal; font-weight: 800; }
.editorial-preview-overlay footer { margin-top: 9px; font-size: .48rem; opacity: .82; }
.editorial-preview-overlay small { position: absolute; top: 7%; right: 8%; font-size: .56rem; }
.editorial-final-preview.template-editorial article { background: var(--editorial-brand-paper, #f7efe3); }
.editorial-final-preview.template-editorial .editorial-preview-overlay { justify-content: center; background: color-mix(in srgb, var(--editorial-brand-paper, #f9f4eb) 92%, transparent); color: var(--editorial-brand-ink, #253d40); }
.editorial-final-preview.template-imovel .editorial-preview-overlay { background: linear-gradient(transparent 35%, color-mix(in srgb, var(--editorial-brand-ink, #0a2629) 94%, transparent)); }
.editorial-output-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #dbe8e9; }
.editorial-output-actions button { min-height: 38px; }
.editorial-canva-note { margin: 10px 0 0; color: var(--muted, #687783); font-size: .7rem; }
.editorial-hint { margin: 12px 0 0; }
.editorial-custom-date { margin-top: 12px; }
.editorial-custom-date summary { color: #246b70; cursor: pointer; font-weight: 700; }
.editorial-custom-date form { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-top: 10px; }
.editorial-custom-date label { display: grid; gap: 5px; }
.editorial-custom-date label span { color: var(--muted, #687783); font-size: .72rem; font-weight: 700; text-transform: uppercase; }
.editorial-custom-date input { min-height: 38px; padding: 8px 10px; border: 1px solid var(--line, #dbe3e7); border-radius: 9px; background: #fff; }
@media (max-width: 900px) {
  .editorial-day { min-height: 68px; }
  .editorial-day em, .editorial-item-chip, .editorial-more { font-size: .6rem; }
  .editorial-day-workspace { grid-template-columns: 1fr; }
  .editorial-final-layout { grid-template-columns: 1fr; }
  .editorial-quick-form { grid-template-columns: 1fr 1fr; }
  .editorial-quick-form .field-wide { grid-column: 1 / -1; }
  .editorial-slide-row { grid-template-columns: 30px minmax(0, 1fr) 32px; }
  .editorial-slide-row label:last-of-type { grid-column: 2 / 3; }
}
@media (max-width: 640px) {
  .editorial-calendar-panel { padding: 12px; overflow-x: auto; }
  .editorial-weekdays, .editorial-grid { min-width: 665px; }
  .editorial-day-panel { min-width: 0; }
  .editorial-day-workspace, .editorial-quick-form { grid-template-columns: 1fr; }
  .editorial-quick-form .field-wide { grid-column: auto; }
  .editorial-plan-row { grid-template-columns: 36px minmax(0, 1fr) auto; }
  .editorial-plan-row .editorial-plan-actions { grid-column: 2; grid-row: 2; justify-self: start; }
  .editorial-plan-row .icon-button { grid-column: 3; grid-row: 1; }
  .editorial-plan-row .icon-button.danger { grid-column: 3; grid-row: 2; }
  .editorial-studio-pair { grid-template-columns: 1fr; }
  .editorial-studio-head, .editorial-section-head, .editorial-studio-actions { align-items: stretch; flex-direction: column; }
  .editorial-slide-row { grid-template-columns: 28px minmax(0, 1fr) 30px; }
}

/* Responsividade estrutural final — uma única estratégia por dimensão. */
@media (min-width: 761px) and (max-width: 1040px) {
  .app-shell,
  body.sidebar-pinned .app-shell {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    min-height: 100dvh;
  }

  .workspace {
    grid-column: 2;
    width: 100%;
    min-width: 0;
  }

  .sidebar,
  body.sidebar-pinned .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    display: flex;
    width: 72px;
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;
    padding: 18px 10px;
    overflow: hidden;
    border-radius: 0;
    box-shadow: none;
  }

  .sidebar:hover {
    width: 224px;
    padding: 18px 14px;
    box-shadow: 18px 0 40px rgba(18, 63, 68, 0.16);
  }

  .sidebar .brand { display: flex; }
  .sidebar .sidebar-footer,
  .sidebar .sidebar-pin { display: none; }

  .side-nav {
    display: grid;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: minmax(196px, 1fr);
    gap: 5px;
    overflow-x: clip;
    overflow-y: auto;
    padding: 0;
  }

  .nav-group { position: relative; min-width: 196px; }
  .nav-group-toggle { min-width: 196px; justify-content: flex-start; }
  .nav-group-toggle .nav-label,
  .nav-group-toggle .nav-chevron { display: block !important; }

  .nav-group:not(.expanded) .nav-children,
  body:not(.sidebar-pinned) .sidebar:not(:hover) .nav-group.expanded .nav-children,
  body.sidebar-pinned .sidebar:not(:hover) .nav-children { display: none !important; }

  .sidebar:hover .nav-group.expanded .nav-children {
    position: static;
    inset: auto;
    display: grid !important;
    gap: 1px;
    width: auto;
    max-height: none;
    padding: 1px 0 4px 38px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body.sidebar-pinned .sidebar:not(:hover) .nav-label,
  body.sidebar-pinned .sidebar:not(:hover) .nav-chevron { opacity: 0; }

  .content { padding-bottom: 44px; }
}

@media (max-width: 760px) {
  .app-shell,
  body.sidebar-pinned .app-shell {
    display: block;
    min-height: 100dvh;
  }

  .workspace {
    width: 100%;
    min-width: 0;
  }

  .sidebar,
  .sidebar:hover,
  body.sidebar-pinned .sidebar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 80;
    display: block;
    width: 100%;
    height: calc(64px + env(safe-area-inset-bottom));
    min-height: calc(64px + env(safe-area-inset-bottom));
    max-height: calc(64px + env(safe-area-inset-bottom));
    padding: 6px max(8px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    overflow: visible;
    border-radius: 0;
    box-shadow: 0 -10px 28px rgba(18, 63, 68, 0.18);
  }

  .sidebar .brand,
  .sidebar .sidebar-footer,
  .sidebar .sidebar-pin { display: none; }

  .side-nav {
    display: flex;
    height: 52px;
    gap: 4px;
    padding: 0;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: none;
  }

  .nav-home,
  .nav-group { position: static; flex: 0 0 56px; min-width: 56px; }
  .nav-group-toggle,
  .nav-home {
    width: 56px;
    min-width: 56px;
    min-height: 52px;
    padding: 6px;
    justify-content: center;
  }

  .nav-group-toggle .nav-label,
  .nav-group-toggle .nav-chevron,
  .nav-home .nav-label { display: none !important; }

  .nav-children,
  body:not(.sidebar-pinned) .sidebar:not(:hover) .nav-children { display: none !important; }

  .nav-group.expanded .nav-children,
  body:not(.sidebar-pinned) .sidebar:not(:hover) .nav-group.expanded .nav-children,
  body.sidebar-pinned .sidebar:not(:hover) .nav-group.expanded .nav-children {
    position: fixed;
    inset: auto 8px calc(72px + env(safe-area-inset-bottom)) 8px;
    z-index: 90;
    display: flex !important;
    gap: 5px;
    width: auto;
    max-height: min(42vh, 220px);
    padding: 9px;
    overflow-x: auto;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: #123f44;
    box-shadow: 0 16px 36px rgba(18, 63, 68, 0.24);
  }

  .nav-group.expanded .nav-children .nav-item,
  .nav-group.expanded .nav-children .nav-action-item {
    flex: 0 0 auto;
    min-width: max-content;
  }

  .nav-group.expanded .nav-children .nav-label {
    display: block !important;
    opacity: 1;
    transform: none;
  }

  .content { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
}
/* Knowledge Hub: memória permanente, compacta e orientada à proveniência. */
.knowledge-match-reason {
  display: block;
  margin-top: 3px;
  color: var(--teal-700, #27646a);
  font-size: 0.72rem;
}

.integration-requirements {
  margin: 0.65rem 0;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-soft, #f4f7f7) 86%, white);
  color: var(--muted);
  font-size: 0.78rem;
}
.knowledge-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--line);
}

.knowledge-summary article {
  display: grid;
  gap: 3px;
  padding: 14px 18px;
  background: var(--surface);
}

.knowledge-summary strong { font-size: 1.5rem; }
.knowledge-summary span,
.knowledge-source-line { color: var(--muted); }

.knowledge-create-panel { margin-bottom: 16px; }
.knowledge-create-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
}
.knowledge-create-panel > summary::-webkit-details-marker { display: none; }
.knowledge-create-panel > summary span:first-child { display: grid; gap: 2px; }
.knowledge-create-panel > summary small { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.knowledge-create-panel > summary span:last-child { font-size: 1.4rem; color: var(--accent); }
.knowledge-create-panel[open] > summary { padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.knowledge-create-panel[open] > summary span:last-child { transform: rotate(45deg); }
.knowledge-create-panel:not([open]) > .knowledge-create-form { display: none; }

.knowledge-create-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.knowledge-create-form > div:first-child,
.knowledge-create-form .field-wide,
.knowledge-create-form .form-status { grid-column: 1 / -1; }

.knowledge-create-form label,
#knowledge-edit-form label { display: grid; gap: 6px; }

.knowledge-filters {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) repeat(2, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.knowledge-filters label { display: grid; gap: 6px; }

.knowledge-layout {
  display: grid;
  grid-template-columns: minmax(300px, .8fr) minmax(420px, 1.2fr);
  gap: 16px;
  align-items: start;
}

.knowledge-result-list {
  display: grid;
  gap: 6px;
  max-height: 720px;
  overflow: auto;
}

.knowledge-result-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  text-align: left;
}

.knowledge-result-row:hover,
.knowledge-result-row.active { border-color: var(--accent); background: var(--accent-soft); }
.knowledge-result-row > div { display: grid; gap: 3px; min-width: 0; }
.knowledge-result-row strong,
.knowledge-result-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-result-kind { min-width: 74px; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.knowledge-review-warning { color: var(--warning, #b85d00); font-weight: 700; }

.knowledge-preview { position: sticky; top: 92px; }
#knowledge-edit-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
#knowledge-edit-form[hidden] { display: none; }
#knowledge-edit-form .field-wide,
#knowledge-edit-form .action-row { grid-column: 1 / -1; }
.knowledge-source-line { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; font-size: .85rem; }
.knowledge-readonly-body { white-space: pre-wrap; line-height: 1.6; }

@media (max-width: 980px) {
  .knowledge-create-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .knowledge-layout { grid-template-columns: 1fr; }
  .knowledge-preview { position: static; }
}

@media (max-width: 640px) {
  .knowledge-summary,
  .knowledge-create-form,
  .knowledge-filters,
  #knowledge-edit-form { grid-template-columns: 1fr; }
  .knowledge-create-form > *,
  #knowledge-edit-form > * { grid-column: 1; }
}
.inbox-quick-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  padding: 0.8rem;
  margin-bottom: 0.8rem;
}

.inbox-quick-form input {
  min-width: 0;
}

.inbox-status-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.8rem;
}

.inbox-status-summary span {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.inbox-status-summary strong {
  color: var(--ink);
  font-size: 1rem;
}

.inbox-table-panel {
  padding: 0;
  overflow: visible;
}

.inbox-table-head,
.inbox-row {
  display: grid;
  grid-template-columns: minmax(7rem, 0.7fr) minmax(15rem, 2fr) minmax(8.5rem, 0.8fr) minmax(8rem, 0.8fr) 2.5rem;
  gap: 0.8rem;
  align-items: center;
}

.inbox-table-head {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.inbox-row {
  min-height: 4.35rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
}

.inbox-row:last-child {
  border-bottom: 0;
}

.inbox-type {
  color: var(--teal-strong);
  font-size: 0.78rem;
  font-weight: 750;
}

.inbox-main {
  display: grid;
  gap: 0.16rem;
  min-width: 0;
}

.inbox-main small,
.inbox-row time {
  color: var(--muted);
  font-size: 0.76rem;
}

.inbox-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbox-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.inbox-links span {
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.68rem;
}

.inbox-row select {
  min-width: 0;
  padding: 0.5rem;
}

.inbox-actions {
  position: relative;
}

.inbox-actions > summary {
  display: grid;
  width: 2.2rem;
  height: 2.2rem;
  place-items: center;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.3rem;
  list-style: none;
}

.inbox-actions > summary::-webkit-details-marker {
  display: none;
}

.inbox-actions-menu {
  position: absolute;
  z-index: 30;
  top: 2.3rem;
  right: 0;
  display: grid;
  width: min(19rem, 80vw);
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.inbox-actions-menu button,
.inbox-actions-menu label {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.inbox-actions-menu button {
  cursor: pointer;
}

.inbox-actions-menu button:hover {
  background: var(--soft);
}

.inbox-actions-menu label {
  display: grid;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.72rem;
}

@media (max-width: 760px) {
  .inbox-table-head {
    display: none;
  }

  .inbox-row {
    grid-template-columns: 1fr auto;
  }

  .smart-capture-fab {
    right: 8px;
    bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .smart-capture-context-grid {
    grid-template-columns: 1fr;
  }

  .smart-capture-context-grid .field-wide {
    grid-column: auto;
  }

  .inbox-type,
  .inbox-main,
  .inbox-row time,
  .inbox-row > select {
    grid-column: 1;
  }

  .inbox-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .inbox-quick-form {
    grid-template-columns: 1fr;
  }
}

/* Bloco fechado de usabilidade — navegação previsível por dimensão. */
.mobile-menu-toggle,
.mobile-sidebar-backdrop { display: none; }

.smart-capture-fab {
  z-index: 120;
  border: 2px solid #ffffff;
  background: #087f83;
  color: #ffffff;
  box-shadow: 0 14px 34px rgba(4, 67, 72, .42);
}
.smart-capture-fab:hover { background: #066d70; }
.smart-capture-fab:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(8, 127, 131, .35), 0 14px 34px rgba(4, 67, 72, .42);
}
.smart-capture-fab:active { transform: translateY(1px) scale(.97); background: #054f52; }
.smart-capture-backdrop { z-index: 140; }

@media (min-width: 1281px) {
  .app-shell,
  body.sidebar-pinned .app-shell { grid-template-columns: 224px minmax(0, 1fr); }
  .sidebar,
  .sidebar:hover,
  body.sidebar-pinned .sidebar { width: 224px; padding: 18px 14px; }
  .sidebar .nav-label,
  .sidebar .nav-chevron,
  .sidebar .brand > div:not(.brand-mark),
  .sidebar .sidebar-footer span:not(.status-dot) { opacity: 1; transform: none; }
  .sidebar .nav-chevron { opacity: 1; }
  .sidebar .nav-children { display: grid; }
  .sidebar .nav-group.expanded .nav-children { display: grid !important; }
  .sidebar .nav-group:not(.expanded) .nav-children { display: none; }
}

@media (min-width: 1051px) and (max-width: 1280px) {
  .app-shell,
  body.sidebar-pinned .app-shell { grid-template-columns: 184px minmax(0, 1fr); }
  .sidebar,
  .sidebar:hover,
  body.sidebar-pinned .sidebar { width: 184px; padding: 16px 10px; }
  .sidebar .brand,
  .sidebar .nav-group,
  .sidebar .sidebar-profile-row { min-width: 164px; }
  .sidebar .nav-label,
  .sidebar .nav-chevron,
  .sidebar .brand > div:not(.brand-mark) { opacity: 1; transform: none; }
  .sidebar .nav-chevron { opacity: 1; }
  .sidebar .nav-children { padding-left: 28px; }
  .sidebar .nav-group.expanded .nav-children { display: grid !important; }
  .sidebar .sidebar-system-meta,
  .sidebar .sidebar-settings { display: none !important; }
}

@media (min-width: 761px) and (max-width: 1050px) {
  .app-shell,
  body.sidebar-pinned .app-shell { grid-template-columns: 72px minmax(0, 1fr); }
  .sidebar,
  .sidebar:hover,
  body.sidebar-pinned .sidebar { width: 72px; padding: 18px 10px; overflow: visible; box-shadow: none; }
  .sidebar .brand { min-width: 0; }
  .sidebar .brand > div:not(.brand-mark),
  .sidebar .sidebar-footer,
  .sidebar .sidebar-pin,
  .sidebar .nav-label,
  .sidebar .nav-chevron { display: none !important; }
  .sidebar .side-nav {
    grid-template-columns: 52px;
    overflow: visible;
  }
  .sidebar .nav-group { min-width: 52px; position: relative; }
  .sidebar .nav-group-toggle,
  .sidebar .side-nav > .nav-item {
    width: 52px;
    min-width: 52px;
    min-height: 42px;
    justify-content: center;
    padding: 7px;
  }
  .sidebar .nav-group-toggle:focus-visible,
  .sidebar .side-nav > .nav-item:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: -3px;
  }
  .sidebar .nav-group.expanded .nav-children,
  body:not(.sidebar-pinned) .sidebar:not(:hover) .nav-group.expanded .nav-children,
  body.sidebar-pinned .sidebar:not(:hover) .nav-group.expanded .nav-children {
    position: absolute !important;
    left: 58px;
    top: 0;
    z-index: 125;
    display: grid !important;
    width: 230px;
    max-height: min(65vh, 480px);
    padding: 9px;
    overflow-y: auto;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 12px;
    background: #123f44;
    box-shadow: 14px 18px 40px rgba(18, 63, 68, .26);
  }
  .sidebar .nav-group.expanded .nav-children .nav-label { display: block !important; opacity: 1; transform: none; }
}

@media (max-width: 760px) {
  .mobile-menu-toggle {
    display: inline-grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-content: center;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface);
  }
  .mobile-menu-toggle span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--slate); }
  .topbar { grid-template-columns: auto minmax(0, 1fr); }
  .topbar-actions { grid-column: 1 / -1; }
  .sidebar,
  .sidebar:hover,
  body.sidebar-pinned .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 130;
    display: flex;
    width: min(320px, 86vw);
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;
    padding: 16px 12px;
    overflow: hidden;
    border-radius: 0 18px 18px 0;
    box-shadow: 18px 0 48px rgba(18, 63, 68, .3);
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }
  body.sidebar-mobile-open .sidebar { transform: translateX(0); }
  .sidebar .brand { display: flex; min-width: 0; }
  .sidebar .brand > div:not(.brand-mark),
  .sidebar .nav-label,
  .sidebar .nav-chevron { display: block !important; opacity: 1; transform: none; }
  .sidebar .sidebar-pin { display: none; }
  .sidebar .side-nav {
    display: grid;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    height: auto;
    overflow-y: auto;
    overflow-x: clip;
  }
  .sidebar .nav-home,
  .sidebar .nav-group { position: relative; width: 100%; min-width: 0; flex: initial; }
  .sidebar .nav-home,
  .sidebar .nav-group-toggle { width: 100%; min-width: 0; min-height: 42px; justify-content: flex-start; padding: 8px 10px; }
  .sidebar .nav-group.expanded .nav-children,
  body:not(.sidebar-pinned) .sidebar:not(:hover) .nav-group.expanded .nav-children,
  body.sidebar-pinned .sidebar:not(:hover) .nav-group.expanded .nav-children {
    position: static;
    display: grid !important;
    width: auto;
    max-height: none;
    padding: 2px 0 5px 34px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .sidebar .nav-children .nav-label { display: block !important; opacity: 1; }
  .sidebar .sidebar-footer { display: grid; }
  .mobile-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 125;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(7, 32, 35, .46);
  }
  .mobile-sidebar-backdrop:not([hidden]) { display: block; }
  .content { padding-bottom: 28px; }
  .smart-capture-fab { right: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); }
}
.workspace-daily-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.workspace-next-card {
  grid-column: 1;
}

.workspace-timer-card {
  grid-column: 2;
}

.workspace-agenda-card,
.workspace-tasks-card,
.workspace-processes-card,
.workspace-inbox-card {
  min-height: 13rem;
}

.workspace-brain-card {
  grid-column: 1 / -1;
}

.workspace-next-action {
  display: grid;
  width: 100%;
  gap: 5px;
  padding: 15px;
  border: 1px solid rgba(38, 179, 181, .25);
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.workspace-next-action strong {
  font-size: 1rem;
}

.workspace-next-action span,
.workspace-next-action small {
  color: var(--muted);
  font-size: .76rem;
}

.workspace-timer-card {
  display: grid;
  gap: 12px;
}

.workspace-timer-card label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: .74rem;
}

.workspace-timer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.workspace-list-row {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 9px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.workspace-list-row:last-child {
  border-bottom: 0;
}

.workspace-list-row strong {
  overflow: hidden;
  font-size: .8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-list-row small {
  color: var(--muted);
  font-size: .7rem;
  white-space: nowrap;
}

.workspace-brain-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2.6rem;
  gap: 8px;
}

.workspace-brain-form button {
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-size: 1.2rem;
}

@media (max-width: 820px) {
  .workspace-daily-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .workspace-next-card,
  .workspace-timer-card,
  .workspace-brain-card {
    grid-column: 1;
  }
}

/* Mobile dialogs: keep record flows contained, scrollable and touch-friendly. */
@media (max-width: 620px) {
  :is(#quick-create-modal, #detail-modal) {
    box-sizing: border-box;
    overflow: hidden;
    padding: 10px;
  }

  :is(#quick-create-modal, #detail-modal) > .modal {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    max-height: calc(100dvh - 20px);
    margin: 0;
  }

  :is(#quick-create-modal, #detail-modal) .modal-header {
    min-width: 0;
    padding: 14px 14px 12px;
  }

  :is(#quick-create-modal, #detail-modal) .modal-header > div,
  :is(#quick-create-modal, #detail-modal) .modal-header :is(h2, p) {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  :is(#quick-create-modal, #detail-modal) > .modal > :is(form, #detail-body) {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    overflow-x: clip;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 14px;
  }

  :is(#quick-create-modal, #detail-modal) :is(input, select, textarea) {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  :is(#quick-create-modal, #detail-modal) .modal-actions {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
  }

  :is(#quick-create-modal, #detail-modal) > .modal > form > .modal-actions {
    bottom: -14px;
    margin: 8px -14px -14px;
    padding: 10px 14px max(10px, env(safe-area-inset-bottom));
  }

  :is(#quick-create-modal, #detail-modal) .modal-actions > button {
    min-height: 44px;
  }

  .attention-center-backdrop {
    box-sizing: border-box;
    overflow: hidden;
  }

  .attention-center-drawer {
    inset: 10px;
    box-sizing: border-box;
    width: auto;
    min-width: 0;
    max-width: calc(100vw - 20px);
    height: auto;
    max-height: calc(100dvh - 20px);
    border: 1px solid var(--line);
    border-radius: 16px;
  }

  .attention-center-header,
  .attention-center-body,
  .attention-center-history,
  .attention-v1-card,
  .attention-alert-card {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
  }

  .attention-center-header > div,
  .attention-center-header :is(h2, p) {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .attention-center-body {
    overflow-x: clip;
    overscroll-behavior: contain;
  }

  .attention-alert-actions > button,
  .attention-snooze-menu > summary,
  .attention-snooze-menu button,
  .attention-center-history > summary {
    min-height: 44px;
  }

  .attention-snooze-menu > div {
    box-sizing: border-box;
    max-width: calc(100vw - 44px);
  }
}

/* Sidebar state contract — must remain last in the cascade. */
.sidebar .nav-home::before { display: none; }
.sidebar .side-nav > .nav-group:first-of-type {
  margin-top: 5px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}
.sidebar .nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
:is(.sidebar:hover, body.sidebar-pinned .sidebar, body.sidebar-mobile-open .sidebar) .side-nav {
  display: grid;
  grid-auto-flow: row;
  grid-auto-columns: auto;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 3px;
  min-height: 0;
  overflow-x: clip;
  overflow-y: auto;
  overscroll-behavior: contain;
}
:is(.sidebar:hover, body.sidebar-pinned .sidebar, body.sidebar-mobile-open .sidebar)
  :is(.side-nav > .nav-item, .side-nav > .nav-action-item, .nav-group, .nav-group-toggle, .nav-children, .nav-children > .nav-item, .nav-children > .nav-action-item) {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
:is(.sidebar:hover, body.sidebar-pinned .sidebar, body.sidebar-mobile-open .sidebar) .nav-group {
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
}
:is(.sidebar:hover, body.sidebar-pinned .sidebar, body.sidebar-mobile-open .sidebar)
  :is(.side-nav > .nav-item, .side-nav > .nav-action-item, .nav-group-toggle) {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 42px;
  height: auto;
  gap: 10px;
  padding: 7px 10px;
  overflow: visible;
  text-align: left;
}
:is(.sidebar:hover, body.sidebar-pinned .sidebar, body.sidebar-mobile-open .sidebar) :is(.nav-label, .nav-chevron) {
  display: block !important;
  opacity: 1;
  transform: none;
}
:is(.sidebar:hover, body.sidebar-pinned .sidebar, body.sidebar-mobile-open .sidebar) :is(.nav-chevron, .nav-badge) {
  justify-self: end;
  margin-left: 0;
}
:is(.sidebar:hover, body.sidebar-pinned .sidebar, body.sidebar-mobile-open .sidebar) .nav-children {
  position: relative !important;
  inset: auto !important;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 0;
  width: 100% !important;
  gap: 1px;
  padding: 2px 0 5px 42px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
:is(.sidebar:hover, body.sidebar-pinned .sidebar, body.sidebar-mobile-open .sidebar) .nav-group:not(.expanded) .nav-children {
  display: none !important;
}
:is(.sidebar:hover, body.sidebar-pinned .sidebar, body.sidebar-mobile-open .sidebar) .nav-group.expanded .nav-children {
  display: grid !important;
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
}
:is(.sidebar:hover, body.sidebar-pinned .sidebar, body.sidebar-mobile-open .sidebar)
  .nav-children > :is(.nav-item, .nav-action-item) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 38px;
  height: auto;
  gap: 8px;
  padding: 6px 9px;
  overflow: visible;
  text-align: left;
}
:is(.sidebar:hover, body.sidebar-pinned .sidebar, body.sidebar-mobile-open .sidebar) .nav-child-dot { display: none; }

@media (min-width: 1281px) {
  .app-shell { grid-template-columns: 76px minmax(0, 1fr); }
  body.sidebar-pinned .app-shell { grid-template-columns: 280px minmax(0, 1fr); }
  .sidebar { width: 76px; padding: 18px 12px; }
  .sidebar:hover, body.sidebar-pinned .sidebar { width: 280px; padding: 18px 14px; }
}
@media (min-width: 1051px) and (max-width: 1280px) {
  .app-shell { grid-template-columns: 72px minmax(0, 1fr); }
  body.sidebar-pinned .app-shell { grid-template-columns: 260px minmax(0, 1fr); }
  .sidebar { width: 72px; padding: 16px 9px; }
  .sidebar:hover, body.sidebar-pinned .sidebar { width: 260px; padding: 16px 12px; }
  :is(.sidebar:hover, body.sidebar-pinned .sidebar) :is(.brand, .nav-group, .sidebar-profile-row) { min-width: 0; }
}
@media (min-width: 761px) and (max-width: 1050px) {
  body.sidebar-pinned .app-shell { grid-template-columns: 280px minmax(0, 1fr); }
  .sidebar:hover, body.sidebar-pinned .sidebar {
    width: 280px;
    padding: 18px 12px;
    overflow: hidden;
    box-shadow: 18px 0 40px rgba(18, 63, 68, .16);
  }
  :is(.sidebar:hover, body.sidebar-pinned .sidebar) .brand { min-width: 0; }
  :is(.sidebar:hover, body.sidebar-pinned .sidebar) :is(.brand > div:not(.brand-mark), .nav-label, .nav-chevron) {
    display: block !important;
  }
}
@media (min-width: 761px) {
  body:not(.sidebar-pinned) .sidebar:not(:hover) .brand {
    width: 54px;
    min-width: 54px;
    overflow: hidden;
  }
  body:not(.sidebar-pinned) .sidebar:not(:hover) .brand > div:not(.brand-mark),
  body:not(.sidebar-pinned) .sidebar:not(:hover) .sidebar-pin {
    display: none !important;
  }
  body:not(.sidebar-pinned) .sidebar:not(:hover) .side-nav { grid-template-columns: 54px; overflow-x: clip; }
  body:not(.sidebar-pinned) .sidebar:not(:hover) :is(.side-nav > .nav-item, .nav-group, .nav-group-toggle) {
    width: 54px;
    min-width: 54px;
    max-width: 54px;
  }
  body:not(.sidebar-pinned) .sidebar:not(:hover) :is(.side-nav > .nav-item, .nav-group-toggle) {
    min-height: 52px;
    height: 52px;
    padding: 6px;
    justify-content: center;
  }
  body:not(.sidebar-pinned) .sidebar:not(:hover) :is(.nav-label, .nav-chevron) { display: none !important; }
  body:not(.sidebar-pinned) .sidebar:not(:hover) .nav-group:not(.expanded) .nav-children { display: none !important; }
  body:not(.sidebar-pinned) .sidebar:not(:hover) .nav-group.expanded .nav-children {
    position: fixed !important;
    top: var(--nav-flyout-top, 12px);
    left: var(--nav-flyout-left, 82px);
    z-index: 125;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    width: min(260px, calc(100vw - 98px));
    max-height: calc(100dvh - 24px);
    padding: 9px;
    overflow-x: clip;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    background: #123f44;
    box-shadow: 14px 18px 40px rgba(18, 63, 68, .26);
  }
  body:not(.sidebar-pinned) .sidebar:not(:hover) .nav-group.expanded .nav-children > :is(.nav-item, .nav-action-item) {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 38px;
  }
  body:not(.sidebar-pinned) .sidebar:not(:hover) .nav-group.expanded .nav-children :is(.nav-label, .nav-badge) {
    display: block !important;
    opacity: 1;
    transform: none;
  }
  body:not(.sidebar-pinned) .sidebar:not(:hover) .nav-group.expanded .nav-child-dot { display: none; }
}
@media (max-width: 760px) {
  body.sidebar-mobile-open .sidebar :is(.side-nav > .nav-item, .side-nav > .nav-action-item, .nav-group, .nav-group-toggle) {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  body.sidebar-mobile-open .sidebar .side-nav > :is(.nav-item, .nav-action-item) { min-height: 42px; height: auto; }
}
