/* ============================================
   ADMIN CORPORATIVO v2 — admin.css
   Tema claro, limpio, profesional
   ============================================ */

@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --white: #ffffff;
  --bg: #f4f6f9;
  --bg2: #eef1f6;
  --border: #dde2ec;
  --border2: #c8d0df;
  --text: #1a2035;
  --text2: #3d4a63;
  --muted: #7a879f;
  --accent: #1d4ed8;
  --accent-h: #1e40af;
  --accent-lt: #eff4ff;
  --green: #059669;
  --green-lt: #ecfdf5;
  --gold: #d97706;
  --gold-lt: #fffbeb;
  --red: #dc2626;
  --red-lt: #fef2f2;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.07);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
  --ff: "Plus Jakarta Sans", system-ui, sans-serif;
  --ease: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

html,
body {
  height: 100%;
}
body {
  font-family: var(--ff);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ══ LOGIN ══════════════════════════════ */
#login-screen {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f2a6e 0%, #1d4ed8 55%, #2563eb 100%);
  z-index: 1000;
}
#login-screen.visible {
  display: flex;
}

.login-card {
  background: var(--white);
  border-radius: 24px;
  padding: 44px 40px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
}
.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 6px;
}
.login-logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-logo-icon svg {
  width: 22px;
  height: 22px;
  stroke: #fff;
  fill: none;
  stroke-width: 1.5;
}
.login-logo-text {
  font-weight: 800;
  font-size: 20px;
  color: var(--text);
}
.login-logo-text span {
  color: var(--accent);
}
.login-sub {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 28px;
}

/* ══ FORM FIELDS ════════════════════════ */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 16px;
}
.form-field label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-family: var(--ff);
  outline: none;
  transition:
    border-color var(--ease),
    box-shadow var(--ease);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--accent);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}
.form-field textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}
.form-field select {
  appearance: none;
  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='%237a879f' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-right: 34px;
}
.field-hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
  margin-top: 4px;
}
.required {
  color: var(--red);
}

/* ══ BOTONES ════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--ff);
  cursor: pointer;
  border: none;
  transition: var(--ease);
  white-space: nowrap;
  text-decoration: none;
  background: transparent;
}
.btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.28);
}
.btn-primary:hover {
  background: var(--accent-h);
  transform: translateY(-1px);
}
.btn-outline {
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--text2);
}
.btn-outline:hover {
  background: var(--bg2);
  border-color: var(--border2);
}
.btn-ghost {
  background: transparent;
  color: var(--text2);
}
.btn-ghost:hover {
  background: var(--bg2);
}
.btn-danger {
  background: var(--red-lt);
  border: 1px solid rgba(220, 38, 38, 0.2);
  color: var(--red);
}
.btn-danger:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}
.btn-block {
  width: 100%;
  justify-content: center;
  padding: 11px;
  font-size: 14px;
}

/* ══ APP LAYOUT ═════════════════════════ */
#admin-app {
  display: none;
  min-height: 100vh;
}
#admin-app.visible {
  display: block;
}

.admin-topbar {
  height: 64px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 200;
}
.topbar-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}
.topbar-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.topbar-logo-icon svg {
  width: 17px;
  height: 17px;
  stroke: #fff;
  fill: none;
  stroke-width: 1.5;
}
.topbar-logo-text {
  font-weight: 800;
  font-size: 16px;
  color: var(--text);
}
.topbar-logo-text span {
  color: var(--accent);
}
.topbar-logo-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--accent-lt);
  color: var(--accent);
  padding: 2px 7px;
  border-radius: 5px;
}

.topbar-nav {
  display: flex;
  gap: 2px;
  flex: 1;
  justify-content: center;
}
.nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: var(--ease);
  background: transparent;
  border: none;
  font-family: var(--ff);
  white-space: nowrap;
}
.nav-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}
.nav-btn:hover {
  color: var(--text);
  background: var(--bg2);
}
.nav-btn.active {
  color: var(--accent);
  background: var(--accent-lt);
}
.topbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.admin-main {
  padding: 28px clamp(16px, 3vw, 40px);
}

/* ══ SECCIONES ══════════════════════════ */
.adm-section {
  display: none;
  animation: fade-up 0.22s ease;
}
.adm-section.active {
  display: block;
}
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-title {
  font-weight: 800;
  font-size: 22px;
  color: var(--text);
  letter-spacing: -0.3px;
}
.page-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}

