:root {
  --bg: #fbf9f6;
  --surface: #ffffff;
  --ink: #1c1917;
  --muted: #78716c;
  --line: #eadfd7;
  --pink: #df2f8f;
  --pink-dark: #8b174f;
  --rose-soft: #fff1f7;
  --shadow: 0 18px 45px rgba(28, 25, 23, 0.08);
}

/* Tipografía uniforme y normal en todo Maison Manager. */
#loginView,
#loginView *,
#adminView,
#adminView * {
  font-family: Arial, Helvetica, sans-serif !important;
  font-style: normal !important;
  letter-spacing: normal !important;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 80% 10%, rgba(223, 47, 143, 0.16), transparent 34%),
    var(--bg);
}

.auth-card,
.section-card {
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.auth-card {
  width: min(460px, 100%);
  padding: 34px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--pink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
  font-family: Georgia, "Times New Roman", serif;
}

h1 {
  font-size: clamp(34px, 6vw, 54px);
}

h2 {
  font-size: 34px;
}

h3 {
  font-size: 24px;
}

.muted {
  color: var(--muted);
  line-height: 1.5;
}

.stack {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(234, 223, 215, 0.9), 0 10px 24px rgba(28, 25, 23, 0.04);
  color: var(--ink);
  outline: none;
  padding: 13px 14px;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  box-shadow: inset 0 0 0 2px rgba(223, 47, 143, 0.35), 0 14px 28px rgba(223, 47, 143, 0.08);
}

.primary-action,
.ghost-action,
.text-action,
.danger-action,
.small-action {
  border: 0;
  border-radius: 14px;
  font-weight: 800;
}

.primary-action {
  background: var(--pink);
  color: #fff;
  padding: 14px 18px;
  box-shadow: 0 16px 30px rgba(223, 47, 143, 0.25);
}

.ghost-action {
  background: #fff;
  color: var(--pink);
  padding: 13px 16px;
  box-shadow: var(--shadow);
}

.text-action {
  background: transparent;
  color: var(--pink);
}

.danger-action {
  background: #fff1f1;
  color: #c2410c;
  padding: 9px 12px;
}

.small-action {
  background: var(--rose-soft);
  color: var(--pink);
  padding: 9px 12px;
}

.error-text {
  color: #b91c1c;
  font-weight: 700;
}

.info-text {
  color: #15803d;
  font-weight: 600;
}

/* Materiales descargables del curso */
.muted-small {
  color: var(--muted, #8a8078);
  font-size: 12px;
  margin: 4px 0 8px;
}
.materials-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.material-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #faf7f5;
  border-radius: 10px;
  padding: 8px 12px;
}
.material-name {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Panel de Regalos y ofertas */
.gift-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 560px;
}
.gift-card select,
.gift-card input {
  width: 100%;
}
.gift-divider {
  height: 1px;
  background: var(--line, #eee);
  margin: 6px 0;
}
.gift-offer-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

/* Botón "Guardar oferta personal": rosado con sombra */
#giftOfferBtn {
  background: var(--pink, #e91b8c);
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(233, 27, 140, 0.32);
}
#giftOfferBtn:hover {
  filter: brightness(1.05);
}

/* Desplegable propio (blanco, abre debajo, no nativo) */
.mc-select {
  position: relative;
}
.mc-select-btn {
  width: 100%;
  text-align: left;
  background: #fff;
  color: #1c1b1b;
  border: 0;
  border-radius: 14px;
  padding: 12px 40px 12px 14px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  position: relative;
}
.mc-select-btn::after {
  content: "▾";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted, #8a8078);
  pointer-events: none;
}
.mc-select-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 60;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
}
.mc-select-option {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  color: #1c1b1b;
  cursor: pointer;
}
.mc-select-option:hover {
  background: #faf2f7;
}
.mc-select-empty {
  padding: 10px 12px;
  color: var(--muted, #8a8078);
  font-size: 13px;
}

/* Campo de contraseña con botón "Ver/Ocultar" adentro */
.password-field {
  position: relative;
  display: block;
}
.password-field input {
  width: 100%;
  padding-right: 76px;
}
.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--pink, #e91b8c);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 6px;
}

/* Enlace "¿Olvidaste tu contraseña?" */
.link-action {
  border: 0;
  background: transparent;
  color: var(--pink, #e91b8c);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
  margin-top: 4px;
  text-align: left;
  text-decoration: underline;
}
.link-action:hover {
  opacity: 0.85;
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 28px 22px;
  background: #fff;
  border-right: 1px solid var(--line);
  /* Scroll propio del menú: se desliza solo la barra, no toda la página */
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

/* Barra de scroll delgada y discreta en la barra lateral */
.sidebar::-webkit-scrollbar {
  width: 8px;
}
.sidebar::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 4px;
}
.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.brand-main {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 800;
}

.brand-sub {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.22em;
}

.tabs {
  display: grid;
  gap: 6px;
}

.tabs button {
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  padding: 13px 14px;
  text-align: left;
  font-weight: 800;
}

.tabs button.active,
.tabs button:hover {
  background: var(--rose-soft);
  color: var(--pink);
}

.sidebar .ghost-action {
  margin-top: auto;
}

.workspace {
  min-width: 0;
  padding: 30px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 26px;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.12);
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.grid-two {
  display: grid;
  grid-template-columns: minmax(360px, 0.85fr) minmax(420px, 1.15fr);
  gap: 22px;
  align-items: start;
}

.section-card {
  padding: 22px;
}

.form-card {
  display: grid;
  gap: 14px;
}

.social-form {
  max-width: 760px;
}

.social-form .primary-action {
  justify-self: start;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.check-row input {
  width: auto;
  box-shadow: none;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.stat-card {
  background: #fff;
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.stat-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  color: var(--pink);
  font-size: 34px;
}

.list,
.table-list {
  display: grid;
  gap: 12px;
}

.item,
.table-row {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(234, 223, 215, 0.7);
}

.item-head,
.row-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.item h4 {
  margin: 0;
  font-size: 15px;
}

.meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.thumb {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--rose-soft);
}

.inline-media {
  display: flex;
  gap: 12px;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--rose-soft);
  color: var(--pink);
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 800;
}

.pill-admin {
  background: #fef3c7;
  color: #b45309;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 25, 23, 0.45);
  display: grid;
  place-items: center;
  z-index: 100;
  padding: 24px;
}

.modal-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 28px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-head h3 {
  margin: 0;
  font-size: 17px;
}

.modal-sep {
  height: 1px;
  background: var(--line);
  margin: 4px 0;
}

.icon-action {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 8px;
  line-height: 1;
}

.icon-action:hover {
  background: var(--rose-soft);
  color: var(--pink);
}

.full-w {
  width: 100%;
  justify-content: center;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: 360px;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  padding: 14px 16px;
  box-shadow: var(--shadow);
  z-index: 20;
}

/* ── Banner orden nueva ── */
.order-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #df2f8f;
  color: #fff;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 14px;
  animation: slideDown 0.3s ease;
}

.order-alert button {
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.8;
}

.order-alert button:hover { opacity: 1; }

@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

/* ── Lecciones ── */
.lessons-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 4px;
}

.lesson-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lesson-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.lesson-num {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pink);
}

.lesson-dur {
  font-size: 11px;
  color: var(--muted);
  background: var(--line);
  padding: 3px 8px;
  border-radius: 20px;
}

.lesson-dur.has-dur {
  background: #d1fae5;
  color: #065f46;
}

.lesson-existing-url {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}

.link-small {
  color: var(--pink);
  text-decoration: none;
}

.link-small:hover {
  text-decoration: underline;
}

.input-auto {
  background: var(--bg) !important;
  color: var(--pink) !important;
  font-weight: 700;
  cursor: default;
}

/* Barra de progreso de upload */
.upload-progress {
  background: var(--rose-soft);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upload-bar-wrap {
  height: 6px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}

.upload-bar {
  height: 100%;
  background: var(--pink);
  border-radius: 99px;
  width: 0%;
  transition: width 0.3s ease;
}

.upload-label {
  font-size: 12px;
  color: var(--pink-dark);
  font-weight: 600;
}

/* ── Analytics ── */
.analytics-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.akpi {
  background: var(--surface);
  border-radius: 16px;
  padding: 18px 16px;
  box-shadow: 0 2px 8px rgba(28,25,23,0.06);
  border-left: 3px solid var(--pink);
}

.akpi-val {
  font-size: 26px;
  font-weight: 800;
  color: var(--pink);
  margin: 0 0 4px;
  line-height: 1;
}

.akpi-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 2px;
}

.akpi-sub {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}

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

.analytics-chart-card {
  min-height: 280px;
  position: relative;
}

.analytics-chart-card canvas {
  max-height: 220px;
}

.analytics-table-wrap {
  overflow-x: auto;
}

.atable {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.atable th {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid var(--line);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.atable td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.atable tr:last-child td {
  border-bottom: none;
}

.atable tr:hover td {
  background: var(--rose-soft);
}

.mono {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--muted);
}

@media (max-width: 980px) {
  .analytics-row {
    grid-template-columns: 1fr;
  }

  .analytics-kpis {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .sidebar {
    position: static;
    height: auto;
  }

  .tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-two,
  .form-row,
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Ofertas ───────────────────────────────────────────────────────────── */
.price-offer { color: var(--pink); font-weight: 700; }
.price-old { color: var(--muted); margin-left: 4px; }
.offer-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--pink);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

/* ── Imágenes de exhibición ────────────────────────────────────────────── */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 8px;
}
.showcase-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.showcase-preview { width: 100%; height: 150px; background: var(--rose-soft); }
.showcase-img { width: 100%; height: 150px; object-fit: cover; display: block; }
.showcase-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 16px;
  color: var(--muted);
  font-size: 13px;
}
.showcase-body { padding: 14px 16px 16px; }
.showcase-body h4 { margin: 0 0 10px; font-size: 14px; }
.showcase-upload {
  display: inline-block;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}
.showcase-upload:hover { background: var(--pink-dark); }

