/**
 * Lumi CMS — Panel de administración
 * Estilo profesional tipo Shopify / PrestaShop
 */
:root {
  --admin-sidebar: oklch(22% 0.02 250);
  --admin-sidebar-hover: oklch(28% 0.025 250);
  --admin-sidebar-text: oklch(75% 0.01 250);
  --admin-sidebar-active: oklch(95% 0.005 250);
  --admin-topbar: oklch(100% 0 0);
  --admin-bg: oklch(97% 0.004 250);
  --admin-border: oklch(90% 0.006 250);
  --admin-accent: oklch(52% 0.10 55);
  --admin-success: oklch(52% 0.14 145);
  --admin-danger: oklch(52% 0.18 25);
  --admin-sidebar-w: 260px;
  --admin-sidebar-collapsed: 72px;
  --admin-content-pad-x: 20px;
  --admin-content-pad-y: 16px;
  --admin-topbar-h: 53px;
}

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

html, body {
  height: 100%;
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color: oklch(20% 0.015 250);
  background: var(--admin-bg);
  -webkit-font-smoothing: antialiased;
}

.admin-shell { display: flex; width: 100%; min-height: 100vh; min-width: 0; }
.admin-shell--collapsed { --admin-sidebar-w: var(--admin-sidebar-collapsed); }