/* ══ STATS ══════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}
.stat-info {
  flex: 1;
}
.stat-val {
  font-weight: 800;
  font-size: 28px;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1;
}
.stat-label {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}

.dash-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.dash-link {
  padding: 10px 18px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--text2);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--ff);
  cursor: pointer;
  transition: var(--ease);
  box-shadow: var(--shadow-sm);
}
.dash-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-lt);
}

/* ══ TABLA ══════════════════════════════ */
.table-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}
thead {
  background: var(--bg);
}
th {
  padding: 11px 15px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}
td {
  padding: 12px 15px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text2);
}
tr:last-child td {
  border-bottom: none;
}
tr:hover td {
  background: rgba(29, 78, 216, 0.02);
}
.td-empty {
  text-align: center;
  color: var(--muted);
  padding: 40px !important;
  font-size: 14px;
}
.td-title {
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
}
.td-actions {
  white-space: nowrap;
  vertical-align: middle;
}

.td-actions .btn {
  margin-right: 6px;
}

.td-actions .btn:last-child {
  margin-right: 0;
}
.cover-thumb {
  width: 56px;
  height: 38px;
  object-fit: cover;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg2);
  display: block;
}
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
}
.badge-active {
  background: var(--green-lt);
  color: var(--green);
  border: 1px solid rgba(5, 150, 105, 0.18);
}
.badge-draft {
  background: var(--gold-lt);
  color: var(--gold);
  border: 1px solid rgba(217, 119, 6, 0.18);
}

/* ══ CONFIGURACIÓN ══════════════════════ */
.config-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  align-items: start;
}
.config-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.config-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.config-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.config-card-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}
.config-card-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}
.config-card-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.config-save-row {
  grid-column: 1/-1;
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

/* ══ OVERLAY / MODAL ════════════════════ */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(15, 25, 50, 0.45);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.overlay.open {
  display: flex;
}
.modal-box {
  background: var(--white);
  border-radius: 18px;
  width: 100%;
  max-width: 700px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-header-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent-lt);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.modal-header-icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}
.modal-header h3 {
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
}
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--ease);
  flex-shrink: 0;
}
.modal-close svg {
  width: 15px;
  height: 15px;
  stroke: var(--muted);
  fill: none;
  stroke-width: 2;
}
.modal-close:hover {
  background: var(--bg2);
}
.modal-close:hover svg {
  stroke: var(--text);
}

.modal-body {
  padding: 22px;
  overflow-y: auto;
  overflow-x: visible;
  flex: 1;
  min-height: 0;
}
.modal-body::-webkit-scrollbar {
  width: 4px;
}
.modal-body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.rich-editor-shell {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: visible;
  background: var(--white);
}

.rich-editor-textarea {
  width: 100%;
  min-height: 320px;
  resize: vertical;
  border: 0;
  padding: 14px 16px;
  font: inherit;
  color: var(--text);
  background: transparent;
}

.rich-editor-textarea:focus {
  outline: none;
}

.tox-tinymce {
  border: 0 !important;
  border-radius: 14px !important;
}

.tox .tox-menubar {
  display: none !important;
}

.tox-tinymce-aux,
.tox-silver-sink,
.moxman-window,
.tam-assetmanager-root {
  z-index: 10050 !important;
}

.tox .tox-collection,
.tox .tox-menu,
.tox .tox-listboxfield .tox-listbox--select,
.tox .tox-pop {
  z-index: 10060 !important;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  border-radius: 0 0 18px 18px;
  flex-shrink: 0;
}

.modal-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  margin-bottom: 10px;
}

/* ══ FORM GRID ══════════════════════════ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-grid .col-full {
  grid-column: 1/-1;
}

/* ══ PRECIOS ════════════════════════════ */
.prices-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.price-group {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}
.price-group-header {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text2);
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.price-group-header svg {
  width: 14px;
  height: 14px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}
.price-row-field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.price-row-field:last-child {
  margin-bottom: 0;
}
.price-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  min-width: 70px;
}
.input-pw {
  position: relative;
  flex: 1;
}
.input-pw-prefix {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  pointer-events: none;
}
.input-pw input {
  width: 100%;
  padding: 8px 10px 8px 26px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-family: var(--ff);
  outline: none;
  transition: var(--ease);
}
.input-pw input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}

