/* Componentes especificos do Nexus. A base visual continua sendo a do Monary. */
.nexus-page-head {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, .28);
  border-left: 4px solid #2563eb;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .05);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 20px 22px;
}

.nexus-page-head h1 {
  color: #0f172a;
  font-size: 1.9rem;
  line-height: 1.1;
  margin: 4px 0 6px;
}

.nexus-page-head p,
.nexus-context-card p {
  color: #52627a;
  margin: 0;
}

.nexus-eyebrow {
  color: #52627a;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.nexus-head-actions,
.nexus-form-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.nexus-btn {
  align-items: center;
  border-radius: 10px;
  display: inline-flex;
  font-size: .94rem;
  font-weight: 800;
  gap: 8px;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  text-decoration: none;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.nexus-btn--compact {
  min-height: 38px;
  padding: 0 14px;
}

.nexus-btn:hover {
  transform: translateY(-1px);
}

.nexus-btn--primary {
  background: #2563eb;
  border: 1px solid #2563eb;
  box-shadow: 0 10px 22px rgba(37, 99, 235, .22);
  color: #fff;
}

.nexus-btn--secondary {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, .5);
  color: #0f172a;
}

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

.nexus-summary-card,
.nexus-context-card,
.nexus-table-panel,
.nexus-form-panel,
.nexus-review-panel {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 14px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .045);
}

.nexus-summary-card {
  align-items: center;
  display: flex;
  gap: 14px;
  min-height: 96px;
  padding: 18px;
}

.nexus-summary-card__icon {
  align-items: center;
  background: #eff6ff;
  border-radius: 12px;
  color: #2563eb;
  display: inline-flex;
  font-size: 1.15rem;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.nexus-summary-card p {
  color: #52627a;
  margin: 0 0 4px;
}

.nexus-summary-card strong {
  color: #0f172a;
  display: block;
  font-size: 1.55rem;
  line-height: 1;
}

.nexus-workspace {
  display: grid;
  gap: 16px;
  grid-template-columns: 280px minmax(0, 1fr);
}

.nexus-context-card {
  align-self: start;
  padding: 18px;
}

.nexus-context-card h2,
.nexus-panel-header h2,
.nexus-review-panel h2 {
  color: #0f172a;
  font-size: 1.1rem;
  margin: 4px 0 0;
}

.nexus-flow-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.nexus-flow-list li {
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 12px;
  padding: 12px;
}

.nexus-flow-list strong,
.nexus-flow-list span {
  display: block;
}

.nexus-flow-list strong {
  color: #0f172a;
  margin-bottom: 3px;
}

.nexus-flow-list span {
  color: #52627a;
  font-size: .9rem;
}

.nexus-table-panel {
  overflow: hidden;
}

.nexus-panel-header {
  align-items: center;
  border-bottom: 1px solid rgba(148, 163, 184, .24);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 16px 18px;
}

.nexus-list-toolbar {
  align-items: center;
  border-bottom: 1px solid rgba(148, 163, 184, .16);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 14px 18px;
}

.nexus-search-form {
  align-items: center;
  display: flex;
  flex: 1;
  gap: 10px;
  max-width: 620px;
}

.nexus-search-control {
  align-items: center;
  background: rgba(15, 23, 42, .78);
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 12px;
  color: #93c5fd;
  display: flex;
  flex: 1;
  gap: 10px;
  min-height: 40px;
  padding: 0 12px;
}

.nexus-search-control input {
  background: transparent;
  border: 0;
  color: #f8fafc;
  font: inherit;
  min-width: 0;
  outline: 0;
  width: 100%;
}

.nexus-search-control input::placeholder {
  color: #7d8ba3;
}

.nexus-list-result {
  color: #a8b6cc;
  font-size: .88rem;
  margin: 0;
  white-space: nowrap;
}

.nexus-helper-pill,
.nexus-source-pill {
  align-items: center;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, .3);
  border-radius: 999px;
  color: #52627a;
  display: inline-flex;
  font-size: .86rem;
  font-weight: 700;
  gap: 7px;
  padding: 7px 11px;
  white-space: nowrap;
}

.nexus-source-pill {
  color: #047857;
}

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

.nexus-table-wrap--desktop {
  display: block;
}

.nexus-table {
  border-collapse: collapse;
  min-width: 940px;
  width: 100%;
}

.nexus-table th {
  background: #f8fafc;
  color: #52627a;
  font-size: .76rem;
  font-weight: 800;
  padding: 13px 18px;
  text-align: left;
  text-transform: uppercase;
}

.nexus-table td {
  border-top: 1px solid rgba(148, 163, 184, .22);
  color: #0f172a;
  padding: 15px 18px;
  vertical-align: middle;
}

.nexus-table small {
  color: #64748b;
  display: block;
  margin-top: 2px;
}

.nexus-table__actions {
  text-align: right;
  white-space: nowrap;
}

.nexus-mobile-list {
  display: none;
}

.nexus-mobile-card {
  background: rgba(15, 23, 42, .72);
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 14px;
  display: grid;
  gap: 14px;
  padding: 15px;
}