/* Sidebar */
.admin-sidebar {
  width: var(--admin-sidebar-w);
  background: var(--admin-sidebar);
  color: var(--admin-sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width 0.2s ease;
}

.admin-sidebar__toggle {
  position: absolute;
  top: 18px;
  right: 12px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: oklch(30% 0.02 250);
  color: var(--admin-sidebar-text);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 14px;
  z-index: 2;
}
.admin-sidebar__toggle:hover { background: var(--admin-sidebar-hover); color: #fff; }

.admin-shell--collapsed .admin-brand span,
.admin-shell--collapsed .admin-nav-label,
.admin-shell--collapsed .admin-nav a span,
.admin-shell--collapsed .admin-sidebar-footer span,
.admin-shell--collapsed .admin-logout { display: none; }
.admin-shell--collapsed .admin-nav a { justify-content: center; padding: 10px; }
.admin-shell--collapsed .admin-brand h1 { font-size: 0; }
.admin-shell--collapsed .admin-brand h1::first-letter { font-size: 18px; }

.admin-brand {
  padding: 20px 20px 16px;
  border-bottom: 1px solid oklch(30% 0.02 250);
}

.admin-brand h1 {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
}

.admin-brand span {
  font-size: 11px;
  color: oklch(55% 0.02 250);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: block;
  margin-top: 2px;
}

.admin-nav { padding: 12px 0; flex: 1; }

.admin-nav-group { margin-bottom: 8px; }

.admin-nav-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: oklch(50% 0.02 250);
  padding: 8px 20px 4px;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: var(--admin-sidebar-text);
  text-decoration: none;
  font-size: 14px;
  transition: background 0.12s;
}

.admin-nav a:hover { background: var(--admin-sidebar-hover); color: #fff; }
.admin-nav a.active { background: var(--admin-sidebar-hover); color: var(--admin-sidebar-active); font-weight: 500; }

.admin-nav a svg { width: 18px; height: 18px; opacity: 0.7; flex-shrink: 0; }

.admin-sidebar-footer {
  margin-top: auto;
  padding: 16px 20px;
  border-top: 1px solid oklch(30% 0.02 250);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-sidebar-footer a { color: var(--admin-sidebar-text); text-decoration: none; }
.admin-sidebar-footer a:hover { color: #fff; }

.admin-logout {
  background: transparent;
  border: 1px solid oklch(40% 0.02 250);
  color: var(--admin-sidebar-text);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}
.admin-logout:hover { background: var(--admin-sidebar-hover); color: #fff; }

/* Main */
.admin-main {
  flex: 1 1 auto;
  width: 0;
  min-width: 0;
  margin-left: var(--admin-sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  transition: margin-left 0.2s ease;
}

.admin-topbar {
  background: var(--admin-topbar);
  border-bottom: 1px solid var(--admin-border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0;
}

.admin-topbar h2 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }

.admin-topbar-actions { display: flex; gap: 8px; align-items: center; }

.admin-content {
  padding: var(--admin-content-pad-y) var(--admin-content-pad-x) 24px;
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 0;
  max-width: none;
  overflow-y: auto;
}

.admin-content--full {
  padding: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Cards & stats */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.admin-stat {
  background: #fff;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 20px;
}

.admin-stat__label {
  font-size: 12px;
  color: oklch(50% 0.01 250);
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}

.admin-stat__value {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Table */
.admin-card {
  background: #fff;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  overflow: hidden;
}

.admin-card__head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-card__head h3 { font-size: 15px; font-weight: 600; }

.admin-table { width: 100%; border-collapse: collapse; }

.admin-table th {
  text-align: left;
  padding: 10px 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: oklch(50% 0.01 250);
  background: oklch(98% 0.003 250);
  border-bottom: 1px solid var(--admin-border);
}

.admin-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--admin-border);
  font-size: 14px;
  vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tr:hover td { background: oklch(98.5% 0.003 250); }

/* Buttons */
.admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid var(--admin-border);
  background: #fff;
  color: oklch(25% 0.015 250);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  text-decoration: none;
}

.admin-btn:hover { background: oklch(97% 0.004 250); }
.admin-btn--primary { background: var(--admin-accent); border-color: var(--admin-accent); color: #fff; }
.admin-btn--primary:hover { filter: brightness(1.05); }
.admin-btn--danger { color: var(--admin-danger); border-color: oklch(85% 0.06 25); }
.admin-btn--sm { padding: 5px 10px; font-size: 12px; }
.admin-btn--ghost { border-color: transparent; background: transparent; }
.admin-btn--ghost:hover { background: oklch(95% 0.004 250); }

/* Forms */
.admin-form {
  width: 100%;
  max-width: none;
}

.admin-form--narrow { max-width: 720px; }

.admin-form--wide { max-width: none; }

.admin-login .admin-form,
.admin-modal .admin-form {
  max-width: 100%;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.admin-field:last-child { margin-bottom: 0; }

.admin-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.02em;
  color: oklch(28% 0.015 250);
  line-height: 1.35;
}

.admin-field input,
.admin-field textarea,
.admin-field select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 11px 14px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
  background: #fff;
  color: oklch(22% 0.015 250);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.admin-field input:hover,
.admin-field textarea:hover,
.admin-field select:hover {
  border-color: oklch(82% 0.01 250);
}

.admin-field input:focus,
.admin-field textarea:focus,
.admin-field select:focus {
  outline: none;
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 3px oklch(52% 0.10 55 / 0.14);
}

.admin-field input::placeholder,
.admin-field textarea::placeholder {
  color: oklch(62% 0.01 250);
}

.admin-field input:disabled,
.admin-field textarea:disabled,
.admin-field select:disabled {
  background: oklch(97% 0.004 250);
  color: oklch(55% 0.01 250);
  cursor: not-allowed;
}

.admin-field textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.55;
}

.admin-field select {
  cursor: pointer;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23888' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
}

.admin-field input[type="checkbox"],
.admin-field input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--admin-accent);
  margin: 0;
}

.admin-field--inline {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.admin-field--inline label {
  margin: 0;
  font-weight: 500;
}

.admin-form-row {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  margin-bottom: 18px;
}

.admin-form-row .admin-field { margin-bottom: 0; }

@media (min-width: 640px) {
  .admin-form-row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-form-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.admin-field-hint {
  font-size: 12px;
  color: oklch(50% 0.01 250);
  margin-top: 2px;
  line-height: 1.45;
}

.admin-media-field-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-media-field-row input[type="url"],
.admin-media-field-row input[type="text"] {
  flex: 1;
  min-width: 0;
}

.admin-media-field-preview {
  display: block;
  margin-top: 8px;
  max-width: 120px;
  max-height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--admin-border, oklch(90% 0.006 250));
}

.admin-settings-panel__inner .admin-field {
  margin-bottom: 16px;
}

.admin-settings-panel__inner .admin-field:last-child {
  margin-bottom: 0;
}

.admin-form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--admin-border);
  margin-top: 20px;
}

/* Badge */
.admin-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.admin-badge--active { background: oklch(92% 0.04 145); color: oklch(35% 0.10 145); }
.admin-badge--draft { background: oklch(93% 0.01 250); color: oklch(45% 0.01 250); }
.admin-badge--warn { background: oklch(92% 0.06 75); color: oklch(38% 0.10 75); }
.admin-badge--info { background: oklch(92% 0.04 240); color: oklch(35% 0.10 240); }
.admin-badge--danger { background: oklch(92% 0.06 25); color: oklch(38% 0.14 25); }

/* Dashboard metrics */
.admin-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.admin-metric {
  background: #fff;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-metric__label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: oklch(50% 0.01 250);
}

.admin-metric__value {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}

.admin-metric__delta {
  font-size: 12px;
  color: var(--admin-success);
}
.admin-metric__delta--down { color: var(--admin-danger); }

.admin-dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

@media (max-width: 1024px) {
  .admin-dashboard-grid { grid-template-columns: 1fr; }
}

.admin-chart-placeholder {
  height: 200px;
  background: linear-gradient(180deg, oklch(97% 0.01 55 / 0.5) 0%, transparent 100%);
  border-radius: 8px;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  gap: 8px;
}

.admin-chart-bar {
  flex: 1;
  background: var(--admin-accent);
  border-radius: 4px 4px 0 0;
  opacity: 0.7;
  min-height: 20px;
}

.admin-activity-list { list-style: none; }
.admin-activity-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--admin-border);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.admin-activity-list li:last-child { border-bottom: 0; }

/* CRUD toolbar */
.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admin-toolbar__left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  padding: 0 12px;
  min-width: 240px;
}

.admin-search input {
  border: 0;
  padding: 9px 0;
  font: inherit;
  flex: 1;
  outline: none;
  background: transparent;
}

.admin-search svg { color: oklch(55% 0.01 250); flex-shrink: 0; }

.admin-toolbar__select {
  padding: 9px 12px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

.admin-bulk-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: oklch(96% 0.02 55);
  border: 1px solid oklch(88% 0.04 55);
  border-radius: 8px;
  margin-bottom: 12px;
}

.admin-bulk-bar__count {
  font-size: 13px;
  font-weight: 500;
  margin-right: 8px;
}

.admin-card--flush {
  border-radius: 10px;
  overflow: visible;
  width: 100%;
  min-width: 0;
}

.admin-table--crud th[data-crud-sort] { cursor: pointer; user-select: none; }
.admin-table--crud th[data-crud-sort]:hover { color: oklch(30% 0.015 250); }

.admin-table__check { width: 44px; text-align: center; }
.admin-table__actions {
  width: auto;
  min-width: 0;
  text-align: right;
  white-space: nowrap;
  vertical-align: middle;
}

.admin-row-actions {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.admin-row-actions .admin-btn--sm {
  padding: 5px 10px;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Tablas CRUD — reemplazadas por Smart Data Table (smart-data-table.css) */

.admin-cell-muted {
  font-size: 12px;
  color: oklch(50% 0.01 250);
}

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 0;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-pagination__info { font-size: 13px; color: oklch(50% 0.01 250); }

.admin-pagination__controls { display: flex; gap: 4px; align-items: center; }

.admin-pagination__btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  background: #fff;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.admin-pagination__btn:hover:not(:disabled) { background: oklch(97% 0.004 250); }
.admin-pagination__btn.active { background: var(--admin-accent); border-color: var(--admin-accent); color: #fff; }
.admin-pagination__btn:disabled { opacity: 0.4; cursor: default; }
.admin-pagination__gap { padding: 0 4px; color: oklch(60% 0.01 250); }

/* Settings panels */
.admin-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.admin-settings-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: none;
}

.admin-settings-panel {
  background: #fff;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-settings-panel.is-open {
  border-color: oklch(88% 0.02 250);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.admin-settings-panel__toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px 20px;
  border: 0;
  background: oklch(98.5% 0.003 250);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: background 0.12s ease;
}

.admin-settings-panel__toggle:hover {
  background: oklch(97% 0.004 250);
}

.admin-settings-panel__toggle:focus-visible {
  outline: 2px solid var(--admin-accent);
  outline-offset: -2px;
}

.admin-settings-panel__title {
  font-size: 15px;
  font-weight: 600;
  flex: 0 0 auto;
}

.admin-settings-panel__desc {
  flex: 1;
  font-size: 13px;
  color: oklch(52% 0.012 250);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-settings-panel__chevron {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  position: relative;
  opacity: 0.55;
  transition: transform 0.2s ease;
}

.admin-settings-panel__chevron::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translate(-60%, -70%) rotate(45deg);
}

.admin-settings-panel.is-open .admin-settings-panel__chevron {
  transform: rotate(180deg);
}

.admin-settings-panel__body {
  border-top: 1px solid var(--admin-border);
}

.admin-settings-panel__inner {
  padding: 20px;
}

.admin-settings-footer {
  margin-top: 4px;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
}

.admin-settings-footer .admin-form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

@media (max-width: 640px) {
  .admin-settings-panel__desc { display: none; }
}

.admin-quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.admin-quick-link {
  display: block;
  padding: 14px;
  background: oklch(98% 0.003 250);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  transition: border-color 0.12s, background 0.12s;
}
.admin-quick-link:hover { border-color: var(--admin-accent); background: #fff; }


/* Modal */
.admin-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.admin-modal {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 560px;
  max-height: min(90vh, 900px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.admin-modal--lg { max-width: 680px; }

.admin-modal--xl { max-width: 820px; }

.admin-modal--product { max-width: 860px; }

.admin-testimonial-row {
  padding: 16px 0;
  border-bottom: 1px solid var(--admin-border);
  margin-bottom: 8px;
}

.admin-modal__head {
  padding: 20px 24px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  border-bottom: 1px solid var(--admin-border);
}

.admin-modal__head h3 { font-size: 17px; font-weight: 600; }

.admin-modal__body {
  padding: 20px 24px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.admin-modal__foot {
  padding: 14px 24px;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  border-top: 1px solid var(--admin-border);
  background: #fff;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
}

.admin-modal__foot--sticky { position: relative; z-index: 2; }

.admin-modal__save-hint {
  margin-right: auto;
  font-size: 13px;
  color: var(--admin-muted);
  min-height: 1.2em;
}

.admin-modal__save-hint.is-ok { color: oklch(42% 0.12 145); }
.admin-modal__save-hint.is-error { color: oklch(48% 0.16 25); }

/* Toast */
.admin-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: oklch(20% 0.02 250);
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 300;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.admin-toast.show { opacity: 1; transform: translateY(0); }

/* Media grid */
.admin-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.admin-media-item {
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.12s;
}

.admin-media-item:hover { border-color: var(--admin-accent); }
.admin-media-item.selected { border-color: var(--admin-accent); box-shadow: 0 0 0 2px oklch(52% 0.10 55 / 0.3); }

.admin-media-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: oklch(95% 0.01 80);
}

.admin-media-item p {
  padding: 8px;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Tabs */
.admin-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--admin-border);
  margin-bottom: 20px;
}

.admin-tab {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: oklch(50% 0.01 250);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  margin-bottom: -1px;
}

.admin-tab.active { color: oklch(20% 0.015 250); border-bottom-color: var(--admin-accent); }

/* Empty state */
.admin-empty {
  text-align: center;
  padding: 48px 24px;
  color: oklch(50% 0.01 250);
}

.admin-empty h3 { font-size: 16px; margin-bottom: 8px; color: oklch(30% 0.015 250); }

/* Loading & boot error */
.admin-shell:has(> .admin-loading) {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
}

.admin-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  gap: 16px;
  color: oklch(45% 0.01 250);
}

.admin-loading__spinner {
  width: 32px;
  height: 32px;
  border: 3px solid oklch(90% 0.006 250);
  border-top-color: var(--admin-accent);
  border-radius: 50%;
  animation: admin-spin 0.8s linear infinite;
}

@keyframes admin-spin {
  to { transform: rotate(360deg); }
}

.admin-boot-error {
  max-width: 480px;
  margin: 80px auto;
  padding: 32px;
  background: #fff;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  text-align: center;
}

.admin-boot-error h2 {
  font-size: 18px;
  margin-bottom: 12px;
}

.admin-boot-error p {
  color: oklch(45% 0.01 250);
  margin-bottom: 8px;
}

.admin-boot-error__hint {
  font-size: 13px;
  margin-bottom: 20px !important;
}

/* Pantalla de login — el shell deja de ser flex lateral y centra el card */
.admin-shell:has(> .admin-login),
#admin-app.admin-shell:has(.admin-login) {
  display: grid;
  place-items: center;
  min-height: 100vh;
  width: 100%;
  background: var(--admin-bg);
}

.admin-shell:has(> .admin-preview-banner) > .admin-login {
  min-height: 100vh;
  padding-top: 52px;
  box-sizing: border-box;
}

.admin-login {
  width: 100%;
  max-width: 100%;
  min-height: auto;
  display: grid;
  place-items: center;
  padding: 24px;
  background: transparent;
}

.admin-login__card {
  width: min(400px, 100%);
  background: #fff;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 8px 32px oklch(0% 0 0 / 0.06);
}

.admin-login__card h1 {
  font-size: 22px;
  margin-bottom: 4px;
}

.admin-login__card > p {
  color: oklch(48% 0.01 250);
  margin-bottom: 20px;
}

.admin-login__hint {
  margin-top: 16px;
  font-size: 12px;
  color: oklch(55% 0.01 250);
  text-align: center;
}

.admin-login__error {
  margin-top: 12px;
  color: var(--admin-danger);
  font-size: 13px;
  text-align: center;
}

.admin-login__success {
  margin-top: 12px;
  color: var(--admin-success, #15803d);
  font-size: 13px;
  text-align: center;
}

.admin-login__hint--demo {
  opacity: 0.75;
}

.admin-login__submit {
  width: 100%;
  margin-top: 8px;
  justify-content: center;
  text-align: center;
}

.admin-field__password {
  position: relative;
}

.admin-field__password input {
  padding-right: 44px;
}

.admin-field__password-toggle {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: oklch(48% 0.01 250);
  cursor: pointer;
  transition: color 0.12s, background 0.12s;
}

.admin-field__password-toggle:hover {
  color: oklch(28% 0.015 250);
  background: oklch(96% 0.004 250);
}

.admin-field__password-toggle:focus-visible {
  outline: 2px solid var(--admin-accent);
  outline-offset: 1px;
}

.admin-field__password-icon {
  display: block;
}

.admin-field__password-icon[hidden] {
  display: none;
}

.admin-preview-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 16px;
  background: oklch(42% 0.08 75);
  color: #fff;
  font-size: 13px;
  text-align: center;
  letter-spacing: 0.01em;
}

.lumi-ux__dev-banner-text {
  flex: 1 1 auto;
  max-width: 56rem;
}

.lumi-ux__dev-banner-dismiss {
  flex: 0 0 auto;
  padding: 4px 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s ease;
}

.lumi-ux__dev-banner-dismiss:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lumi-ux__dev-banner-dismiss:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.admin-preview-banner a {
  color: #fff;
  text-decoration: underline;
}

.admin-shell:has(.admin-preview-banner) .admin-sidebar {
  top: 40px;
  height: calc(100vh - 40px);
}

.admin-shell:has(.admin-preview-banner) .admin-main {
  padding-top: 40px;
  max-height: calc(100vh - 40px);
  min-height: calc(100vh - 40px);
}

.admin-boot-error__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

.admin-boot-error__actions .admin-btn {
  text-decoration: none;
}

/* ── Módulo Contenido ── */
.content-module {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) minmax(340px, 400px);
  grid-template-areas: "areas blocks editor";
  gap: 0;
  flex: 1;
  width: 100%;
  min-height: 0;
  height: 100%;
  min-width: 0;
  background: var(--admin-bg);
  overflow: hidden;
}

.content-areas {
  grid-area: areas;
  background: var(--admin-surface);
  border-right: 1px solid var(--admin-border);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  overflow-y: auto;
}

.content-areas__title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: oklch(50% 0.01 250);
  margin: 0 8px 12px;
  font-weight: 600;
}

.content-area-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--admin-fg);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.content-area-btn:hover { background: oklch(96% 0.005 250); }
.content-area-btn.active {
  background: oklch(94% 0.02 75);
  color: oklch(35% 0.06 55);
  font-weight: 600;
}

