

.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 color-mix(in srgb, var(--text-primary) 8.0%, transparent);
  --shadow-soft: 0 5px 18px color-mix(in srgb, var(--text-primary) 4.5%, transparent);
  --shadow-breath: 0 8px 22px color-mix(in srgb, var(--text-primary) 4.5%, transparent);
}

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

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

.auth-brand{
  color: var(--surface);
}

.topbar {
  min-height: 66px;
  align-items: center;
  padding: 12px 28px;
  background: color-mix(in srgb, var(--surface) 92.0%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border-subtle) 72.0%, transparent);
  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: color-mix(in srgb, var(--border-subtle) 92.0%, transparent);
  background: var(--surface);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--text-primary) 3.0%, transparent);
}

.search-box:focus-within {
  border-color: color-mix(in srgb, var(--accent-info) 42.0%, transparent);
  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 color-mix(in srgb, var(--border-subtle) 86.0%, transparent);
  border-radius: 12px;
  box-shadow: 0 3px 14px color-mix(in srgb, var(--text-primary) 3.5%, transparent);
}

.panel {
  padding: 18px;
}

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

.module-header {
  padding: 0 0 14px;
  border-bottom-color: color-mix(in srgb, var(--border-subtle) 72.0%, transparent);
}

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

.priority-panel {
  min-height: 74px;
  padding: 15px 18px 15px 24px;
  border-color: color-mix(in srgb, var(--accent-info) 28.0%, transparent);
}

.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: color-mix(in srgb, var(--text-secondary) 35.0%, transparent);
}

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

.metrics-panel {
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--border-subtle) 86.0%, transparent);
  box-shadow: 0 3px 14px color-mix(in srgb, var(--text-primary) 3.5%, transparent);
}

.metric {
  min-height: 104px;
  padding: 16px 18px;
  border-right-color: color-mix(in srgb, var(--border-subtle) 72.0%, transparent);
}

.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: color-mix(in srgb, var(--accent-info) 45.0%, transparent);
  color: var(--text-primary);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--accent-info) 12.0%, transparent);
}

.secondary-button,
.ghost-button,
.icon-button {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--border-subtle) 95.0%, transparent);
  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: color-mix(in srgb, var(--border-subtle) 92.0%, transparent);
  border-radius: 14px;
  box-shadow: 0 18px 48px color-mix(in srgb, var(--text-primary) 12.0%, transparent);
}

.modal {
  border-radius: 18px;
}

.modal-header {
  padding: 16px 22px 14px;
  background: color-mix(in srgb, var(--surface) 96.0%, transparent);
  border-bottom-color: color-mix(in srgb, var(--border-subtle) 78.0%, transparent);
}

.modal-actions {
  padding: 12px 22px;
  border-top-color: color-mix(in srgb, var(--border-subtle) 78.0%, transparent);
}

input,
select,
textarea {
  min-height: 36px;
  border-color: color-mix(in srgb, var(--border-subtle) 96.0%, transparent);
  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: color-mix(in srgb, var(--border-subtle) 96.0%, transparent);
  background: var(--surface);
}

.view-tabs button.active {
  border-color: color-mix(in srgb, var(--accent-info) 32.0%, transparent);
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.contact-radar-row {
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 82.0%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 82.0%, transparent);
  border-bottom-color: color-mix(in srgb, var(--border-subtle) 82.0%, transparent);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--text-primary) 1.8%, transparent);
}

.contact-radar-row:hover,
.contact-radar-row:focus-visible,
.contact-radar-row:focus-within {
  background: var(--surface-muted);
  border-color: color-mix(in srgb, var(--accent-info) 18.0%, transparent);
  box-shadow: 0 2px 10px color-mix(in srgb, var(--text-primary) 3.5%, transparent);
}

.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 color-mix(in srgb, var(--text-primary) 6.0%, transparent);
}

