/* ══════════════════════════════
   COMPONENTS — shared across pages
══════════════════════════════ */

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  text-align: center;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--text-primary);
  color: #111;
}

.btn-primary:hover {
  background: #d4d4d4;
}

.btn-primary:disabled,
.btn-primary[disabled] {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: var(--bg-hover);
  border-color: rgba(255,255,255,0.25);
}

.btn-outline:disabled,
.btn-outline[disabled] {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-danger {
  background: var(--accent);
  color: #fff;
}

.btn-danger:hover {
  background: var(--accent-hover);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
}

/* ── Inputs & Selects ── */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-control,
.form-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition);
  -webkit-appearance: none;
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(255, 255, 255, 0.25);
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

.form-select option {
  background: var(--bg-input);
  color: var(--text-primary);
}

textarea.form-control {
  resize: vertical;
  min-height: 90px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.5;
}

/* ── Status badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  gap: 5px;
}

.badge-green  { background: rgba(74, 222, 128, 0.12); color: var(--green); }
.badge-yellow { background: rgba(251, 191, 36, 0.12);  color: var(--yellow); }
.badge-orange { background: rgba(249, 115, 22, 0.12);  color: var(--orange); }
.badge-blue   { background: rgba(96, 165, 250, 0.12);  color: var(--blue); }
.badge-red    { background: rgba(248, 113, 113, 0.12); color: var(--red); }

/* ── Row actions ── */
.status-select {
  background: transparent;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  padding: 3px 4px;
  border-radius: 20px;
}

.status-select.green  { color: var(--green);  background: rgba(74, 222, 128, 0.12); }
.status-select.yellow { color: var(--yellow); background: rgba(251, 191, 36, 0.12); }
.status-select.orange { color: var(--orange); background: rgba(249, 115, 22, 0.12); }
.status-select.red    { color: var(--red);    background: rgba(248, 113, 113, 0.12); }

.status-select option { background: #1c1c1c; color: var(--text-primary); }

/* ══════════════════════════════════════════════════════════
   ALERTAS / MODALES PERSONALIZADAS  (showAlerta / showConfirmar)
══════════════════════════════════════════════════════════ */

.ps-alert-overlay {
  position: fixed;
  inset: 0;
  background: var(--modal-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(2px);
}
.ps-alert-overlay.ps-alert-visible { opacity: 1; }

.ps-alert-modal {
  background: var(--bg-modal);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px 28px 24px;
  max-width: 380px;
  width: calc(100% - 48px);
  text-align: center;
  box-shadow: var(--modal-shadow);
  transform: scale(0.92);
  transition: transform 0.2s ease;
}
.ps-alert-overlay.ps-alert-visible .ps-alert-modal { transform: scale(1); }

.ps-alert-icon   { margin-bottom: 14px; }
.ps-alert-titulo {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.ps-alert-msg {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 22px;
}

.ps-alert-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.ps-alert-btn {
  padding: 8px 24px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: opacity 0.15s;
  border: 1.5px solid;
  background: transparent;
}
.ps-alert-btn:hover { opacity: 0.8; }

.ps-alert-btn-cancel {
  border-color: var(--border);
  color: var(--text-secondary);
}
.ps-alert-btn-confirm {
  border-color: var(--accent);
  color: var(--accent);
}

/* ══════════════════════════════════════════════════════════════════════════════
   TOOLTIP — [data-tip="texto"]
   La lógica de posicionamiento está en main.js (tooltip JS global).
   Este bloque solo define el cursor para indicar que hay tooltip.
══════════════════════════════════════════════════════════════════════════════ */
[data-tip] {
  cursor: default;
}
