/* Neura Solar Intelligence — tema claro Engage Solar */
.nsi-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 4px 0 24px;
  color: #1a2332;
}

.nsi-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.nsi-title {
  margin: 4px 0 6px;
  font-size: 1.55rem;
  font-weight: 700;
  color: #0b1b33;
}

.nsi-subtitle {
  margin: 0;
  color: #5b6b7c;
  font-size: 0.95rem;
  max-width: 640px;
  line-height: 1.45;
}

.nsi-link-back {
  border: 0;
  background: none;
  color: #3b82f6;
  cursor: pointer;
  padding: 0;
  font-size: 0.875rem;
}

.nsi-link-back:hover {
  text-decoration: underline;
}

.nsi-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.nsi-hub-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

@media (max-width: 900px) {
  .nsi-hub-grid,
  .nsi-hub-grid--3 {
    grid-template-columns: 1fr;
  }
}

.nsi-hub-card,
.nsi-card {
  background: #fff;
  border: 1px solid #e4e9f0;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(11, 27, 51, 0.05);
  padding: 20px;
}

.nsi-hub-card h3 {
  margin: 10px 0 8px;
  font-size: 1.15rem;
}

.nsi-hub-card p {
  margin: 0 0 16px;
  color: #5b6b7c;
  line-height: 1.45;
}

.nsi-hub-card--disabled {
  opacity: 0.72;
  background: #f8fafc;
}

.nsi-hub-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.nsi-hub-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #fff7e6;
  font-size: 1.25rem;
}

.nsi-hub-links {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #8a96a5;
  font-size: 0.9rem;
}

.nsi-hub-links a {
  color: #d97706;
}

.nsi-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
}

.nsi-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.nsi-btn--primary {
  background: #f5a623;
  color: #fff;
  border-color: #f5a623;
}

.nsi-btn--primary:hover:not(:disabled) {
  filter: brightness(0.96);
}

.nsi-btn--ghost {
  background: #fff;
  border-color: #d7dee8;
  color: #1a2332;
}

.nsi-btn--ghost:hover:not(:disabled) {
  background: #f5f7fa;
}

.nsi-filters {
  display: grid;
  grid-template-columns: 1.4fr repeat(5, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
  background: #fff;
  border: 1px solid #e4e9f0;
  border-radius: 14px;
  padding: 14px;
}

@media (max-width: 1100px) {
  .nsi-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.nsi-filters label,
.nsi-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.78rem;
  color: #6b7785;
  font-weight: 600;
}

.nsi-filters input,
.nsi-filters select,
.nsi-field input,
.nsi-field select,
.nsi-upload select {
  min-height: 40px;
  border: 1px solid #d7dee8;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 0.9rem;
  color: #1a2332;
  background: #fff;
  font-weight: 500;
}

.nsi-filters-actions {
  display: flex;
  align-items: end;
}

.nsi-table-wrap {
  overflow: auto;
}

.nsi-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.nsi-table th,
.nsi-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #eef2f6;
  text-align: left;
  white-space: nowrap;
}

.nsi-table th {
  color: #6b7785;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nsi-table a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.nsi-table a:hover {
  text-decoration: underline;
}

.nsi-actions-cell {
  display: flex;
  gap: 10px;
}

.nsi-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  color: #6b7785;
  font-size: 0.875rem;
}

.nsi-empty {
  padding: 32px 16px;
  text-align: center;
  color: #6b7785;
}

.nsi-alert {
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.nsi-alert--error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.nsi-alert--warn {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.nsi-alert--danger {
  background: #fff1f2;
  color: #9f1239;
  border: 1px solid #fecdd3;
}

.nsi-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #f1f5f9;
  color: #475569;
}

.nsi-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.nsi-badge--ok {
  background: #ecfdf5;
  color: #047857;
}
.nsi-badge--warn {
  background: #fffbeb;
  color: #b45309;
}
.nsi-badge--purple {
  background: #f5f3ff;
  color: #6d28d9;
}
.nsi-badge--info {
  background: #eff6ff;
  color: #1d4ed8;
}
.nsi-badge--accent {
  background: #fff7ed;
  color: #c2410c;
}
.nsi-badge--muted {
  background: #f1f5f9;
  color: #64748b;
}

.nsi-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nsi-section-title {
  margin: 0 0 14px;
  font-size: 1rem;
}

.nsi-section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.nsi-section-title-row .nsi-section-title {
  margin: 0;
}

.nsi-radio-row {
  display: flex;
  gap: 18px;
  margin-bottom: 14px;
  font-weight: 500;
  color: #1a2332;
}

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

@media (max-width: 700px) {
  .nsi-grid-2 {
    grid-template-columns: 1fr;
  }
}

.nsi-field--full {
  grid-column: 1 / -1;
}

.nsi-hint {
  margin: 0 0 12px;
  color: #6b7785;
  font-size: 0.85rem;
}

.nsi-hint--ok {
  color: #047857;
}

.nsi-suggest {
  margin-top: 6px;
  border: 1px solid #e4e9f0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  max-height: 220px;
  overflow-y: auto;
}

.nsi-suggest button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: #fff;
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  color: #1a2332;
}