.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: color-mix(in srgb, var(--border-subtle) 84.0%, transparent);
  padding: 10px 12px;
}

.work-diary-compact div,
.work-diary-row,
.detail-card,
.signal-card,
.dependency-row,
.check-row,
.integration-card {
  border-color: color-mix(in srgb, var(--border-subtle) 86.0%, transparent);
}

table th,
table td {
  padding: 11px 14px;
  border-bottom-color: color-mix(in srgb, var(--border-subtle) 74.0%, transparent);
}

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);
}


.property-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 90.0%, transparent);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 3px 14px color-mix(in srgb, var(--text-primary) 3.5%, transparent);
}

.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 color-mix(in srgb, var(--border-subtle) 86.0%, transparent);
  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 color-mix(in srgb, var(--border-subtle) 95.0%, transparent);
  background: var(--surface-muted);
  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: color-mix(in srgb, var(--surface-muted) 92.0%, transparent);
  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;
}


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

.app-shell {
  background: var(--surface-muted);
}

.topbar {
  background: color-mix(in srgb, var(--surface-muted) 94.0%, transparent);
}

.search-box {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--border-subtle) 88.0%, transparent);
}

.search-box:focus-within {
  border-color: color-mix(in srgb, var(--accent-info) 55.0%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-info) 14.0%, transparent);
}

.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: var(--surface);
  border-color: color-mix(in srgb, var(--accent-info) 28.0%, transparent);
}

.important-dates-panel {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--border-subtle) 90.0%, transparent);
  border-top: 3px solid color-mix(in srgb, var(--accent-info) 28.0%, transparent);
}

.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: var(--surface);
}

.metric:nth-child(1) {
  --metric-tint: var(--surface);
  --metric-line: color-mix(in srgb, var(--accent-info) 23.0%, transparent);
}

.metric:nth-child(2) {
  --metric-tint: var(--surface);
  --metric-line: color-mix(in srgb, var(--accent-info) 22.0%, transparent);
}

.metric:nth-child(3) {
  --metric-tint: var(--surface);
  --metric-line: color-mix(in srgb, var(--accent-info) 16.0%, transparent);
}

.metric:nth-child(4) {
  --metric-tint: var(--surface);
  --metric-line: color-mix(in srgb, var(--danger) 14.0%, transparent);
}

.work-diary-panel {
  background: var(--surface);
}

.activity-panel {
  background: var(--surface-muted);
}

.view-tabs button.active {
  border-color: color-mix(in srgb, var(--accent-info) 44.0%, transparent);
  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: color-mix(in srgb, var(--border-subtle) 78.0%, transparent);
}

.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: var(--surface-muted);
}

.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: var(--surface);
  border-color: color-mix(in srgb, var(--accent-info) 24.0%, transparent);
}

.detail-summary-strip {
  background: var(--surface-muted);
}

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

  .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{
    display: block;
    min-height: 100dvh;
  }

  .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;
  }
}


#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;
  }
}


#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 color-mix(in srgb, var(--text-primary) 16.0%, transparent);
}

.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;
  }
}


#view-contacts .contact-radar-row {
  min-height: 66px;
  padding: 9px 12px;
}

.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); } }


.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: color-mix(in srgb, var(--surface) 78.0%, transparent);
}
.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: var(--danger); }
.attention-today-counts .pending { color: var(--warning); }
.attention-today-counts .followup { color: var(--warning); }
.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: var(--surface);
  font-size: .67rem;
}

.attention-center-toggle.has-items {
  border-color: color-mix(in srgb, var(--danger) 25.0%, transparent);
  background: color-mix(in srgb, var(--surface-muted) 96.0%, transparent);
}

.smart-capture-fab {
  position: fixed;
  z-index: 70;
  right: 20px;
  bottom: 18px;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--surface) 42.0%, transparent);
  border-radius: 50%;
  background: var(--teal);
  color: var(--surface);
  cursor: pointer;
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1;
  box-shadow: 0 16px 38px color-mix(in srgb, var(--text-primary) 28.0%, transparent);
}