.content-area-btn__icon {
  width: 22px;
  text-align: center;
  opacity: 0.7;
  font-size: 14px;
}

.content-preview-link {
  margin-top: auto;
  padding: 12px;
  font-size: 12px;
  color: var(--admin-accent);
  text-decoration: none;
}

.content-blocks-panel {
  grid-area: blocks;
  padding: 20px 24px;
  border-right: 1px solid var(--admin-border);
  overflow-y: auto;
  min-height: 0;
  min-width: 0;
}

.content-blocks-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.content-blocks-panel__head h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.content-blocks-panel__head p {
  font-size: 12px;
  color: oklch(50% 0.01 250);
}

.content-blocks-panel__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.content-block-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.content-block {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  transition: box-shadow 0.15s, opacity 0.15s;
}

.content-block--off { opacity: 0.55; }
.content-block--dragging { opacity: 0.4; }
.content-block--over { box-shadow: 0 0 0 2px var(--admin-accent); }

.content-block__drag {
  cursor: grab;
  color: oklch(65% 0.01 250);
  font-size: 16px;
  user-select: none;
  flex-shrink: 0;
}

.content-block__drag--static { cursor: default; opacity: 0.3; }

.content-block__info {
  flex: 1;
  min-width: 0;
}

.content-block__info strong {
  display: block;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.content-block__meta {
  font-size: 11px;
  color: oklch(52% 0.01 250);
}

.content-toggle {
  position: relative;
  display: inline-flex;
  cursor: pointer;
  flex-shrink: 0;
}

.content-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }

.content-toggle__track {
  width: 36px;
  height: 20px;
  background: oklch(88% 0.01 250);
  border-radius: 999px;
  transition: background 0.2s;
  position: relative;
}

.content-toggle__track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px oklch(0% 0 0 / 0.15);
}

.content-toggle input:checked + .content-toggle__track {
  background: oklch(55% 0.1 145);
}

.content-toggle input:checked + .content-toggle__track::after {
  transform: translateX(16px);
}

.content-editor-panel {
  grid-area: editor;
  padding: 20px;
  overflow-y: auto;
  background: #fff;
  min-height: 0;
  min-width: 0;
}

.content-editor-empty {
  text-align: center;
  padding: 48px 24px;
  color: oklch(50% 0.01 250);
}

.content-editor-empty__hint {
  font-size: 12px;
  margin-top: 8px;
}

.content-editor-form__head {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--admin-border);
}

.content-editor-form__head h3 { font-size: 15px; margin-bottom: 4px; }

.content-editor-form__actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--admin-border);
}

.content-subblock {
  padding: 14px;
  margin: 12px 0;
  background: oklch(98% 0.004 95);
  border-radius: 8px;
  border: 1px solid var(--admin-border);
}

.content-subblock h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  color: oklch(45% 0.01 250);
}

.content-btn-fieldset {
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 16px 0;
}

.content-btn-fieldset legend {
  font-size: 12px;
  font-weight: 600;
  padding: 0 6px;
  color: oklch(40% 0.02 55);
}

.content-media-row {
  display: flex;
  gap: 8px;
}

.content-media-row input { flex: 1; }

.content-media-preview {
  margin-top: 8px;
  max-width: 220px;
  max-height: 140px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid var(--admin-border);
  background: #f8f4ef;
}

.content-media-preview--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 88px;
  max-width: 220px;
  padding: 12px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--admin-muted);
  text-align: center;
  background: #f8f4ef;
  border: 1px dashed var(--admin-border);
  border-radius: 6px;
}