.nsi-suggest button:hover {
  background: #f8fafc;
}

.nsi-suggest small {
  display: block;
  color: #6b7785;
  margin-top: 2px;
}

.nsi-form-actions,
.nsi-btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.nsi-crm-block {
  background: #fff;
  border: 1px solid #e4e9f0;
  border-radius: 12px;
  padding: 14px 16px;
  display: grid;
  gap: 4px;
  font-size: 0.92rem;
}

.nsi-crm-label {
  color: #059669;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.nsi-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  overflow-x: auto;
  padding-bottom: 2px;
}

.nsi-tab {
  border: 1px solid #d7dee8;
  background: #fff;
  color: #475569;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  white-space: nowrap;
}

.nsi-tab.is-active {
  background: #0b1b33;
  border-color: #0b1b33;
  color: #fff;
}

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

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

.nsi-kv-grid > div,
.nsi-kv-stack > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nsi-kv-grid span,
.nsi-kv-stack span {
  font-size: 0.75rem;
  color: #6b7785;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.nsi-kv-stack {
  display: grid;
  gap: 12px;
}

.nsi-location-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 14px;
}

@media (max-width: 980px) {
  .nsi-location-grid {
    grid-template-columns: 1fr;
  }
}

.nsi-map-img {
  width: 100%;
  border-radius: 12px;
  display: block;
  min-height: 280px;
  object-fit: cover;
  background: #eef2f6;
}

.nsi-map-iframe-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 68%;
  border-radius: 12px;
  overflow: hidden;
  background: #eef2f6;
}

.nsi-map-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.nsi-link-btn {
  border: 0;
  background: none;
  color: #2563eb;
  cursor: pointer;
  font-weight: 600;
}

.nsi-muted {
  color: #8a96a5;
  font-weight: 500;
}

.nsi-meta-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 6px;
}

.nsi-upcoming {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #eef2f6;
}

.nsi-upcoming-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.nsi-upcoming-grid p {
  margin: 4px 0 0;
  color: #6b7785;
  font-size: 0.875rem;
}

.nsi-upload {
  border: 1.5px dashed #c9d4e2;
  border-radius: 12px;
  padding: 16px;
  background: #f8fafc;
  margin-bottom: 16px;
}

.nsi-upload-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 10px;
}

.nsi-file-btn {
  position: relative;
  overflow: hidden;
}

.nsi-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 14px;
}

.nsi-chip {
  border: 1px solid #d7dee8;
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
}

.nsi-chip.is-active {
  background: #0b1b33;
  border-color: #0b1b33;
  color: #fff;
}

.nsi-gallery-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 900px) {
  .nsi-gallery-layout {
    grid-template-columns: 1fr;
  }
}

.nsi-thumbs {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
}

.nsi-thumb {
  text-align: left;
  border: 1px solid #e4e9f0;
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  display: grid;
  grid-template-columns: 56px 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
}

.nsi-thumb.is-active {
  border-color: #f5a623;
  box-shadow: 0 0 0 2px rgba(245, 166, 35, 0.2);
}

.nsi-thumb-media {
  grid-row: 1 / span 2;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: #eef2f6;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.nsi-thumb-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nsi-thumb-placeholder {
  font-size: 0.75rem;
  color: #94a3b8;
}

.nsi-thumb.has-image .nsi-thumb-placeholder {
  display: none;
}

.nsi-thumb-label {
  display: block;
  font-weight: 600;
  color: #1a2332;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nsi-thumb small {
  color: #6b7785;
}

