/* ============================================================
   ProfeAcademī · Admin Slideshow
   App exclusiva del rol admin para gestionar el slideshow.
   ============================================================ */

.as-shell {
  min-height: 100vh;
  padding: 5.5rem 1.4rem 3rem;
  max-width: 1180px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.as-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}
.as-hero h1 {
  margin: 0 0 0.25rem;
  font-size: 1.85rem;
  font-weight: 700;
  background: linear-gradient(135deg, #7c3aed, #a78bfa, #f0abfc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}
.as-hero p {
  margin: 0;
  font-size: 0.92rem;
  color: rgba(75, 85, 99, 0.85);
  max-width: 620px;
}
body.theme-dark .as-hero p { color: rgba(196, 181, 253, 0.78); }

.as-stats {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}
.as-stat {
  padding: 0.55rem 1rem;
  border-radius: 12px;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(167,139,250,0.25);
  backdrop-filter: blur(10px);
  font-size: 0.78rem;
  color: #4b5563;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  min-width: 90px;
}
.as-stat strong {
  font-size: 1.15rem;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
body.theme-dark .as-stat {
  background: rgba(26, 16, 51, 0.65);
  border-color: rgba(167,139,250,0.3);
  color: #c4b5fd;
}

/* ── Layout 2 columnas ── */
.as-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 1.4rem;
  align-items: start;
}
@media (max-width: 980px) {
  .as-layout { grid-template-columns: 1fr; }
}

/* ── Tarjeta general ── */
.as-card {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(167, 139, 250, 0.25);
  border-radius: 18px;
  padding: 1.4rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 30px rgba(76, 29, 149, 0.1);
}
body.theme-dark .as-card {
  background: rgba(26, 16, 51, 0.75);
  border-color: rgba(167, 139, 250, 0.32);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4), 0 0 30px rgba(124, 58, 237, 0.15);
}

.as-card h2 {
  margin: 0 0 0.2rem;
  font-size: 1.1rem;
  color: #4c1d95;
}
.as-card .as-sub {
  margin: 0 0 1rem;
  font-size: 0.82rem;
  color: rgba(75, 85, 99, 0.8);
}
body.theme-dark .as-card h2 { color: #e9d5ff; }
body.theme-dark .as-card .as-sub { color: rgba(196, 181, 253, 0.7); }

/* ── Drop zone ── */
.as-drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1.5rem 1rem;
  border: 2px dashed rgba(167, 139, 250, 0.55);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(167,139,250,0.08), rgba(244,114,182,0.06));
  color: #6d28d9;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.as-drop:hover, .as-drop.dragover {
  background: linear-gradient(135deg, rgba(167,139,250,0.18), rgba(244,114,182,0.14));
  border-color: rgba(124, 58, 237, 0.85);
  transform: translateY(-1px);
}
.as-drop .ic { font-size: 2rem; }
.as-drop strong { color: #4c1d95; font-weight: 700; font-size: 0.95rem; }
.as-drop small { color: #6b7280; font-size: 0.74rem; }
body.theme-dark .as-drop { color: #c4b5fd; }
body.theme-dark .as-drop strong { color: #ede9fe; }
body.theme-dark .as-drop small { color: #a5a3c7; }

.as-drop input[type=file] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}

.as-preview {
  margin-top: 0.8rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(167,139,250,0.3);
  background: #0f0824;
  display: none;
  aspect-ratio: 16 / 10;
}
.as-preview.is-shown { display: block; }
.as-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Form fields ── */
.as-field {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  margin-top: 0.9rem;
}
.as-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #6d28d9;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.as-field label .ic { font-size: 0.95rem; }
body.theme-dark .as-field label { color: #c4b5fd; }

.as-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(167, 139, 250, 0.35);
  border-radius: 10px;
  background: rgba(255,255,255,0.85);
  color: #1f2937;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.as-input:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
}
body.theme-dark .as-input {
  background: rgba(15, 8, 36, 0.7);
  border-color: rgba(167, 139, 250, 0.4);
  color: #ede9fe;
}

.as-hint {
  font-size: 0.72rem;
  color: rgba(107,114,128,0.85);
  margin: 0;
}
body.theme-dark .as-hint { color: rgba(165, 163, 199, 0.75); }

/* ── Botones ── */
.as-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.1rem;
  border-radius: 10px;
  border: 0;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}
.as-btn-primary {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: #fff;
  box-shadow: 0 4px 14px rgba(124,58,237,0.4);
}
.as-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(124,58,237,0.55); }
.as-btn-primary:disabled { opacity: 0.6; cursor: progress; transform: none; }

.as-btn-ghost {
  background: rgba(255,255,255,0.7);
  color: #4b5563;
  border: 1px solid rgba(0,0,0,0.06);
}
.as-btn-ghost:hover { background: rgba(255,255,255,0.95); }
body.theme-dark .as-btn-ghost {
  background: rgba(255,255,255,0.05);
  color: #c4b5fd;
  border-color: rgba(167,139,250,0.2);
}

.as-btn-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

/* ── Toolbar de la lista ── */
.as-list-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.as-filter-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.as-chip {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(167,139,250,0.3);
  background: rgba(255,255,255,0.7);
  color: #6d28d9;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.as-chip.is-active {
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 3px 10px rgba(124,58,237,0.35);
}
body.theme-dark .as-chip { background: rgba(26, 16, 51, 0.65); color: #c4b5fd; }

/* ── Lista / Grid ── */
.as-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.95rem;
}

.as-item {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #0f0824;
  border: 1px solid rgba(167, 139, 250, 0.22);
  transition: transform 0.18s, box-shadow 0.18s;
}
.as-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(76, 29, 149, 0.25);
}
.as-item-thumb {
  aspect-ratio: 16 / 10;
  width: 100%;
  background: #0f0824;
  position: relative;
}
.as-item-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.as-item-status {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: #fff;
  backdrop-filter: blur(6px);
}
.as-item-status.s-live      { background: linear-gradient(135deg, #10b981, #059669); }
.as-item-status.s-scheduled { background: linear-gradient(135deg, #38bdf8, #0ea5e9); }
.as-item-status.s-expired   { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.as-item-status.s-paused    { background: linear-gradient(135deg, #6b7280, #4b5563); }

.as-item-body {
  padding: 0.7rem 0.85rem 0.85rem;
  background: rgba(255,255,255,0.86);
  color: #374151;
  font-size: 0.78rem;
}
body.theme-dark .as-item-body { background: rgba(26, 16, 51, 0.85); color: #c4b5fd; }

.as-item-dates {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  font-size: 0.74rem;
}
.as-item-dates span { display: flex; align-items: center; gap: 0.35rem; }
.as-item-dates .lbl { color: #9ca3af; min-width: 36px; }
.as-item-dates .val { color: inherit; font-weight: 600; }

.as-item-actions {
  margin-top: 0.65rem;
  display: flex;
  gap: 0.35rem;
}
.as-mini-btn {
  flex: 1;
  padding: 0.4rem;
  border-radius: 8px;
  border: 1px solid rgba(167,139,250,0.25);
  background: rgba(255,255,255,0.6);
  color: #4b5563;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.as-mini-btn:hover { background: rgba(124,58,237,0.12); color: #6d28d9; }
.as-mini-btn.danger { color: #b91c1c; }
.as-mini-btn.danger:hover { background: rgba(239,68,68,0.12); color: #991b1b; }
body.theme-dark .as-mini-btn { background: rgba(15,8,36,0.6); color: #c4b5fd; }

.as-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2.4rem 1rem;
  border: 1px dashed rgba(167,139,250,0.35);
  border-radius: 14px;
  color: #6b7280;
}
.as-empty .ic { font-size: 2.4rem; margin-bottom: 0.4rem; display: block; }
.as-empty h3 { margin: 0 0 0.2rem; color: #4c1d95; }
body.theme-dark .as-empty { color: #a5a3c7; }
body.theme-dark .as-empty h3 { color: #ede9fe; }

/* ── Toast ── */
.as-toast-wrap {
  position: fixed;
  bottom: 1.2rem;
  right: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 9500;
  pointer-events: none;
}
.as-toast {
  pointer-events: auto;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  background: rgba(26, 16, 51, 0.92);
  color: #ede9fe;
  font-size: 0.85rem;
  border: 1px solid rgba(167,139,250,0.4);
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
  animation: as-toast-in 0.25s ease both;
  max-width: 320px;
}
.as-toast.ok    { border-color: rgba(16,185,129,0.55); }
.as-toast.err   { border-color: rgba(239,68,68,0.55); }
@keyframes as-toast-in {
  from { transform: translateY(10px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* ── Modal de edición ── */
.as-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8, 3, 24, 0.7);
  backdrop-filter: blur(10px);
  z-index: 9100;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.as-modal-overlay.open { display: flex; }
.as-modal {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: linear-gradient(160deg, #1a1033, #251247);
  border: 1px solid rgba(167,139,250,0.4);
  border-radius: 18px;
  padding: 1.6rem 1.4rem 1.2rem;
  box-shadow: 0 25px 60px rgba(0,0,0,0.6), 0 0 50px rgba(124,58,237,0.25);
}
.as-modal h3 {
  margin: 0 0 0.2rem;
  font-size: 1.1rem;
  background: linear-gradient(135deg, #a78bfa, #f0abfc);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.as-modal p { margin: 0 0 1rem; font-size: 0.82rem; color: #a5a3c7; }
.as-modal .as-modal-close {
  position: absolute; top: 0.8rem; right: 0.8rem;
  background: none; border: 0; color: #9ca3af;
  font-size: 1.4rem; cursor: pointer; line-height: 1;
}
.as-modal .as-modal-close:hover { color: #fff; }
.as-modal .as-input {
  background: rgba(255,255,255,0.05);
  color: #ede9fe;
  border-color: rgba(167,139,250,0.4);
}

/* ── Header mini (volver / chip / logout) ── */
.as-mini-actions {
  position: fixed; top: 1rem; right: 1rem; z-index: 1000;
  display: flex; gap: .5rem; align-items: center;
}
.as-mini-back, .as-mini-logout {
  padding: .5rem 1rem;
  background: white;
  color: #475569;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 10px;
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.06);
  transition: transform .15s, box-shadow .2s;
}
.as-mini-back:hover, .as-mini-logout:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(0,0,0,.12);
}
body.theme-dark .as-mini-back,
body.theme-dark .as-mini-logout {
  background: rgba(26, 16, 51, 0.8);
  color: #c4b5fd;
  border-color: rgba(167,139,250,0.3);
}
.as-mini-chip {
  display: none;
  align-items: center;
  gap: .5rem;
  padding: .45rem .9rem;
  background: white;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  color: #1f2937;
  font-size: .85rem;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}
.as-mini-chip.visible { display: inline-flex; }
.as-mini-rol {
  display: inline-flex; align-items: center;
  padding: 4px 11px; margin-bottom: 2px; border-radius: 7px;
  font-size: .62rem; font-weight: 800; letter-spacing: 1px;
  text-transform: uppercase; color: white;
  background: rgb(255,56,86); box-shadow: rgb(201,46,70) 0 3px 0 0;
}
body.theme-dark .as-mini-chip {
  background: rgba(26, 16, 51, 0.8);
  color: #ede9fe;
  border-color: rgba(167,139,250,0.3);
}