.smart-capture-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px color-mix(in srgb, var(--text-primary) 34.0%, transparent);
}

.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: color-mix(in srgb, var(--text-primary) 28.0%, transparent);
  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: var(--surface);
  box-shadow: -24px 0 60px color-mix(in srgb, var(--text-primary) 16.0%, transparent);
  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: color-mix(in srgb, var(--surface) 92.0%, transparent);
}

.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: var(--surface);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--text-primary) 3.5%, transparent);
}

.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: var(--danger); }
.attention-priority-group.pending > h3 > span { color: var(--warning); }
.attention-priority-group.followup > h3 > span { color: var(--warning); }
.attention-priority-group.suggestion > h3 > span { color: var(--accent-info); }

.attention-alert-card {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: 11px;
  background: var(--surface);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--text-primary) 3.5%, transparent);
}
.attention-alert-card + .attention-alert-card { margin-top: 8px; }
.attention-alert-card.critical { border-left-color: var(--danger); }
.attention-alert-card.pending { border-left-color: var(--warning); }
.attention-alert-card.followup { border-left-color: var(--warning); }
.attention-alert-card.suggestion { border-left-color: var(--accent-info); }

.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: var(--surface);
  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: var(--surface);
  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: var(--surface);
}
.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; }
}


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 color-mix(in srgb, var(--danger) 22.0%, transparent);
  border-radius: 12px;
  background: var(--surface-muted);
  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)); }
}


.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 color-mix(in srgb, var(--text-primary) 3.5%, transparent);
}
.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)); }
}

.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) {
}

@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; }
}


#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; }
}

.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, var(--surface)); }
.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, var(--surface)); }
.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, var(--surface)); }
.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-category-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft, var(--surface-muted)); }
.brain-category-tabs button { min-width: 0; min-height: 42px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-size: .84rem; font-weight: 750; }
.brain-category-tabs button:hover { color: var(--ink); }
.brain-category-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px color-mix(in srgb, var(--text-primary) 10%, transparent); }
.brain-category-tabs button:focus-visible { outline: 2px solid var(--primary, var(--accent-info)); outline-offset: 2px; }
.brain-category-tabs span { min-width: 24px; padding: 3px 7px; border-radius: 999px; background: var(--surface-muted, var(--surface-soft)); font-size: .7rem; text-align: center; }
.brain-two-lists { display: block; }
.brain-stream[hidden] { display: none; }
.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, var(--surface-muted)); 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: var(--surface); }
.brain-quick-form button { border: 0; border-radius: 10px; background: var(--primary, var(--accent-info)); color: var(--surface); 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, var(--surface-muted)); 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, var(--surface-muted)); 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: var(--surface); box-shadow: 0 14px 32px color-mix(in srgb, var(--text-primary) 16.0%, transparent); }
.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, var(--surface-muted)); }
.brain-row-menu-popover .brain-menu-danger { color: var(--danger); }
.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, var(--surface)); }
.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: var(--surface); }
.brain-convert-menu span { align-self: center; color: var(--muted); font-size: .72rem; }
.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-category-tabs { gap: 3px; }
  .brain-category-tabs button { gap: 5px; min-height: 40px; padding: 7px 5px; font-size: .76rem; }
  .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; }
}