.nsi-preview {
  border: 1px solid #e4e9f0;
  border-radius: 12px;
  padding: 16px;
  background: #f8fafc;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nsi-preview-media {
  position: relative;
  width: 100%;
  min-height: 220px;
  max-height: 420px;
  border-radius: 10px;
  overflow: hidden;
  background: #e8eef5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nsi-preview-media img {
  max-width: 100%;
  max-height: 420px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.nsi-preview-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 0.9rem;
}

.nsi-preview-media.has-image .nsi-preview-loading {
  display: none;
}

.nsi-pre {
  background: #0b1b33;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  overflow: auto;
  font-size: 0.8rem;
}

body[data-es-panel-active='nsi'] #esPageHeading {
  display: none;
}

/* ── Irradiação ── */
.nsi-irr {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nsi-irr-empty {
  text-align: center;
  padding: 28px 20px;
}

.nsi-irr-empty p {
  color: #5b6b7c;
  line-height: 1.5;
  max-width: 520px;
  margin: 0 auto 16px;
}

.nsi-irr-hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.nsi-irr-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 900px) {
  .nsi-irr-hero,
  .nsi-irr-kpis {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .nsi-irr-hero,
  .nsi-irr-kpis {
    grid-template-columns: 1fr;
  }
}

.nsi-irr-kpi {
  background: #fff;
  border: 1px solid #e4e9f0;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 8px 24px rgba(11, 27, 51, 0.04);
}

.nsi-irr-kpi--hero {
  padding: 20px;
  background: linear-gradient(165deg, #fff 0%, #fff8ee 100%);
  border-color: #f5d9a8;
}

.nsi-irr-kpi-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7785;
  font-weight: 600;
}

.nsi-irr-kpi-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: #c45f0a;
  line-height: 1.1;
}

.nsi-irr-kpi-unit {
  font-size: 0.8rem;
  color: #6b7785;
}

.nsi-irr-kpi-ico {
  font-size: 1.1rem;
}

.nsi-irr-atlas .nsi-irr-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 16px;
}

.nsi-irr-atlas .nsi-irr-steps > li {
  padding: 14px;
  border: 1px solid #eef2f6;
  border-radius: 12px;
  background: #f8fafc;
}

.nsi-irr-coords {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
  margin: 6px 0;
  color: #0b1b33;
}

.nsi-irr-distance {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.nsi-irr-footnote {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid #eef2f6;
  color: #6b7785;
  font-size: 0.85rem;
  line-height: 1.5;
}

.nsi-kv-grid--compact {
  margin-top: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
}

.nsi-irr-season-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 10px;
}

@media (max-width: 900px) {
  .nsi-irr-season-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.nsi-irr-season-grid > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nsi-irr-season-grid span {
  font-size: 0.75rem;
  color: #6b7785;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.nsi-irr-season-grid em {
  font-style: normal;
  color: #c45f0a;
  font-weight: 700;
}

.nsi-irr-insight p {
  margin: 0 0 14px;
  line-height: 1.55;
  color: #334155;
}

.nsi-chart {
  margin: 12px 0 8px;
}

.nsi-bars {
  --label-h: 24px;
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 4px;
  height: 220px;
  padding: 8px 2px var(--label-h);
  border-bottom: 1px solid #e4e9f0;
}

.nsi-bars-avg {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--label-h) + (100% - var(--label-h) - 8px) * var(--avg-pct, 0) / 100);
  border-top: 1.5px dashed #f5a623;
  z-index: 1;
  pointer-events: none;
}

.nsi-bar {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
}

.nsi-bar-track {
  flex: 1;
  position: relative;
  min-height: 0;
  width: 100%;
}

.nsi-bar-val {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.62rem;
  color: #64748b;
  white-space: nowrap;
  z-index: 3;
}

.nsi-bar-fill {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 28px;
  background: linear-gradient(180deg, #f7b84b 0%, #e8940f 100%);
  border-radius: 5px 5px 2px 2px;
  min-height: 2px;
}

.nsi-bar-lbl {
  height: var(--label-h);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 600;
}

.nsi-bars-unit {
  margin-top: 8px;
  font-size: 0.75rem;
  color: #6b7785;
}

.nsi-table--compact th,
.nsi-table--compact td {
  padding: 8px 6px;
  font-size: 0.78rem;
  text-align: center;
}

.nsi-table--compact th {
  text-transform: none;
  letter-spacing: 0;
}

/* ── Imagens do imóvel (hero + cards + viewer) ── */
.nsi-btn--danger {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.nsi-btn--danger:hover:not(:disabled) {
  background: #fecaca;
}

.nsi-asset-hero {
  margin: 8px 0 18px;
  padding: 16px;
  border: 1px solid #e4e9f0;
  border-radius: 14px;
  background: #f8fafc;
}

.nsi-asset-hero h4 {
  margin: 0 0 12px;
  font-size: 0.95rem;
  color: #0b1b33;
}

.nsi-asset-hero--empty {
  text-align: center;
  padding: 24px 16px;
}

.nsi-asset-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.8fr);
  gap: 16px;
  align-items: stretch;
}