.nexus-mobile-card__top,
.nexus-mobile-card__owner,
.nexus-mobile-card__actions {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.nexus-mobile-card__top strong,
.nexus-mobile-card__owner strong {
  color: #f8fafc;
  display: block;
}

.nexus-mobile-card small {
  color: #a8b6cc;
  display: block;
  margin-top: 2px;
}

.nexus-mobile-card__grid {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.nexus-mobile-card__grid span {
  background: rgba(30, 41, 59, .72);
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 12px;
  padding: 10px;
}

.nexus-mobile-card__grid b {
  color: #f8fafc;
  display: block;
  font-size: .92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nexus-mobile-card__owner {
  background: rgba(30, 41, 59, .58);
  border-radius: 12px;
  justify-content: flex-start;
  padding: 11px;
}

.nexus-mobile-card__owner i {
  color: #93c5fd;
  font-size: 1.35rem;
}

.nexus-mobile-card__actions {
  align-items: stretch;
}

.nexus-mobile-card__actions .nexus-btn {
  flex: 1;
  min-height: 40px;
}

.nexus-pagination {
  align-items: center;
  border-top: 1px solid rgba(148, 163, 184, .16);
  color: #a8b6cc;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 14px 18px;
}

.nexus-pagination__actions {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.nexus-pagination a,
.nexus-pagination button,
.nexus-pagination strong {
  align-items: center;
  background: rgba(15, 23, 42, .78);
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 10px;
  color: #dbeafe;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  min-width: 34px;
  text-decoration: none;
}

.nexus-pagination button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.nexus-pagination a:hover {
  border-color: rgba(96, 165, 250, .68);
  color: #93c5fd;
}

.nexus-detail-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.nexus-detail-card {
  background: linear-gradient(180deg, rgba(30, 41, 59, .96), rgba(15, 23, 42, .94));
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 14px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, .22);
  display: grid;
  gap: 4px;
  padding: 16px;
}

.nexus-detail-card span,
.nexus-detail-card small {
  color: #a8b6cc;
}

.nexus-detail-card strong {
  color: #f8fafc;
  font-size: 1.1rem;
}

.nexus-page-head--dossie {
  align-items: center;
  overflow: hidden;
  position: relative;
}

.nexus-page-head--dossie::after {
  background: linear-gradient(135deg, rgba(37, 99, 235, .22), rgba(20, 184, 166, .16));
  content: "";
  inset: 0 0 auto auto;
  height: 100%;
  pointer-events: none;
  position: absolute;
  width: 44%;
}

.nexus-dossie-title {
  position: relative;
  z-index: 1;
}

.nexus-dossie-title h1 {
  align-items: center;
  display: flex;
  gap: 12px;
}

.nexus-dossie-summary {
  display: grid;
  gap: 14px;
  grid-template-columns: 1.35fr repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}

.nexus-dossie-main-card {
  align-items: center;
  background: linear-gradient(180deg, rgba(30, 41, 59, .96), rgba(15, 23, 42, .94));
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 14px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, .22);
  display: grid;
  gap: 14px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 16px;
}

.nexus-dossie-main-card h2 {
  color: #f8fafc;
  font-size: 1.28rem;
  margin: 0;
}

.nexus-dossie-main-card p {
  color: #a8b6cc;
  margin: 2px 0 0;
}

.nexus-dossie-avatar {
  align-items: center;
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  border-radius: 14px;
  color: #fff;
  display: inline-flex;
  font-size: 1.1rem;
  font-weight: 900;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.nexus-dossie-strip {
  background: rgba(15, 23, 42, .78);
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 14px;
  display: grid;
  gap: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
  overflow: hidden;
}

.nexus-dossie-strip span {
  align-items: center;
  border-right: 1px solid rgba(148, 163, 184, .16);
  display: grid;
  gap: 2px 10px;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 14px 16px;
}

.nexus-dossie-strip span:last-child {
  border-right: 0;
}

.nexus-dossie-strip i {
  color: #67e8f9;
  font-size: 1.2rem;
  grid-row: span 2;
}

.nexus-dossie-strip b {
  color: #a8b6cc;
  font-size: .78rem;
  text-transform: uppercase;
}

.nexus-dossie-strip strong {
  color: #f8fafc;
  font-size: .95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nexus-tabs--dossie {
  background: rgba(15, 23, 42, .62);
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 14px;
  padding: 8px;
}

.nexus-dossie-section {
  margin-bottom: 16px;
}

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

.nexus-info-list--dossie {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.nexus-owner-line--dossie {
  align-items: center;
  justify-content: space-between;
}

.nexus-dossie-list {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.nexus-dossie-list article {
  background: rgba(15, 23, 42, .58);
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 12px;
  display: grid;
  gap: 4px;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 12px;
}

.nexus-dossie-list article strong,
.nexus-timeline strong {
  color: #f8fafc;
}

.nexus-dossie-list article small,
.nexus-timeline small {
  color: #a8b6cc;
  grid-column: 2;
}

.nexus-timeline {
  display: grid;
  padding: 8px 16px 16px;
}

.nexus-timeline article {
  align-items: start;
  border-left: 1px solid rgba(148, 163, 184, .22);
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  margin-left: 14px;
  padding: 14px 0 14px 18px;
  position: relative;
}

.nexus-timeline article:last-child {
  padding-bottom: 0;
}

.nexus-timeline i {
  align-items: center;
  background: #10213b;
  border: 1px solid rgba(96, 165, 250, .36);
  border-radius: 999px;
  color: #93c5fd;
  display: inline-flex;
  height: 30px;
  justify-content: center;
  left: -15px;
  position: absolute;
  top: 12px;
  width: 30px;
}

.nexus-timeline time {
  color: #93c5fd;
  font-size: .82rem;
  font-weight: 800;
  white-space: nowrap;
}

.nexus-tabs {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.nexus-tab {
  align-items: center;
  background: rgba(15, 23, 42, .72);
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 999px;
  color: #bfdbfe;
  display: inline-flex;
  font-weight: 800;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  text-decoration: none;
}

.nexus-tab--active,
.nexus-tab:hover {
  background: rgba(37, 99, 235, .22);
  border-color: rgba(96, 165, 250, .48);
  color: #fff;
}

.nexus-detail-sections {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.nexus-info-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 18px;
}

.nexus-info-list span {
  background: rgba(15, 23, 42, .58);
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 12px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.nexus-info-list b,
.nexus-owner-line small {
  color: #a8b6cc;
  font-size: .82rem;
}

.nexus-info-list strong,
.nexus-owner-line strong {
  color: #f8fafc;
}

.nexus-owner-line {
  align-items: center;
  display: flex;
  gap: 12px;
  padding: 18px;
}

.nexus-owner-line i {
  color: #93c5fd;
  font-size: 2rem;
}

.nexus-icon-btn {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, .44);
  border-radius: 10px;
  color: #2563eb;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  margin-left: 6px;
  width: 36px;
}

.nexus-status {
  border-radius: 999px;
  display: inline-flex;
  font-size: .78rem;
  font-weight: 800;
  padding: 6px 11px;
}

.nexus-status--success {
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #047857;
}

.nexus-status--warning {
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #92400e;
}

.nexus-status--info {
  background: #dbeafe;
  border: 1px solid #93c5fd;
  color: #1d4ed8;
}

.nexus-status--danger {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
}

.nexus-status--muted {
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  color: #475569;
}

.nexus-filter-select {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  color: #0f172a;
  font-weight: 700;
  min-height: 42px;
  padding: 0 12px;
}

.nexus-long-text {
  color: #475569;
  font-size: 1rem;
  line-height: 1.75;
  margin: 0;
  padding: 18px;
  white-space: pre-wrap;
}

.nexus-form {
  display: grid;
  gap: 16px;
}

.nexus-form-panel {
  overflow: hidden;
}

.nexus-form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 18px;
}

.nexus-form-grid--message {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nexus-form-grid label {
  color: #1e293b;
  display: grid;
  font-size: .88rem;
  font-weight: 800;
  gap: 7px;
}

.nexus-form-grid input,
.nexus-form-grid select,
.nexus-form-grid textarea {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, .55);
  border-radius: 10px;
  color: #0f172a;
  font: inherit;
  min-height: 44px;
  padding: 0 12px;
}

.nexus-form-grid textarea {
  line-height: 1.5;
  min-height: 150px;
  padding: 12px;
  resize: vertical;
}

.nexus-form-field--wide {
  grid-column: 1 / -1;
}

.nexus-context-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.nexus-context-grid--compact {
  gap: 12px;
}

.nexus-context-grid .nexus-context-card {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  padding: 14px;
}

.nexus-context-grid .nexus-context-card i {
  align-items: center;
  background: rgba(37, 99, 235, .16);
  border: 1px solid rgba(96, 165, 250, .26);
  border-radius: 12px;
  color: #60a5fa;
  display: inline-flex;
  flex: 0 0 auto;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.nexus-context-grid .nexus-context-card strong {
  color: #f8fafc;
  display: block;
  font-size: .96rem;
}

.nexus-context-grid .nexus-context-card span {
  color: #a8b6cc;
  display: block;
  font-size: .84rem;
  line-height: 1.45;
  margin-top: 3px;
}

.nexus-form-full {
  color: #1e293b;
  display: grid;
  font-size: .88rem;
  font-weight: 800;
  gap: 7px;
  padding: 0 18px 18px;
}

.nexus-form-full textarea {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, .55);
  border-radius: 10px;
  color: #0f172a;
  font: inherit;
  line-height: 1.5;
  min-height: 120px;
  outline: none;
  padding: 12px;
  resize: vertical;
}

.nexus-form-full textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .14);
}

.nexus-review-panel {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 18px;
}

.nexus-review-panel p {
  color: #52627a;
  margin: 6px 0 0;
}

.nexus-form-actions--inside {
  border-top: 1px solid rgba(148, 163, 184, .24);
  padding: 16px 18px;
}

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

  .nexus-workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nexus-page-head,
  .nexus-panel-header,
  .nexus-review-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .nexus-head-actions,
  .nexus-form-actions {
    justify-content: stretch;
  }

  .nexus-btn {
    width: 100%;
  }

  .nexus-summary-grid,
  .nexus-detail-grid,
  .nexus-detail-sections,
  .nexus-dossie-summary,
  .nexus-dossie-grid,
  .nexus-dossie-strip,
  .nexus-info-list,
  .nexus-form-grid,
  .nexus-form-grid--message,
  .nexus-context-grid {
    grid-template-columns: 1fr;
  }

  .nexus-dossie-main-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .nexus-dossie-main-card .nexus-status {
    grid-column: 1 / -1;
    width: fit-content;
  }

  .nexus-dossie-strip span {
    border-bottom: 1px solid rgba(148, 163, 184, .16);
    border-right: 0;
  }

  .nexus-dossie-strip span:last-child {
    border-bottom: 0;
  }

  .nexus-owner-line--dossie {
    align-items: flex-start;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .nexus-owner-line--dossie .nexus-status {
    grid-column: 1 / -1;
    width: fit-content;
  }

  .nexus-timeline article {
    grid-template-columns: minmax(0, 1fr);
  }

  .nexus-timeline time {
    padding-left: 2px;
  }

  .nexus-list-toolbar,
  .nexus-search-form {
    align-items: stretch;
    flex-direction: column;
  }

  .nexus-search-form {
    max-width: none;
    width: 100%;
  }

  .nexus-list-result {
    align-self: flex-start;
  }

  .nexus-table-wrap--desktop {
    display: none;
  }

  .nexus-mobile-list {
    display: grid;
    gap: 12px;
    padding: 14px;
  }

  .nexus-mobile-card__top,
  .nexus-mobile-card__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .nexus-mobile-card__grid {
    grid-template-columns: 1fr;
  }

  .nexus-pagination {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Cadastro inicial de empresas */
.nexus-company-builder .nexus-panel-header {
  align-items: center;
}

.nexus-company-builder .nexus-panel-header p {
  color: var(--app-text-muted);
  margin: 4px 0 0;
}

.nexus-company-list {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.nexus-company-item {
  background: var(--app-surface-muted);
  border: 1px solid var(--app-border);
  border-radius: 10px;
  overflow: hidden;
}

.nexus-company-item__header {
  align-items: center;
  border-bottom: 1px solid var(--app-border);
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
}

.nexus-company-item__header > div {
  align-items: center;
  display: flex;
  gap: 10px;
}

.nexus-company-item__index {
  color: var(--app-text-muted);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.nexus-company-item .nexus-form-grid {
  padding: 16px;
}

.nexus-company-remove {
  color: var(--app-danger);
}

/* Navegação do dossiê: seções, não uma coleção de botões. */
.nexus-body .nexus-tabs--dossie {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--app-border);
  border-radius: 0;
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 0 4px;
}

.nexus-body .nexus-tabs--dossie .nexus-tab {
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: var(--app-text-muted);
  margin-bottom: -1px;
  min-height: 48px;
  padding: 0 2px;
  white-space: nowrap;
}

.nexus-body .nexus-tabs--dossie .nexus-tab:hover {
  background: transparent;
  color: var(--app-text);
}

.nexus-body .nexus-tabs--dossie .nexus-tab--active {
  background: transparent;
  border-bottom-color: var(--app-primary);
  color: var(--app-primary);
}

@media (max-width: 760px) {
  .nexus-company-builder .nexus-panel-header {
    align-items: stretch;
  }

  .nexus-company-add {
    justify-content: center;
    width: 100%;
  }

  .nexus-company-list {
    padding: 12px;
  }

  .nexus-body .nexus-tabs--dossie {
    gap: 18px;
  }
}

/* Tema operacional do Nexus */
.nexus-body {
  background: var(--app-page-bg) !important;
  color: #e5edf8 !important;
}

.nexus-body .bg-gray-50,
.nexus-body .dark\:bg-gray-900 {
  background-color: transparent !important;
}

.nexus-body nav,
.nexus-body [data-app-navegacao-principal] {
  background: rgba(15, 23, 42, .82) !important;
  border-color: rgba(148, 163, 184, .18) !important;
  backdrop-filter: blur(18px);
}

.nexus-body .app-page-canvas {
  display: block;
}

.nexus-list-toolbar--filters {
  gap: .85rem;
}

.nexus-search-form--filters {
  width: min(100%, 58rem);
}

.nexus-search-form--filters .nexus-filter-select {
  flex: 0 0 13rem;
}

.nexus-message-form {
  padding-top: .25rem;
}

.nexus-message-form .app-form-actions {
  margin-top: 1.15rem;
}

.nexus-search-clear {
  align-items: center;
  border-radius: 999px;
  color: #a8b6cc;
  display: inline-flex;
  height: 28px;
  justify-content: center;
  text-decoration: none;
  width: 28px;
}

.nexus-search-clear:hover {
  background: rgba(148, 163, 184, .16);
  color: #fff;
}

.nexus-table-panel--primary {
  min-height: 320px;
}

.nexus-table-panel--primary .nexus-panel-header {
  min-height: 76px;
}

.nexus-panel-header h2 {
  letter-spacing: 0;
}

.nexus-table tbody tr {
  transition: background .14s ease;
}

.nexus-table tbody tr:hover {
  background: rgba(37, 99, 235, .08);
}

.nexus-table td > strong:first-child {
  font-size: 1rem;
}

.nexus-table__actions {
  min-width: 116px;
}

.nexus-icon-btn {
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.nexus-icon-btn:hover {
  transform: translateY(-1px);
}

.nexus-empty-state {
  background: rgba(15, 23, 42, .48);
  border-top: 1px solid rgba(148, 163, 184, .14);
  min-height: 240px;
}

.nexus-empty-state__icon {
  align-items: center;
  background: rgba(37, 99, 235, .16);
  border: 1px solid rgba(96, 165, 250, .28);
  border-radius: 16px;
  display: inline-flex;
  height: 56px;
  justify-content: center;
  width: 56px;
}

.nexus-page-head,
.nexus-page-head--dark,
.dashboard-hero,
.dashboard-panel,
.nexus-summary-card,
.nexus-context-card,
.nexus-table-panel,
.nexus-form-panel,
.nexus-review-panel {
  background: linear-gradient(180deg, rgba(30, 41, 59, .96), rgba(15, 23, 42, .94));
  border: 1px solid rgba(148, 163, 184, .2);
  box-shadow: 0 22px 50px rgba(0, 0, 0, .28);
  color: #e5edf8;
}

.nexus-page-head {
  border-left-color: #38bdf8;
}

.nexus-page-head h1,
.nexus-context-card h2,
.nexus-panel-header h2,
.nexus-review-panel h2,
.dashboard-hero h1,
.dashboard-panel h2,
.nexus-summary-card strong,
.nexus-flow-list strong,
.nexus-table td,
.nexus-form-grid label {
  color: #f8fafc;
}

.nexus-page-head p,
.nexus-context-card p,
.nexus-review-panel p,
.dashboard-hero p,
.dashboard-panel p,
.nexus-flow-list span,
.nexus-summary-card p,
.nexus-table small {
  color: #a8b6cc;
}

.nexus-eyebrow,
.dashboard-eyebrow {
  color: #93c5fd;
}

.nexus-btn--primary {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  border-color: rgba(96, 165, 250, .72);
  box-shadow: 0 16px 34px rgba(37, 99, 235, .28);
}

.nexus-btn--secondary,
.nexus-icon-btn {
  background: rgba(15, 23, 42, .72);
  border-color: rgba(148, 163, 184, .28);
  color: #dbeafe;
}

.nexus-btn--secondary:hover,
.nexus-icon-btn:hover {
  background: rgba(30, 41, 59, .92);
  border-color: rgba(96, 165, 250, .55);
}

.nexus-summary-card__icon,
.dashboard-list__icon,
.dashboard-kpi__top span {
  background: rgba(37, 99, 235, .18);
  color: #93c5fd;
}

.nexus-flow-list li,
.nexus-helper-pill,
.nexus-source-pill,
.dashboard-list__row,
.dashboard-shortcut {
  background: rgba(15, 23, 42, .58);
  border-color: rgba(148, 163, 184, .2);
  color: #e5edf8;
}

.nexus-panel-header {
  border-bottom-color: rgba(148, 163, 184, .18);
}

.nexus-table th {
  background: rgba(15, 23, 42, .72);
  color: #93a4bd;
}

.nexus-table td {
  border-top-color: rgba(148, 163, 184, .16);
}

.nexus-form-grid input,
.nexus-form-grid select,
.nexus-form-grid textarea,
.nexus-form-full textarea {
  background: rgba(15, 23, 42, .78);
  border-color: rgba(148, 163, 184, .34);
  color: #f8fafc;
  outline: none;
}

.nexus-form-grid input:focus,
.nexus-form-grid select:focus,
.nexus-form-grid textarea:focus,
.nexus-form-full textarea:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .18);
}

.nexus-form-grid input::placeholder,
.nexus-form-grid textarea::placeholder,
.nexus-form-full textarea::placeholder {
  color: #7d8ba3;
}

.nexus-status--success {
  background: rgba(16, 185, 129, .14);
  border-color: rgba(52, 211, 153, .42);
  color: #86efac;
}

.nexus-status--warning {
  background: rgba(245, 158, 11, .14);
  border-color: rgba(251, 191, 36, .42);
  color: #fcd34d;
}

.nexus-status--info {
  background: rgba(59, 130, 246, .16);
  border-color: rgba(96, 165, 250, .42);
  color: #93c5fd;
}

.nexus-status--danger {
  background: rgba(239, 68, 68, .16);
  border-color: rgba(248, 113, 113, .42);
  color: #fca5a5;
}

.nexus-status--muted {
  background: rgba(148, 163, 184, .14);
  border-color: rgba(148, 163, 184, .34);
  color: #cbd5e1;
}

body.nexus-theme-dark .nexus-filter-select,
.nexus-theme-dark .nexus-filter-select {
  background: rgba(15, 23, 42, .86);
  border-color: rgba(148, 163, 184, .28);
  color: #e5eefb;
}

body.nexus-theme-dark .nexus-long-text,
.nexus-theme-dark .nexus-long-text {
  color: #cbd5e1;
}

.nexus-env-pill {
  align-items: center;
  background: rgba(37, 99, 235, .16);
  border: 1px solid rgba(96, 165, 250, .42);
  border-radius: 999px;
  color: #bfdbfe;
  display: inline-flex;
  font-size: .86rem;
  font-weight: 800;
  gap: 8px;
  min-height: 38px;
  padding: 0 13px;
  text-decoration: none;
}

.nexus-env-pill:hover {
  background: rgba(37, 99, 235, .25);
  color: #fff;
}

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

.nexus-environment-card {
  background: linear-gradient(180deg, rgba(30, 41, 59, .96), rgba(15, 23, 42, .94));
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 18px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, .28);
  color: #e5edf8;
  display: grid;
  gap: 12px;
  padding: 24px;
}

.nexus-environment-card--active {
  border-color: rgba(56, 189, 248, .66);
  box-shadow: 0 22px 60px rgba(14, 165, 233, .16);
}

.nexus-environment-card__icon {
  align-items: center;
  background: rgba(37, 99, 235, .18);
  border-radius: 14px;
  color: #93c5fd;
  display: inline-flex;
  font-size: 1.25rem;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.nexus-environment-card h2 {
  color: #f8fafc;
  font-size: 1.55rem;
  margin: 0;
}

.nexus-environment-card p {
  color: #a8b6cc;
  margin: 0 0 8px;
}

.nexus-empty-state {
  align-items: center;
  display: grid;
  gap: 14px;
  justify-items: start;
  padding: 26px;
}

.nexus-empty-state i {
  color: #60a5fa;
  font-size: 2rem;
}

.nexus-empty-state h2 {
  color: #f8fafc;
  margin: 0;
}

.nexus-empty-state p {
  color: #a8b6cc;
  margin: 0;
}

.nexus-reply-form {
  border-bottom: 1px solid rgba(148, 163, 184, .2);
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 20px;
}

.nexus-reply-form label {
  display: grid;
  gap: 9px;
}

.nexus-reply-form label span {
  color: #475569;
  font-size: .86rem;
  font-weight: 800;
}

.nexus-reply-form textarea {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  color: #0f172a;
  font: inherit;
  min-height: 120px;
  padding: 14px 16px;
  resize: vertical;
}

.nexus-reply-form textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .16);
  outline: none;
}

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

.nexus-ticket-timeline-item {
  display: grid;
  gap: 12px;
  grid-template-columns: 18px minmax(0, 1fr);
}

.nexus-ticket-timeline-marker {
  border: 1px solid rgba(148, 163, 184, .34);
  border-radius: 999px;
  height: 14px;
  margin-top: 18px;
  width: 14px;
}

.nexus-ticket-timeline-card {
  background: #f8fafc;
  border: 1px solid #dbe4f0;
  border-radius: 16px;
  display: grid;
  gap: 8px;
  padding: 16px;
}

.nexus-ticket-timeline-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.nexus-ticket-timeline-head strong {
  color: #0f172a;
}

.nexus-ticket-timeline-head span,
.nexus-ticket-timeline-card small {
  color: #64748b;
}

.nexus-ticket-timeline-card p {
  color: #1e293b;
  line-height: 1.55;
  margin: 0;
  white-space: pre-wrap;
}

body.nexus-theme-dark .nexus-reply-form,
.nexus-theme-dark .nexus-reply-form {
  border-bottom-color: rgba(148, 163, 184, .2);
}

body.nexus-theme-dark .nexus-reply-form label span,
.nexus-theme-dark .nexus-reply-form label span {
  color: #cbd5e1;
}

body.nexus-theme-dark .nexus-reply-form textarea,
.nexus-theme-dark .nexus-reply-form textarea,
body.nexus-theme-dark .nexus-ticket-timeline-card,
.nexus-theme-dark .nexus-ticket-timeline-card {
  background: rgba(15, 23, 42, .62);
  border-color: rgba(148, 163, 184, .24);
  color: #e5eefb;
}

body.nexus-theme-dark .nexus-ticket-timeline-head strong,
.nexus-theme-dark .nexus-ticket-timeline-head strong,
body.nexus-theme-dark .nexus-ticket-timeline-card p,
.nexus-theme-dark .nexus-ticket-timeline-card p {
  color: #f8fafc;
}

body.nexus-theme-dark .nexus-ticket-timeline-head span,
.nexus-theme-dark .nexus-ticket-timeline-head span,
body.nexus-theme-dark .nexus-ticket-timeline-card small,
.nexus-theme-dark .nexus-ticket-timeline-card small {
  color: #94a3b8;
}

@media (max-width: 760px) {
  .nexus-environment-grid {
    grid-template-columns: 1fr;
  }

  .nexus-search-form--filters {
    width: 100%;
  }
}

/* Fechamento da base visual compartilhada do Nexus. */
.nexus-shell,
.nexus-shell *,
.nexus-flash-shell,
.nexus-flash-shell * {
  box-sizing: border-box;
}

.nexus-page-head,
.nexus-panel-header,
.nexus-list-toolbar,
.nexus-summary-card,
.nexus-context-card,
.nexus-table-panel,
.nexus-form-panel,
.nexus-review-panel,
.nexus-mobile-card,
.nexus-empty-state,
.nexus-pagination {
  min-width: 0;
}

.nexus-page-head h1,
.nexus-page-head p,
.nexus-panel-header h2,
.nexus-panel-header p,
.nexus-table td,
.nexus-table small,
.nexus-mobile-card strong,
.nexus-mobile-card small,
.nexus-mobile-card b,
.nexus-info-list strong,
.nexus-info-list b,
.nexus-status,
.nexus-btn {
  overflow-wrap: anywhere;
}

.nexus-btn,
.nexus-icon-btn,
.nexus-status,
.nexus-helper-pill,
.nexus-source-pill,
.nexus-env-pill {
  flex: 0 0 auto;
}

.nexus-table {
  table-layout: fixed;
}

.nexus-table th,
.nexus-table td {
  line-height: 1.35;
}

.nexus-table td > strong:first-child,
.nexus-table small {
  max-width: 100%;
}

.nexus-table td > strong:first-child {
  display: block;
}

.nexus-table__actions {
  width: 120px;
}

.nexus-list-toolbar .nexus-btn {
  min-width: 112px;
}

.nexus-search-control {
  min-width: 0;
}

.nexus-mobile-card__top > div,
.nexus-mobile-card__owner > div {
  min-width: 0;
}

.nexus-mobile-card__grid span {
  min-width: 0;
}

.nexus-flash-card .flash-message-content {
  align-items: flex-start;
}

.nexus-flash-card .flash-message-text {
  line-height: 1.45;
  overflow-wrap: anywhere;
}

@media (min-width: 761px) {
  .nexus-table-panel {
    min-width: 0;
  }

  .nexus-table-wrap {
    scrollbar-color: rgba(148, 163, 184, .45) transparent;
    scrollbar-width: thin;
  }
}

@media (max-width: 980px) {
  .nexus-context-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nexus-form-grid,
  .nexus-form-grid--message,
  .nexus-info-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .nexus-page-head {
    border-radius: 16px;
    gap: 14px;
    margin-bottom: 14px;
    padding: 18px;
  }

  .nexus-page-head h1 {
    font-size: 1.55rem;
  }

  .nexus-page-head p {
    font-size: .94rem;
    line-height: 1.55;
  }

  .nexus-panel-header {
    gap: 8px;
    padding: 15px;
  }

  .nexus-list-toolbar {
    gap: 12px;
    padding: 14px;
  }

  .nexus-list-toolbar .nexus-btn,
  .nexus-search-clear {
    min-height: 42px;
  }

  .nexus-list-result {
    white-space: normal;
  }

  .nexus-summary-card {
    min-height: 84px;
    padding: 15px;
  }

  .nexus-summary-card strong {
    font-size: 1.35rem;
  }

  .nexus-table-panel {
    border-radius: 16px;
  }

  .nexus-mobile-list {
    gap: 12px;
    padding: 12px;
  }

  .nexus-mobile-card {
    border-radius: 16px;
    padding: 14px;
  }

  .nexus-mobile-card__top {
    align-items: flex-start;
  }

  .nexus-mobile-card__top .nexus-status {
    width: fit-content;
  }

  .nexus-mobile-card__grid {
    gap: 8px;
  }

  .nexus-mobile-card__grid span {
    padding: 11px;
  }

  .nexus-mobile-card__grid b {
    white-space: normal;
  }

  .nexus-mobile-card__owner {
    align-items: flex-start;
  }

  .nexus-mobile-card__actions {
    gap: 10px;
  }

  .nexus-mobile-card__actions .nexus-btn {
    justify-content: center;
    min-height: 44px;
  }

  .nexus-pagination {
    gap: 12px;
    padding: 14px;
  }

  .nexus-pagination > span {
    line-height: 1.4;
  }

  .nexus-pagination__actions {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: 100%;
  }

  .nexus-pagination a,
  .nexus-pagination button,
  .nexus-pagination strong {
    height: 40px;
    min-width: 0;
    width: 100%;
  }

  .nexus-form-grid,
  .nexus-form-grid--message,
  .nexus-info-list,
  .nexus-context-grid {
    grid-template-columns: 1fr;
  }

  .nexus-form-grid {
    padding: 15px;
  }

  .nexus-form-actions--inside {
    padding: 15px;
  }

  .nexus-empty-state {
    justify-items: stretch;
    min-height: 220px;
    padding: 22px 16px;
    text-align: left;
  }

  .nexus-empty-state .nexus-btn {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .nexus-shell {
    padding: 14px 10px 28px;
  }

  .nexus-page-head,
  .nexus-summary-card,
  .nexus-context-card,
  .nexus-table-panel,
  .nexus-form-panel,
  .nexus-review-panel {
    border-radius: 14px;
  }

  .nexus-page-head h1 {
    font-size: 1.38rem;
  }

  .nexus-head-actions,
  .nexus-form-actions {
    gap: 8px;
  }

  .nexus-btn {
    min-height: 44px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .nexus-status {
    max-width: 100%;
  }

  .nexus-mobile-card__owner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .nexus-flash-shell {
    left: 10px;
    right: 10px;
  }
}

/* Ajustes do dossie de grupo e navegacao mobile. */
.nexus-body [data-app-barra-navegacao] {
  color: #e5edf8;
}

.nexus-body [data-app-barra-navegacao] .container {
  max-width: 1500px;
}

.nexus-body [data-app-barra-navegacao-logo] img {
  height: 42px;
  width: 42px;
}

.nexus-body [data-app-navegacao-principal] {
  background: rgba(15, 23, 42, .64) !important;
  border-color: rgba(148, 163, 184, .18) !important;
}

.nexus-page-head--compact {
  min-height: 118px;
}

.nexus-tab-content {
  display: grid;
  gap: 16px;
}

.nexus-tabs--dossie {
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.nexus-dossie-section {
  margin-bottom: 0;
}

@media (max-width: 760px) {
  .nexus-shell {
    padding-top: 86px;
  }

  .nexus-body [data-app-barra-navegacao] {
    min-height: 4.5rem;
  }

  .nexus-body [data-app-barra-navegacao][data-menu-celular-expandido='true'] {
    height: 4.5rem;
  }

  .nexus-body [data-app-barra-navegacao-miolo] {
    min-height: 4.5rem;
  }

  .nexus-body [data-app-barra-navegacao-logo] img {
    height: 38px;
    width: 38px;
  }

  .nexus-body [data-app-barra-navegacao-logo] a {
    max-width: calc(100vw - 5.5rem);
  }

  .nexus-body #navegacao-celular {
    background: #0f172a !important;
    height: calc(100dvh - 4.5rem);
    max-height: calc(100dvh - 4.5rem);
    top: 4.5rem;
  }

  .nexus-body #navegacao-celular > .container {
    padding: 14px 14px calc(18px + env(safe-area-inset-bottom, 0px));
  }

  .nexus-body .app-mobile-nav__item {
    background: rgba(15, 23, 42, .48);
    border: 1px solid rgba(148, 163, 184, .16);
    color: #dbeafe !important;
  }

  .nexus-body .app-mobile-nav__item:hover,
  .nexus-body .app-mobile-nav__item:focus-visible {
    background: rgba(37, 99, 235, .22);
  }

  .nexus-body .app-mobile-nav__footer {
    border-color: rgba(148, 163, 184, .18) !important;
  }

  .nexus-page-head--dossie::after {
    width: 100%;
  }

  .nexus-tabs--dossie {
    flex-wrap: nowrap;
    margin-left: -2px;
    margin-right: -2px;
    padding: 8px;
  }

  .nexus-tabs--dossie .nexus-tab {
    flex: 0 0 auto;
    min-width: max-content;
    width: auto;
  }

  .nexus-dossie-main-card,
  .nexus-detail-card {
    box-shadow: none;
  }
}

/* Superficie operacional unica, alinhada ao ritmo visual do Monary. */
.nexus-body {
  --app-page-bg: #101828;
  --app-surface: #1f2937;
  --app-surface-muted: rgba(15, 23, 42, .45);
  --app-surface-subtle: #243244;
  --app-control-bg: #111827;
  --app-border: #374151;
  --app-border-strong: #475569;
  --app-text: #f8fafc;
  --app-text-muted: #94a3b8;
  --app-primary: #60a5fa;
  --app-primary-soft: rgba(37, 99, 235, .16);
  --app-success: #6ee7b7;
  --app-warning: #fbbf24;
  --app-danger: #fca5a5;
}

.nexus-body .app-main {
  max-width: 1400px !important;
  padding-left: 24px;
  padding-right: 24px;
  width: 100%;
}

.nexus-body .app-page-canvas > .space-y-4,
.nexus-body .app-form-page {
  display: grid;
  gap: 20px;
}

.nexus-body .app-page-header {
  margin: 0;
}

.nexus-body .app-list-surface,
.nexus-body .app-form-surface,
.nexus-body .nexus-form-panel,
.nexus-body .nexus-review-panel,
.nexus-body .nexus-dossie-section {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 12px;
  box-shadow: none;
  overflow: hidden;
}

.nexus-body .app-list-surface .app-list-toolbar {
  border-bottom: 1px solid var(--app-border);
  margin: 0;
  padding: 16px 18px;
}

.nexus-body .app-list-surface .app-table-shell {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.nexus-body .app-list-surface > nav {
  margin: 0;
  padding: 14px 18px;
}

.nexus-body .nexus-table {
  min-width: 920px;
}

.nexus-body .nexus-table th {
  background: rgba(15, 23, 42, .54);
}

.nexus-body .nexus-table tbody tr:hover {
  background: rgba(59, 130, 246, .08);
}

.nexus-body .nexus-form-panel,
.nexus-body .nexus-review-panel {
  margin: 0;
}

@media (max-width: 760px) {
  .nexus-body .app-main {
    padding-left: 14px;
    padding-right: 14px;
  }

  .nexus-body .app-page-canvas > .space-y-4,
  .nexus-body .app-form-page {
    gap: 14px;
  }

  .nexus-body .app-list-surface {
    overflow: visible;
  }

  .nexus-body .app-list-surface .app-list-toolbar {
    border-radius: 12px;
  }
}