/* ── Chat con estudiantes ──────────────────────────────────────────────── */
.chat-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 18px;
  align-items: start;
}
.chat-list-card { display: flex; flex-direction: column; max-height: 72vh; }
.chat-search {
  margin: 0 0 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
}
.chat-students { overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.chat-student {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
}
.chat-student:hover { background: var(--rose-soft); }
.chat-student.active { background: var(--rose-soft); }
.chat-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.chat-avatar-fallback {
  display: flex; align-items: center; justify-content: center;
  background: var(--pink); color: #fff; font-size: 13px; font-weight: 700;
}
.chat-student-info { display: flex; flex-direction: column; overflow: hidden; }
.chat-student-name { font-size: 14px; font-weight: 600; }
.chat-student-mail { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.chat-thread-card { display: flex; flex-direction: column; height: 72vh; }
.chat-header {
  display: flex; flex-direction: column; gap: 2px;
  padding-bottom: 12px; margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.chat-thread {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 2px;
}
.chat-row { display: flex; }
.chat-row.mine { justify-content: flex-end; }
.chat-row.theirs { justify-content: flex-start; }
.chat-bubble {
  max-width: 72%;
  padding: 9px 13px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  line-height: 1.4;
}
.chat-row.mine .chat-bubble { background: var(--pink); color: #fff; border-bottom-right-radius: 4px; }
.chat-row.theirs .chat-bubble { background: #f1ede9; color: var(--ink); border-bottom-left-radius: 4px; }
.chat-bubble-time { font-size: 10px; opacity: 0.7; align-self: flex-end; }
.chat-audio { max-width: 220px; }
.chat-input {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.chat-input input {
  flex: 1;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
}

/* ── Chat: indicadores y voz (estilo app) ──────────────────────────────── */
.chat-indicator { padding: 4px 6px 8px; min-height: 22px; }

/* 3 puntos de "escribiendo" — el último crece y brilla rosa */
.typing-dots { display: inline-flex; align-items: center; gap: 5px; padding: 8px 12px; background: #f1ede9; border-radius: 14px; }
.typing-dots i { width: 7px; height: 7px; border-radius: 50%; background: #b8b0a6; display: inline-block; animation: typingPulse 1.4s infinite ease-in-out; }
.typing-dots i:nth-child(2) { animation-delay: 0.2s; }
.typing-dots i:nth-child(3) { animation-delay: 0.4s; background: var(--pink); animation: typingGrow 1.4s infinite ease-in-out; box-shadow: 0 0 8px rgba(223,47,143,0.7); }
@keyframes typingPulse { 0%,60%,100% { opacity: 0.4; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@keyframes typingGrow { 0%,60%,100% { opacity: 0.5; transform: scale(1); } 30% { opacity: 1; transform: scale(1.5); } }

/* Indicador "grabando nota de voz" */
.ind-rec { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; background: #fff1f7; color: var(--pink); border-radius: 14px; font-size: 13px; font-weight: 600; }
.ind-waves { display: inline-flex; align-items: center; gap: 2px; }
.ind-waves i { width: 3px; height: 10px; background: var(--pink); border-radius: 2px; animation: wave 1s infinite ease-in-out; }
.ind-waves i:nth-child(2){ animation-delay: .15s } .ind-waves i:nth-child(3){ animation-delay: .3s } .ind-waves i:nth-child(4){ animation-delay: .45s }
@keyframes wave { 0%,100% { height: 5px } 50% { height: 16px } }

/* Reproductor de nota de voz en la burbuja */
.chat-bubble-voice { min-width: 200px; }
.voice-msg { display: flex; align-items: center; gap: 10px; }
.voice-play { width: 34px; height: 34px; flex-shrink: 0; border: none; border-radius: 50%; cursor: pointer; font-size: 13px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.25); color: inherit; }
.chat-row.theirs .voice-play { background: var(--pink); color: #fff; }
.voice-track { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.4); overflow: hidden; }
.chat-row.theirs .voice-track { background: #d9d2ca; }
.voice-fill { display: block; height: 100%; width: 0%; background: #fff; }
.chat-row.theirs .voice-fill { background: var(--pink); }
.voice-dur { font-size: 11px; opacity: 0.85; min-width: 30px; text-align: right; }

/* Botón micrófono */
.chat-mic { width: 46px; height: 46px; flex-shrink: 0; border: none; border-radius: 50%; background: var(--pink); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.chat-mic:hover { background: var(--pink-dark); }

/* Barra de grabación */
.chat-recording-bar { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 10px 14px; border-top: 1px solid var(--line); }
.rec-cancel { width: 34px; height: 34px; border: none; border-radius: 50%; background: #f1ede9; cursor: pointer; font-size: 14px; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--pink); animation: recBlink 1s infinite; }
@keyframes recBlink { 0%,100% { opacity: 1 } 50% { opacity: 0.2 } }
.rec-timer { font-variant-numeric: tabular-nums; font-weight: 600; }
.rec-waves { display: inline-flex; align-items: center; gap: 3px; flex: 1; }
.rec-waves i { width: 3px; height: 10px; background: var(--pink); border-radius: 2px; animation: wave 1s infinite ease-in-out; }
.rec-waves i:nth-child(2){animation-delay:.1s} .rec-waves i:nth-child(3){animation-delay:.2s} .rec-waves i:nth-child(4){animation-delay:.3s} .rec-waves i:nth-child(5){animation-delay:.4s}
.rec-send { border: none; border-radius: 999px; background: var(--pink); color: #fff; padding: 9px 20px; font-weight: 600; cursor: pointer; }
.rec-send:hover { background: var(--pink-dark); }

/* ── Botones de icono del chat (iconos reales de la app) ───────────────── */
.chat-icon-btn { width: 46px; height: 46px; flex-shrink: 0; border: none; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.chat-mic { background: transparent; color: var(--pink); }
.chat-mic:hover { background: transparent; color: var(--pink-dark); }
.chat-send { background: var(--pink); color: #fff; }
.chat-send:hover { background: var(--pink-dark); }
.chat-send svg { margin-left: -1px; }
.rec-send { width: 42px; height: 42px; border-radius: 50%; padding: 0; }
.voice-play svg { display: block; }

/* ── Ajustes finales: micrófono tamaño del send, barra de grabación app ─── */
.chat-mic svg { width: 40px; height: 40px; }
.chat-send svg { width: 22px; height: 22px; }

/* Barra de grabación tipo app: contenida, redondeada, tinte rosa */
.chat-recording-bar {
  margin-top: 12px;
  padding: 8px 10px;
  border-top: none;
  background: var(--rose-soft);
  border-radius: 999px;
  gap: 10px;
}
.rec-cancel {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  color: var(--pink);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
}
.rec-cancel:hover { color: var(--pink-dark); background: rgba(223,47,143,0.08); }

/* ── Igualar a la app: botón círculo rosa + icono blanco con sombra ─────── */
.chat-icon-btn {
  width: 46px; height: 46px;
  background: var(--pink);
  color: #fff;
  box-shadow: 0 6px 14px rgba(233,27,140,0.30), 0 2px 6px rgba(0,0,0,0.10);
}
.chat-icon-btn:hover { background: var(--pink-dark); }
.chat-mic { background: var(--pink); color: #fff; }
.chat-mic:hover { background: var(--pink-dark); color: #fff; }
.chat-mic svg { width: 30px; height: 30px; }
.chat-send svg { width: 22px; height: 22px; }

/* Barra de texto como la app: blanca, redondeada (14), sombra rosada suave */
.chat-input { gap: 8px; align-items: center; }
.chat-input input {
  background: #fff;
  border: none;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 6px 18px rgba(233,27,140,0.10), 0 2px 8px rgba(0,0,0,0.06);
}
.chat-input input:focus { outline: none; }

/* ── Quitar las líneas divisoras del chat (cabecera e input) ────────────── */
.chat-header { border-bottom: none; }
.chat-input { border-top: none; }

/* ── Burbuja recibida en blanco con sombra; play sin contenedor ────────── */
.chat-row.theirs .chat-bubble {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(233,27,140,0.08), 0 2px 8px rgba(0,0,0,0.06);
}
.voice-play {
  background: transparent;
  box-shadow: none;
  width: 28px;
  height: 28px;
}
.voice-play:hover { background: transparent; }
.chat-row.theirs .voice-play { background: transparent; color: var(--pink); }
.chat-row.mine .voice-play { background: transparent; color: #fff; }
.voice-play svg { width: 20px; height: 20px; }

/* ── Play de la nota de voz más grande ─────────────────────────────────── */
.voice-play { width: 42px; height: 42px; }
.voice-play svg { width: 34px; height: 34px; }
.chat-bubble-voice { min-width: 220px; }

/* ── Fecha/hora arriba y fuera de la burbuja ───────────────────────────── */
.chat-row { flex-direction: column; }
.chat-row.mine { align-items: flex-end; }
.chat-row.theirs { align-items: flex-start; }
.chat-time { font-size: 10px; color: var(--muted); margin: 0 6px 3px; }

/* ── Editor de avatar de la instructora ────────────────────────────────── */
.avatar-editor { display: flex; align-items: center; gap: 18px; }
.avatar-preview { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; background: var(--rose-soft); flex-shrink: 0; }
.avatar-img { width: 96px; height: 96px; object-fit: cover; display: block; }
.avatar-empty { display: flex; align-items: center; justify-content: center; text-align: center; color: var(--muted); font-size: 12px; }

/* ── Resumen · Maison Manager ──────────────────────────────────────────── */
.admin-shell {
  grid-template-columns: 360px minmax(0, 1fr);
  background: #fdf9f8;
}

.sidebar {
  gap: 28px;
  padding: 48px 30px 30px;
  background: rgba(255, 255, 255, 0.62);
  border-right: 1px solid rgba(118, 68, 72, 0.05);
}

.brand-main {
  color: #c40055;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 35px;
  font-weight: 760;
  letter-spacing: -0.055em;
}

.brand-sub {
  margin-top: 9px;
  color: #49373a;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  letter-spacing: 0.14em;
}

.tabs { gap: 8px; }

.tabs button {
  position: relative;
  min-height: 54px;
  padding: 14px 18px 14px 72px;
  border-radius: 0;
  color: #4b363a;
  font-size: 16px;
  font-weight: 500;
}

.tabs button::before { content: none !important; display: none; }

.tabs .nav-icon {
  position: absolute;
  top: 50%;
  left: 30px;
  display: block;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  object-fit: contain;
  filter: invert(15%) sepia(99%) saturate(3765%) hue-rotate(325deg) brightness(77%) contrast(102%);
  transition: filter 160ms ease, transform 160ms ease;
}

.tabs button[data-tab="dashboard"]::before { content: "▦"; }
.tabs button[data-tab="courses"]::before { content: "◇"; }
.tabs button[data-tab="products"]::before { content: "▣"; }
.tabs button[data-tab="workshops"]::before { content: "▤"; }
.tabs button[data-tab="showcase"]::before { content: "▧"; }
.tabs button[data-tab="messages"]::before { content: "▱"; }
.tabs button[data-tab="creations"]::before { content: "◫"; }
.tabs button[data-tab="moderation"]::before { content: "▤"; }
.tabs button[data-tab="social"]::before { content: "◎"; }
.tabs button[data-tab="users"]::before { content: "♧"; }
.tabs button[data-tab="orders"]::before { content: "⌑"; }
.tabs button[data-tab="reviews"]::before { content: "☆"; }
.tabs button[data-tab="community"]::before { content: "▰"; }
.tabs button[data-tab="support"]::before { content: "?"; }
.tabs button[data-tab="notifications"]::before { content: "◌"; }
.tabs button[data-tab="analytics"]::before { content: "▥"; }

.tabs button.active,
.tabs button:hover {
  background: #f8e3e9;
  color: #c40055;
  box-shadow: inset -5px 0 #d90062;
}

.tabs button.active .nav-icon,
.tabs button:hover .nav-icon {
  filter: invert(15%) sepia(99%) saturate(3765%) hue-rotate(325deg) brightness(77%) contrast(102%);
}

.sidebar .ghost-action {
  min-height: 55px;
  border: 1px solid #e4b5c7;
  border-radius: 14px;
  background: transparent;
  box-shadow: none;
  color: #503b3e;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar .ghost-action .nav-icon {
  width: 16px;
  height: 16px;
  margin-right: 10px;
  vertical-align: -3px;
  filter: invert(15%) sepia(99%) saturate(3765%) hue-rotate(325deg) brightness(77%) contrast(102%);
}

.workspace {
  padding: 52px 50px 64px;
  background:
    radial-gradient(circle at 16% 0%, rgba(255, 255, 255, 0.92), transparent 36%),
    linear-gradient(115deg, #fffafa 0%, #fff7f5 100%);
}

.topbar {
  margin-bottom: 42px;
  align-items: flex-end;
}

.topbar .eyebrow {
  margin-bottom: 14px;
  color: #c40055;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  letter-spacing: 0.12em;
}

.topbar h2 {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 38px;
  font-weight: 760;
  letter-spacing: -0.045em;
}

.admin-user {
  min-width: 330px;
  justify-content: center;
  padding: 13px 20px;
  border: 1px solid #f1e7e7;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #533b41;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.status-dot {
  width: 12px;
  height: 12px;
  background: #32d49d;
  box-shadow: none;
}

.dashboard-panel.active { display: grid; gap: 30px; }

.dashboard-avatar-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  gap: 30px;
  min-height: 270px;
  padding: 42px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 40px rgba(132, 58, 81, 0.07);
}

.dashboard-avatar-card .avatar-editor {
  flex-direction: column;
  gap: 18px;
}

.dashboard-avatar-card .avatar-preview,
.dashboard-avatar-card .avatar-img {
  width: 158px;
  height: 158px;
}

.dashboard-avatar-card .avatar-preview {
  border: 5px solid #fff;
  box-shadow: 0 16px 35px rgba(207, 0, 85, 0.22);
}

.dashboard-avatar-card .showcase-upload {
  min-width: 172px;
  padding: 14px 18px;
  border-radius: 999px;
  background: linear-gradient(100deg, #c50059, #e71977);
  box-shadow: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}

.dashboard-avatar-card .showcase-upload::before {
  content: "▣";
  margin-right: 10px;
  font-size: 16px;
  vertical-align: -1px;
}

.dashboard-avatar-copy h3,
.dashboard-activity-card h3 {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 29px;
  font-weight: 750;
  letter-spacing: -0.04em;
}

.dashboard-avatar-copy .muted {
  max-width: 760px;
  margin: 16px 0 0;
  color: #543b3e;
  font-size: 18px;
  line-height: 1.55;
}

.stats-grid {
  gap: 30px;
  margin-bottom: 0;
}

.stat-card {
  min-height: 182px;
  padding: 29px 32px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 15px 28px rgba(131, 55, 79, 0.06);
}

.stat-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stat-card span {
  color: #583e41;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.stat-icon {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: invert(72%) sepia(37%) saturate(715%) hue-rotate(291deg) brightness(99%) contrast(87%);
}

.stat-card strong {
  margin-top: 33px;
  color: #c9005c;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 58px;
  font-weight: 760;
  letter-spacing: -0.07em;
  line-height: 0.9;
  text-shadow: 0 8px 14px rgba(201, 0, 92, 0.18);
}

.dashboard-activity-card {
  padding: 36px 32px 26px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 40px rgba(132, 58, 81, 0.06);
}

.dashboard-activity-card .section-head { margin-bottom: 32px; }

.dashboard-activity-card .muted {
  margin: 12px 0 0;
  color: #573d42;
  font-size: 16px;
}

#activityList { gap: 0; }

.activity-table-head,
.activity-table-row {
  display: grid;
  grid-template-columns: minmax(230px, 2fr) minmax(90px, 0.55fr) minmax(120px, 0.65fr) minmax(105px, 0.55fr);
  gap: 18px;
  align-items: center;
}

.activity-table-head {
  padding: 0 0 14px;
  color: #5d4246;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.activity-table-row {
  min-height: 68px;
  padding: 15px 0;
  border-top: 1px solid #f6eeee;
  color: #523a3e;
  font-size: 16px;
}

.activity-table-row strong {
  color: #1d1919;
  font-weight: 550;
}

.activity-status {
  justify-self: start;
  padding: 5px 11px;
  border-radius: 999px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.status-pending { background: #fff3c9; border: 1px solid #e7c76b; color: #76601c; }
.status-complete { background: #d9f0f3; border: 1px solid #83c6cf; color: #19707b; }
.status-cancelled { background: #fee3e5; border: 1px solid #edafb4; color: #a34551; }
.status-active { background: #fae3ec; border: 1px solid #eeb4cb; color: #bd2264; }

@media (max-width: 1180px) {
  .admin-shell { grid-template-columns: 290px minmax(0, 1fr); }
  .workspace { padding: 40px 30px; }
  .stats-grid { gap: 18px; }
  .dashboard-avatar-card { padding: 32px; }
}

@media (max-width: 980px) {
  .sidebar { padding: 28px 20px; }
  .tabs button { padding-left: 46px; font-size: 14px; }
  .tabs button::before { left: 16px; }
  .dashboard-avatar-card { grid-template-columns: 1fr; justify-items: start; }
  .dashboard-avatar-card .avatar-editor { flex-direction: row; }
  .activity-table-head,
  .activity-table-row { grid-template-columns: minmax(150px, 1.5fr) 0.7fr 0.8fr; }
  .activity-table-head span:last-child,
  .activity-table-row .activity-status { display: none; }
}

@media (max-width: 640px) {
  .workspace { padding: 28px 18px 42px; }
  .topbar { align-items: flex-start; flex-direction: column; margin-bottom: 28px; }
  .admin-user { min-width: 0; max-width: 100%; }
  .dashboard-avatar-card { padding: 28px 22px; }
  .dashboard-avatar-card .avatar-editor { flex-direction: column; align-items: flex-start; }
  .dashboard-avatar-copy h3,
  .dashboard-activity-card h3 { font-size: 25px; }
  .dashboard-avatar-copy .muted { font-size: 16px; }
  .activity-table-head,
  .activity-table-row { grid-template-columns: minmax(0, 1fr) 90px; }
  .activity-table-head span:nth-child(2),
  .activity-table-row > span:nth-child(2) { display: none; }
}

/* ── Mis creaciones (admin) ─────────────────────────────────────────────── */
.creations-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.creation-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.creation-img { width: 100%; height: 150px; object-fit: cover; display: block; }
.creation-body { padding: 10px 12px 12px; }
.creation-body h4 { margin: 0 0 4px; font-size: 14px; }
.creation-body .meta { margin: 0 0 8px; }
.creation-body .danger-action { width: 100%; }

/* ── Moderación de comentarios ─────────────────────────────────────────── */
.comments-list { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; }
.comment-row { display: flex; align-items: flex-start; gap: 12px; justify-content: space-between; padding: 12px 14px; background: var(--rose-soft); border-radius: 10px; }
.comment-body { flex: 1; }
.comment-body strong { font-size: 14px; }
.comment-body p { margin: 4px 0; font-size: 14px; }
.comment-body .meta { font-size: 11px; }

/* ── Botones de papelera (eliminar) ────────────────────────────────────── */
.creation-thumb { position: relative; }
.trash-overlay {
  position: absolute;
  top: 8px; right: 8px;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%;
  background: rgba(255,255,255,0.92);
  color: #d12c2c;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.trash-overlay:hover { background: #fff; color: #a50000; }
.trash-btn {
  flex-shrink: 0;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%;
  background: transparent;
  color: #d12c2c;
  cursor: pointer;
}
.trash-btn:hover { background: rgba(209,44,44,0.10); color: #a50000; }

/* ── Papelera sin contenedor (solo icono) ──────────────────────────────── */
.trash-overlay {
  background: transparent;
  box-shadow: none;
  width: auto;
  height: auto;
  padding: 0;
}
.trash-overlay:hover { background: transparent; }
.trash-overlay svg { filter: drop-shadow(0 1px 2px rgba(255,255,255,0.9)); }
.trash-btn { background: transparent; }
.trash-btn:hover { background: transparent; color: #a50000; }

/* ── Crear grupo ───────────────────────────────────────────────────────── */
.group-members { display: flex; flex-direction: column; gap: 4px; max-height: 320px; overflow-y: auto; margin-bottom: 14px; }
.group-member { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.group-member:hover { background: var(--rose-soft); }
.group-member input { width: 18px; height: 18px; accent-color: var(--pink); }
.group-member span { font-size: 14px; }

/* Campos de texto editables del hero (Exhibición) */
.hero-text-fields {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid #eee;
  padding-top: 12px;
}
.hero-text-fields label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
}
.hero-text-fields input,
.hero-text-fields textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #e6d3dd;
  border-radius: 8px;
  font: inherit;
  resize: vertical;
}

/* Órdenes: dirección de envío + items con enlace AliExpress */
.order-address {
  margin: 10px 0;
  padding: 10px 12px;
  background: #fdf3f8;
  border: 1px solid #f0d5e3;
  border-radius: 10px;
}
.order-address .address-block {
  margin: 6px 0 8px;
  font: inherit;
  white-space: pre-wrap;
  color: #333;
}
.order-items { display: flex; flex-direction: column; gap: 6px; }
.order-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-top: 1px solid #f0e6ec;
}
.order-item a.small-action { text-decoration: none; white-space: nowrap; }

/* ── Cursos · Maison Manager ──────────────────────────────────────────── */
.courses-panel.active {
  display: grid;
  gap: 26px;
  max-width: 1060px;
}

.courses-form-card {
  gap: 17px;
  padding: 28px 26px 26px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 34px rgba(126, 57, 76, 0.055);
}

.courses-form-card .section-head {
  align-items: center;
  margin: 0 0 7px;
}

.courses-form-card .section-head h3,
.courses-published-section > h3 {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 23px;
  font-weight: 620;
  letter-spacing: -0.035em;
}

.courses-form-card .text-action {
  padding: 5px 0;
  color: #c9005c;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.courses-form-card label {
  gap: 7px;
  color: #543e42;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.045em;
}

.courses-form-card input,
.courses-form-card textarea,
.courses-form-card select {
  min-height: 38px;
  padding: 10px 12px;
  border: 1px solid #d9d2d3;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: none;
  color: #4f586b;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
}

.courses-form-card textarea {
  min-height: 57px;
  line-height: 1.35;
}

.courses-form-card textarea[name="details"],
.courses-form-card textarea[name="learnings"] {
  min-height: 93px;
}

.courses-form-card input:focus,
.courses-form-card textarea:focus,
.courses-form-card select:focus {
  border-color: #a18c92;
  box-shadow: 0 0 0 2px rgba(201, 0, 92, 0.08);
}

.courses-form-card input[type="file"] {
  min-height: 34px;
  padding: 4px;
  color: #4f3b3f;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

.courses-form-card input[type="file"]::file-selector-button {
  margin-right: 14px;
  padding: 6px 10px;
  border: 1px solid #cac2c3;
  border-radius: 3px;
  background: #f6f3f2;
  color: #1d1819;
  font: inherit;
}

.courses-form-card .form-row { gap: 12px; }

.courses-form-card .input-auto {
  background: #fcf1f5 !important;
  color: #c9005c !important;
  font-weight: 500;
}

.courses-form-card .lessons-container { margin: -2px 0 0; }

.courses-form-card .lesson-card {
  border-color: #eadfe2;
  border-radius: 8px;
  background: #fffafa;
  box-shadow: none;
}

.courses-form-card .check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #32292b;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  letter-spacing: 0;
}

.courses-form-card .check-row input {
  width: 16px;
  min-height: 16px;
  height: 16px;
  padding: 0;
  border-radius: 4px;
  accent-color: #c9005c;
}

.courses-form-card .primary-action {
  min-height: 48px;
  margin-top: 17px;
  border-radius: 8px;
  background: linear-gradient(100deg, #c40058, #e11872);
  box-shadow: none;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 17px;
  font-weight: 700;
}

.courses-form-card .primary-action::before {
  content: "▣";
  margin-right: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
}

.courses-published-section {
  display: grid;
  gap: 17px;
}

.courses-published-section > h3 {
  margin: 0;
  font-size: 27px;
  font-weight: 620;
}

.courses-published-card {
  min-height: 300px;
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 34px rgba(126, 57, 76, 0.055);
}

.courses-published-card #coursesList {
  min-height: 300px;
}

.courses-published-card .item {
  padding: 18px 20px;
  border-radius: 0;
  box-shadow: none;
}

.courses-empty-state {
  display: flex;
  min-height: 300px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding: 35px 24px;
  text-align: center;
}

.courses-empty-icon {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  margin-bottom: 20px;
  border: 3px solid #fae9ef;
  border-radius: 50%;
  background: #fbe8f0;
  color: #c9005c;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 37px;
  font-weight: 700;
}

.courses-empty-state h4 {
  margin: 0;
  color: #171415;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 19px;
  font-weight: 640;
}

.courses-empty-state p {
  max-width: 360px;
  margin: 11px 0 17px;
  color: #563d42;
  font-size: 12px;
  line-height: 1.48;
}

.courses-empty-dots { display: flex; gap: 5px; }
.courses-empty-dots i { width: 29px; height: 3px; border-radius: 9px; background: #e9e3e4; }
.courses-empty-dots i:first-child { background: #e69ab8; }

/* La versión de referencia usa una barra lateral compacta en pantallas laptop. */
@media (min-width: 761px) and (max-width: 1080px) {
  .admin-shell { grid-template-columns: 220px minmax(0, 1fr); }
  .sidebar { position: sticky; height: 100vh; gap: 22px; padding: 23px 0 20px; }
  .brand-main { padding: 0 19px; font-size: 24px; }
  .brand-sub { padding: 0 19px; margin-top: 5px; font-size: 9px; }
  .tabs { grid-template-columns: 1fr; gap: 3px; }
  .tabs button { min-height: 45px; padding: 11px 12px 11px 45px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; letter-spacing: 0.02em; }
  .tabs .nav-icon { left: 20px; width: 15px; height: 15px; }
  .sidebar .ghost-action { min-height: 47px; margin: auto 0 0; border: 0; border-radius: 0; font-size: 10px; }
  .workspace { padding: 20px 29px 45px; }
  .topbar { margin-bottom: 20px; }
  .topbar .eyebrow { margin-bottom: 7px; font-size: 9px; }
  .topbar h2 { font-size: 24px; }
  .admin-user { min-width: 0; padding: 4px 0; border: 0; background: transparent; font-size: 9px; }
  .status-dot { width: 10px; height: 10px; }
  .courses-panel.active { max-width: none; gap: 22px; }
  .courses-form-card { padding: 25px; }
}

@media (max-width: 760px) {
  .courses-form-card { padding: 22px 18px; }
  .courses-form-card .form-row { grid-template-columns: 1fr; }
  .courses-published-section > h3 { font-size: 24px; }
}

/* ── Tienda · mismo sistema visual de Cursos ───────────────────────────── */
.products-panel.active {
  display: grid;
  gap: 26px;
  max-width: 1060px;
}

.products-form-card {
  gap: 17px;
  padding: 28px 26px 26px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 34px rgba(126, 57, 76, 0.055);
}

.products-form-card .section-head {
  align-items: center;
  margin: 0 0 7px;
}

.products-form-card .section-head h3,
.products-published-section > h3 {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 23px;
  font-weight: 620;
  letter-spacing: -0.035em;
}

.products-form-card .text-action {
  padding: 5px 0;
  color: #c9005c;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.products-form-card label {
  gap: 7px;
  color: #543e42;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.045em;
}

.products-form-card input,
.products-form-card textarea,
.products-form-card select {
  min-height: 38px;
  padding: 10px 12px;
  border: 1px solid #d9d2d3;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: none;
  color: #4f586b;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
}

.products-form-card textarea {
  min-height: 75px;
  line-height: 1.38;
}

.products-form-card input:focus,
.products-form-card textarea:focus,
.products-form-card select:focus {
  border-color: #a18c92;
  box-shadow: 0 0 0 2px rgba(201, 0, 92, 0.08);
}

.products-form-card input[type="file"] {
  min-height: 34px;
  padding: 4px;
  color: #4f3b3f;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

.products-form-card input[type="file"]::file-selector-button {
  margin-right: 14px;
  padding: 6px 10px;
  border: 1px solid #cac2c3;
  border-radius: 3px;
  background: #f6f3f2;
  color: #1d1819;
  font: inherit;
}

.products-form-card .form-row { gap: 12px; }

.products-form-card [data-fetch-images] {
  justify-self: start;
  padding: 10px 13px;
  border: 1px solid #e4b4c7;
  border-radius: 7px;
  background: #fff6fa;
  box-shadow: none;
  color: #c9005c;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.products-form-card .check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #32292b;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  letter-spacing: 0;
}

.products-form-card .check-row input {
  width: 16px;
  min-height: 16px;
  height: 16px;
  padding: 0;
  border-radius: 4px;
  accent-color: #c9005c;
}

.products-form-card .primary-action {
  min-height: 48px;
  margin-top: 17px;
  border-radius: 8px;
  background: linear-gradient(100deg, #c40058, #e11872);
  box-shadow: none;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 17px;
  font-weight: 700;
}

.products-form-card .primary-action::before {
  content: "▣";
  margin-right: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
}

.products-published-section {
  display: grid;
  gap: 17px;
}

.products-published-section > h3 {
  margin: 0;
  font-size: 27px;
  font-weight: 620;
}

.products-published-card {
  min-height: 300px;
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 34px rgba(126, 57, 76, 0.055);
}

.products-published-card #productsList { min-height: 300px; }

.products-published-card .item {
  padding: 18px 20px;
  border-radius: 0;
  box-shadow: none;
}

.products-empty-state {
  display: flex;
  min-height: 300px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding: 35px 24px;
  text-align: center;
}

.products-empty-icon {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  margin-bottom: 20px;
  border: 3px solid #fae9ef;
  border-radius: 50%;
  background: #fbe8f0;
  color: #c9005c;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 35px;
  font-weight: 700;
}

.products-empty-state h4 {
  margin: 0;
  color: #171415;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 19px;
  font-weight: 640;
}

.products-empty-state p {
  max-width: 360px;
  margin: 11px 0 17px;
  color: #563d42;
  font-size: 12px;
  line-height: 1.48;
}

.products-empty-dots { display: flex; gap: 5px; }
.products-empty-dots i { width: 29px; height: 3px; border-radius: 9px; background: #e9e3e4; }
.products-empty-dots i:first-child { background: #e69ab8; }

@media (min-width: 761px) and (max-width: 1080px) {
  .products-panel.active { max-width: none; gap: 22px; }
  .products-form-card { padding: 25px; }
}

@media (max-width: 760px) {
  .products-form-card { padding: 22px 18px; }
  .products-form-card .form-row { grid-template-columns: 1fr; }
  .products-published-section > h3 { font-size: 24px; }
}

/* ── Workshops ─────────────────────────────────────────────────────────── */
.workshops-panel.active {
  display: grid;
  gap: 28px;
  max-width: 1040px;
  margin: 0 auto;
}

.admin-shell[data-active-tab="workshops"] .topbar { display: none; }

.workshops-form-card {
  gap: 22px;
  padding: 47px 46px 43px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 42px rgba(126, 57, 76, 0.06);
}

.workshops-form-card .section-head {
  margin: 0 0 14px;
  padding-bottom: 28px;
  border-bottom: 1px solid #f0eceb;
}

.workshops-form-card .section-head h3,
.workshops-existing-head h3 {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 34px;
  font-weight: 680;
  letter-spacing: -0.045em;
}

.workshops-form-card .text-action {
  padding: 5px 0;
  color: #c9005c;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.workshops-form-card label {
  gap: 9px;
  color: #563e43;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.workshops-form-card input,
.workshops-form-card textarea,
.workshops-form-card select {
  min-height: 54px;
  padding: 13px 17px;
  border: 1px solid #e7becd;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
  color: #1f1b1c;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0;
}

.workshops-form-card textarea {
  min-height: 132px;
  line-height: 1.42;
}

.workshops-form-card input:focus,
.workshops-form-card textarea:focus,
.workshops-form-card select:focus {
  border-color: #c9005c;
  box-shadow: 0 0 0 3px rgba(201, 0, 92, 0.08);
}

.workshops-form-card .form-row { gap: 28px; }

.workshops-form-card .workshop-date-field {
  position: relative;
  display: block;
  width: 100%;
}

.workshops-form-card .workshop-date-field input[type="date"] {
  width: 100%;
  padding-right: 58px;
  background-image: none;
}

.workshops-form-card .workshop-date-trigger {
  position: absolute;
  top: 50%;
  right: 19px;
  z-index: 3;
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
}

.workshops-form-card .workshop-date-trigger img {
  display: block;
  width: 20px;
  height: 20px;
  filter: invert(16%) sepia(97%) saturate(3879%) hue-rotate(321deg) brightness(88%) contrast(102%);
}

.workshops-form-card .workshop-date-field input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 100%;
  margin: 0;
  opacity: 0;
}

.workshops-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 10px;
  padding-top: 28px;
  border-top: 1px solid #f0eceb;
}

.workshops-form-card .check-row {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #50383d;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  letter-spacing: 0;
}

.workshops-form-card .check-row input {
  width: 22px;
  min-height: 22px;
  height: 22px;
  padding: 0;
  border: 2px solid #94797f;
  border-radius: 6px;
  box-shadow: none;
  accent-color: #c9005c;
}

.workshops-form-card .primary-action {
  min-height: 53px;
  padding: 13px 23px;
  border-radius: 13px;
  background: linear-gradient(100deg, #c40058, #e11872);
  box-shadow: 0 11px 20px rgba(201, 0, 92, 0.2);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  font-weight: 700;
}

.workshops-form-card .primary-action::after {
  content: "→";
  margin-left: 13px;
  font-size: 24px;
  line-height: 0;
  vertical-align: -2px;
}

.workshops-existing-section {
  min-height: 450px;
  padding: 48px 46px 44px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 42px rgba(126, 57, 76, 0.06);
}

.workshops-existing-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 31px;
}

.workshops-list {
  min-height: 276px;
  padding: 0;
  border: 1px dashed #ecd7dc;
  border-radius: 17px;
}

.workshops-list .item {
  padding: 19px 21px;
  border-radius: 0;
  box-shadow: none;
}

.workshops-empty-state {
  display: flex;
  min-height: 274px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding: 34px 24px;
  text-align: center;
}

.workshops-empty-icon {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 50%;
  background: #fff0f4;
  color: #c9005c;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 31px;
  font-weight: 700;
}

.workshops-empty-state h4 {
  margin: 0;
  color: #171415;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 18px;
  font-weight: 650;
}

.workshops-empty-state p {
  max-width: 435px;
  margin: 11px 0 0;
  color: #553e43;
  font-size: 16px;
  line-height: 1.5;
}

@media (min-width: 761px) and (max-width: 1080px) {
  .workshops-panel.active { max-width: none; margin-top: 45px; }
  .workshops-form-card,
  .workshops-existing-section { padding: 34px 30px; border-radius: 19px; }
  .workshops-form-card .section-head h3,
  .workshops-existing-head h3 { font-size: 29px; }
  .workshops-form-card input,
  .workshops-form-card textarea,
  .workshops-form-card select { min-height: 48px; font-size: 15px; }
}

@media (max-width: 760px) {
  .workshops-panel.active { margin-top: 0; }
  .workshops-form-card,
  .workshops-existing-section { padding: 28px 19px; border-radius: 17px; }
  .workshops-form-card .section-head h3,
  .workshops-existing-head h3 { font-size: 26px; }
  .workshops-form-card .form-row { grid-template-columns: 1fr; gap: 18px; }
  .workshops-form-actions { align-items: stretch; flex-direction: column; }
  .workshops-form-card .primary-action { width: 100%; }
  .workshops-existing-head { align-items: flex-start; flex-direction: column; }
  .workshops-empty-state p { font-size: 14px; }
}

/* ── Exhibición ────────────────────────────────────────────────────────── */
.showcase-panel.active {
  display: block;
  position: relative;
  margin-top: 0;
}

.admin-shell[data-active-tab="showcase"] .topbar {
  display: flex;
  align-items: flex-end;
  margin-bottom: 54px;
}

.admin-shell[data-active-tab="showcase"] .topbar h2 {
  font-size: clamp(38px, 4vw, 54px);
}

.topbar-description {
  max-width: 800px;
  margin: 16px 0 0;
  color: #5b3e44;
  font-size: 20px;
  line-height: 1.42;
}

.showcase-shell {
  position: relative;
  z-index: 1;
  max-width: 1450px;
  padding: 0;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.showcase-shell > .section-head { display: none; }

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px;
  margin: 0;
}

.showcase-card {
  min-height: 710px;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 36px rgba(126, 57, 76, 0.055);
}

.showcase-body {
  display: flex;
  min-height: 710px;
  flex-direction: column;
  padding: 40px 38px 38px;
}

.showcase-body h4 {
  min-height: 69px;
  margin: 0 0 27px;
  color: #181516;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 27px;
  font-weight: 690;
  letter-spacing: -0.045em;
  line-height: 1.3;
}

.showcase-body h4::first-letter { text-transform: uppercase; }

.showcase-upload {
  position: relative;
  display: block;
  flex: 0 0 auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.showcase-upload:hover { background: transparent; }

.showcase-upload::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  pointer-events: none;
  opacity: 0;
  background: rgba(255, 240, 245, 0.38);
  transition: opacity 0.2s ease;
}

.showcase-upload-copy {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  padding: 15px 32px;
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(0.94);
  background: linear-gradient(100deg, #c90058, #e71474);
  box-shadow: 0 10px 20px rgba(193, 0, 83, 0.27);
  color: #fff;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.showcase-upload:hover .showcase-upload-copy,
.showcase-upload:focus-within .showcase-upload-copy {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.showcase-upload:hover::after,
.showcase-upload:focus-within::after { opacity: 1; }

.showcase-preview,
.showcase-img {
  width: 100%;
  height: 188px;
}

.showcase-preview {
  overflow: hidden;
  border: 2px dashed #efcbd4;
  border-radius: 13px;
  background: #fffdfd;
}

.showcase-img {
  display: block;
  object-fit: cover;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.showcase-upload:hover .showcase-img,
.showcase-upload:focus-within .showcase-img {
  filter: blur(2px);
  transform: scale(1.025);
}

.showcase-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 23px;
  color: #5b4448;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.42;
  text-align: center;
}

.showcase-empty::before {
  display: block;
  margin-right: 12px;
  color: #9a7d82;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 31px;
}

.showcase-card--home .showcase-empty::before { content: "▧"; }
.showcase-card--courses .showcase-empty::before { content: "◇"; }
.showcase-card--shop .showcase-empty::before { content: "▣"; }
.showcase-card--instructor .showcase-empty::before { content: "♧"; }

.showcase-card .hero-text-fields {
  display: grid;
  gap: 16px;
  margin-top: 24px;
  padding-top: 0;
  border-top: 0;
}

.showcase-card .hero-text-fields label {
  display: grid;
  gap: 8px;
  color: #634a4f;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.045em;
}

.showcase-card .hero-text-fields input,
.showcase-card .hero-text-fields textarea {
  min-height: 56px;
  padding: 13px 15px;
  border: 1px solid #806b72;
  border-radius: 9px;
  background: #fff;
  color: #1f1a1b;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.38;
  resize: none;
}

.showcase-card .hero-text-fields textarea { min-height: 115px; border-color: #ece1e3; }

.showcase-card .hero-text-fields input:focus,
.showcase-card .hero-text-fields textarea:focus {
  border-color: #c9005c;
  box-shadow: 0 0 0 3px rgba(201, 0, 92, 0.08);
}

.showcase-card .hero-text-fields .small-action {
  min-height: 57px;
  margin-top: auto;
  border: 0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(82, 42, 50, 0.14);
  color: #c9005c;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 17px;
  font-weight: 700;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.showcase-card .hero-text-fields .small-action:hover,
.showcase-card .hero-text-fields .small-action:focus-visible {
  background: #d90062;
  box-shadow: 0 13px 27px rgba(201, 0, 92, 0.28);
  color: #fff;
  transform: translateY(-1px);
}

.showcase-instructor-note {
  display: flex;
  gap: 13px;
  margin: 35px 0 0;
  padding: 25px 22px;
  border: 1px solid #eee5e3;
  border-radius: 13px;
  background: #f7f5f3;
  color: #594248;
  font-size: 16px;
  line-height: 1.48;
}

.showcase-instructor-note span {
  color: #8f710d;
  font-size: 23px;
  line-height: 1;
}

@media (max-width: 1320px) {
  .showcase-grid { gap: 24px; }
  .showcase-body { padding: 31px 25px; }
  .showcase-body h4 { font-size: 23px; }
  .showcase-card .hero-text-fields input,
  .showcase-card .hero-text-fields textarea { font-size: 15px; }
}

@media (max-width: 1080px) {
  .showcase-panel.active { margin-top: 0; }
  .showcase-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .showcase-panel.active { margin-top: 0; }
  .showcase-panel::before,
  .showcase-panel::after { display: none; }
  .showcase-grid { grid-template-columns: 1fr; }
  .showcase-card,
  .showcase-body { min-height: auto; }
  .showcase-body { padding: 30px 22px; }
}

/* ── Mensajes ─────────────────────────────────────────────────────────── */
#messages.active { max-width: 1450px; }

.admin-shell[data-active-tab="messages"] .topbar { margin-bottom: 38px; }

#messages .chat-layout {
  grid-template-columns: minmax(330px, 380px) minmax(0, 1fr);
  gap: 30px;
  align-items: stretch;
}

#messages .chat-list-card,
#messages .chat-thread-card {
  height: min(76vh, 1020px);
  min-height: 620px;
  border: 0;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 42px rgba(126, 57, 76, 0.055);
}

#messages .chat-list-card {
  max-height: none;
  padding: 34px 28px 26px;
  overflow: hidden;
}

#messages .chat-list-card .section-head {
  margin-bottom: 48px;
  padding: 0 4px;
}

#messages .chat-list-card .section-head h3 {
  color: #181516;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.035em;
}

#messages #newGroupBtn {
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(82, 42, 50, 0.14);
  color: #c60058;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#messages .chat-search {
  min-height: 64px;
  margin: 0 0 29px;
  padding: 0 17px 0 51px;
  border: 1px solid #efccd8;
  border-radius: 15px;
  background-color: #fffdfd;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239b8a8e' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='m16 16 4 4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 17px center;
  background-size: 22px;
  color: #3b282c;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 17px;
}

#messages .chat-search:focus {
  border-color: #d51b6a;
  box-shadow: 0 0 0 3px rgba(213, 27, 106, 0.08);
}

#messages .chat-students { gap: 11px; padding: 0 4px 8px; }

#messages .chat-student {
  min-height: 74px;
  gap: 15px;
  padding: 10px 0;
  border-radius: 14px;
}

#messages .chat-student:hover,
#messages .chat-student.active { background: #fff3f6; }

#messages .chat-student:hover,
#messages .chat-student.active { padding-right: 10px; padding-left: 10px; }

#messages .chat-avatar {
  width: 54px;
  height: 54px;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(70, 35, 41, 0.08);
}

#messages .chat-student-name {
  color: #21191b;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 17px;
  font-weight: 500;
}

#messages .chat-student-mail {
  margin-top: 5px;
  color: #67434a;
  font-size: 15px;
}

#messages .chat-thread-card {
  position: relative;
  padding: 34px 36px;
  overflow: hidden;
}

#messages .chat-header {
  padding-bottom: 18px;
  margin-bottom: 18px;
}

#messages .chat-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  max-width: 570px;
  margin: auto;
  color: #221719;
  text-align: center;
}

#messages .chat-empty-icon {
  display: grid;
  width: 118px;
  height: 118px;
  margin-bottom: 40px;
  border: 1px solid #eb9cba;
  border-radius: 50%;
  place-items: center;
  background: #f6d9e4;
  color: #d1467a;
}

#messages .chat-empty h3 {
  margin: 0 0 22px;
  color: #151112;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

#messages .chat-empty p {
  margin: 0;
  color: #5c343c;
  font-size: 18px;
  line-height: 1.55;
}

#messages .chat-thread { padding: 5px 2px; }

#messages .chat-input {
  margin-top: 18px;
  padding-top: 18px;
}

@media (max-width: 980px) {
  #messages .chat-layout { grid-template-columns: 1fr; }
  #messages .chat-list-card { height: auto; min-height: 390px; }
  #messages .chat-thread-card { height: min(72vh, 780px); }
}

@media (max-width: 640px) {
  #messages .chat-list-card,
  #messages .chat-thread-card { min-height: 0; border-radius: 20px; }
  #messages .chat-list-card { padding: 26px 20px; }
  #messages .chat-thread-card { height: 590px; padding: 26px 20px; }
  #messages .chat-list-card .section-head { margin-bottom: 28px; }
  #messages .chat-empty-icon { width: 90px; height: 90px; margin-bottom: 28px; }
  #messages .chat-empty h3 { font-size: 27px; }
  #messages .chat-empty p { font-size: 16px; }
}

/* ── Mis creaciones ───────────────────────────────────────────────────── */
#creations.active {
  display: flex;
  flex-direction: column;
  max-width: 1450px;
  gap: 42px;
}

.admin-shell[data-active-tab="creations"] .topbar { margin-bottom: 38px; }

#creations .creation-form-card {
  padding: 42px 46px 44px;
  border: 1px solid rgba(239, 203, 216, 0.7);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 44px rgba(126, 57, 76, 0.06);
}

#creations .creation-form-card > .section-head {
  margin-bottom: 38px;
  padding-bottom: 26px;
  border-bottom: 1px solid #f0e7e7;
}

#creations .creation-form-card > .section-head h3,
#creations .creations-published-head h3 {
  margin: 0;
  color: #181516;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.045em;
}

#creations .creation-form-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(0, 1.14fr);
  gap: 54px;
  align-items: stretch;
}

#creations .creation-image-field,
#creations .creation-text-fields > label {
  display: grid;
  gap: 13px;
  color: #684c52;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

#creations .creation-image-picker {
  position: relative;
  display: flex;
  min-height: 310px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 32px;
  border: 2px dashed #efc8d5;
  border-radius: 17px;
  background: linear-gradient(135deg, #fffdfd, #fff8fa);
  color: #65474d;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

#creations .creation-image-picker:hover {
  border-color: #d61866;
  background: #fff4f8;
}

#creations .creation-image-picker input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

#creations .creation-image-picker-icon {
  margin-bottom: 24px;
  color: #e5b8c7;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 47px;
  font-weight: 300;
  letter-spacing: -0.18em;
}

#creations .creation-image-picker strong {
  color: #64474d;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: none;
}

#creations .creation-image-picker small {
  margin-top: 11px;
  color: #9a8187;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

#creations .creation-text-fields {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  gap: 29px;
}

#creations .creation-text-fields input,
#creations .creation-text-fields textarea {
  width: 100%;
  min-height: 65px;
  padding: 16px 20px;
  border: 1px solid #8f7c81;
  border-radius: 14px;
  background: #fff;
  color: #21191b;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.42;
  resize: vertical;
  text-transform: none;
}

#creations .creation-text-fields textarea { min-height: 165px; }

#creations .creation-text-fields input:focus,
#creations .creation-text-fields textarea:focus {
  border-color: #d51b6a;
  box-shadow: 0 0 0 3px rgba(213, 27, 106, 0.08);
}

#creations .creation-text-fields .primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  align-self: flex-end;
  min-width: 194px;
  min-height: 61px;
  margin-top: auto;
  border-radius: 999px;
  background: linear-gradient(100deg, #c80058, #ea1b78);
  box-shadow: 0 12px 24px rgba(201, 0, 88, 0.2);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#creations .creation-submit-icon {
  width: 17px;
  height: 17px;
  filter: brightness(0) invert(1);
}

#creations .creations-published-section { display: grid; gap: 23px; }

#creations .creations-published-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

#creations .creations-published-head h3 { font-size: 31px; }

#creations .creation-count {
  padding: 10px 18px;
  border: 1px solid #edd9df;
  border-radius: 999px;
  background: #fffafa;
  color: #927379;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

#creations .creations-published-card {
  min-height: 350px;
  padding: 34px;
  border: 1px solid rgba(239, 203, 216, 0.7);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 44px rgba(126, 57, 76, 0.06);
}

#creations .creations-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
}

#creations .creation-card {
  border: 1px solid #f1e2e6;
  border-radius: 16px;
  box-shadow: none;
}

#creations .creation-img { height: 200px; }

#creations .creation-body { padding: 15px; }

#creations .creations-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: 280px;
  max-width: 550px;
  margin: 0 auto;
  color: #5d454a;
  text-align: center;
}

#creations .creations-empty-icon {
  display: grid;
  width: 94px;
  height: 94px;
  margin-bottom: 26px;
  border-radius: 50%;
  place-items: center;
  background: #f5eff0;
  color: #c6afb4;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 36px;
}

#creations .creations-empty h4 {
  margin: 0 0 15px;
  color: #201819;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

#creations .creations-empty p {
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  #creations .creation-form-layout { grid-template-columns: 1fr; gap: 30px; }
  #creations .creation-image-picker { min-height: 260px; }
}

@media (max-width: 640px) {
  #creations.active { gap: 30px; }
  #creations .creation-form-card,
  #creations .creations-published-card { padding: 27px 20px; border-radius: 20px; }
  #creations .creation-form-card > .section-head { margin-bottom: 28px; }
  #creations .creation-form-card > .section-head h3 { font-size: 29px; }
  #creations .creation-text-fields .primary-action { width: 100%; }
  #creations .creations-published-head { align-items: flex-start; flex-direction: column; }
  #creations .creations-empty h4 { font-size: 24px; }
  #creations .creations-empty p { font-size: 16px; }
}

/* ── Publicaciones ────────────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#moderation.active { display: block; max-width: 1450px; }

.admin-shell[data-active-tab="moderation"] .topbar { margin-bottom: 38px; }

#moderation .moderation-shell {
  min-height: 720px;
  padding: 48px 52px 50px;
  border: 0;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 44px rgba(126, 57, 76, 0.1);
}

#moderation .section-head {
  display: block;
  max-width: 960px;
  margin-bottom: 46px;
}

#moderation .section-head h3 {
  margin: 0 0 22px;
  color: #171314;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.045em;
}

#moderation .section-head .muted {
  margin: 0;
  color: #56343b;
  font-size: 18px;
  line-height: 1.5;
}

#moderation .moderation-tools {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  margin-bottom: 38px;
}

#moderation .moderation-search {
  position: relative;
  width: min(100%, 420px);
  min-width: 0;
}

#moderation .moderation-search::before {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 22px;
  width: 18px;
  height: 18px;
  content: "";
  transform: translateY(-50%);
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a4247' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='m16 16 4 4'/%3E%3C/svg%3E") center/contain no-repeat;
}

#moderation .moderation-search input,
#moderation .moderation-control {
  height: 62px;
  border: 1px solid #eed1db;
  border-radius: 999px;
  background: #fffdfd;
  color: #351f24;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  letter-spacing: 0.05em;
}

#moderation .moderation-search input {
  width: 100%;
  padding: 0 24px 0 57px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 17px;
  letter-spacing: 0;
}

#moderation .moderation-control {
  min-width: 154px;
  padding: 0 22px;
  border: 0;
  background: #fff;
  box-shadow: 0 10px 24px rgba(82, 42, 50, 0.12);
  cursor: pointer;
  text-align: center;
}

#moderation .moderation-filter {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-self: center;
  min-width: 180px;
}

#moderation .moderation-filter .moderation-control {
  width: 100%;
}

#moderation #moderationSort {
  justify-self: end;
}

#moderation .moderation-filter-chevron {
  display: inline-block;
  margin-left: 16px;
  font-size: 18px;
  line-height: 1;
  transition: transform 160ms ease;
}

#moderation .moderation-filter.is-open .moderation-filter-chevron {
  transform: rotate(180deg);
}

#moderation .moderation-filter-menu {
  position: absolute;
  z-index: 5;
  top: calc(100% + 14px);
  left: 50%;
  width: 100%;
  margin-top: 0;
  padding: 8px;
  border: 0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 30px rgba(82, 42, 50, 0.16);
  transform: translateX(-50%);
}

#moderation .moderation-filter-menu button {
  display: block;
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: #43282e;
  cursor: pointer;
  font: 600 15px/1 Inter, ui-sans-serif, system-ui, sans-serif;
  text-align: left;
}

#moderation .moderation-filter-menu button:hover,
#moderation .moderation-filter-menu button.active {
  background: #fff3f8;
  color: #d51b6a;
}

#moderation .moderation-control:hover,
#moderation .moderation-search input:focus {
  border-color: #d51b6a;
  box-shadow: 0 0 0 3px rgba(213, 27, 106, 0.07);
}

#moderation .moderation-control:hover {
  border: 0;
  box-shadow: 0 13px 28px rgba(82, 42, 50, 0.16);
}

#moderation .moderation-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
}

#moderation .creation-card {
  overflow: hidden;
  border: 0;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(82, 42, 50, 0.13);
}

#moderation .creation-thumb { position: relative; }

#moderation .creation-img {
  width: 100%;
  height: 245px;
  object-fit: cover;
}

#moderation .moderation-media-kind {
  position: absolute;
  top: 13px;
  left: 13px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(39, 24, 27, 0.72);
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#moderation .trash-overlay {
  top: 13px;
  right: 13px;
  width: 37px;
  height: 37px;
  border: 0;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 4px 12px rgba(64, 34, 39, 0.12);
}

#moderation .creation-body { padding: 24px 27px 28px; }

#moderation .creation-body h4 {
  margin: 0 0 9px;
  color: #171314;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.035em;
}

#moderation .creation-body .meta {
  margin: 0 0 21px;
  color: #59353c;
  font-size: 15px;
}

#moderation .moderation-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 19px;
  border-top: 1px solid #f5e8eb;
}

#moderation .moderation-likes {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #43282e;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
}

#moderation .moderation-likes img {
  width: 18px;
  height: 18px;
  filter: invert(18%) sepia(81%) saturate(2456%) hue-rotate(322deg) brightness(90%) contrast(102%);
}

#moderation .moderation-card-footer .small-action {
  min-height: 47px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(82, 42, 50, 0.14);
  color: #c60058;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

#moderation .moderation-card-footer .small-action:hover {
  background: #fff3f8;
  box-shadow: 0 13px 27px rgba(82, 42, 50, 0.18);
}

/* Comunidad usa el mismo diseño de tarjeta que Publicaciones */
#community .creations-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 300px)); justify-content: start; gap: 20px; }

#community .creation-card {
  overflow: hidden;
  border: 0;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(82, 42, 50, 0.13);
}

#community .creation-thumb { position: relative; }

#community .creation-img {
  width: 100%;
  height: 245px;
  object-fit: cover;
}

#community .creation-img-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 245px;
  background: #f6eef1;
  color: #b79aa2;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#community .trash-overlay {
  top: 13px;
  right: 13px;
  width: 37px;
  height: 37px;
  border: 0;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 4px 12px rgba(64, 34, 39, 0.12);
}

#community .creation-body { padding: 24px 27px 28px; }

#community .creation-body h4 {
  margin: 0 0 9px;
  color: #171314;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.035em;
}