@media (max-width: 820px) {
  .nsi-asset-hero-grid {
    grid-template-columns: 1fr;
  }
}

.nsi-asset-hero-media {
  position: relative;
  min-height: 220px;
  max-height: 360px;
  border-radius: 12px;
  overflow: hidden;
  background: #e8eef5;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  width: 100%;
  cursor: pointer;
  text-align: inherit;
  font: inherit;
  color: inherit;
}

.nsi-asset-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nsi-asset-hero-media.has-image .nsi-preview-loading,
.nsi-asset-card-media.has-image .nsi-thumb-placeholder,
.nsi-asset-viewer-canvas.has-image .nsi-preview-loading {
  display: none;
}

.nsi-asset-hero-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

.nsi-asset-hero-name {
  font-size: 0.92rem;
  color: #0b1b33;
  word-break: break-all;
}

.nsi-asset-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 3px 10px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.72rem;
  font-weight: 700;
}

.nsi-asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.nsi-gallery-split {
  display: grid;
  grid-template-columns: minmax(200px, 280px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 4px;
}

.nsi-gallery-pane {
  border: 1px solid #e4e9f0;
  border-radius: 14px;
  background: #f8fafc;
  padding: 12px;
  min-width: 0;
  max-height: min(78vh, 920px);
  overflow: auto;
}

.nsi-gallery-pane-head {
  margin-bottom: 4px;
}

.nsi-gallery-pane .nsi-gallery-toolbar {
  margin: 8px 0 12px;
}

.nsi-gallery-pane .nsi-chips {
  flex-wrap: wrap;
}

.nsi-asset-grid--list {
  grid-template-columns: 1fr;
  gap: 12px;
}

.nsi-preview-pane {
  min-width: 0;
  position: sticky;
  top: 12px;
}

.nsi-preview-pane .nsi-asset-inline-preview {
  margin: 0;
  height: 100%;
}

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

  .nsi-gallery-pane {
    max-height: none;
  }

  .nsi-preview-pane {
    position: static;
  }

  .nsi-asset-grid--list {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

.nsi-asset-card {
  border: 1px solid #e4e9f0;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 20px rgba(11, 27, 51, 0.04);
  cursor: pointer;
}

.nsi-asset-card--compact {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 12px;
  box-shadow: none;
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
}

.nsi-asset-card--compact .nsi-asset-card-media {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  aspect-ratio: auto;
  border-radius: 8px;
}

.nsi-asset-card--compact .nsi-asset-principal-pill {
  top: 4px;
  left: 4px;
  font-size: 0.58rem;
  padding: 2px 6px;
}

.nsi-asset-card-name {
  flex: 1;
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #0b1b33;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

.nsi-asset-card.is-primary {
  border-color: #93c5fd;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.18);
}

.nsi-asset-card.is-selected {
  border-color: #f5a623;
  background: #fffbeb;
  box-shadow: 0 0 0 2px rgba(245, 166, 35, 0.22);
}

.nsi-asset-inline-preview {
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid #e4e9f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(11, 27, 51, 0.04);
}

.nsi-asset-inline-preview--empty {
  text-align: center;
  padding: 28px 16px;
  background: #f8fafc;
}

.nsi-asset-inline-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.nsi-asset-inline-media {
  min-width: 0;
}

.nsi-asset-inline-data {
  min-width: 0;
  max-height: min(42vh, 420px);
  overflow: auto;
  padding-right: 4px;
}

@media (min-width: 1400px) {
  .nsi-asset-inline-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.9fr);
    gap: 16px;
  }

  .nsi-asset-inline-data {
    max-height: min(62vh, 560px);
  }
}

.nsi-asset-inline-data .nsi-asset-viewer-meta {
  margin-bottom: 12px;
}

.nsi-asset-inline-data .nsi-asset-meta-row {
  grid-template-columns: 140px 1fr;
  gap: 8px;
  font-size: 0.82rem;
  padding-bottom: 6px;
}

.nsi-asset-inline-data .nsi-asset-viewer-actions {
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), #fff 30%);
  padding-top: 10px;
}