@media (max-width: 1200px) {
  .content-module {
    grid-template-columns: 200px minmax(0, 1fr);
    grid-template-areas:
      "areas blocks"
      "editor editor";
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .content-editor-panel {
    grid-area: editor;
    border-top: 1px solid var(--admin-border);
    max-height: 320px;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .admin-sidebar { transform: translateX(-100%); transition: transform 0.2s; }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
}

/* ── Biblioteca multimedia (Google Drive style) ── */
.admin-content:has([data-media-manager]),
.admin-content--full:has([data-media-manager]) {
  padding: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.mm-toolbar-hint {
  font-size: 12px;
  color: oklch(55% 0.01 250);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.media-manager {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.mm-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--admin-border);
  flex-shrink: 0;
  background: var(--admin-bg);
}

.mm-toolbar__left,
.mm-toolbar__center,
.mm-toolbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mm-toolbar__center { flex: 1; min-width: 200px; }

.mm-search {
  flex: 1;
  min-width: 180px;
  padding: 8px 12px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  font-size: 13px;
  background: var(--admin-surface);
}

.mm-filter {
  padding: 8px 10px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  font-size: 13px;
  background: var(--admin-surface);
}

.mm-view-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface);
  cursor: pointer;
  font-size: 16px;
}

.mm-view-btn.active {
  background: var(--admin-accent);
  color: #fff;
  border-color: var(--admin-accent);
}

.mm-dropzone {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0 16px 16px;
  overflow: hidden;
}

.mm-main__body {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.mm-dropzone__overlay {
  position: absolute;
  inset: 0;
  background: oklch(52% 0.10 55 / 0.14);
  border: 2px dashed var(--admin-accent);
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 500;
  color: var(--admin-accent);
  z-index: 20;
  pointer-events: none;
}

.mm-dropzone__overlay[hidden] {
  display: none !important;
}

.mm-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 300px;
  grid-template-areas: "sidebar main detail";
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  flex: 1;
  min-height: 0;
  height: 100%;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  background: var(--admin-surface);
  overflow: hidden;
}

.mm-sidebar {
  grid-area: sidebar;
  border-right: 1px solid var(--admin-border);
  padding: 12px 8px;
  overflow-y: auto;
  min-width: 0;
  min-height: 0;
  background: oklch(99% 0.003 250);
}

.mm-folder {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: none;
  text-align: left;
  font-size: 13px;
  cursor: pointer;
  color: oklch(35% 0.015 250);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mm-folder:hover { background: oklch(96% 0.005 250); }
.mm-folder--active {
  background: oklch(94% 0.02 55);
  color: var(--admin-accent);
  font-weight: 550;
}

.mm-folder__icon { font-size: 14px; opacity: 0.85; }

.mm-main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 16px 20px;
  overflow: hidden;
}

.mm-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
  font-size: 13px;
  flex-shrink: 0;
}

.mm-crumb {
  background: none;
  border: none;
  color: var(--admin-accent);
  cursor: pointer;
  font-size: 13px;
  padding: 2px 4px;
}

.mm-crumb--current { color: oklch(40% 0.01 250); cursor: default; }
.mm-breadcrumb span { color: oklch(70% 0.01 250); }

.mm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 12px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  align-content: start;
  padding-right: 4px;
}

.mm-upload-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 140px;
  border: 2px dashed oklch(82% 0.03 55);
  border-radius: 10px;
  background: oklch(98% 0.015 55);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  padding: 16px;
  text-align: center;
}

.mm-upload-card:hover {
  border-color: var(--admin-accent);
  background: oklch(96% 0.025 55);
}

.mm-upload-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--admin-accent);
  color: #fff;
  font-size: 28px;
  line-height: 44px;
  font-weight: 300;
}

.mm-upload-card__label {
  font-size: 13px;
  font-weight: 550;
  color: oklch(30% 0.015 250);
}

.mm-upload-card__hint {
  font-size: 11px;
  color: oklch(50% 0.01 250);
}

.mm-bulk-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 16px;
  margin: 0;
  background: oklch(94% 0.03 55);
  border-bottom: 1px solid oklch(85% 0.04 55);
  font-size: 13px;
  flex-shrink: 0;
}

.mm-select-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: oklch(40% 0.01 250);
  cursor: pointer;
  user-select: none;
}

.mm-upload-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  margin: 0;
  background: oklch(96% 0.02 240);
  border-bottom: 1px solid var(--admin-border);
  font-size: 13px;
  color: oklch(40% 0.01 250);
  flex-shrink: 0;
}

.mm-upload-progress__bar {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: oklch(90% 0.01 250);
  overflow: hidden;
  position: relative;
}

.mm-upload-progress__bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--admin-accent);
  animation: mm-progress 1.2s ease-in-out infinite;
  transform-origin: left;
}

@keyframes mm-progress {
  0% { transform: scaleX(0.15); }
  50% { transform: scaleX(0.85); }
  100% { transform: scaleX(0.15); }
}

.mm-hint {
  display: none;
}

.mm-empty--upload {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  height: 100%;
  padding: 24px 20px;
  border: 2px dashed var(--admin-border);
  border-radius: 12px;
  background: oklch(98.5% 0.008 80);
}

.mm-empty__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 380px;
  text-align: center;
}

.mm-empty--upload h3 {
  font-size: 18px;
  margin: 0;
  color: oklch(25% 0.015 250);
  letter-spacing: -0.01em;
}

.mm-empty--upload p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: oklch(48% 0.012 250);
}

.mm-empty--upload .admin-btn {
  margin-top: 4px;
}

.mm-empty__icon {
  font-size: 40px;
  opacity: 0.5;
  line-height: 1;
}

.mm-item__media {
  position: relative;
}

.mm-item--grid .mm-item__check--grid {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.92);
  border-radius: 6px;
  border: 1px solid var(--admin-border);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s;
}

.mm-item--grid:hover .mm-item__check--grid,
.mm-item--checked .mm-item__check--grid {
  opacity: 1;
}

.mm-item--checked {
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 2px oklch(52% 0.10 55 / 0.2);
}

.mm-item__actions {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.12s;
}

.mm-item:hover .mm-item__actions,
.mm-item--list .mm-item__actions {
  opacity: 1;
}

.mm-item__action {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: rgba(255,255,255,0.95);
  color: oklch(40% 0.02 25);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: background 0.12s, color 0.12s;
}

.mm-item__action:hover {
  background: oklch(55% 0.18 25);
  color: #fff;
}

.mm-item--list .mm-item__thumb-wrap {
  position: relative;
}

.mm-detail__actions--primary {
  margin-bottom: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--admin-border);
}

.mm-detail__actions--primary .admin-btn--danger {
  width: 100%;
  justify-content: center;
}

.mm-grid--list {
  grid-template-columns: 1fr;
  gap: 4px;
}

.mm-item {
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.12s, box-shadow 0.12s;
  background: var(--admin-surface);
}

.mm-item:hover { border-color: oklch(80% 0.02 55); }
.mm-item--selected {
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 2px oklch(52% 0.10 55 / 0.25);
}

.mm-item--grid .mm-item__media .mm-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: oklch(95% 0.01 80);
}

.mm-thumb--folder,
.mm-thumb--empty,
.mm-thumb--video {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: oklch(96% 0.008 80);
  font-size: 32px;
  position: relative;
}