#community .creation-body .meta {
  margin: 0 0 21px;
  color: #59353c;
  font-size: 15px;
}

#community .moderation-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 19px;
  border-top: 1px solid #f5e8eb;
}

#community .moderation-likes {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #43282e;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
}

#community .moderation-likes img {
  width: 18px;
  height: 18px;
  filter: invert(18%) sepia(81%) saturate(2456%) hue-rotate(322deg) brightness(90%) contrast(102%);
}

#community .moderation-card-footer .small-action {
  min-height: 47px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(82, 42, 50, 0.14);
  color: #c60058;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

#community .moderation-card-footer .small-action:hover {
  background: #fff3f8;
  box-shadow: 0 13px 27px rgba(82, 42, 50, 0.18);
}

#moderation .moderation-empty {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: 310px;
  color: #70565b;
  text-align: center;
}

#moderation .moderation-empty span {
  margin-bottom: 16px;
  color: #d9bbc5;
  font-size: 42px;
}

#moderation .moderation-empty p { margin: 0; font-size: 17px; }

@media (max-width: 1100px) {
  #moderation .moderation-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #moderation .moderation-shell { padding: 38px 34px; }
}

@media (max-width: 720px) {
  #moderation .moderation-shell { padding: 28px 20px; border-radius: 20px; }
  #moderation .section-head { margin-bottom: 30px; }
  #moderation .section-head h3 { font-size: 29px; }
  #moderation .section-head .muted { font-size: 16px; }
  #moderation .moderation-tools { grid-template-columns: 1fr; gap: 12px; }
  #moderation .moderation-control { width: 100%; }
  #moderation .moderation-search,
  #moderation .moderation-filter { width: 100%; }
  #moderation #moderationSort { justify-self: stretch; }
  #moderation .moderation-list { grid-template-columns: 1fr; }
}

