/* Vista Negocios — layout referencia Panel VELION */

.negocios-view {
  max-width: 1280px;
  margin: 0 auto;
}

.negocios-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.negocios-title {
  margin: 0 0 6px;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.02em;
}

.negocios-sub {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-sub);
  line-height: 1.45;
  max-width: 520px;
}

.btn-nuevo-neg {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Métricas 4 cards */
.negocios-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

@media (max-width: 1100px) {
  .negocios-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .negocios-metrics {
    grid-template-columns: 1fr;
  }
}

.neg-metric-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(212, 169, 106, 0.2);
  background: var(--card, #242018);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.28);
}

.neg-metric-ico {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(212, 169, 106, 0.12);
  border: 1px solid rgba(212, 169, 106, 0.28);
  color: var(--gold);
}

.neg-metric-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.neg-metric-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted, var(--text-sub));
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.neg-metric-val {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--velion-gold, var(--gold));
  line-height: 1.1;
}

.neg-metric-sub {
  font-size: 0.78rem;
  color: var(--text-muted, var(--text-sub));
  margin-top: 2px;
}

/* Toolbar */
.negocios-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.neg-search-wrap {
  flex: 1;
  min-width: 200px;
  max-width: 320px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: rgba(20, 18, 14, 0.65);
}

.neg-search-ico {
  color: var(--gold);
  opacity: 0.85;
  display: flex;
}

.neg-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.88rem;
  outline: none;
}

.neg-search-input::placeholder {
  color: var(--text-sub);
}

.neg-toolbar-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  flex: 1;
  justify-content: flex-end;
}

.neg-select {
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: rgba(20, 18, 14, 0.75);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  min-width: 140px;
}

.neg-select--sort {
  min-width: 200px;
}

.neg-view-toggle {
  display: flex;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  overflow: hidden;
}

.neg-view-btn {
  width: 40px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(20, 18, 14, 0.5);
  color: var(--text-sub);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.neg-view-btn:hover {
  color: var(--gold);
  background: rgba(212, 169, 106, 0.08);
}

.neg-view-btn.is-active {
  background: rgba(212, 169, 106, 0.18);
  color: var(--gold);
}

/* Tabla negocios */
.negocios-table-card {
  background: linear-gradient(180deg, rgba(36, 32, 24, 0.55), rgba(13, 13, 13, 0.35));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.data-table--negocios th {
  color: var(--gold);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom-color: rgba(212, 169, 106, 0.2);
}

.data-table--negocios .neg-id-code {
  font-size: 0.8rem;
  color: var(--text-sub);
}

.badge-trial--gold {
  background: rgba(212, 169, 106, 0.14) !important;
  color: var(--gold) !important;
  border: 1px solid rgba(212, 169, 106, 0.25);
}

.data-table--negocios .th-actions {
  min-width: 200px;
  text-align: right;
}

.data-table--negocios td:last-child {
  overflow: visible;
  min-width: 188px;
}

.neg-actions-ico {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.neg-ico-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(212, 169, 106, 0.35);
  background: rgba(13, 13, 13, 0.45);
  color: var(--gold);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.neg-ico-btn:hover {
  background: rgba(212, 169, 106, 0.12);
  border-color: var(--gold);
}

.neg-ico-btn--danger {
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}

.neg-ico-btn--danger:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--danger);
  color: #fecaca;
}

/* Eliminar: btn-danger en círculo compacto (emoji 🗑️) */
.neg-ico-btn.btn-danger {
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  color: #fff;
  border-color: rgba(220, 38, 38, 0.75);
  background: linear-gradient(180deg, #f87171 0%, #dc2626 100%);
}
.neg-ico-btn.btn-danger:hover {
  filter: brightness(1.06);
  color: #fff;
  border-color: rgba(248, 113, 113, 0.95);
}

.neg-ico-btn--success {
  border-color: rgba(34, 197, 94, 0.45);
  color: #86efac;
}

.neg-ico-btn--success:hover {
  background: rgba(34, 197, 94, 0.12);
  border-color: var(--success);
}

.neg-ult-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text);
}

.neg-conn-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.55);
  flex-shrink: 0;
}

.neg-conn-dot--off {
  background: rgba(154, 150, 140, 0.45);
  box-shadow: none;
}

/* Grid cards */
.negocios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.neg-card {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: linear-gradient(145deg, rgba(36, 32, 24, 0.9), rgba(18, 16, 12, 0.85));
}

.neg-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.neg-card-name {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--text);
}

.neg-card-meta {
  margin: 0 0 6px;
  font-size: 0.8rem;
  color: var(--text-sub);
}

.neg-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  justify-content: flex-end;
}

/* Paginación */
.negocios-pagination {
  margin-top: 16px;
  padding: 12px 4px 0;
}

.neg-pag-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.neg-pag-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.neg-pag-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background: rgba(20, 18, 14, 0.65);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.neg-pag-btn:hover:not(:disabled) {
  border-color: rgba(212, 169, 106, 0.45);
  color: var(--gold);
}

.neg-pag-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.neg-pag-btn.is-current {
  background: rgba(212, 169, 106, 0.22);
  border-color: var(--gold);
  color: var(--gold);
}

.neg-pag-gap {
  padding: 0 4px;
  color: var(--text-sub);
  font-size: 0.9rem;
}

.neg-pag-range {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-sub);
  flex: 1;
  text-align: center;
  min-width: 200px;
}

.neg-pag-size .neg-select {
  min-width: auto;
}