.mm-thumb--video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mm-thumb__play {
  position: absolute;
  font-size: 20px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.mm-item__foot {
  padding: 8px 10px;
}

.mm-item__foot p {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.mm-item__meta {
  font-size: 10px;
  color: oklch(50% 0.01 250);
}

.mm-item--list {
  display: grid;
  grid-template-columns: 32px 48px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
}

.mm-item--list .mm-item__thumb-wrap { width: 48px; height: 48px; }
.mm-item--list .mm-thumb { width: 48px; height: 48px; aspect-ratio: auto; border-radius: 6px; }
.mm-item--list .mm-thumb--folder,
.mm-item--list .mm-thumb--video { height: 48px; aspect-ratio: auto; font-size: 20px; }

.mm-item__info strong {
  display: block;
  font-size: 13px;
  font-weight: 550;
}

.mm-item__info span { font-size: 11px; color: oklch(50% 0.01 250); }

.mm-badge {
  display: inline-block;
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 4px;
  background: oklch(92% 0.04 145);
  color: oklch(40% 0.08 145);
  margin-left: 4px;
  vertical-align: middle;
}

.mm-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  color: oklch(50% 0.01 250);
  font-size: 14px;
}

.mm-detail {
  grid-area: detail;
  border-left: 1px solid var(--admin-border);
  padding: 16px;
  overflow-y: auto;
  min-width: 0;
  min-height: 0;
  font-size: 13px;
  background: var(--admin-surface);
  isolation: isolate;
}

.mm-detail--empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: oklch(50% 0.01 250);
  padding: 24px 20px;
}

.mm-detail__empty-icon {
  font-size: 36px;
  opacity: 0.35;
  margin-bottom: 12px;
  line-height: 1;
}

.mm-detail__empty-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: oklch(35% 0.015 250);
}

.mm-detail__empty-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  max-width: 22ch;
}

.mm-detail--empty > p {
  margin: 0 0 12px;
}

.mm-detail__tips {
  margin-top: 16px;
  padding-left: 18px;
  font-size: 12px;
  text-align: left;
}

.mm-detail__preview {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 16px;
  background: oklch(96% 0.008 80);
}

.mm-detail__preview--folder {
  aspect-ratio: 16/10;
  display: grid;
  place-items: center;
  font-size: 48px;
}

.mm-detail h3 { font-size: 15px; margin-bottom: 4px; }
.mm-detail__type { color: oklch(50% 0.01 250); margin-bottom: 12px; }

.mm-detail__form label {
  display: block;
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: 550;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: oklch(45% 0.01 250);
}

.mm-detail__form input,
.mm-detail__form textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  font-size: 13px;
  text-transform: none;
  font-weight: 400;
}

.mm-detail__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
  font-size: 11px;
  color: oklch(50% 0.01 250);
}

.mm-detail__stats span {
  padding: 4px 8px;
  background: oklch(97% 0.005 250);
  border-radius: 6px;
}

.mm-detail__webp { color: oklch(45% 0.08 145); }

.mm-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.mm-detail__usage h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  color: oklch(45% 0.01 250);
}

.mm-detail__usage ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mm-detail__usage li {
  padding: 8px 0;
  border-bottom: 1px solid var(--admin-border);
  font-size: 12px;
}

.mm-detail__usage li span { display: block; }
.mm-detail__usage li small { color: oklch(50% 0.01 250); }
.mm-detail__usage-none { color: oklch(55% 0.01 250); font-style: italic; }

.mm-picker-modal {
  position: fixed;
  inset: 0;
  z-index: 10100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mm-picker-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 15, 0.55);
}

.mm-picker-modal__panel {
  position: relative;
  width: min(1100px, 96vw);
  max-height: 90vh;
  background: var(--admin-bg);
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mm-picker-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--admin-border);
}

.mm-picker-modal__tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mm-picker-modal__head h3 { font-size: 16px; margin: 0; }

.mm-picker-modal__close {
  width: 36px;
  height: 36px;
  border: none;
  background: oklch(96% 0.005 250);
  border-radius: 8px;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

.mm-picker-modal__body {
  overflow: auto;
  padding: 16px;
  max-height: calc(90vh - 60px);
}

.mm-picker-modal__body .mm-layout {
  grid-template-columns: 180px minmax(0, 1fr) 260px;
  grid-template-areas: "sidebar main detail";
  min-height: 420px;
  max-height: calc(90vh - 120px);
}

/* Modo picker — selección clara y sin acciones destructivas */
.mm-picker-modal .media-manager--picker .mm-item__check--grid {
  opacity: 1;
}

.mm-picker-modal .media-manager--picker .mm-item--grid {
  cursor: pointer;
  user-select: none;
}

.mm-picker-modal .media-manager--picker .mm-item--checked {
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 2px oklch(52% 0.10 55 / 0.35);
}

.mm-picker-modal .media-manager--picker .mm-item--checked .mm-item__media::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  background: oklch(52% 0.10 55 / 0.45);
  pointer-events: none;
}

.mm-picker-modal [data-mm-picker-confirm]:not(:disabled) {
  animation: mm-picker-pulse 1.2s ease infinite;
}

@keyframes mm-picker-pulse {
  0%, 100% { box-shadow: 0 0 0 0 oklch(52% 0.10 55 / 0.35); }
  50% { box-shadow: 0 0 0 6px oklch(52% 0.10 55 / 0); }
}

.mm-picker-modal .mm-bulk-bar {
  display: none;
}

/* ── Media picker ligero (formulario producto) ── */
.mp-picker {
  position: fixed;
  inset: 0;
  z-index: 10200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.mp-picker__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 15, 0.55);
}

.mp-picker__panel {
  position: relative;
  width: min(900px, 96vw);
  max-height: 88vh;
  background: var(--admin-bg, #fff);
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  pointer-events: auto;
}

.mp-picker__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--admin-border);
  flex-shrink: 0;
}

.mp-picker__head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.mp-picker__tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mp-picker__close {
  width: 36px;
  height: 36px;
  border: none;
  background: oklch(96% 0.005 250);
  border-radius: 8px;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

.mp-picker__body {
  overflow: auto;
  padding: 16px;
  flex: 1;
  min-height: 0;
}

.mp-picker__progress {
  padding: 10px 14px;
  margin-bottom: 12px;
  background: oklch(97% 0.01 80);
  border-radius: 8px;
  font-size: 13px;
  color: var(--admin-accent);
}

.mp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.mp-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  border: 2px solid var(--admin-border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: border-color 0.12s, box-shadow 0.12s;
}

.mp-item:hover {
  border-color: oklch(80% 0.02 55);
}

.mp-item--selected {
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 2px oklch(52% 0.10 55 / 0.3);
}

.mp-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: oklch(95% 0.01 80);
  pointer-events: none;
}