/* ── Usuarias ─────────────────────────────────────────────────────────── */
#users,
#users *,
#users *::before,
#users *::after { box-sizing: border-box; }

#users.active { display: block; max-width: 1450px; }

.admin-shell[data-active-tab="users"] .topbar { margin-bottom: 38px; }

#users .users-shell {
  min-height: 650px;
  padding: 42px 44px 46px;
  border: 1px solid rgba(239, 203, 216, 0.72);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 44px rgba(126, 57, 76, 0.06);
}

#users .users-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  grid-template-areas:
    "title title"
    "search filters";
  align-items: center;
  gap: 18px 22px;
  margin-bottom: 34px;
}

#users .users-toolbar h3 {
  grid-area: title;
  margin: 0;
  color: #171314;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.045em;
  white-space: nowrap;
}

#users .users-search {
  position: relative;
  grid-area: search;
  min-width: 0;
}

#users .users-search::before {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 17px;
  width: 20px;
  height: 20px;
  content: "";
  transform: translateY(-50%);
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a99b9e' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='m16 16 4 4'/%3E%3C/svg%3E") center/contain no-repeat;
}

#users .users-search input {
  width: 100%;
  height: 54px;
  padding: 0 16px 0 50px;
  border: 0;
  border-radius: 12px;
  background: #fffdfd;
  color: #3d282d;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
}

#users .users-search input:focus {
  box-shadow: 0 0 0 2px rgba(213, 27, 106, 0.15);
}

#users .users-filters {
  display: grid;
  grid-template-columns: minmax(82px, 1fr) minmax(126px, 1.45fr) minmax(82px, 1fr);
  grid-area: filters;
  width: 360px;
  gap: 10px;
  padding: 0;
  background: transparent;
}

#users .users-filters button {
  min-width: 0;
  min-height: 43px;
  padding: 0 13px;
  border: 0;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(99, 54, 65, 0.12);
  color: #56393f;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  cursor: pointer;
}

#users .users-filters button.active {
  background: #fff;
  box-shadow: 0 10px 22px rgba(99, 54, 65, 0.14);
  color: #ca095b;
}

#users .users-list { gap: 18px; }

#users .user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 382px;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  min-height: 122px;
  padding: 24px 30px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: none;
}

#users .user-row-admin { border-left: 5px solid #f4ba00; }

#users .user-identity {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  gap: 22px;
}

#users .user-identity > div { min-width: 0; flex: 1; }

#users .user-avatar {
  width: 60px;
  height: 60px;
  flex: 0 0 auto;
  border: 2px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 9px rgba(69, 36, 43, 0.11);
}

#users .user-avatar-fallback {
  display: grid;
  place-items: center;
  background: #fff2ce;
  color: #846209;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 21px;
  font-weight: 600;
}

#users .user-identity h4 {
  margin: 0 0 8px;
  color: #141112;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 27px;
  font-weight: 650;
  letter-spacing: -0.035em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#users .user-identity .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 11px;
  margin: 0;
  color: #56383e;
  font-size: 16px;
  white-space: nowrap;
  min-width: 0;
}

#users .user-email {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

#users .users-role-badge {
  padding: 5px 11px;
  border-radius: 999px;
  background: #fde4ed;
  color: #c60058;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#users .users-role-badge-admin { background: #ffdc51; color: #5f4c00; }

#users .users-actions {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) minmax(0, 1fr);
  width: 382px;
  gap: 10px;
}

#users .users-edit {
  min-width: 0;
  min-height: 48px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(99, 54, 65, 0.12);
  color: #ca095b;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
}

#users .users-role-action {
  min-height: 48px;
  min-width: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(99, 54, 65, 0.12);
  color: #cc095c;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
}

#users .users-role-action:disabled {
  border: 0;
  background: #fff;
  box-shadow: 0 10px 22px rgba(99, 54, 65, 0.1);
  color: #b7adb0;
  cursor: not-allowed;
}

#users .users-empty {
  padding: 60px 20px;
  color: #72565c;
  font-size: 17px;
  text-align: center;
}

@media (max-width: 1120px) {
  #users .users-toolbar {
    grid-template-columns: minmax(0, 1fr) 360px;
    grid-template-areas:
      "title title"
      "search filters";
  }
  #users .user-row { display: flex; align-items: flex-start; flex-direction: column; gap: 20px; }
  #users .users-actions { width: 382px; }
}

@media (max-width: 640px) {
  #users .users-shell { padding: 28px 20px; border-radius: 20px; }
  #users .users-toolbar { display: flex; align-items: stretch; flex-direction: column; gap: 16px; }
  #users .users-toolbar h3 { font-size: 29px; }
  #users .users-search,
  #users .users-filters { width: 100%; }
  #users .users-filters button { flex: 1; min-width: 0; font-size: 13px; }
  #users .user-row { padding: 22px 18px; }
  #users .user-identity { align-items: flex-start; gap: 15px; }
  #users .user-identity h4 { font-size: 22px; }
  #users .user-identity .meta { font-size: 14px; }
  #users .users-actions { width: 100%; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1fr); }
  #users .users-role-action { min-width: 0; }
}

/* ── Órdenes ──────────────────────────────────────────────────────────── */
#orders,
#orders *,
#orders *::before,
#orders *::after { box-sizing: border-box; }

#orders.active {
  display: block;
  max-width: 1260px;
  padding: 54px 62px 60px;
  border: 1px solid rgba(239, 214, 222, 0.68);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.91);
  box-shadow: 0 20px 48px rgba(122, 63, 77, 0.06);
}

#orders .section-head { margin: 0 0 38px; }

#orders .orders-section-head {
  align-items: center;
}

#orders .section-head h3 {
  color: #171314;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 37px;
  font-weight: 650;
  letter-spacing: -0.045em;
}

#orders .orders-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

#orders .orders-bulk-actions button {
  min-height: 42px;
  border: 0;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(99, 54, 65, 0.12);
  color: #c60058;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

#orders .orders-bulk-actions .danger-action {
  border: 0;
  background: #fff;
  color: #b3262a;
}

#orders .orders-bulk-actions button:disabled {
  border: 0;
  background: #fff;
  color: #b9afb1;
  box-shadow: 0 10px 22px rgba(99, 54, 65, 0.1);
  cursor: not-allowed;
}

#orders .orders-selected-count {
  padding: 6px 10px;
  border-radius: 999px;
  background: #fde4ed;
  color: #c60058;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

#orders .orders-list { gap: 22px; }

#orders .order-card {
  display: grid;
  gap: 28px;
  padding: 34px;
  border: 1px solid #f0dce3;
  border-radius: 21px;
  background: #fff;
  box-shadow: none;
}

#orders .order-card.is-selected {
  border-color: #de89ab;
  box-shadow: 0 0 0 3px rgba(214, 8, 97, 0.07);
}

#orders .order-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 24px;
}

#orders .order-summary {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  min-width: 0;
  gap: 13px;
}

#orders .order-summary-content { min-width: 0; }

#orders .order-select-control {
  display: grid;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  cursor: pointer;
}

#orders .order-select-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

#orders .order-select-control > span:not(.sr-only) {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1.5px solid #dcb6c3;
  border-radius: 7px;
  background: #fff;
}

#orders .order-select-control > span:not(.sr-only)::after {
  width: 9px;
  height: 5px;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  content: "";
  opacity: 0;
  transform: rotate(-45deg) translate(1px, -1px);
}

#orders .order-select-control input:checked + span:not(.sr-only) {
  border-color: #ca095b;
  background: #ca095b;
}

#orders .order-select-control input:checked + span:not(.sr-only)::after { opacity: 1; }

#orders .order-select-control input:focus-visible + span:not(.sr-only) {
  outline: 3px solid rgba(202, 9, 91, 0.2);
  outline-offset: 2px;
}

#orders .order-summary h4 {
  margin: 0 0 10px;
  overflow-wrap: anywhere;
  color: #171314;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 25px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

#orders .order-summary h4 span { font-weight: 500; }

#orders .order-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #54343b;
  font-size: 15px;
}

#orders .order-meta b { color: #a88c94; font-weight: 500; }

#orders .order-current-status {
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff0f4;
  color: #c60058;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#orders .order-current-status--cancelled { background: #ffe1df; color: #af1d20; }
#orders .order-current-status--fulfilled,
#orders .order-current-status--completed { background: #dcefed; color: #08746e; }

#orders .order-status-actions { flex-wrap: wrap; justify-content: flex-end; }

#orders .order-status-actions button {
  min-height: 43px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #ffe4eb;
  color: #d00761;
  box-shadow: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

#orders .order-status-actions .danger-action { background: #ffe4e1; color: #bb272c; }

#orders .order-status-actions button:hover,
#orders .order-status-actions button.is-active {
  border-color: #e8aebe;
  background: #fff7f9;
  box-shadow: 0 5px 13px rgba(193, 29, 92, 0.1);
}

#orders .order-status-actions .danger-action:hover,
#orders .order-status-actions .danger-action.is-active {
  border-color: #ed9e9e;
  background: #fff6f5;
}

#orders .order-delete-action {
  min-height: 43px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #b3262a;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

#orders .order-delete-action:hover { background: #fff0ef; }

#orders .order-address {
  position: relative;
  margin: 0;
  padding: 30px 32px;
  border: 1px solid #f6dde4;
  border-radius: 16px;
  background: #fff8fa;
}

#orders .order-address::before {
  position: absolute;
  top: 33px;
  left: 15px;
  width: 4px;
  height: 24px;
  border-radius: 4px;
  background: #d40a62;
  content: "";
}

#orders .order-address strong {
  display: block;
  margin-bottom: 13px;
  color: #1f1819;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 18px;
  font-weight: 700;
}

#orders .order-address .address-block {
  margin: 0 0 17px;
  color: #56343b;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

#orders .order-copy-address {
  min-height: 38px;
  padding: 0;
  background: transparent;
  color: #c90059;
  box-shadow: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#orders .order-copy-address:hover { color: #8f0041; background: transparent; }

#orders .order-items {
  display: grid;
  gap: 0;
  padding-top: 3px;
  border-top: 1px solid #f2e3e7;
}

#orders .order-items-title {
  margin: 24px 0 5px;
  color: #7a5b63;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

#orders .order-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 21px 0;
  border-top: 1px solid #f3e7ea;
}