/* ══ OPCIONES ═══════════════════════════ */
.options-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.toggle-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.toggle-lbl-text {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
}
.toggle-switch {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  position: relative;
  width: 42px;
  height: 24px;
}
.toggle-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--border2);
  border-radius: 12px;
  transition: background 0.2s;
}
.toggle-track::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 3px;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.toggle-switch input:checked + .toggle-track {
  background: var(--accent);
}
.toggle-switch input:checked + .toggle-track::after {
  transform: translateX(18px);
}
.toggle-hint {
  font-size: 11px;
  color: var(--muted);
}

/* ══ INFO BANNER ════════════════════════ */
.info-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--accent-lt);
  border: 1px solid rgba(29, 78, 216, 0.2);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
}
.info-banner svg {
  width: 16px;
  height: 16px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ══ DROPZONE ═══════════════════════════ */
.dropzone {
  border: 2px dashed var(--border2);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
  margin-bottom: 12px;
}
.dropzone input {
  display: none;
}
.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-lt);
}
.dropzone-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}
.dropzone-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}
.dropzone-text {
  font-size: 14px;
  color: var(--text2);
  font-weight: 500;
}
.dropzone-text strong {
  color: var(--accent);
}
.dropzone-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 9px;
  margin-top: 12px;
}
.media-item {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 9px;
  overflow: hidden;
  background: var(--bg2);
  border: 2.5px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s;
}
.media-item.dragging {
  opacity: 0.55;
  border-style: dashed;
}
.media-item.cover {
  border-color: var(--accent);
}
.media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.media-type-ic {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 10px;
  border-radius: 4px;
  padding: 2px 5px;
  z-index: 1;
}
.media-del-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--red);
  border: none;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 2;
}
.media-item:hover .media-del-btn {
  display: flex;
}
.media-cover-ic {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(29, 78, 216, 0.85), transparent);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 5px 6px 4px;
  display: none;
}
.media-item.cover .media-cover-ic {
  display: block;
}
.media-sort-handle {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  letter-spacing: -1px;
  cursor: grab;
  user-select: none;
}
.media-item:active .media-sort-handle {
  cursor: grabbing;
}

.video-add-row {
  margin-top: 16px;
}
.video-add-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 8px;
}
.video-add-label svg {
  width: 14px;
  height: 14px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
}
.video-input-row {
  display: flex;
  gap: 8px;
}
.video-input-row input {
  flex: 1;
  padding: 9px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 13px;
  font-family: var(--ff);
  outline: none;
  transition: var(--ease);
}
.video-input-row input:focus {
  border-color: var(--accent);
  background: var(--white);
}

/* ══ CATEGORÍA MODAL ════════════════════ */
.color-picker-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.color-picker-row input[type="color"] {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  padding: 3px;
  background: var(--white);
}
.color-swatches {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.swatch {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition:
    transform 0.15s,
    border-color 0.15s;
}
.swatch:hover {
  transform: scale(1.15);
}
.swatch.active {
  border-color: #1a2035;
  box-shadow: 0 0 0 2px var(--white) inset;
}
.cat-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.cat-badge-preview {
  display: inline-block;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 6px;
}
.cat-preview-hint {
  font-size: 12px;
  color: var(--muted);
}

/* ══ RESPONSIVE ═════════════════════════ */
@media (max-width: 768px) {
  .admin-topbar {
    padding: 0 14px;
  }
  .topbar-nav {
    display: none;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .col-full {
    grid-column: 1;
  }
  .prices-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .config-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .admin-main {
    padding: 16px;
  }
  .stat-card {
    padding: 14px;
    gap: 12px;
  }
  .stat-val {
    font-size: 24px;
  }
  .options-row {
    flex-direction: column;
  }
  .page-header {
    flex-direction: column;
    align-items: stretch;
  }
  .page-header .btn {
    align-self: flex-start;
  }
  .td-actions {
    white-space: normal;
  }
  .td-actions .btn {
    width: 100%;
    justify-content: center;
    margin-right: 0;
    margin-bottom: 6px;
  }
  .td-actions .btn:last-child {
    margin-bottom: 0;
  }
}