.mp-item__name {
  padding: 6px 8px;
  font-size: 11px;
  color: oklch(45% 0.01 250);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-item__check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--admin-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: grid;
  place-items: center;
  z-index: 2;
}

.mp-item {
  position: relative;
}

.mp-item--upload {
  min-height: 120px;
  justify-content: center;
  align-items: center;
  gap: 6px;
  border-style: dashed;
  color: oklch(50% 0.01 250);
  font-size: 13px;
}

.mp-item__plus {
  font-size: 28px;
  line-height: 1;
  color: var(--admin-accent);
}

.mp-empty {
  text-align: center;
  padding: 40px 20px;
  color: oklch(50% 0.01 250);
}

.mp-empty p {
  margin: 0 0 16px;
}

@media (max-width: 1024px) {
  .mm-layout {
    grid-template-columns: 200px minmax(0, 1fr);
    grid-template-areas:
      "sidebar main"
      "detail detail";
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .mm-detail {
    grid-area: detail;
    border-left: none;
    border-top: 1px solid var(--admin-border);
    max-height: 220px;
  }
}

@media (max-width: 768px) {
  .media-manager { max-height: none; }
  .admin-content:has([data-media-manager]) { overflow: visible; }
  .mm-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "sidebar"
      "main"
      "detail";
  }
  .mm-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--admin-border);
    max-height: 160px;
  }
  .mm-detail { max-height: none; }
  .mm-toolbar__center { order: 3; width: 100%; }
}

/* ── Menu manager ── */
.mn-layout { display: flex; flex-direction: column; gap: 16px; }
.mn-toolbar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.mn-toolbar__left { display: flex; gap: 10px; flex: 1; min-width: 240px; }
.mn-search { flex: 1; min-width: 180px; }
.mn-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--admin-border); padding-bottom: 8px; }
.mn-tab { border: none; background: transparent; padding: 8px 14px; border-radius: 8px; font-size: 13px; cursor: pointer; color: var(--admin-muted); }
.mn-tab--active { background: oklch(96% 0.02 80); color: var(--admin-fg); font-weight: 600; }
.mn-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: 16px; min-height: 480px; }
.mn-tree-panel { background: var(--admin-surface); border: 1px solid var(--admin-border); border-radius: 12px; padding: 12px; overflow: auto; max-height: 70vh; }
.mn-detail-panel { background: var(--admin-surface); border: 1px solid var(--admin-border); border-radius: 12px; padding: 16px; overflow: auto; max-height: 70vh; }
.mn-tree { list-style: none; margin: 0; padding: 0; }
.mn-tree__item { margin-bottom: 4px; }
.mn-tree__row { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 8px; background: oklch(99% 0.002 250); border: 1px solid transparent; }
.mn-tree__item--selected .mn-tree__row { border-color: oklch(72% 0.08 70); background: oklch(97% 0.02 80); }
.mn-tree__item--hidden .mn-tree__row { opacity: 0.55; }
.mn-tree__item--dragging .mn-tree__row { opacity: 0.4; }
.mn-tree__item--over .mn-tree__row { border-color: var(--admin-accent); }
.mn-tree__drag { cursor: grab; color: var(--admin-muted); font-size: 14px; }
.mn-tree__label { flex: 1; text-align: left; background: none; border: none; cursor: pointer; font-size: 13px; font-weight: 600; padding: 0; }
.mn-tree__meta { font-size: 11px; color: var(--admin-muted); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mn-tree__actions { display: flex; gap: 2px; }
.mn-tree__children { list-style: none; margin: 4px 0 0; padding: 0; }
.mn-tree--over { outline: 2px dashed oklch(72% 0.08 70); border-radius: 8px; }
.mn-badge { font-size: 10px; padding: 2px 6px; border-radius: 999px; margin-left: 6px; background: oklch(92% 0.04 80); color: oklch(45% 0.06 70); letter-spacing: 0.06em; text-transform: uppercase; }
.mn-empty, .mn-editor--empty { color: var(--admin-muted); font-size: 13px; padding: 24px; text-align: center; }
.mn-footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mn-footer-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; color: var(--admin-muted); }
.mn-mega-group { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--admin-border); }
.mn-mega-group__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.mn-editor h3 { font-size: 15px; margin-bottom: 16px; }
.mn-editor__hint { font-size: 12px; color: var(--admin-muted); margin-top: 8px; }
.mn-editor__preview { font-size: 12px; margin-top: 12px; color: var(--admin-muted); }
.mn-editor__actions { display: flex; gap: 8px; margin-top: 16px; }
@media (max-width: 960px) {
  .mn-body { grid-template-columns: 1fr; }
  .mn-footer-cols { grid-template-columns: 1fr; }
}