.nsi-asset-inline-preview .nsi-asset-viewer-stage {
  background: #0f172a;
  min-height: 280px;
  max-height: min(48vh, 460px);
}

.nsi-asset-inline-preview .nsi-asset-viewer-canvas img {
  max-height: min(46vh, 440px);
}

@media (max-width: 960px) {
  .nsi-asset-inline-data {
    max-height: none;
  }
}

.nsi-asset-card-media {
  position: relative;
  aspect-ratio: 16 / 11;
  background: #e8eef5;
  overflow: hidden;
}

.nsi-asset-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nsi-asset-card-media .nsi-thumb-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}

.nsi-asset-principal-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: #7c3aed;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: 999px;
}

.nsi-asset-card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.nsi-asset-card-title {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 700;
  color: #0b1b33;
  font-size: 0.86rem;
}

.nsi-asset-card-title > span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nsi-icon-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
  color: #94a3b8;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
}

.nsi-icon-btn.is-on {
  color: #f59e0b;
}

.nsi-asset-card-meta {
  font-size: 0.78rem;
  color: #475569;
  display: grid;
  gap: 2px;
}

.nsi-asset-card-actions {
  display: grid;
  gap: 6px;
  margin-top: auto;
}

.nsi-asset-card-actions .nsi-btn {
  width: 100%;
  justify-content: center;
}

.nsi-asset-viewer {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: rgba(11, 27, 51, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.nsi-asset-viewer-panel {
  width: min(920px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  padding: 16px 18px 18px;
  box-shadow: 0 24px 64px rgba(11, 27, 51, 0.28);
}

.nsi-asset-viewer.is-fullscreen .nsi-asset-viewer-panel {
  width: min(1200px, 100%);
  background: #0b1220;
  color: #e2e8f0;
}

.nsi-asset-viewer.is-fullscreen .nsi-asset-viewer-head strong,
.nsi-asset-viewer.is-fullscreen .nsi-asset-zoom button {
  color: #e2e8f0;
}

.nsi-asset-viewer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.nsi-asset-viewer-stage {
  overflow: auto;
  border-radius: 12px;
  background: #0f172a;
  min-height: 280px;
  max-height: 52vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nsi-asset-viewer-canvas {
  position: relative;
  transform-origin: center center;
  transition: transform 0.12s ease;
  max-width: 100%;
}

.nsi-asset-viewer-canvas img {
  max-width: min(100%, 900px);
  max-height: 50vh;
  display: block;
  margin: 0 auto;
}

.nsi-asset-viewer.is-fullscreen .nsi-asset-viewer-canvas img {
  max-height: 70vh;
}

.nsi-asset-zoom {
  display: inline-flex;
  gap: 6px;
  margin: 10px 0 14px;
}

.nsi-asset-zoom button {
  min-width: 42px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #d7dee8;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
  color: #0b1b33;
}

.nsi-asset-viewer.is-fullscreen .nsi-asset-zoom button {
  background: #1e293b;
  border-color: #334155;
}

.nsi-asset-viewer-meta {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.nsi-asset-meta-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 0.86rem;
  padding-bottom: 8px;
  border-bottom: 1px solid #eef2f7;
}

.nsi-asset-meta-row > span {
  color: #64748b;
}

.nsi-asset-meta-row > strong {
  color: #0b1b33;
  font-weight: 600;
  word-break: break-word;
}

.nsi-asset-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.nsi-asset-tag {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nsi-asset-tag.tone-blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.nsi-asset-tag.tone-purple {
  background: #ede9fe;
  color: #6d28d9;
}

.nsi-asset-tag.tone-teal {
  background: #ccfbf1;
  color: #0f766e;
}

.nsi-asset-tag.tone-amber {
  background: #fef3c7;
  color: #b45309;
}

.nsi-asset-viewer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 640px) {
  .nsi-asset-meta-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .nsi-asset-viewer {
    padding: 10px;
  }
}

/* ── Insumos de Aquisição ── */
.nsi-acq {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid #e4e9f0;
}

.nsi-acq-head {
  margin-bottom: 14px;
}

.nsi-acq-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.nsi-acq-card {
  border: 1px solid #e4e9f0;
  border-radius: 12px;
  background: #fff;
  padding: 12px 14px;
  display: grid;
  gap: 4px;
  font-size: 0.8rem;
  color: #475569;
  box-shadow: 0 6px 16px rgba(11, 27, 51, 0.04);
}

.nsi-acq-card strong {
  color: #0b1b33;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.nsi-acq-status span {
  color: #059669;
  font-weight: 700;
}

.nsi-acq-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.nsi-acq-stats > div,
.nsi-acq-stats-meta {
  background: #f8fafc;
  border: 1px solid #e4e9f0;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nsi-acq-stats span {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nsi-acq-stats strong {
  color: #0b1b33;
  font-size: 0.9rem;
  font-weight: 700;
  word-break: break-word;
}

.nsi-acq-stats-meta {
  grid-column: 1 / -1;
}

.nsi-acq-subtitle {
  margin: 0 0 10px;
  font-size: 0.92rem;
  color: #0b1b33;
}

.nsi-acq-table {
  width: 100%;
  margin-bottom: 16px;
}

.nsi-acq-table th {
  text-align: left;
}

.nsi-acq-table td {
  text-align: left;
  font-size: 0.8rem;
}

.nsi-acq-table code {
  font-size: 0.78rem;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 6px;
}

.nsi-acq-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #e4e9f0;
  background: #0b1b33;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 700;
}

.nsi-acq-toggle-left,
.nsi-acq-toggle-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nsi-acq-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: #94a3b8;
}

.nsi-acq-dot--ok {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

.nsi-acq-cache {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  background: #334155;
  color: #fde68a;
  font-size: 0.7rem;
  font-weight: 700;
}

.nsi-acq-toggle-status {
  color: #86efac;
  font-size: 0.8rem;
  font-weight: 600;
}

.nsi-acq-history {
  margin-top: 12px;
  border: 1px solid #e4e9f0;
  border-radius: 12px;
  padding: 14px;
  background: #fff;
}

.nsi-acq-log {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.nsi-acq-log-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
}

.nsi-acq-log-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  background: #ecfdf5;
  color: #059669;
}

.nsi-acq-log-item--file .nsi-acq-log-ico {
  background: #eff6ff;
  color: #2563eb;
}

@media (max-width: 720px) {
  .nsi-acq-stats {
    grid-template-columns: 1fr;
  }
}

/* ── Concessionárias (NSI-516) ── */
.nsi-util-filters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}

.nsi-util-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #e4e9f0;
}

