/* parametros.css - Estilos y diseño para el módulo Tarifario */

#tarifasSection .table-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

.tarifas-table {
  width: 100% !important;
  min-width: 100% !important;
  table-layout: auto;
  border-collapse: collapse;
}

.tarifas-table th,
.tarifas-table td {
  padding: 12px 16px;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}

.tarifas-table td.col-cargo {
  white-space: normal;
  max-width: 280px;
  line-height: 1.35;
}

.tarifas-table td.col-estamento {
  white-space: normal;
  max-width: 200px;
  font-weight: 600;
  color: #0f172a;
  font-size: 12.5px;
}

.tarifas-table td.col-jornada,
.tarifas-table td.col-unidad,
.tarifas-table td.col-valor,
.tarifas-table td.col-estado,
.tarifas-table td.col-acciones {
  white-space: nowrap;
}

.tarifas-table td.col-valor {
  font-family: monospace;
  font-size: 14px;
  font-weight: 700;
  color: #047857;
  text-align: right;
}

/* Columna Estado y Badges */
.tarifas-table th.col-estado,
.tarifas-table td.col-estado {
  text-align: center;
  width: 100px;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.2;
}

.badge-status.badge-active {
  background: #ecfdf5;
  color: #065f46;
  border: none;
}

.badge-status.badge-active::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
}

.badge-status.badge-inactive {
  background: #f1f5f9;
  color: #64748b;
  border: none;
}

.badge-status.badge-inactive::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94a3b8;
}

.tarifas-table td.col-acciones {
  text-align: right;
  white-space: nowrap;
}

.tarifas-table td.col-acciones .table-actions-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.btn.soft-warning {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.btn.soft-warning:hover {
  background: #ffedd5;
  color: #9a3412;
  border-color: #fdba74;
}

.btn.soft-danger {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fee2e2;
}

.btn.soft-danger:hover {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

.btn.soft-success {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #dcfce7;
}

.btn.soft-success:hover {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}

tr.tarifa-inactiva {
  background: #fafafa;
}

tr.tarifa-inactiva td.col-estamento,
tr.tarifa-inactiva td.col-cargo strong {
  color: #64748b;
}

tr.tarifa-inactiva td.col-valor {
  color: #94a3b8;
}

.concept-label {
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13.5px;
  color: #0f172a;
}

.current-price-label {
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 15px;
  color: #047857;
}

/* ==========================================================================
   Alineación Simétrica y Reemplazo In-Place para Modales de Tarifa
   ========================================================================== */
#modalCrearTarifa .form-grid,
#modalEditarTarifa .form-grid {
  align-items: start;
}

#modalCrearTarifa .field,
#modalEditarTarifa .field {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
}

.field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 20px;
}

.field-label-row label {
  margin: 0;
  line-height: 1.2;
}

.btn-link-action {
  background: none;
  border: none;
  padding: 0;
  font-size: 11.5px;
  color: #0284c7;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.15s ease;
  line-height: 1;
}

.btn-link-action:hover {
  color: #0369a1;
}

.control-wrap {
  position: relative;
  width: 100%;
}

.input-with-action {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-with-action input {
  width: 100%;
  padding-right: 36px;
}

.btn-clear-inline {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
}

.btn-clear-inline:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #94a3b8;
}

/* En resoluciones de escritorio normales, evitar scrollbar horizontal */
@media (min-width: 900px) {
  #tarifasSection .table-wrap {
    overflow-x: hidden;
  }
}
