/* ── categoria-form ── estilo unificado (referencia: redactor-form) ── */

.cat-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Errores globales ── */
.cat-errors {
  padding: 10px 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 7px;
  color: #7f1d1d;
  font-size: 0.84rem;
}

/* ── Grupos de campo ── */
.cat-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cat-label {
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #5A6478;
}
.dark .cat-label { color: #9ca3af; }

.cat-required { color: #ef4444; }
.cat-error    { font-size: 0.72rem; color: #ef4444; margin: 0; }
.cat-hint     { font-size: 0.72rem; color: #9ca3af; }

/* ── Inputs ── */
.cat-wrap input[type="text"],
.cat-wrap textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #DDE2EC;
  border-radius: 8px;
  font-size: 0.9rem;
  background: #fff;
  color: #1A1F2E;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
  font-family: inherit;
  resize: vertical;
}
.cat-wrap input[type="text"]:focus,
.cat-wrap textarea:focus {
  border-color: #0099BB;
  box-shadow: 0 0 0 3px rgba(0,153,187,.12);
}
.dark .cat-wrap input[type="text"],
.dark .cat-wrap textarea {
  background: #111827;
  border-color: #374151;
  color: #f3f4f6;
}

/* ── Toggle activa ── */
.cat-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  user-select: none;
}
.dark .cat-toggle { color: #d1d5db; }

.cat-toggle input[type="checkbox"] {
  width: 36px;
  height: 20px;
  appearance: none;
  background: #d1d5db;
  border-radius: 20px;
  position: relative;
  cursor: pointer;
  transition: background .2s;
  flex-shrink: 0;
}
.cat-toggle input[type="checkbox"]::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.cat-toggle input[type="checkbox"]:checked        { background: #0099BB; }
.cat-toggle input[type="checkbox"]:checked::after { transform: translateX(16px); }

/* ── Meta slug ── */
.cat-meta {
  font-size: 0.69rem;
  color: #9ca3af;
  padding-top: 4px;
}
.cat-meta code {
  font-size: 0.69rem;
  background: #f3f4f6;
  padding: 1px 5px;
  border-radius: 4px;
  color: #374151;
}
.dark .cat-meta code { background: #374151; color: #d1d5db; }

/* ── Acciones (siempre al fondo) ── */
.cat-actions {
  display: flex;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid #DDE2EC;
}
.dark .cat-actions { border-color: #374151; }

.cat-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity .15s, background .15s;
  text-decoration: none;
  line-height: 1;
}
.cat-btn--primary { background: #0099BB; color: #fff; }
.cat-btn--primary:hover { opacity: .88; }
.cat-btn--ghost {
  background: transparent;
  color: #6b7280;
  border: 1px solid #DDE2EC;
}
.cat-btn--ghost:hover { background: #f9fafb; color: #374151; }
.dark .cat-btn--ghost { border-color: #374151; color: #9ca3af; }
.dark .cat-btn--ghost:hover { background: #374151; color: #d1d5db; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .cat-wrap { padding: 16px 14px; }
  .cat-actions { flex-direction: column; }
  .cat-btn { width: 100%; }
}