#orders .order-items-title + .order-item { border-top: 0; }

#orders .order-item-info { min-width: 0; }

#orders .order-item-info p {
  margin: 0;
  color: #20191a;
  font-size: 19px;
  line-height: 1.38;
}

#orders .order-item-info p span { white-space: nowrap; }

#orders .order-item-variant { margin-top: 11px; }

#orders .order-item .pill {
  margin-left: 0 !important;
  background: #fff0f4;
  color: #d00761;
  font-size: 11px;
}

#orders .order-item-actions { flex-wrap: wrap; justify-content: flex-end; }

#orders .order-item-actions .small-action {
  min-height: 43px;
  border: 1px solid #f2c7d5;
  border-radius: 12px;
  background: #fff8fa;
  box-shadow: none;
  color: #ca095b;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
}

#orders .order-item-actions .small-action:hover { background: #ffeaf1; }

@media (max-width: 940px) {
  #orders.active { padding: 38px 32px 42px; }
  #orders .orders-section-head { align-items: flex-start; flex-direction: column; }
  #orders .orders-bulk-actions { justify-content: flex-start; }
  #orders .order-card-head { grid-template-columns: 1fr; }
  #orders .order-status-actions { justify-content: flex-start; }
}

@media (max-width: 620px) {
  #orders.active { padding: 28px 18px 32px; border-radius: 22px; }
  #orders .section-head { margin-bottom: 26px; }
  #orders .section-head h3 { font-size: 29px; }
  #orders .orders-bulk-actions { width: 100%; }
  #orders .orders-bulk-actions button { flex: 1 1 100%; }
  #orders .order-card { gap: 23px; padding: 23px 19px; border-radius: 17px; }
  #orders .order-summary h4 { font-size: 22px; }
  #orders .order-meta { font-size: 14px; }
  #orders .order-status-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  #orders .order-status-actions button { width: 100%; }
  #orders .order-address { padding: 24px 25px; }
  #orders .order-address .address-block { font-size: 15px; }
  #orders .order-item { grid-template-columns: 1fr; gap: 14px; }
  #orders .order-item-info p { font-size: 17px; }
  #orders .order-item-actions { justify-content: flex-start; }
}

/* ── Reseñas ──────────────────────────────────────────────────────────── */
.reviews-header-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  width: min(640px, 56vw);
  gap: 16px;
  margin-left: auto;
}

.review-metric {
  position: relative;
  min-height: 116px;
  padding: 20px 23px;
  border: 0;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(99, 54, 65, 0.1);
}

.review-metric span {
  display: block;
  color: #57363d;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.review-metric-icon {
  position: absolute;
  top: 20px;
  right: 22px;
  width: 23px;
  height: 23px;
  object-fit: contain;
}

.review-icon-total,
.review-icon-pending { filter: invert(14%) sepia(98%) saturate(5327%) hue-rotate(324deg) brightness(80%) contrast(104%); }
.review-icon-average { filter: invert(70%) sepia(99%) saturate(678%) hue-rotate(2deg) brightness(101%) contrast(101%); }

.review-metric strong {
  display: block;
  margin-top: 13px;
  color: #151112;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 36px;
  font-weight: 650;
  letter-spacing: -0.05em;
}

.review-metric-pending { border: 0; background: #fff; box-shadow: 0 14px 30px rgba(99, 54, 65, 0.1); }
.review-metric-pending span,
.review-metric-pending strong { color: #c60058; }

.admin-shell[data-active-tab="reviews"] .topbar { align-items: flex-end; margin-bottom: 38px; }
.admin-shell[data-active-tab="reviews"] .topbar .admin-user { display: none; }

#reviews,
#reviews *,
#reviews *::before,
#reviews *::after { box-sizing: border-box; }

#reviews.active { display: block; max-width: 1260px; }

#reviews .reviews-shell {
  min-height: 690px;
  padding: 39px 34px 42px;
  border: 1px solid rgba(240, 226, 229, 0.8);
  border-radius: 27px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 20px 48px rgba(122, 63, 77, 0.05);
}

#reviews .reviews-section-head { margin-bottom: 26px; }

#reviews .reviews-section-head h3 {
  color: #181314;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 34px;
  font-weight: 650;
  letter-spacing: -0.045em;
}

#reviews .reviews-filter-control {
  position: relative;
  display: block;
  width: 141px;
}

#reviews .reviews-filter-control::before {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 19px;
  width: 18px;
  height: 18px;
  content: "";
  transform: translateY(-50%);
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a3c42' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 7h16M7 12h10m-7 5h4'/%3E%3C/svg%3E") center/contain no-repeat;
}

#reviews .reviews-filter-control select {
  height: 45px;
  padding: 0 13px 0 51px;
  border: 1px solid #f0d6df;
  border-radius: 11px;
  background: #fffafa;
  box-shadow: none;
  color: #50343a;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

#reviews .reviews-list { min-height: 548px; align-content: start; }
#reviews .review-card { align-content: start; }

#reviews .review-card {
  display: grid;
  gap: 18px;
  padding: 25px 26px;
  border: 1px solid #f1e1e5;
  border-radius: 17px;
  background: #fff;
  box-shadow: none;
}

#reviews .review-card-pending { border-left: 4px solid #d40762; }

#reviews .review-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
}

#reviews .review-author { display: flex; align-items: center; min-width: 0; gap: 14px; }

#reviews .review-avatar {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  background: #f8e8ee;
  color: #bd0a58;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(69, 36, 43, 0.1);
}

#reviews .review-author > div { min-width: 0; }

#reviews .review-author h4 {
  margin: 0 0 4px;
  overflow: hidden;
  color: #171314;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 18px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#reviews .review-author p { margin: 0; color: #725158; font-size: 14px; }

#reviews .review-rating { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
#reviews .review-rating .review-stars { display: inline-flex; gap: 3px; }
#reviews .rev-star {
  width: 16px;
  height: 16px;
  opacity: 0.26;
  filter: invert(62%) sepia(6%) saturate(420%) hue-rotate(300deg) brightness(96%) contrast(88%);
}
#reviews .rev-star.on {
  opacity: 1;
  filter: invert(18%) sepia(81%) saturate(2456%) hue-rotate(322deg) brightness(90%) contrast(102%);
}
#reviews .review-rating b { color: #5f4148; font-size: 13px; }

#reviews .review-body { margin: 0; color: #4e3037; font-size: 16px; line-height: 1.6; }

#reviews .review-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 17px;
  border-top: 1px solid #f3e7e9;
}

#reviews .review-status {
  padding: 5px 10px;
  border-radius: 999px;
  background: #dcefed;
  color: #08746e;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#reviews .review-status-pending { background: #fde4ed; color: #c60058; }

#reviews .review-actions { flex-wrap: wrap; justify-content: flex-end; }

#reviews .review-actions button {
  min-height: 39px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(82, 42, 50, 0.14);
  color: #c60058;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#reviews .review-actions button:hover {
  box-shadow: 0 11px 26px rgba(82, 42, 50, 0.2);
}

#reviews .review-actions .danger-action { border: 0; background: #fff; color: #b3262a; }

#reviews .reviews-empty {
  display: grid;
  min-height: 520px;
  align-content: center;
  justify-items: center;
  padding: 45px 20px;
  text-align: center;
}

#reviews .reviews-empty-icon {
  display: grid;
  width: 128px;
  height: 128px;
  margin-bottom: 28px;
  place-items: center;
  border-radius: 50%;
  background: #f2eeee;
  color: #edb5c4;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 66px;
}

#reviews .reviews-empty h4 {
  margin: 0 0 13px;
  color: #171314;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 27px;
  font-weight: 650;
  letter-spacing: -0.035em;
}

#reviews .reviews-empty p {
  max-width: 630px;
  margin: 0;
  color: #65434b;
  font-size: 16px;
  line-height: 1.6;
}

@media (max-width: 1080px) {
  .reviews-header-metrics { width: auto; grid-template-columns: repeat(3, minmax(112px, 1fr)); gap: 10px; }
  .review-metric { min-height: 102px; padding: 17px; }
}

@media (max-width: 760px) {
  .admin-shell[data-active-tab="reviews"] .topbar { align-items: flex-start; flex-direction: column; }
  .reviews-header-metrics { width: 100%; }
  #reviews .reviews-shell { min-height: 0; padding: 28px 20px; border-radius: 21px; }
  #reviews .reviews-section-head h3 { font-size: 29px; }
  #reviews .reviews-empty { min-height: 400px; }
}

@media (max-width: 530px) {
  .reviews-header-metrics { grid-template-columns: 1fr; }
  .review-metric { min-height: 88px; }
  .review-metric strong { margin-top: 8px; font-size: 30px; }
  #reviews .reviews-section-head { align-items: flex-start; flex-direction: column; }
  #reviews .reviews-filter-control { width: 100%; }
  #reviews .review-card { padding: 21px 18px; }
  #reviews .review-card-head,
  #reviews .review-card-footer { align-items: flex-start; flex-direction: column; }
  #reviews .review-actions { justify-content: flex-start; }
  #reviews .reviews-empty-icon { width: 105px; height: 105px; font-size: 55px; }
  #reviews .reviews-empty h4 { font-size: 23px; }
}

/* ── Comunidad ────────────────────────────────────────────────────────── */
#community,
#community *,
#community *::before,
#community *::after { box-sizing: border-box; }

#community.active { display: grid; max-width: 1260px; gap: 40px; }

#community .community-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

#community .community-metric {
  min-height: 142px;
  padding: 28px 30px;
  border: 1px solid rgba(242, 233, 234, 0.7);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 16px 36px rgba(121, 65, 77, 0.04);
}

#community .community-metric span {
  display: block;
  color: #59373e;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#community .community-metric strong {
  display: block;
  margin-top: 17px;
  color: #171314;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 37px;
  font-weight: 650;
  letter-spacing: -0.05em;
}

#community .community-metric-posts span { color: #c60058; }
#community .community-metric-comments span { color: #047080; }
#community .community-metric-today span { color: #8a5b00; }

#community .community-shell {
  min-height: 710px;
  padding: 42px 40px;
  border: 1px solid rgba(240, 228, 230, 0.8);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 20px 48px rgba(122, 63, 77, 0.055);
}

#community .community-shell .section-head { margin-bottom: 26px; }

#community .community-shell .section-head h3 {
  color: #181314;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 32px;
  font-weight: 650;
  letter-spacing: -0.04em;
}

#community .community-list { min-height: 575px; align-content: start; align-items: start; }

#community .community-card {
  display: grid;
  gap: 18px;
  padding: 25px 27px;
  border: 1px solid #f1e1e5;
  border-radius: 18px;
  background: #fff;
}

#community .community-card-head,
#community .community-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

#community .community-author { display: flex; align-items: center; min-width: 0; gap: 14px; }

#community .community-avatar {
  display: grid;
  width: 49px;
  height: 49px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  background: #fbe8ef;
  color: #c60058;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(69, 36, 43, 0.1);
}

#community .community-author > div { min-width: 0; }
#community .community-author h4 {
  margin: 0 0 4px;
  overflow: hidden;
  color: #1c1718;
  font-size: 18px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#community .community-author p { margin: 0; color: #77555d; font-size: 14px; }

#community .community-body { margin: 0; color: #4d3138; font-size: 16px; line-height: 1.6; }

#community .community-post-image {
  width: min(100%, 560px);
  max-height: 360px;
  border-radius: 13px;
  object-fit: cover;
}

#community .community-card-footer {
  justify-content: flex-start;
  padding-top: 15px;
  border-top: 1px solid #f3e7e9;
  color: #745159;
  font-size: 14px;
}
#community .community-card-footer span { margin-right: 18px; }

#community .community-actions { flex-wrap: wrap; justify-content: flex-end; }
#community .community-actions button {
  min-height: 39px;
  border: 1px solid #f0bfd0;
  border-radius: 10px;
  background: #fff8fa;
  box-shadow: none;
  color: #c60058;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
#community .community-actions .danger-action { border-color: #efb5b1; background: #fff5f4; color: #b3262a; }

#community .community-empty {
  display: grid;
  min-height: 550px;
  align-content: center;
  justify-items: center;
  padding: 45px 20px;
  text-align: center;
}

#community .community-empty-icon {
  display: grid;
  width: 128px;
  height: 128px;
  margin-bottom: 29px;
  place-items: center;
  border: 1px solid #f4b2cb;
  border-radius: 50%;
  background: #fde4ed;
  color: #d30b63;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 65px;
}

#community .community-empty h4 {
  max-width: 590px;
  margin: 0 0 13px;
  color: #171314;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.035em;
}

#community .community-empty p {
  max-width: 590px;
  margin: 0;
  color: #65434b;
  font-size: 16px;
  line-height: 1.62;
}

@media (max-width: 800px) {
  #community.active { gap: 27px; }
  #community .community-metrics { gap: 14px; }
  #community .community-metric { min-height: 118px; padding: 21px; }
  #community .community-shell { min-height: 0; padding: 30px 22px; border-radius: 21px; }
}

@media (max-width: 570px) {
  #community .community-metrics { grid-template-columns: 1fr; }
  #community .community-metric { min-height: 90px; }
  #community .community-metric strong { margin-top: 8px; font-size: 30px; }
  #community .community-shell .section-head h3 { font-size: 28px; }
  #community .community-card { padding: 21px 18px; }
  #community .community-card-head { align-items: flex-start; flex-direction: column; }
  #community .community-actions { justify-content: flex-start; }
  #community .community-empty { min-height: 420px; }
  #community .community-empty-icon { width: 105px; height: 105px; font-size: 54px; }
  #community .community-empty h4 { font-size: 23px; }
}

/* ── Soporte ──────────────────────────────────────────────────────────── */
#support,
#support *,
#support *::before,
#support *::after { box-sizing: border-box; }

#support.active { display: grid; max-width: 1260px; gap: 40px; }

#support .support-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

#support .support-metric {
  position: relative;
  min-height: 174px;
  padding: 30px 31px;
  border: 1px solid rgba(242, 233, 234, 0.72);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 16px 36px rgba(121, 65, 77, 0.04);
}

#support .support-metric span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #57363d;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#support .support-metric strong {
  display: inline-block;
  margin-top: 54px;
  color: #1a1516;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 38px;
  font-weight: 650;
  letter-spacing: -0.05em;
}

#support .support-metric em {
  margin-left: 9px;
  color: #61424a;
  font-size: 16px;
  font-style: normal;
}

#support .support-metric-icon {
  position: absolute;
  top: 30px;
  right: 30px;
  width: 24px;
  height: 24px;
  object-fit: contain;
}

#support .support-metric-open span,
#support .support-metric-open strong { color: #c60058; }
#support .support-metric-open .support-metric-icon { filter: invert(15%) sepia(97%) saturate(5024%) hue-rotate(322deg) brightness(79%) contrast(103%); }
#support .support-metric-response span,
#support .support-metric-response strong { color: #067283; }
#support .support-metric-response .support-metric-icon { filter: invert(35%) sepia(91%) saturate(694%) hue-rotate(141deg) brightness(86%) contrast(96%); }
#support .support-metric-closed span,
#support .support-metric-closed strong { color: #8a6100; }
#support .support-metric-closed .support-metric-icon { filter: invert(35%) sepia(63%) saturate(899%) hue-rotate(3deg) brightness(88%) contrast(101%); }

#support .support-shell {
  min-height: 720px;
  padding: 42px 41px 38px;
  border: 1px solid rgba(240, 228, 230, 0.82);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 20px 48px rgba(122, 63, 77, 0.055);
}

#support .support-section-head {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee4e5;
}

#support .support-section-head h3 {
  color: #181314;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 33px;
  font-weight: 650;
  letter-spacing: -0.04em;
}

#support .support-search { position: relative; display: block; width: min(320px, 42vw); }
#support .support-search::before {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 17px;
  width: 20px;
  height: 20px;
  content: "";
  transform: translateY(-50%);
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a3c42' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='m16 16 4 4'/%3E%3C/svg%3E") center/contain no-repeat;
}
#support .support-search input {
  height: 52px;
  padding: 0 15px 0 51px;
  border: 1px solid #efb8ca;
  border-radius: 999px;
  background: #fffdfd;
  box-shadow: none;
  color: #4d353b;
  font-size: 16px;
}

#support .tickets-list { min-height: 506px; }

#support .ticket-card {
  display: grid;
  gap: 17px;
  padding: 25px 26px;
  border: 1px solid #f0dfe4;
  border-radius: 17px;
  background: #fff;
}
#support .ticket-card-closed { opacity: 0.82; }

#support .ticket-card-head,
#support .ticket-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
#support .ticket-subject { display: flex; align-items: center; min-width: 0; gap: 13px; }
#support .ticket-marker {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: #fde4ed;
  color: #cf0960;
  font-size: 19px;
  font-weight: 800;
}
#support .ticket-card-closed .ticket-marker { background: #e2f0ee; color: #07736d; }
#support .ticket-subject > div { min-width: 0; }
#support .ticket-subject h4 {
  margin: 0 0 4px;
  overflow: hidden;
  color: #1c1718;
  font-size: 18px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#support .ticket-subject p { margin: 0; color: #76535b; font-size: 14px; }
#support .ticket-status {
  padding: 5px 10px;
  border-radius: 999px;
  background: #fde4ed;
  color: #c60058;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
#support .ticket-status-closed { background: #dcefed; color: #08746e; }
#support .ticket-body { margin: 0; color: #4f3339; font-size: 16px; line-height: 1.6; }
#support .ticket-card-footer { padding-top: 16px; border-top: 1px solid #f3e7e9; color: #967980; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
#support .ticket-actions { flex-wrap: wrap; justify-content: flex-end; }
#support .ticket-actions button {
  min-height: 39px;
  border: 1px solid #f0bfd0;
  border-radius: 10px;
  background: #fff8fa;
  box-shadow: none;
  color: #c60058;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
#support .ticket-actions .danger-action { border-color: #efb5b1; background: #fff5f4; color: #b3262a; }
#support .ticket-actions button:disabled { border-color: transparent; background: #f4f3f3; color: #aaa0a3; cursor: not-allowed; }

#support .support-empty {
  display: grid;
  min-height: 500px;
  align-content: center;
  justify-items: center;
  padding: 45px 20px;
  text-align: center;
}
#support .support-empty-icon {
  display: grid;
  width: 126px;
  height: 126px;
  margin-bottom: 30px;
  place-items: center;
  border-radius: 50%;
  background: #fce4ed;
  color: #cf0960;
  font-size: 60px;
}
#support .support-empty h4 { margin: 0 0 13px; color: #171314; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 29px; font-weight: 650; letter-spacing: -0.04em; }
#support .support-empty p { max-width: 600px; margin: 0; color: #65434b; font-size: 16px; line-height: 1.62; }

#support .support-history-wrap { display: flex; justify-content: center; padding-top: 15px; }
#support .support-history-button {
  min-height: 50px;
  padding: 0 25px;
  border: 1px solid #db0c63;
  border-radius: 10px;
  background: #fff;
  color: #c60058;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  font-weight: 650;
}
#support .support-history-button:hover { background: #fff4f8; }

@media (max-width: 800px) {
  #support.active { gap: 27px; }
  #support .support-metrics { gap: 14px; }
  #support .support-metric { min-height: 138px; padding: 22px; }
  #support .support-metric strong { margin-top: 41px; }
  #support .support-shell { min-height: 0; padding: 30px 22px; border-radius: 21px; }
}