.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, var(--text-secondary)); font-size: .72rem; font-weight: 700; text-align: center; text-transform: uppercase; }
.editorial-grid { border-top: 1px solid var(--line, var(--border-subtle)); border-left: 1px solid var(--line, var(--border-subtle)); }
.editorial-month-summary { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.editorial-month-summary span { padding: 3px 7px; border-radius: 999px; background: var(--surface-muted); color: var(--muted, var(--text-secondary)); font-size: .67rem; font-weight: 700; }
.editorial-day { min-height: 104px; padding: 6px; border: 0; border-right: 1px solid var(--line, var(--border-subtle)); border-bottom: 1px solid var(--line, var(--border-subtle)); background: var(--surface); color: inherit; text-align: left; overflow: hidden; }
.editorial-day:hover { background: var(--surface-muted); }
.editorial-day.selected { background: var(--surface-muted); box-shadow: inset 0 0 0 2px var(--accent-info); }
.editorial-day.outside { background: var(--surface); }
.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: var(--warning); 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: var(--surface-muted); color: var(--accent-info); 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: var(--surface-muted); color: var(--accent-info); }
.editorial-item-chip.status-publicado { background: var(--surface-muted); color: var(--accent-info); }
.editorial-item-chip.status-em-preparacao { background: var(--surface-muted); color: var(--warning); }
.editorial-more { background: transparent; color: var(--muted, var(--text-secondary)); }
.editorial-day-panel { margin-top: 14px; padding: 16px; border: 1px solid var(--border-subtle); border-radius: 14px; background: var(--surface); }
.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: var(--warning); 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, var(--border-subtle)); border-radius: 10px; background: var(--surface); }
.editorial-plan-row.is-editing { border-color: var(--accent-info); background: var(--surface-muted); }
.editorial-plan-row.is-creating { border-color: var(--accent-info); background: var(--surface-muted); }
.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, var(--text-secondary)); font-size: .67rem; }
.editorial-plan-time { color: var(--accent-info); 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: var(--danger); }
.editorial-create-content { min-height: 30px; padding: 5px 9px; color: var(--accent-info); }
.editorial-plan-actions { display: flex; gap: 5px; }
.editorial-finalize-content { min-height: 30px; padding: 5px 9px; color: var(--accent-info); }
.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: var(--surface-muted); }
.editorial-quick-form label { display: grid; gap: 5px; }
.editorial-quick-form label span { color: var(--muted, var(--text-secondary)); 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, var(--border-subtle)); border-radius: 9px; background: var(--surface); }
.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, var(--text-secondary)); 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, var(--border-subtle)); border-radius: 999px; background: var(--surface); 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 var(--border-subtle); border-radius: 14px; background: var(--surface); }
.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, var(--text-secondary)); 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, var(--text-secondary)); 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, var(--border-subtle)); border-radius: 9px; background: var(--surface); 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 var(--border-subtle); }
.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, var(--border-subtle)); border-radius: 10px; background: var(--surface); }
.editorial-slide-row > span { align-self: center; color: var(--accent-info); 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, var(--border-subtle)); border-radius: 10px; background: var(--surface); cursor: pointer; }
.editorial-image-grid label:has(input:checked) { border-color: var(--accent-info); box-shadow: inset 0 0 0 1px var(--accent-info); }
.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: var(--surface-muted); }
.editorial-image-grid span { color: var(--muted, var(--text-secondary)); 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 var(--border-subtle); }
.editorial-studio-actions span { color: var(--muted, var(--text-secondary)); 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, var(--border-subtle)); border-radius: 9px; background: var(--surface); }
.growth-slide-preview li strong, .growth-slide-preview li span { display: block; }
.growth-slide-preview li span { margin-top: 3px; color: var(--muted, var(--text-secondary)); 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: var(--surface-muted); }
.editorial-finalizer { margin-top: 16px; padding: 16px; border: 1px solid var(--accent-info); border-radius: 14px; background: var(--surface); }
.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, var(--text-secondary)); font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.editorial-final-controls textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--line, var(--border-subtle)); border-radius: 9px; background: var(--surface); 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, var(--border-subtle)); border-radius: 8px; background: var(--surface); }
.editorial-readiness-list span { font-weight: 900; text-align: center; }
.editorial-readiness-list strong { font-size: .75rem; }
.editorial-readiness-list small { color: var(--muted, var(--text-secondary)); font-size: .64rem; }
.editorial-readiness-list .ready span { color: var(--accent-info); }
.editorial-readiness-list .missing { border-color: var(--border-subtle); background: var(--surface); }
.editorial-readiness-list .missing span { color: var(--danger); }
.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, var(--border-subtle)); border-radius: 9px; background: var(--surface); }
.editorial-choice-grid input:checked + span { border-color: var(--accent-info); box-shadow: inset 0 0 0 1px var(--accent-info); background: var(--surface-muted); }
.editorial-choice-grid strong { font-size: .75rem; }
.editorial-choice-grid small { color: var(--muted, var(--text-secondary)); 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, var(--border-subtle)); border-radius: 13px; background: linear-gradient(145deg, var(--editorial-brand-paper, var(--surface-muted)), var(--editorial-brand-var(--surface), var(--surface))); box-shadow: 0 8px 20px color-mix(in srgb, var(--text-primary) 8.0%, transparent); }
.editorial-final-preview article::before { position: absolute; z-index: 2; inset: 0 auto 0 0; width: 5px; background: var(--editorial-brand-primary, var(--warning)); 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%, color-mix(in srgb, var(--text-primary) 90.0%, transparent)); color: var(--surface); }
.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, var(--surface-muted)); }
.editorial-final-preview.template-editorial .editorial-preview-overlay { justify-content: center; background: color-mix(in srgb, var(--editorial-brand-paper, var(--surface-muted)) 92%, transparent); color: var(--editorial-brand-ink, var(--text-primary)); }
.editorial-final-preview.template-imovel .editorial-preview-overlay { background: linear-gradient(transparent 35%, color-mix(in srgb, var(--editorial-brand-ink, var(--text-primary)) 94%, transparent)); }
.editorial-output-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border-subtle); }
.editorial-output-actions button { min-height: 38px; }
.editorial-canva-note { margin: 10px 0 0; color: var(--muted, var(--text-secondary)); font-size: .7rem; }
.editorial-hint { margin: 12px 0 0; }
.editorial-custom-date { margin-top: 12px; }
.editorial-custom-date summary { color: var(--accent-info); 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, var(--text-secondary)); font-size: .72rem; font-weight: 700; text-transform: uppercase; }
.editorial-custom-date input { min-height: 38px; padding: 8px 10px; border: 1px solid var(--line, var(--border-subtle)); border-radius: 9px; background: var(--surface); }
@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; }
}