/* ── Product images picker (CMS) ── */
.admin-product-cell { display: flex; align-items: center; gap: 12px; }
.admin-product-thumb {
  width: 40px; height: 40px; border-radius: 8px; object-fit: cover;
  border: 1px solid var(--admin-border); flex-shrink: 0;
}
.admin-product-thumb--empty {
  display: inline-flex; align-items: center; justify-content: center;
  background: oklch(96% 0.004 250); color: var(--admin-muted); font-size: 12px;
}
.product-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 12px;
  margin: 12px 0;
}
.product-images-empty {
  grid-column: 1 / -1;
  padding: 28px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--admin-muted);
  border: 1px dashed var(--admin-border);
  border-radius: 12px;
  background: oklch(99% 0.002 250);
}
.product-img-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--admin-border);
  background: oklch(98% 0.004 250);
  cursor: grab;
}
.product-img-item.is-dragging { opacity: 0.45; }
.product-img-item.is-drag-over { outline: 2px solid var(--admin-accent); }
.product-img-item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.product-img-item__badge {
  position: absolute; top: 6px; left: 6px; z-index: 1;
  font-size: 9px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 6px; border-radius: 999px;
  background: rgba(10, 14, 26, 0.82); color: #fff;
}
.product-img-item__actions {
  position: absolute; top: 6px; right: 6px; z-index: 1;
}
.product-img-item__remove {
  width: 26px; height: 26px; border: none; border-radius: 50%;
  background: rgba(180, 40, 40, 0.92); color: #fff;
  font-size: 16px; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
}
.product-img-item__remove:hover { background: rgba(140, 20, 20, 0.95); }
.product-images-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Variantes de producto (admin) */
.pv-variants-field { margin-top: 8px; }
.pv-variants-list { display: flex; flex-direction: column; gap: 12px; margin: 12px 0; }
.pv-variants-empty { font-size: 13px; color: oklch(52% 0.01 250); margin: 0; }
.pv-variant {
  border: 1px solid oklch(88% 0.01 250);
  border-radius: 10px;
  background: oklch(99% 0.002 250);
  overflow: hidden;
}
.pv-variant__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: oklch(97% 0.004 250);
  border-bottom: 1px solid oklch(92% 0.008 250);
}
.pv-variant.is-collapsed .pv-variant__head {
  border-bottom-color: transparent;
}
.pv-variant__toggle {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 4px 0;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  position: relative;
  z-index: 1;
  pointer-events: auto;
}
.pv-variant__toggle:focus-visible {
  outline: 2px solid oklch(58% 0.12 55);
  outline-offset: 2px;
  border-radius: 6px;
}
.pv-variant__chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 4px;
  background: oklch(94% 0.006 250);
  position: relative;
}
.pv-variant__chevron::before {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 6px;
  height: 6px;
  border-right: 2px solid oklch(45% 0.02 250);
  border-bottom: 2px solid oklch(45% 0.02 250);
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform 0.2s ease;
}
.pv-variant.is-collapsed .pv-variant__chevron::before {
  transform: rotate(-45deg) translate(0, -1px);
}
.pv-variant__title {
  flex: 0 1 auto;
  font-size: 13px;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pv-variant__summary {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  color: oklch(52% 0.01 250);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pv-variant__remove { flex-shrink: 0; }
.pv-variant__body {
  padding: 14px;
  display: block;
}
.pv-variant.is-collapsed .pv-variant__body {
  display: none;
}
.pv-variant__drag { color: oklch(65% 0.01 250); user-select: none; flex-shrink: 0; }
.pv-color-input { display: flex; gap: 8px; align-items: center; }
.pv-color-input input[type="color"] { width: 44px; height: 36px; padding: 2px; border: 1px solid oklch(88% 0.01 250); border-radius: 6px; cursor: pointer; }
.pv-color-input input[type="text"] { flex: 1; }
.pv-swatch-preview {
  width: 72px; height: 72px; border-radius: 8px; border: 1px solid oklch(88% 0.01 250);
  overflow: hidden; display: grid; place-items: center; background: oklch(96% 0.005 250);
  margin-bottom: 8px;
}
.pv-swatch-preview img { width: 100%; height: 100%; object-fit: cover; }
.pv-swatch-preview__empty { font-size: 11px; color: oklch(55% 0.01 250); text-align: center; padding: 4px; }
.pv-variant__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pv-variant__stock { margin-top: 4px; }
.pv-variant__stock-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}
.pv-variant__stock-label .admin-field-hint { display: inline; margin: 0; }
.pv-variant-images {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; min-height: 40px;
}
.pv-variant [data-variant-images-add],
.pv-variant [data-variant-swatch-pick],
.pv-variant [data-add-variant],
.product-images-actions [data-product-images-add] {
  position: relative;
  z-index: 2;
  pointer-events: auto;
}
.pv-variant-images__empty { font-size: 12px; color: oklch(55% 0.01 250); }
.pv-variant-img {
  position: relative; width: 72px; height: 72px; border-radius: 8px; overflow: hidden;
  border: 1px solid oklch(88% 0.01 250);
}
.pv-variant-img img { width: 100%; height: 100%; object-fit: cover; }
.pv-variant-img__remove {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: none;
  border-radius: 50%; background: rgba(180,40,40,0.92); color: #fff; font-size: 14px;
  line-height: 1; cursor: pointer; display: grid; place-items: center;
}

/* ── Layout ancho completo (CMS) ──
   Jerarquía: admin-main → admin-content → [data-crud-body] → admin-card → sdt-viewport
   Cada nivel: width 100%, min-width 0, sin overflow que recorte acciones.
*/
.admin-content:has([data-crud-body]) {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
}

[data-crud-body] {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  min-height: 0;
}

[data-crud-body] .admin-toolbar {
  width: 100%;
  flex-shrink: 0;
}

[data-crud-body] .admin-card,
[data-crud-body] .admin-card--flush {
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  overflow: visible;
}

[data-crud-body] .sdt-viewport,
[data-crud-body] .sdt-table,
[data-crud-body] .sdt--table {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

[data-crud-body] .admin-pagination {
  width: 100%;
  flex-shrink: 0;
}

.admin-content--full [data-menu-root],
.admin-content--full [data-media-manager] {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.admin-content--full [data-menu-root] {
  padding: var(--admin-content-pad-y) var(--admin-content-pad-x) 24px;
  overflow: auto;
}

.media-manager {
  max-height: none;
}

@media (min-width: 1100px) {
  .admin-settings-panel__inner {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 24px;
    row-gap: 0;
  }

  .admin-settings-panel__inner > .admin-field:has(textarea),
  .admin-settings-panel__inner > .admin-field--full,
  .admin-settings-panel__inner > .admin-form-row,
  .admin-settings-panel__inner > fieldset,
  .admin-settings-panel__inner > .content-btn-fieldset,
  .admin-settings-panel__inner > .content-media-row,
  .admin-settings-panel__inner > .product-images-grid,
  .admin-settings-panel__inner > .product-images-actions {
    grid-column: 1 / -1;
  }
}

.admin-content--full:has(.content-module) {
  overflow: hidden;
}

.admin-content--full .content-module {
  flex: 1;
  min-height: 0;
}

@media (min-width: 1280px) {
  .content-module {
    grid-template-columns: 220px minmax(0, 1fr) minmax(360px, 420px);
  }

  .mm-layout {
    grid-template-columns: 220px minmax(0, 1fr) minmax(280px, 360px);
  }

  .admin-dashboard-grid {
    grid-template-columns: 2.5fr 1fr;
  }

  .admin-metrics {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (min-width: 1600px) {
  .admin-metrics {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .mn-body {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 480px);
  }
}

@media (max-width: 768px) {
  .admin-main {
    width: 100%;
  }

  .admin-content {
    padding: 12px 14px 20px;
  }

  .admin-table--crud .admin-table__actions {
    width: 220px;
    min-width: 220px;
  }

  .admin-row-actions {
    flex-wrap: wrap;
    max-width: 220px;
  }

  .content-module {
    min-height: auto;
  }
}