@media (max-width: 570px) {
  #support .support-metrics { grid-template-columns: 1fr; }
  #support .support-metric { min-height: 95px; }
  #support .support-metric strong { margin-top: 10px; font-size: 30px; }
  #support .support-metric::after { display: none; }
  #support .support-section-head { align-items: flex-start; flex-direction: column; }
  #support .support-search { width: 100%; }
  #support .support-section-head h3 { font-size: 28px; }
  #support .ticket-card { padding: 21px 18px; }
  #support .ticket-card-head,
  #support .ticket-card-footer { align-items: flex-start; flex-direction: column; }
  #support .ticket-actions { justify-content: flex-start; }
  #support .support-empty { min-height: 400px; }
  #support .support-empty-icon { width: 105px; height: 105px; font-size: 52px; }
  #support .support-empty h4 { font-size: 24px; }
}

/* ── Notificaciones ───────────────────────────────────────────────────── */
#notifications,
#notifications *,
#notifications *::before,
#notifications *::after { box-sizing: border-box; }

#notifications.active { display: grid; max-width: 1260px; gap: 36px; }

#notifications .notifications-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

#notifications .notification-metric {
  position: relative;
  min-height: 160px;
  padding: 29px 30px;
  border: 1px solid rgba(241, 232, 233, 0.78);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 15px 35px rgba(113, 62, 72, 0.04);
}

#notifications .notification-metric::after {
  display: none;
}

#notifications .notification-metric span {
  display: block;
  color: #54363d;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#notifications .notification-metric strong {
  display: block;
  margin-top: 29px;
  color: #181314;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 35px;
  font-weight: 650;
  letter-spacing: -0.05em;
}

#notifications .notification-metric em {
  display: block;
  margin-top: 10px;
  color: #8a6b72;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0.03em;
}

#notifications .notification-metric .notification-metric-icon {
  position: absolute;
  top: 29px;
  right: 30px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
}

#notifications .notification-metric .notification-metric-icon img {
  display: block;
  width: 19px;
  height: 19px;
  object-fit: contain;
}

#notifications .notification-icon-sent { background: #fce3ed; }
#notifications .notification-icon-sent img { filter: invert(15%) sepia(99%) saturate(4343%) hue-rotate(323deg) brightness(82%) contrast(99%); }
#notifications .notification-metric-rate { background: #fffdf8; }
#notifications .notification-icon-rate { background: #ffe8a3; }
#notifications .notification-icon-rate img { filter: invert(43%) sepia(98%) saturate(476%) hue-rotate(4deg) brightness(91%) contrast(101%); }
#notifications .notification-metric-alerts { background: #fcfefe; }
#notifications .notification-icon-alerts { background: #dcecef; }
#notifications .notification-icon-alerts img { filter: invert(34%) sepia(78%) saturate(1071%) hue-rotate(140deg) brightness(87%) contrast(95%); }

#notifications .notifications-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  align-items: start;
  gap: 28px;
}

#notifications .notification-compose-card {
  display: grid;
  gap: 22px;
  padding: 39px 39px 36px;
  border: 1px solid rgba(240, 227, 230, 0.82);
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 48px rgba(122, 63, 77, 0.055);
}

#notifications .notification-compose-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

#notifications .notification-compose-head h3 {
  margin: 0 0 9px;
  color: #181314;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 33px;
  font-weight: 650;
  letter-spacing: -0.045em;
}

#notifications .notification-compose-head p { margin: 0; color: #593b42; font-size: 17px; }
#notifications .notification-compose-card label {
  gap: 9px;
  color: #2f2225;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

#notifications .notification-compose-card input,
#notifications .notification-compose-card textarea,
#notifications .notification-compose-card select {
  border: 1px solid #edc9d5;
  border-radius: 12px;
  background: #fffdfd;
  box-shadow: none;
  color: #493139;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
}

#notifications .notification-compose-card input { min-height: 57px; }
#notifications .notification-compose-card textarea { min-height: 141px; line-height: 1.5; }
#notifications .notification-character-count { justify-self: end; margin-top: -12px; color: #997c83; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; font-weight: 500; letter-spacing: 0.05em; text-transform: none; }

#notifications .notification-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 27px; }

#notifications .notification-compose-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 23px;
  border-top: 1px solid #f0e4e7;
}

#notifications .notification-compose-footer p {
  margin: 0;
  padding: 13px 15px;
  border: 1px solid #f0dce3;
  border-radius: 10px;
  background: #fffafb;
  color: #654149;
  font-size: 14px;
}

#notifications .notification-compose-footer .primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 57px;
  min-width: 220px;
  border-radius: 12px;
  background: #d70762;
  box-shadow: 0 10px 20px rgba(201, 0, 85, 0.19);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#notifications .notification-send-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  filter: brightness(0) invert(1);
}

#notifications .notifications-sidebar { display: grid; gap: 25px; }

#notifications .notification-status-card,
#notifications .notification-recent-card {
  padding: 28px;
  border: 1px solid rgba(240, 227, 230, 0.82);
  border-radius: 19px;
  box-shadow: 0 15px 35px rgba(122, 63, 77, 0.04);
}

#notifications .notification-status-card { background: #f8f5f2; }
#notifications .notification-status-card h3,
#notifications .notification-recent-card h3 { margin: 0 0 12px; color: #1a1516; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 25px; font-weight: 650; letter-spacing: -0.035em; }
#notifications .notification-status-card #notificationStatus { color: #5d4147; font-size: 15px; line-height: 1.55; }

#notifications .notification-recent-card { background: rgba(255, 255, 255, 0.91); }
#notifications .notification-recent-list { display: grid; gap: 18px; }
#notifications .notification-recent-item { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 13px; padding-bottom: 17px; border-bottom: 1px solid #f0e4e7; }
#notifications .notification-recent-item:last-child { padding-bottom: 0; border-bottom: 0; }
#notifications .notification-recent-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: #fde4ed; color: #ca095b; font-size: 17px; }
#notifications .notification-recent-item h4 { margin: 1px 0 5px; overflow: hidden; color: #24191b; font-size: 16px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
#notifications .notification-recent-item p { display: -webkit-box; margin: 0 0 8px; overflow: hidden; color: #76545c; font-size: 13px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
#notifications .notification-recent-item small { color: #96777f; font-size: 11px; }
#notifications .notification-recent-item small b { padding: 4px 7px; border-radius: 5px; background: #fde4ed; color: #c60058; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; letter-spacing: 0.07em; text-transform: uppercase; }
#notifications .notification-recent-empty { padding: 24px 0; color: #86676e; font-size: 14px; line-height: 1.5; }

@media (max-width: 980px) {
  #notifications .notifications-layout { grid-template-columns: 1fr; }
  #notifications .notifications-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  #notifications.active { gap: 25px; }
  #notifications .notifications-metrics { gap: 13px; }
  #notifications .notification-metric { min-height: 135px; padding: 21px; }
  #notifications .notification-metric strong { margin-top: 24px; font-size: 30px; }
  #notifications .notification-metric::after { top: 21px; right: 21px; }
  #notifications .notification-compose-card { padding: 30px 22px; border-radius: 21px; }
}

@media (max-width: 570px) {
  #notifications .notifications-metrics,
  #notifications .notifications-sidebar,
  #notifications .notification-field-row { grid-template-columns: 1fr; }
  #notifications .notification-metric { min-height: 100px; }
  #notifications .notification-metric strong { margin-top: 10px; }
  #notifications .notification-metric::after { display: none; }
  #notifications .notification-compose-head h3 { font-size: 29px; }
  #notifications .notification-compose-head p { font-size: 15px; }
  #notifications .notification-compose-footer { align-items: stretch; flex-direction: column; }
  #notifications .notification-compose-footer .primary-action { width: 100%; }
}

/* ── Análisis (rediseño desactivado: se conserva el layout estable) ───── */
@media not all {
#analytics,
#analytics *,
#analytics *::before,
#analytics *::after { box-sizing: border-box; }

.admin-shell[data-active-tab="analytics"] .workspace {
  position: relative;
  padding: 0 32px 64px;
  background: linear-gradient(118deg, #fffdfd 0%, #fff9f9 60%, #fff7f8 100%);
}

.admin-shell[data-active-tab="analytics"] .workspace::before {
  position: absolute;
  top: 90px;
  left: 32px;
  width: 155px;
  height: 75px;
  border-radius: 3px;
  background: linear-gradient(100deg, rgba(157, 112, 124, 0.32), rgba(255, 255, 255, 0.03));
  content: "";
  filter: blur(18px);
  opacity: 0.35;
  pointer-events: none;
}

.admin-shell[data-active-tab="analytics"] .sidebar {
  background: #fff;
}

.admin-shell[data-active-tab="analytics"] .brand-main {
  font-size: 0;
}

.admin-shell[data-active-tab="analytics"] .brand-main::after {
  color: #c60058;
  content: "Maison Manager";
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 25px;
  font-weight: 750;
  letter-spacing: -0.045em;
}

.admin-shell[data-active-tab="analytics"] .brand-sub {
  margin-top: 5px;
  font-size: 0;
  letter-spacing: 0;
}

.admin-shell[data-active-tab="analytics"] .brand-sub::after {
  color: #4d3d40;
  content: "Admin Dashboard";
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 400;
}

.admin-shell[data-active-tab="analytics"] .topbar {
  min-height: 64px;
  margin: 0 -32px 126px;
  padding: 0 25px;
  align-items: center;
  border-bottom: 1px solid #f0e8e8;
  background: rgba(255, 255, 255, 0.62);
}

.admin-shell[data-active-tab="analytics"] .topbar > div:first-child,
.admin-shell[data-active-tab="analytics"] .topbar > .admin-user,
.admin-shell[data-active-tab="analytics"] .topbar > .reviews-header-metrics {
  display: none !important;
}

.analytics-header {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.analytics-search {
  display: flex;
  width: min(350px, 52vw);
  min-height: 36px;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid #7d7578;
  border-radius: 999px;
  background: #fff;
  color: #584449;
  box-shadow: none;
}

.analytics-search span { font-size: 18px; line-height: 1; }
.analytics-search input {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #251d1f;
  font-size: 13px;
}
.analytics-search input:focus { box-shadow: none; }
.analytics-search input::placeholder { color: #4f4446; opacity: 1; }

.analytics-account {
  display: flex;
  align-items: center;
  gap: 13px;
  color: #241b1d;
  font-size: 13px;
  white-space: nowrap;
}

.analytics-bell { position: relative; color: #441920; font-size: 21px; }
.analytics-bell::after {
  position: absolute;
  top: -1px;
  right: -5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #df0a61;
  content: "";
}

.analytics-avatar {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid #f1cad8;
  border-radius: 50%;
  background: linear-gradient(135deg, #fee8f0, #e9f7f3);
  color: #c80059;
  font-family: Georgia, serif;
  font-size: 13px;
  font-weight: 700;
}

#analytics.active {
  display: grid;
  width: min(100%, 1100px);
  max-width: 1100px;
  gap: 34px;
}

#analytics .analytics-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 28px;
  row-gap: 32px;
  margin: 0;
}

#analytics .akpi {
  min-height: 125px;
  padding: 21px 20px;
  border: 0;
  border-left: 5px solid #ee75a7;
  border-radius: 12px;
  background: linear-gradient(105deg, #fff 10%, #fff6fa 100%);
  box-shadow: 0 12px 30px rgba(115, 59, 73, 0.042);
}

#analytics .akpi:nth-child(5),
#analytics .akpi:nth-child(6) { grid-column: span 2; }

#analytics .akpi-wide {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
}

#analytics .akpi-wide .akpi-label { margin: 0 0 5px; }
#analytics .akpi-wide .akpi-sub { margin: 0; }
#analytics .akpi-wide .akpi-val { margin: 0; font-size: 26px; }

#analytics .akpi-val {
  margin: 0 0 7px;
  color: #d70861;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.045em;
}

#analytics .akpi-label {
  margin: 0 0 5px;
  color: #21191a;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  font-weight: 700;
}

#analytics .akpi-sub { margin: 0; color: #7b5c64; font-size: 12px; }

#analytics .analytics-row {
  gap: 36px;
  margin: 0;
}

#analytics .analytics-revenue-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }

#analytics .analytics-primary-row:not(.analytics-revenue-row) { grid-template-columns: repeat(2, minmax(0, 1fr)); }

#analytics .analytics-chart-card {
  display: grid;
  min-height: 342px;
  padding: 27px 26px 22px;
  border: 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(122, 63, 77, 0.045);
}

#analytics .analytics-revenue-row .analytics-chart-card { min-height: 420px; }
#analytics .analytics-primary-row:not(.analytics-revenue-row) .analytics-chart-card { min-height: 430px; }

#analytics .analytics-chart-card h3,
#analytics .analytics-orders-card h3 {
  margin: 0;
  color: #1a1516;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

#analytics .analytics-chart-head,
#analytics .analytics-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

#analytics .analytics-chart-head span {
  color: #57383f;
  font-size: 12px;
  white-space: nowrap;
}

#analytics .analytics-chart-card canvas {
  width: 100% !important;
  max-height: none;
  min-height: 300px;
}

#analytics .analytics-donut-card,
#analytics .analytics-revenue-card,
#analytics .analytics-ratings-card { position: relative; }

#analytics .analytics-donut-center {
  position: absolute;
  top: 55%;
  left: 50%;
  display: grid;
  min-width: 105px;
  gap: 4px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  text-align: center;
}

#analytics .analytics-donut-center strong {
  color: #171415;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.05em;
}

#analytics .analytics-donut-center span {
  color: #4d353b;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
}

#analytics .analytics-empty-overlay {
  position: absolute;
  top: 58%;
  right: 20px;
  left: 20px;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 9px;
  transform: translateY(-50%);
  pointer-events: none;
  text-align: center;
}

#analytics .analytics-empty-overlay span {
  color: #aa9da0;
  font-size: 28px;
  line-height: 1;
}

#analytics .analytics-empty-overlay p {
  margin: 0;
  color: #3a292d;
  font-size: 12px;
}

#analytics .analytics-ratings-empty span { font-size: 31px; }

#analytics .analytics-orders-card {
  margin-top: -15px;
  padding: 24px 0 4px;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(122, 63, 77, 0.045);
}

#analytics .analytics-table-head { padding: 0 28px 23px; }
#analytics .analytics-table-head span { color: #cf0960; font-size: 12px; font-weight: 700; white-space: nowrap; }

#analytics .analytics-table-wrap { overflow-x: auto; }
#analytics .atable { min-width: 660px; font-size: 13px; }
#analytics .atable th {
  padding: 15px 20px;
  border: 0;
  background: #fffafa;
  color: #72555d;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
#analytics .atable td { padding: 16px 20px; border-bottom-color: #f3eaeb; color: #2a1d20; }
#analytics .atable td strong { color: #d70861; }
#analytics .atable tr:hover td { background: #fff6f9; }
#analytics .atable .pill { padding: 4px 9px; font-size: 10px; }

#analytics .analytics-secondary-row { grid-template-columns: repeat(2, minmax(0, 1fr)); opacity: 0.96; }
#analytics .analytics-secondary-row .analytics-chart-card { min-height: 290px; }

@media (max-width: 980px) {
  .admin-shell[data-active-tab="analytics"] .workspace { padding: 0 26px 45px; }
  .admin-shell[data-active-tab="analytics"] .topbar { margin: 0 -26px 68px; padding: 0 26px; }
  #analytics .analytics-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  #analytics .akpi:nth-child(5),
  #analytics .akpi:nth-child(6) { grid-column: auto; }
  #analytics .analytics-revenue-row,
  #analytics .analytics-primary-row:not(.analytics-revenue-row),
  #analytics .analytics-secondary-row { grid-template-columns: 1fr; }
}

@media (min-width: 761px) and (max-width: 1080px) {
  .admin-shell[data-active-tab="analytics"] { grid-template-columns: 230px minmax(0, 1fr); }
  .admin-shell[data-active-tab="analytics"] .sidebar { padding: 20px 0; }
  .admin-shell[data-active-tab="analytics"] .brand-main,
  .admin-shell[data-active-tab="analytics"] .brand-sub { padding: 0 20px; }
}

/* En escritorio compacto se conserva exactamente la composición de la referencia. */
@media (min-width: 761px) and (max-width: 980px) {
  #analytics .analytics-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  #analytics .akpi:nth-child(5),
  #analytics .akpi:nth-child(6) { grid-column: span 2; }
  #analytics .analytics-revenue-row { grid-template-columns: minmax(0, 2fr) minmax(185px, 1fr); }
  #analytics .analytics-primary-row:not(.analytics-revenue-row),
  #analytics .analytics-secondary-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Análisis usa una composición propia; no hereda la navegación extendida del
   resto del administrador. El menú completo sigue disponible al pasar el
   cursor o al navegar con teclado por la barra lateral. */
.admin-shell[data-active-tab="analytics"] {
  grid-template-columns: 230px minmax(0, 1fr);
}

.admin-shell[data-active-tab="analytics"] .sidebar {
  position: sticky;
  overflow: hidden;
  gap: 0;
  padding: 20px;
}

.admin-shell[data-active-tab="analytics"] .brand-main,
.admin-shell[data-active-tab="analytics"] .brand-sub {
  padding: 0;
}

.admin-shell[data-active-tab="analytics"] .tabs {
  display: block;
  margin-top: auto;
  margin-bottom: 108px;
}

.admin-shell[data-active-tab="analytics"] .tabs button {
  display: none;
  width: 100%;
}

.admin-shell[data-active-tab="analytics"] .tabs button[data-tab="community"] {
  display: block;
  min-height: 46px;
  padding: 12px 10px 12px 38px;
  color: #4b363a;
  font-size: 13px;
  font-weight: 500;
}

.admin-shell[data-active-tab="analytics"] .tabs button[data-tab="community"]::before {
  left: 9px;
  width: 18px;
  font-size: 17px;
}

.admin-shell[data-active-tab="analytics"] .sidebar::after {
  position: absolute;
  bottom: 69px;
  left: 20px;
  color: #4b363a;
  content: "⚙  Configuración";
  font-size: 13px;
  font-weight: 500;
  pointer-events: none;
}

.admin-shell[data-active-tab="analytics"] .sidebar .ghost-action {
  min-height: 38px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #c60058;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
}

.admin-shell[data-active-tab="analytics"] .sidebar .ghost-action::before {
  margin-right: 9px;
  content: "↪";
  font-size: 19px;
  vertical-align: -1px;
}

.admin-shell[data-active-tab="analytics"] .sidebar:hover,
.admin-shell[data-active-tab="analytics"] .sidebar:focus-within {
  overflow: visible;
}

.admin-shell[data-active-tab="analytics"] .sidebar:hover .tabs,
.admin-shell[data-active-tab="analytics"] .sidebar:focus-within .tabs {
  position: absolute;
  top: 109px;
  right: 0;
  left: 0;
  z-index: 4;
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 10px 12px 16px;
  background: #fff;
  box-shadow: 15px 17px 33px rgba(71, 42, 50, 0.10);
}

.admin-shell[data-active-tab="analytics"] .sidebar:hover .tabs button,
.admin-shell[data-active-tab="analytics"] .sidebar:focus-within .tabs button {
  display: block;
  min-height: 38px;
  padding: 9px 10px 9px 37px;
  font-size: 12px;
}

.admin-shell[data-active-tab="analytics"] .sidebar:hover .tabs button::before,
.admin-shell[data-active-tab="analytics"] .sidebar:focus-within .tabs button::before {
  left: 10px;
  font-size: 15px;
}

@media (max-width: 760px) {
  .admin-shell[data-active-tab="analytics"] .sidebar { position: static; overflow: visible; }
  .admin-shell[data-active-tab="analytics"] .tabs { display: grid; margin: 0; }
  .admin-shell[data-active-tab="analytics"] .tabs button { display: block; }
  .admin-shell[data-active-tab="analytics"] .sidebar::after { display: none; }
}

@media (max-width: 570px) {
  .admin-shell[data-active-tab="analytics"] .workspace { padding: 0 18px 36px; }
  .admin-shell[data-active-tab="analytics"] .topbar { min-height: 58px; margin: 0 -18px 36px; padding: 0 18px; }
  .analytics-account span:last-child { display: none; }
  .analytics-search { width: 100%; }
  #analytics.active { gap: 20px; }
  #analytics .analytics-kpis { grid-template-columns: 1fr; }
  #analytics .akpi { min-height: 100px; padding: 20px; }
  #analytics .akpi-val { font-size: 27px; }
  #analytics .analytics-chart-card { min-height: 300px; padding: 23px 18px 17px; border-radius: 15px; }
  #analytics .analytics-chart-card canvas { min-height: 225px; }
  #analytics .analytics-chart-head,
  #analytics .analytics-table-head { align-items: flex-start; flex-direction: column; }
  #analytics .analytics-orders-card { border-radius: 15px; }
  #analytics .analytics-table-head { padding: 0 20px 19px; }
}
}