@media (min-width: 761px) and (max-width: 1040px) {
  .app-shell{
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    min-height: 100dvh;
  }

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

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

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

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

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

.knowledge-match-reason {
  display: block;
  margin-top: 3px;
  color: var(--teal-700, var(--accent-info));
  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, var(--surface-muted)) 86%, var(--surface));
  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, var(--warning)); 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;
  }
}


.mobile-menu-toggle,
.mobile-sidebar-backdrop { display: none; }

.smart-capture-fab {
  z-index: 120;
  border: 2px solid var(--surface);
  background: var(--accent-info);
  color: var(--surface);
  box-shadow: 0 14px 34px color-mix(in srgb, var(--text-primary) 42.0%, transparent);
}
.smart-capture-fab:hover { background: var(--text-primary); }
.smart-capture-fab:focus-visible {
  outline: 3px solid var(--surface);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent-info) 35.0%, transparent), 0 14px 34px color-mix(in srgb, var(--text-primary) 42.0%, transparent);
}
.smart-capture-fab:active { transform: translateY(1px) scale(.97); background: var(--text-primary); }
.smart-capture-backdrop { z-index: 140; }

@media (min-width: 1281px) {
  .app-shell{ grid-template-columns: 224px minmax(0, 1fr); }
}

@media (min-width: 1051px) and (max-width: 1280px) {
  .app-shell{ grid-template-columns: 184px minmax(0, 1fr); }
}