.nsi-util-uf-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}

.nsi-util-uf {
  display: inline-flex;
  min-width: 28px;
  justify-content: center;
  padding: 2px 6px;
  border-radius: 999px;
  background: #e8eef8;
  color: #1e5aa8;
  font-size: 0.7rem;
  font-weight: 700;
}

.nsi-util-uf--more {
  background: #f1f5f9;
  color: #64748b;
}

.nsi-util-table tbody tr.nsi-util-row {
  cursor: pointer;
}

.nsi-util-table tbody tr.nsi-util-row:hover {
  background: #f8fafc;
}

.nsi-linkish {
  border: 0;
  background: transparent;
  color: #1e5aa8;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-right: 10px;
  text-decoration: underline;
}

.nsi-util-cols {
  position: relative;
}

.nsi-util-cols-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;
  background: #fff;
  border: 1px solid #e4e9f0;
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 8px;
  min-width: 200px;
  box-shadow: 0 12px 32px rgba(11, 27, 51, 0.12);
}

.nsi-util-cols-panel label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #334155;
}

.nsi-util-detail-head {
  align-items: flex-start;
}

.nsi-util-detail-title {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 6px;
}

.nsi-util-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 6px;
}

.nsi-util-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.nsi-util-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
}

.nsi-util-field input,
.nsi-util-field select,
.nsi-util-field textarea {
  font: inherit;
  font-weight: 500;
  color: #0b1b33;
  border: 1px solid #d7dee8;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}

.nsi-util-field input:disabled,
.nsi-util-field select:disabled,
.nsi-util-field textarea:disabled {
  background: #f8fafc;
  color: #64748b;
}

.nsi-util-checks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
  margin: 8px 0 14px;
}

.nsi-util-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e4e9f0;
  border-radius: 8px;
  padding: 8px 10px;
}

.nsi-util-voltage-custom {
  display: flex;
  gap: 8px;
  margin: 8px 0 16px;
  max-width: 360px;
}

.nsi-util-voltage-custom input {
  flex: 1;
  border: 1px solid #d7dee8;
  border-radius: 10px;
  padding: 10px 12px;
}