/* Cursos y Tienda: misma escala tipográfica que Workshops. */
.courses-form-card .section-head h3,
.products-form-card .section-head h3,
.courses-published-section > h3,
.products-published-section > h3 {
  font-size: 34px;
}

.courses-form-card .text-action,
.products-form-card .text-action,
.courses-form-card label,
.products-form-card label,
.courses-form-card input[type="file"],
.products-form-card input[type="file"],
.products-form-card [data-fetch-images] {
  font-size: 13px;
}

.courses-form-card input,
.courses-form-card textarea,
.courses-form-card select,
.products-form-card input,
.products-form-card textarea,
.products-form-card select {
  font-size: 17px;
}

.courses-form-card .check-row,
.products-form-card .check-row,
.courses-empty-state p,
.products-empty-state p {
  font-size: 16px;
}

@media (min-width: 761px) and (max-width: 1080px) {
  .courses-form-card .section-head h3,
  .products-form-card .section-head h3,
  .courses-published-section > h3,
  .products-published-section > h3 { font-size: 29px; }

  .courses-form-card input,
  .courses-form-card textarea,
  .courses-form-card select,
  .products-form-card input,
  .products-form-card textarea,
  .products-form-card select { font-size: 15px; }
}

/* Fondo blanco y tarjetas con sombra en todo Maison Manager. */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
}

html,
body,
.auth-shell,
.admin-shell,
.sidebar,
.workspace {
  background: #ffffff !important;
  background-image: none !important;
}

#adminView .section-card,
#adminView [class$="-card"],
#adminView [class*="-card "],
#adminView .item {
  background: #ffffff !important;
  box-shadow: 0 10px 26px rgba(43, 27, 32, 0.10) !important;
}

#adminView .tabs button,
#adminView .sidebar .ghost-action {
  background: #ffffff !important;
  box-shadow: 0 7px 18px rgba(43, 27, 32, 0.09) !important;
}

#adminView .tabs button.active,
#adminView .tabs button:hover {
  background: #ffffff !important;
  box-shadow: inset -5px 0 #d90062, 0 7px 18px rgba(43, 27, 32, 0.12) !important;
}

/* Campos de texto y selección: sin bordes, con sombra suave. */
#loginView input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
#adminView input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
#loginView textarea,
#adminView textarea,
#loginView select,
#adminView select {
  border: 0 !important;
  background: #ffffff !important;
  box-shadow: 0 8px 20px rgba(43, 27, 32, 0.12) !important;
}

#loginView input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
#adminView input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
#loginView textarea:focus,
#adminView textarea:focus,
#loginView select:focus,
#adminView select:focus {
  box-shadow: 0 0 0 3px rgba(217, 0, 98, 0.16), 0 10px 24px rgba(43, 27, 32, 0.14) !important;
}

/* Archivos y acciones primarias: blanco limpio, sin borde y con profundidad. */
#loginView input[type="file"],
#adminView input[type="file"] {
  border: 0 !important;
  background: #ffffff !important;
  box-shadow: 0 8px 20px rgba(43, 27, 32, 0.12) !important;
}

#loginView input[type="file"]::file-selector-button,
#adminView input[type="file"]::file-selector-button {
  margin-right: 14px;
  padding: 8px 13px;
  border: 0 !important;
  border-radius: 8px;
  background: #ffffff !important;
  box-shadow: 0 5px 12px rgba(43, 27, 32, 0.16) !important;
  color: var(--ink);
  cursor: pointer;
}

#adminView .primary-action {
  box-shadow: 0 12px 24px rgba(201, 0, 92, 0.28) !important;
}

/* Los símbolos previos de Guardar se eliminan para que el botón quede limpio. */
#adminView .courses-form-card .primary-action::before,
#adminView .products-form-card .primary-action::before {
  content: none !important;
  margin: 0 !important;
}

/* Estados vacíos: el icono comunica el contenido de cada sección. */
#adminView .empty-section-icon {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: invert(15%) sepia(99%) saturate(3765%) hue-rotate(325deg) brightness(77%) contrast(102%);
}

/* Estados vacíos: solo el SVG, sin aros, fondos ni bordes alrededor. */
#adminView .courses-empty-icon,
#adminView .products-empty-icon,
#adminView .workshops-empty-icon,
#adminView .creations-empty-icon,
#adminView .reviews-empty-icon,
#adminView .community-empty-icon,
#adminView .support-empty-icon,
#adminView .chat-empty-icon {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#adminView .courses-empty-icon .empty-section-icon,
#adminView .products-empty-icon .empty-section-icon,
#adminView .workshops-empty-icon .empty-section-icon,
#adminView .creations-empty-icon .empty-section-icon,
#adminView .reviews-empty-icon .empty-section-icon,
#adminView .community-empty-icon .empty-section-icon,
#adminView .support-empty-icon .empty-section-icon,
#adminView .chat-empty-icon .empty-section-icon {
  width: 52px;
  height: 52px;
}

#adminView .showcase-empty { gap: 10px; }
#adminView .showcase-empty::before { content: none !important; }
#adminView .showcase-empty .empty-section-icon { width: 38px; height: 38px; flex: 0 0 auto; }

#adminView .users-empty,
#adminView .notification-recent-empty,
#adminView .moderation-empty,
#adminView .empty-item {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

#adminView .users-empty p,
#adminView .notification-recent-empty p,
#adminView .moderation-empty p,
#adminView .empty-item p { margin: 0; }

/* Botones para imágenes: forma más recta, sombra y sin símbolos extra. */
#adminView .dashboard-avatar-card .showcase-upload {
  border-radius: 10px !important;
  background: #ffffff !important;
  color: #d90062 !important;
  box-shadow: 0 10px 22px rgba(201, 0, 92, 0.30) !important;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

#adminView .dashboard-avatar-card .showcase-upload::before {
  content: none !important;
  margin: 0 !important;
}

#adminView .dashboard-avatar-card .showcase-upload:hover,
#adminView .dashboard-avatar-card .showcase-upload:focus-within {
  background: #d90062 !important;
  color: #ffffff !important;
  box-shadow: 0 12px 24px rgba(201, 0, 92, 0.36) !important;
}

#adminView .showcase-upload-copy {
  border-radius: 10px !important;
  box-shadow: 0 10px 22px rgba(201, 0, 92, 0.30) !important;
}

/* Sin órdenes no queda ningún contenedor ni espacio residual. */
#adminView #orders[hidden] { display: none !important; }

#community .community-metric span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#community .community-metric-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

#community .community-metric-posts .community-metric-icon {
  filter: invert(13%) sepia(99%) saturate(3720%) hue-rotate(329deg) brightness(83%) contrast(106%);
}

#community .community-metric-comments .community-metric-icon {
  filter: invert(37%) sepia(69%) saturate(821%) hue-rotate(142deg) brightness(80%) contrast(103%);
}

#community .community-metric-today .community-metric-icon {
  filter: invert(35%) sepia(50%) saturate(815%) hue-rotate(5deg) brightness(88%) contrast(103%);
}

@media (max-width: 760px) {
  .courses-form-card .section-head h3,
  .products-form-card .section-head h3,
  .courses-published-section > h3,
  .products-published-section > h3 { font-size: 26px; }

  .courses-form-card input,
  .courses-form-card textarea,
  .courses-form-card select,
  .products-form-card input,
  .products-form-card textarea,
  .products-form-card select { font-size: 15px; }
}

/* Marca del sidebar: nombre directo desde el HTML, tamaño y color fijos en
   todas las pestañas. Se anula cualquier ::after para evitar duplicados. */
.brand-main {
  font-size: 24px !important;
  color: #d70861 !important;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.brand-sub {
  font-size: 12px !important;
  color: #6b5459 !important;
}
.brand-main::after,
.brand-sub::after { content: none !important; }
.admin-shell[data-active-tab="analytics"] .brand-main,
.admin-shell[data-active-tab="analytics"] .brand-sub { font-size: revert; }
.admin-shell[data-active-tab="analytics"] .brand-main { font-size: 24px !important; }

/* ══════════════════════════════════════════════════════════════════════════
   ANÁLISIS · Encabezado con búsqueda + Admin User (siempre aplica, sin @media)
   Reemplaza el topbar por defecto SOLO en la pestaña Análisis, replicando la
   referencia: barra de búsqueda, campana y "Admin User".
   ═════════════════════════════════════════════════════════════════════════ */
.admin-shell[data-active-tab="analytics"] .topbar > div:first-child,
.admin-shell[data-active-tab="analytics"] .topbar > .admin-user,
.admin-shell[data-active-tab="analytics"] .topbar > .reviews-header-metrics { display: none !important; }

.analytics-header { display: none; }
.admin-shell[data-active-tab="analytics"] .analytics-header {
  display: flex !important;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 56px;
}
.analytics-header .analytics-search {
  display: flex !important;
  align-items: center;
  gap: 8px;
  width: min(380px, 46vw);
  min-height: 40px;
  padding: 9px 16px;
  border: 1px solid #e2d7db !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #7d6f73;
  font-size: 13px;
  box-shadow: none !important;
}
.analytics-header .analytics-search span { font-size: 17px; line-height: 1; }
.analytics-header .analytics-search input {
  flex: 1;
  min-height: auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #333;
  font-size: 13px;
}
.analytics-header .analytics-account {
  display: flex;
  align-items: center;
  gap: 13px;
  color: #241b1d;
  font-size: 13px;
  white-space: nowrap;
}
.analytics-header .analytics-bell { font-size: 20px; line-height: 1; }
.analytics-header .analytics-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fee8f0, #e9f7f3);
  border: 1px solid #f1cad8;
  color: #c80059;
  font-weight: 700;
  font-size: 12px;
}

/* ══════════════════════════════════════════════════════════════════════════
   ANÁLISIS · Texto centrado en donas + estados vacíos (siempre aplica)
   Fuerza la posición sin depender de @media, como en la imagen de referencia.
   ═════════════════════════════════════════════════════════════════════════ */
.analytics-donut-card,
.analytics-revenue-card,
.analytics-ratings-card { position: relative; }

.analytics-donut-center {
  position: absolute !important;
  top: 56%; left: 50%;
  transform: translate(-50%, -50%) !important;
  display: grid !important;
  gap: 3px;
  text-align: center;
  pointer-events: none;
}
.analytics-donut-center strong {
  font-size: 22px; font-weight: 700; color: #1a1516; line-height: 1;
}
.analytics-donut-center span {
  font-size: 10px; letter-spacing: 0.12em; color: #6b555b;
}

.analytics-empty-overlay {
  position: absolute !important;
  top: 60%; left: 0; right: 0;
  transform: translateY(-50%) !important;
  display: grid !important;
  justify-items: center;
  gap: 7px;
  text-align: center;
  pointer-events: none;
}
.analytics-empty-overlay[hidden] { display: none !important; }
.analytics-empty-overlay span { font-size: 26px; color: #b7a7ab; line-height: 1; }
.analytics-empty-overlay p { margin: 0; font-size: 12px; color: #5f4a50; }

/* ══════════════════════════════════════════════════════════════════════════
   MENÚ LATERAL plano y limpio (como la imagen de referencia)
   Anula las "tarjetas blancas con sombra" en los botones del menú.
   ═════════════════════════════════════════════════════════════════════════ */
#adminView .tabs { gap: 2px !important; }
#adminView .tabs button {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 12px !important;
  min-height: 46px !important;
}
#adminView .tabs button.active,
#adminView .tabs button:hover {
  background: #fdeef4 !important;
  box-shadow: none !important;
  color: #c40055 !important;
}
#adminView .tabs button.active { box-shadow: inset 3px 0 0 #d90062 !important; }
#adminView .sidebar .ghost-action {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #d90062 !important;
}
#adminView .sidebar {
  background: #ffffff !important;
  border-right: 1px solid #f0e8ea !important;
}


/* ══════════════════════════════════════════════════════════════════════════
   ESTRUCTURA como la imagen: la ventana termina en "Resumen de ingresos por
   orden". Se ocultan las gráficas extra que iban DESPUÉS de la tabla
   (Cursos más vendidos, Productos más vendidos, Actividad, Tickets).
   ═════════════════════════════════════════════════════════════════════════ */
#analytics .analytics-secondary-row { display: none !important; }

/* ══════════════════════════════════════════════════════════════════════════
   Tamaño de tarjetas como la imagen: se limita el ancho del área de análisis
   (antes se estiraba a 1100px) para que las tarjetas queden compactas como
   en la referencia. El alto se mantiene.
   ═════════════════════════════════════════════════════════════════════════ */
#analytics.active { max-width: 820px !important; margin: 0 auto !important; }

/* Precio por variante (casillas visuales bajo el campo de variantes) */
.variant-prices-wrap { margin-top: 6px; }
.variant-prices-title {
  margin: 0 0 8px; font-size: 13px; font-weight: 700; color: #4d3d40;
}
.variant-prices-title span { font-weight: 400; color: #8a6b73; }
.variant-price-group {
  margin-bottom: 10px; padding: 12px 14px; border-radius: 12px;
  background: #fff; box-shadow: 0 6px 16px rgba(43, 27, 32, 0.06);
}
.variant-price-name {
  display: block; margin-bottom: 8px; font-size: 12px; font-weight: 800;
  letter-spacing: 0.04em; text-transform: uppercase; color: #c40055;
}
.variant-price-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 5px 0;
}
.variant-price-row span { font-size: 14px; color: #2a1d20; }
.variant-price-row input {
  width: 130px; min-height: 38px; padding: 6px 12px; text-align: right;
}

/* Filas de variante con miniatura + etiqueta + precio + URL de imagen */
.variant-price-row {
  display: flex; align-items: center; gap: 10px; padding: 7px 0;
  flex-wrap: wrap; justify-content: flex-start;
}
.variant-opt-thumb {
  width: 42px; height: 42px; flex: none; border-radius: 9px;
  object-fit: cover; background: #f4eef0; border: 1px solid #efe1e6;
}
.variant-opt-thumb--empty {
  display: inline-block;
  background: repeating-linear-gradient(45deg, #f4eef0, #f4eef0 5px, #efe4e8 5px, #efe4e8 10px);
}
.variant-opt-label { flex: 1 1 110px; font-size: 14px; color: #2a1d20; }
.variant-price-row .variant-price-num {
  width: 110px; min-height: 38px; padding: 6px 12px; text-align: right;
}
.variant-price-row .variant-img-input {
  flex: 1 1 180px; width: auto; min-height: 38px; padding: 6px 12px;
  text-align: left; font-size: 12px;
}

.variant-price-row .variant-img-select {
  flex: 1 1 150px; width: auto; min-height: 38px; padding: 6px 10px; font-size: 13px;
}

/* ── Badges "nuevo sin ver" en el menú lateral ── */
.tabs button { position: relative; }
.nav-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #E91B8C;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(233, 27, 140, 0.35);
}
.nav-badge[hidden] { display: none; }

/* ── Resaltado de items NUEVOS (sin ver) dentro de cada sección ── */
.is-new {
  border-left: 3px solid #E91B8C !important;
  background: rgba(233, 27, 140, 0.055);
}
.new-pill {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: #E91B8C;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  vertical-align: middle;
}

/* ── Grupos de reseñas: Comunidad / Cursos ── */
.reviews-group-title {
  margin: 20px 0 10px;
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}
.reviews-group-title:first-child { margin-top: 0; }
.reviews-group-count {
  background: #FFD6EA;
  color: #E91B8C;
  font-size: 12px;
  font-weight: 800;
  padding: 1px 9px;
  border-radius: 999px;
}

/* ── Chat de soporte en vivo (Soporte) ─────────────────────────────────────── */
#support .support-chat-card { margin-bottom: 22px; }

#support .support-chat-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 18px;
  min-height: 460px;
}

#support .support-chat-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 4px;
}

#support .support-chat-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 15px;
  border: 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(82, 42, 50, 0.1);
  text-align: left;
  cursor: pointer;
}

#support .support-chat-item.is-active { box-shadow: 0 0 0 2px #e91b8c, 0 10px 22px rgba(82, 42, 50, 0.16); }
#support .support-chat-item.needs-human { background: #fff6e6; }

#support .support-chat-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

#support .support-chat-name { color: #171314; font-weight: 700; font-size: 15px; }

#support .support-chat-unread {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e91b8c;
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 800;
}

#support .support-chat-preview {
  color: #6b4a52;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#support .support-chat-badge {
  align-self: flex-start;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
#support .support-chat-badge-bot { background: #fde4ed; color: #c60058; }
#support .support-chat-badge-waiting { background: #fdeccb; color: #98690a; }
#support .support-chat-badge-human { background: #dcefed; color: #08746e; }
#support .support-chat-badge-closed { background: #eee; color: #777; }

#support .support-chat-conversation {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: #faf6f7;
  box-shadow: inset 0 0 0 1px #f1e1e5;
  min-height: 460px;
}

#support .support-chat-empty {
  margin: auto;
  padding: 40px;
  color: #9a8189;
  font-size: 14px;
  text-align: center;
}

#support .support-chat-conv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #f1e1e5;
}
#support .support-chat-conv-head h4 { margin: 0 0 2px; font-size: 17px; color: #171314; }
#support .support-chat-conv-head p { margin: 0; font-size: 13px; color: #7c5b63; }

#support .support-chat-messages {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px;
  overflow-y: auto;
  max-height: 380px;
}

#support .sc-msg { display: flex; flex-direction: column; max-width: 78%; }
#support .sc-msg-user { align-self: flex-end; align-items: flex-end; }
#support .sc-msg-bot, #support .sc-msg-admin { align-self: flex-start; align-items: flex-start; }

#support .sc-msg-role {
  margin-bottom: 3px;
  font-size: 11px;
  font-weight: 700;
  color: #a07b84;
}
#support .sc-msg-admin .sc-msg-role { color: #a50062; }