@media (min-width: 761px) and (max-width: 1050px) {
  .app-shell{ grid-template-columns: 72px minmax(0, 1fr); }
}

@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; }
  .mobile-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 125;
    width: 100%;
    height: 100%;
    border: 0;
    background: color-mix(in srgb, var(--text-primary) 46.0%, transparent);
  }
  .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 color-mix(in srgb, var(--accent-info) 25.0%, transparent);
  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: var(--surface);
  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;
  }
}


@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;
  }

  .task-detail-modal .modal-header { padding-block: 10px; }
  .task-detail-modal #detail-body { padding: 0 !important; }
  .task-pilot-header { grid-template-columns: minmax(0, 1fr); gap: 7px; padding: 10px 12px 9px; }
  .task-pilot-signals { gap: 5px; }
  .task-pilot-signals span { min-height: 25px; padding: 3px 7px; font-size: .7rem; }
  .task-pilot-actions { grid-column: 1; grid-row: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 38px; }
  .task-pilot-actions > button { min-height: 40px; }
  .task-pilot-actions > button:first-child { grid-column: 1 / 2; }
  .task-pilot-more { grid-column: 3; grid-row: 1; margin: 0; }
  .task-pilot-tabs { padding: 0 10px; }
  .task-pilot-tabs button { padding: 9px 10px 7px; }
  .task-pilot-panel { min-height: 220px; padding: 15px 14px 20px; }
  .task-register-fields { grid-template-columns: minmax(0, 1fr); }
  .task-register-footer { grid-template-columns: minmax(0, 1fr); align-items: stretch; }
  .task-register-footer > button { width: 100%; }
  .task-register-attachment { justify-content: center; }
  .task-register-list header { align-items: flex-start; flex-direction: column; gap: 3px; }
  .task-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .task-pilot-more > div { right: 0; max-width: calc(100vw - 48px); }
  body:has(#detail-modal:not([hidden]) .task-detail-modal) .status-toast { top: calc(10px + env(safe-area-inset-top)); bottom: auto; }

  .contact-detail-modal .modal-header { padding-block: 10px; }
  .contact-detail-modal #detail-body { padding: 0 !important; }
  .contact-pilot-header { gap: 11px; padding: 15px 14px 14px; }
  .contact-pilot-signals { gap: 5px; }
  .contact-pilot-signals span { min-height: 25px; padding: 3px 7px; font-size: .7rem; }
  .contact-pilot-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 38px; }
  .contact-pilot-actions > button { width: 100%; }
  .contact-pilot-actions > [data-contact-action="email"] { grid-column: 1 / 3; }
  .contact-pilot-actions .task-pilot-more { grid-column: 3; grid-row: 1; margin: 0; }
  .contact-pilot-tabs { padding: 0 10px; }
  .contact-pilot-tabs button { padding-inline: 10px; }
  .contact-pilot-panel { min-height: 220px; padding: 15px 14px 20px; }
  .contact-pilot-facts { grid-template-columns: minmax(0, 1fr); }
  .edit-contract-bar { align-items: stretch; flex-direction: column; margin: 4px -14px -20px; padding: 10px 14px max(10px, env(safe-area-inset-bottom)); }
  .edit-contract-bar > div { display: grid; grid-template-columns: 1fr 1fr; }
  .edit-contract-bar button { width: 100%; min-height: 44px; }
  body:has(#detail-modal:not([hidden]) .contact-detail-modal) .status-toast { top: calc(10px + env(safe-area-inset-top)); bottom: auto; }

  .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);
  }
}

@media (min-width: 1281px) {
  .app-shell { grid-template-columns: 76px minmax(0, 1fr); }
}
@media (min-width: 1051px) and (max-width: 1280px) {
  .app-shell { grid-template-columns: 72px minmax(0, 1fr); }
}
@media (min-width: 761px) and (max-width: 1050px) {
}
@media (min-width: 761px) {
}
@media (max-width: 760px) {
}