#support .sc-bubble {
  padding: 10px 14px;
  border-radius: 15px;
  font-size: 14px;
  line-height: 1.45;
}
#support .sc-msg-user .sc-bubble { background: #e91b8c; color: #fff; border-bottom-right-radius: 4px; }
#support .sc-msg-bot .sc-bubble { background: #fff; color: #2b2226; box-shadow: 0 4px 12px rgba(82, 42, 50, 0.08); border-bottom-left-radius: 4px; }
#support .sc-msg-admin .sc-bubble { background: #fff0f6; color: #57123a; box-shadow: 0 4px 12px rgba(82, 42, 50, 0.08); border-bottom-left-radius: 4px; }

#support .support-chat-composer {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid #f1e1e5;
}
#support .support-chat-composer textarea {
  flex: 1;
  resize: none;
  min-height: 44px;
  max-height: 120px;
  padding: 12px 14px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(82, 42, 50, 0.1);
  font-family: inherit;
  font-size: 14px;
  color: #2b2226;
}
#support .support-chat-composer textarea:focus { outline: 2px solid #f4b6d3; }

#support .support-chat-send {
  align-self: flex-end;
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  background: #e91b8c;
  box-shadow: 0 8px 20px rgba(233, 27, 140, 0.35);
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}
#support .support-chat-send:hover { box-shadow: 0 11px 26px rgba(233, 27, 140, 0.45); }

@media (max-width: 860px) {
  #support .support-chat-layout { grid-template-columns: 1fr; }
  #support .support-chat-list { max-height: 220px; flex-direction: row; overflow-x: auto; }
  #support .support-chat-item { min-width: 200px; }
}

/* ── Datos personales de la usuaria en Soporte ─────────────────────────────── */
#support .support-user-card {
  margin: 12px 16px 4px;
  padding: 16px 18px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(82, 42, 50, 0.1);
}

#support .support-user-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
}

#support .support-user-grid > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#support .support-user-full { grid-column: 1 / -1; }

#support .support-user-grid span {
  color: #9a7f87;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
#support .support-user-grid b {
  color: #2b2226;
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

#support .support-user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #f3e7ea;
}

#support .support-user-btn {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: #e91b8c;
  box-shadow: 0 8px 18px rgba(233, 27, 140, 0.28);
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
}
#support .support-user-btn:hover { box-shadow: 0 11px 24px rgba(233, 27, 140, 0.4); }
#support .support-user-btn:disabled { opacity: 0.6; cursor: default; }

#support .support-user-btn-alt {
  background: #fff;
  box-shadow: 0 8px 18px rgba(82, 42, 50, 0.14);
  color: #c60058;
}
#support .support-user-btn-alt:hover { background: #fff3f8; }

/* ── Botón "Marcar como completado" en Soporte ─────────────────────────────── */
#support .support-chat-resolve {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 10px 16px 0;
}

#support .support-resolve-btn {
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #dcefed;
  color: #08746e;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
}
#support .support-resolve-btn:hover { background: #cbe8e5; }
#support .support-resolve-btn.reopen { background: #fff; box-shadow: 0 6px 16px rgba(82,42,50,0.14); color: #c60058; }
#support .support-resolved-tag {
  color: #08746e;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

/* Acciones en la cabecera de la conversación (estado + completar/reabrir) */
#support .support-chat-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Grupo "Completados" en la lista de chats de soporte */
#support .support-chat-group-title {
  margin: 8px 2px 2px;
  padding-top: 10px;
  border-top: 1px solid #f0e2e6;
  color: #9a7f87;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
#support .support-chat-item.is-closed { opacity: 0.6; }
#support .support-chat-item.is-closed:hover { opacity: 0.85; }

/* Pestañas Activos / Completados en la lista de soporte */
#support .support-chat-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}
#support .support-chat-tab {
  flex: 1;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: #f4eef0;
  color: #8a6d75;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
}
#support .support-chat-tab.on {
  background: #e91b8c;
  color: #fff;
  box-shadow: 0 6px 16px rgba(233, 27, 140, 0.3);
}

/* Botón rápido ✓ (completar) / ↺ (reabrir) en la tarjeta de la lista */
#support .support-chat-item-right { display: inline-flex; align-items: center; gap: 8px; }
#support .support-chat-quick {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: #dcefed;
  color: #08746e;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
#support .support-chat-quick:hover { background: #bfe6e1; }
#support .support-chat-quick.reopen { background: #fdeccb; color: #98690a; }
#support .support-chat-quick.reopen:hover { background: #f8dfa8; }

/* ═══════════════════════════════════════════════════════════════════════════
   SOPORTE · Chat en vivo (3 columnas) + Ficha de registro  [rediseño]
   ═══════════════════════════════════════════════════════════════════════════ */
.support-grid {
  display: grid;
  /* La columna del CHAT (centro) tiene mínimo firme: nunca se colapsa. */
  grid-template-columns: minmax(240px, 300px) minmax(400px, 1.4fr) minmax(280px, 350px);
  gap: 14px;
  height: calc(100vh - 160px);
  min-height: 520px;
}
.support-col {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(28, 25, 23, 0.04);
}

/* ── Columna 1 · Lista de chats ─────────────────────────────────────── */
.support-list-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px 10px;
}
.support-col-title {
  margin: 0; font-size: 19px; font-weight: 800; color: var(--ink);
  display: flex; align-items: center; gap: 10px;
}
.support-live-pill {
  font-size: 11px; font-weight: 800; color: var(--pink);
  background: var(--rose-soft); border: 1px solid #f7d3e6;
  padding: 3px 9px; border-radius: 999px;
}
.support-filter-btn {
  width: 34px; height: 34px; flex: none; display: grid; place-items: center;
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 10px; cursor: pointer;
}
.support-filter-btn:hover { color: var(--pink); border-color: #f3c9df; }
.support-tabs { display: flex; gap: 8px; padding: 0 16px 12px; }
.sc-tabbtn {
  flex: 1; padding: 9px 10px; border-radius: 10px; cursor: pointer;
  font-size: 13px; font-weight: 800; border: 1px solid var(--line);
  background: #fff; color: var(--muted);
}
.sc-tabbtn.on {
  background: linear-gradient(135deg, var(--pink), var(--pink-dark));
  color: #fff; border-color: transparent;
  box-shadow: 0 6px 16px rgba(223, 47, 143, 0.28);
}
.support-list-search {
  display: flex; align-items: center; gap: 8px; margin: 0 16px 10px;
  padding: 0 12px; height: 40px; border: 1px solid var(--line);
  border-radius: 12px; background: #faf7f4; color: var(--muted);
}
.support-list-search input {
  border: 0; background: transparent; outline: none; width: 100%;
  font: inherit; font-size: 13px; color: var(--ink);
  -webkit-appearance: none; appearance: none; box-shadow: none;
}
.support-list-search input::-webkit-search-cancel-button,
.support-list-search input::-webkit-search-decoration {
  -webkit-appearance: none; appearance: none;
}
.support-chat-list {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 4px 12px 14px; display: flex; flex-direction: column; gap: 10px;
}
.sc-card {
  display: flex; gap: 11px; padding: 12px; border-radius: 14px;
  border: 1px solid var(--line); background: #fff; cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.sc-card:hover { border-color: #f1c8de; }
.sc-card.is-active { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(223, 47, 143, 0.12); }
.sc-card.is-closed { opacity: .72; }
.sc-card-ava {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 15px;
  color: #fff; background: linear-gradient(135deg, #ff7db0, var(--pink));
}
.sc-card-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.sc-card-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sc-card-name {
  font-weight: 800; font-size: 14px; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sc-card-ok { color: #22c55e; font-weight: 900; font-size: 13px; flex: none; }
.sc-card-unread {
  flex: none; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--pink); color: #fff; font-size: 11px; font-weight: 800;
  display: grid; place-items: center;
}
.sc-card-mail, .sc-card-preview {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sc-card-mail { font-size: 12px; color: var(--muted); }
.sc-card-preview { font-size: 12.5px; color: #57534e; }
.sc-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 5px; }
.sc-card-time { font-size: 11px; color: #a8a29e; font-weight: 600; flex: none; }

.sc-tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .02em;
  padding: 3px 8px; border-radius: 999px; text-transform: uppercase;
}
.sc-tag-bot { background: var(--rose-soft); color: var(--pink); border: 1px solid #f7d3e6; }
.sc-tag-waiting { background: #fff4e5; color: #b45309; }
.sc-tag-human { background: #e8f7ee; color: #15803d; }
.sc-tag-closed { background: #eef2f7; color: #64748b; }

/* ── Columna 2 · Conversación ───────────────────────────────────────── */
.support-col-chat { background: #fbf8fb; }
.sc-convhead {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 18px; border-bottom: 1px solid var(--line); background: #fff;
}
.sc-convhead-info { min-width: 120px; flex: 1; }
.sc-convhead-info h4 { margin: 0; font-size: 17px; font-weight: 800; color: var(--ink); }
.sc-convhead-info p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.sc-convhead-info p span { color: #a8a29e; }
.sc-head-profile {
  border: 0; background: #16110f; color: #fff; cursor: pointer;
  font-size: 12.5px; font-weight: 800; padding: 9px 13px; border-radius: 11px;
}
.sc-head-profile:hover { background: #000; }
.sc-head-btn {
  border: 1px solid var(--line); background: #fff; color: #15803d; cursor: pointer;
  font-size: 12.5px; font-weight: 800; padding: 8px 12px; border-radius: 11px;
}
.sc-head-btn.reopen { color: var(--pink); }

.sc-ava {
  flex: none; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; color: #fff; position: relative;
}
.sc-ava-user { width: 40px; height: 40px; font-size: 13px; background: linear-gradient(135deg, #ff7db0, var(--pink)); }
.sc-ava-lg { width: 46px; height: 46px; font-size: 15px; }
.sc-online {
  position: absolute; right: 0; bottom: 0; width: 11px; height: 11px;
  border-radius: 50%; background: #22c55e; border: 2px solid #fff;
}
.sc-ava-me { width: 30px; height: 30px; font-size: 11px; background: #16110f; }
.sc-ava-bot { width: 34px; height: 34px; background: linear-gradient(135deg, #ff7db0, var(--pink)); }

.sc-thread {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 18px; display: flex; flex-direction: column; gap: 14px;
}
.sc-datesep { text-align: center; margin: 2px 0 6px; }
.sc-datesep span {
  font-size: 11.5px; font-weight: 700; color: var(--muted);
  background: #efe7ea; padding: 4px 12px; border-radius: 999px;
}
.sc-line { display: flex; align-items: flex-end; gap: 9px; max-width: 84%; }
.sc-in { align-self: flex-start; }
.sc-out { align-self: flex-end; justify-content: flex-end; }
.sc-bub { padding: 11px 14px; border-radius: 16px; font-size: 13.5px; line-height: 1.5; }
.sc-bub p { margin: 0; }
.sc-bub time { display: block; margin-top: 5px; font-size: 10.5px; opacity: .7; }
.sc-bub-user { background: #fff; color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.sc-bub-admin { background: linear-gradient(135deg, var(--pink), var(--pink-dark)); color: #fff; border-bottom-right-radius: 5px; }
.sc-bub-admin time { opacity: .85; }
.sc-bub-bot { background: var(--rose-soft); color: #7a1f4f; border: 1px solid #f7d3e6; border-bottom-left-radius: 5px; }
.sc-botname { display: block; font-weight: 800; font-size: 12px; color: var(--pink); margin-bottom: 3px; }
.sc-note {
  align-self: center; max-width: 90%; text-align: center;
  background: #fffbeb; border: 1px dashed #f5d98b; border-radius: 12px;
  padding: 8px 14px; color: #92700e;
}
.sc-note span { font-weight: 800; font-size: 11px; display: block; }
.sc-note p { margin: 3px 0 0; font-size: 12.5px; }
.sc-note time { font-size: 10px; opacity: .7; }

.sc-quick {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 16px; border-top: 1px solid var(--line); background: #fff;
}
.sc-quick-label { font-size: 12px; font-weight: 700; color: var(--muted); }
.sc-quick-chip {
  border: 1px solid var(--line); background: #faf7f4; color: #57534e; cursor: pointer;
  font-size: 12px; font-weight: 700; padding: 7px 11px; border-radius: 9px;
}
.sc-quick-chip:hover { border-color: var(--pink); color: var(--pink); background: var(--rose-soft); }

.sc-composer { padding: 12px 16px 16px; background: #fff; border-top: 1px solid var(--line); }
.sc-composer textarea {
  width: 100%; resize: none; border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; font: inherit; font-size: 13.5px; color: var(--ink);
  outline: none; min-height: 46px; background: #faf7f4;
}
.sc-composer textarea:focus { border-color: var(--pink); background: #fff; }
.sc-composer-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.sc-composer-tools { display: flex; align-items: center; gap: 6px; }
.sc-tool { border: 0; background: transparent; cursor: pointer; font-size: 16px; padding: 4px; border-radius: 8px; }
.sc-tool:hover { background: #f3eef0; }
.sc-note-toggle {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px;
  font-weight: 700; color: var(--muted); cursor: pointer; margin-left: 4px;
}
.sc-send {
  border: 0; cursor: pointer; color: #fff; font-weight: 800; font-size: 13px;
  padding: 11px 20px; border-radius: 12px;
  background: linear-gradient(135deg, var(--pink), var(--pink-dark));
  box-shadow: 0 8px 18px rgba(223, 47, 143, 0.3);
}
.sc-send:hover { filter: brightness(1.05); }

/* ── Columna 3 · Ficha de registro ──────────────────────────────────── */
.support-col-ficha { display: block; overflow-y: auto; }
.ficha-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; background: var(--rose-soft); border-bottom: 1px solid #f7d3e6;
  position: sticky; top: 0; z-index: 2;
}
.ficha-kicker { font-size: 12px; font-weight: 900; color: var(--pink); letter-spacing: .04em; }
.ficha-link { border: 0; background: transparent; color: var(--pink); font-weight: 800; font-size: 12px; cursor: pointer; }
.ficha-user { display: flex; gap: 13px; padding: 18px; align-items: center; }
.ficha-ava {
  width: 58px; height: 58px; border-radius: 16px; flex: none;
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 20px;
  background: linear-gradient(135deg, #ff7db0, var(--pink));
}
.ficha-user-main { min-width: 0; }
.ficha-user-main h4 { margin: 0; font-size: 17px; font-weight: 800; color: var(--ink); }
.ficha-user-main p { margin: 2px 0 6px; font-size: 12.5px; color: var(--muted); word-break: break-all; }
.ficha-user-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ficha-badge { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px; }
.ficha-badge.ok { background: #e8f7ee; color: #15803d; }
.ficha-badge.no { background: #eef2f7; color: #64748b; }
.ficha-id { font-size: 11px; font-weight: 700; color: var(--muted); }
.ficha-cta {
  display: block; width: calc(100% - 36px); margin: 0 18px 8px;
  border: 0; cursor: pointer; color: #fff; font-weight: 800; font-size: 13px;
  padding: 12px; border-radius: 12px; background: #16110f;
}
.ficha-cta:hover { background: #000; }
.ficha-sec { padding: 14px 18px; border-top: 1px solid var(--line); }
.ficha-sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ficha-sec-head span { font-size: 11.5px; font-weight: 900; color: var(--muted); letter-spacing: .04em; }
.ficha-edit { border: 0; background: transparent; color: var(--pink); font-weight: 800; font-size: 12px; cursor: pointer; }
.ficha-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.ficha-grid-3 { grid-template-columns: 1fr 1fr 1fr; margin-top: 12px; }
.ficha-grid > div, .ficha-addr { display: flex; flex-direction: column; gap: 3px; }
.ficha-full { grid-column: 1 / -1; }
.ficha-grid span, .ficha-addr-label { font-size: 10.5px; font-weight: 800; color: var(--muted); letter-spacing: .03em; text-transform: uppercase; }
.ficha-grid b, .ficha-addr-main { font-size: 13.5px; font-weight: 700; color: var(--ink); word-break: break-word; }
.ficha-tag-ok { font-style: normal; font-size: 10.5px; font-weight: 800; color: #15803d; background: #e8f7ee; padding: 1px 7px; border-radius: 999px; margin-left: 6px; }
.ficha-addr { background: #faf7f4; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.ficha-addr-main { margin-top: 2px; }
.ficha-rows { display: flex; flex-direction: column; gap: 10px; }
.ficha-rows > div { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; }
.ficha-rows span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.ficha-rows b { font-size: 12.5px; color: var(--ink); font-weight: 700; text-align: right; }
.ficha-mono { font-family: ui-monospace, Menlo, monospace; background: #f3eef0; padding: 2px 8px; border-radius: 6px; font-size: 12px; }
.ficha-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.ficha-stats > div {
  background: #faf7f4; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 8px; text-align: center; display: flex; flex-direction: column; gap: 4px;
}
.ficha-stats span { font-size: 11px; color: var(--muted); font-weight: 700; }
.ficha-stats b { font-size: 19px; font-weight: 800; color: var(--ink); }
.ficha-stats b.pink { color: var(--pink); }
.ficha-stats b.gold { color: #d97706; }
.ficha-actions { padding: 16px 18px 22px; display: flex; flex-direction: column; gap: 10px; }
.ficha-btn {
  border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer;
  font-weight: 800; font-size: 13px; padding: 11px 12px; border-radius: 12px;
}
.ficha-btn:hover { border-color: var(--pink); color: var(--pink); }
.ficha-btn-primary {
  border: 0; color: #fff; background: linear-gradient(135deg, var(--pink), var(--pink-dark));
  box-shadow: 0 8px 18px rgba(223, 47, 143, 0.28);
}
.ficha-btn-primary:hover { color: #fff; filter: brightness(1.05); }
.ficha-actions-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ficha-btn-danger { color: #dc2626; }
.ficha-btn-danger:hover { border-color: #dc2626; color: #dc2626; }

.support-chat-empty, .support-ficha-empty {
  margin: auto; padding: 30px; text-align: center; color: var(--muted);
  font-size: 13px; font-weight: 600;
}
.support-col-ficha .support-ficha-empty { margin: 40px auto; }

.support-chat-list::-webkit-scrollbar, .sc-thread::-webkit-scrollbar, .support-col-ficha::-webkit-scrollbar { width: 8px; }
.support-chat-list::-webkit-scrollbar-thumb, .sc-thread::-webkit-scrollbar-thumb, .support-col-ficha::-webkit-scrollbar-thumb { background: #e3d7cf; border-radius: 999px; }

/* Medianas: lista + chat lado a lado (el chat SIEMPRE visible); ficha debajo. */
@media (max-width: 1240px) {
  .support-grid {
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    grid-template-areas: "list chat" "ficha ficha";
    height: auto;
    min-height: 0;
  }
  .support-col-list { grid-area: list; height: calc(100vh - 160px); }
  .support-col-chat { grid-area: chat; height: calc(100vh - 160px); }
  .support-col-ficha { grid-area: ficha; height: auto; max-height: none; }
}
/* Chicas: todo apilado en una sola columna. */
@media (max-width: 820px) {
  .support-grid { grid-template-columns: 1fr; grid-template-areas: none; height: auto; }
  .support-col-ficha { height: auto; max-height: none; }
  .support-col-list, .support-col-chat { height: 72vh; }
}

.ficha-badge-blocked { background: #fee2e2; color: #dc2626; }
