/* UpLift Catalogo — Bocetos UI (post-auditoría) */

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

:root {
  --primary: #5bc2e7;
  --primary-deep: #0077b3;
  --primary-soft: rgba(91, 194, 231, 0.12);
  --accent: #e36159;
  --ink: #212529;
  --slate: #383f48;
  --muted: #6a6a6d;
  --line: #e5e5e5;
  --surface: #ffffff;
  --canvas: #f6f8fa;
  --shadow: 0 1px 2px rgba(33, 37, 41, 0.04), 0 8px 24px rgba(33, 37, 41, 0.06);
  --radius: 10px;
  --font: "Source Sans 3", "Segoe UI", sans-serif;
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

/* ——— View Transitions: slide-up (catálogo) ——— */
@view-transition {
  navigation: auto;
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.42s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

::view-transition-old(root) {
  animation-name: vt-slide-up-out;
}

::view-transition-new(root) {
  animation-name: vt-slide-up-in;
}

@keyframes vt-slide-up-out {
  to {
    transform: translateY(-8%);
    opacity: 0;
  }
}

@keyframes vt-slide-up-in {
  from {
    transform: translateY(12%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Header estable durante el cambio */
.site-header {
  view-transition-name: site-header;
}

::view-transition-old(site-header),
::view-transition-new(site-header) {
  animation: none;
  mix-blend-mode: normal;
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Admin usa su propio shell a pantalla completa */
body.admin-body {
  display: block;
}

main.wrap {
  flex: 1 0 auto;
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary-deep);
  text-decoration: none;
}

a:hover {
  color: var(--primary);
}

:focus-visible {
  outline: 2px solid var(--primary-deep);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 100;
  background: var(--primary-deep);
  color: #fff;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
}

.skip-link:focus {
  top: 0.75rem;
  color: #fff;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner,
.site-footer__inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand__logo {
  height: 40px;
  width: auto;
  display: block;
}

.admin-aside .brand__logo {
  height: 34px;
  filter: brightness(0) invert(1);
}

.brand span {
  font-size: 1.05rem;
}

.nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.92rem;
}

.nav a {
  color: var(--slate);
}

.nav a[aria-current="page"] {
  color: var(--primary-deep);
  font-weight: 600;
}

.hero {
  padding: 2.75rem 0 1.5rem;
}

.hero h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.6rem, 2.5vw, 2.15rem);
  letter-spacing: -0.03em;
}

.hero p {
  margin: 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.02rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: var(--surface);
  flex-shrink: 0;
  width: 100%;
}

.site-footer__inner {
  padding: 1.5rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Mosaic */
.mosaic {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  padding: 0.5rem 0 2rem;
}

.tile {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
  color: inherit;
}

.tile:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  color: inherit;
}

.tile__media {
  aspect-ratio: 4 / 3;
  background: linear-gradient(180deg, #dfe9ef, #c5d5e0);
}

.tile__body {
  padding: 1rem 1.1rem 1.15rem;
}

.tile__body h2 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.tile__meta {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ——— Home layouts (admin · Apariencia) ——— */
.hero--compact {
  padding-bottom: 0.75rem;
}

.hero--compact h1 {
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
}

.home-bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(100px, auto);
  gap: 0.85rem;
  padding: 0.35rem 0 1.5rem;
}

.home-bento > .tile {
  grid-column: span 4;
}

.home-bento__item--hero {
  grid-column: span 7;
  grid-row: span 2;
}

.home-bento__item--hero .tile__media {
  aspect-ratio: 16 / 10;
  min-height: 220px;
}

.home-bento__item--wide {
  grid-column: span 5;
}

.home-bento--compact > .tile {
  grid-column: span 4;
}

.home-bento--compact > .home-bento__item--hero,
.home-bento--compact > .tile:first-child {
  grid-column: span 8;
}

.home-rail-section {
  padding: 0.5rem 0 1.5rem;
}

.home-rail-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.home-rail-section__head h2 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.home-rail {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scroll-snap-type: x mandatory;
}

.home-band {
  padding: 1.25rem 0;
}

.home-band--alt {
  background: #eaf1f5;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: max(1rem, calc(50vw - 560px));
  padding-right: max(1rem, calc(50vw - 560px));
}

.home-band__inner {
  max-width: var(--max);
  margin: 0 auto;
}

.home-feature-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 0.85rem;
}

.home-feature-grid__main .tile__media {
  aspect-ratio: 16 / 11;
  min-height: 220px;
}

.home-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
}

.home-cta h2 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
}

.home-cta p {
  margin: 0;
  color: var(--muted);
}

.home-spot {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
  align-items: stretch;
}

.home-spot__media {
  min-height: 280px;
}

.home-spot__media .tile__media {
  height: 100%;
  min-height: 280px;
  aspect-ratio: auto;
}

.home-spot__info {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
}

.home-spot__info h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.home-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.35rem 0 1.25rem;
}

.chip--link {
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.chip--link:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-deep);
}

/* Admin layout picker */
.layout-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.layout-card {
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  position: relative;
}

.layout-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.layout-card.is-active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.layout-card__badge {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary-deep);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

.layout-card__desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.35;
}

@media (max-width: 900px) {
  .home-bento > .tile,
  .home-bento__item--hero,
  .home-bento__item--wide,
  .home-bento--compact > .tile,
  .home-bento--compact > .tile:first-child {
    grid-column: span 6;
  }

  .home-feature-grid,
  .home-spot {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .home-bento {
    grid-template-columns: 1fr;
  }

  .home-bento > .tile,
  .home-bento__item--hero,
  .home-bento__item--wide,
  .home-bento--compact > .tile,
  .home-bento--compact > .tile:first-child {
    grid-column: span 1;
  }
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  align-items: center;
}

.toolbar input,
.toolbar select {
  min-height: 42px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

.toolbar input {
  flex: 1;
  min-width: 180px;
}

.toolbar select {
  min-width: 160px;
}

.price {
  margin: 0.35rem 0 0.85rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--slate);
}

.price small {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}

.machine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.35rem;
  padding-bottom: 2rem;
}

.machine {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.machine[hidden] {
  display: none !important;
}

.carousel {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #d7e3eb;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
}

.carousel__track {
  display: flex;
  height: 100%;
  transition: transform 0.35s ease;
}

.carousel__slide {
  min-width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--slate);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  font-size: 1.25rem;
  line-height: 1;
}

.carousel__btn:hover {
  background: var(--primary);
  color: #fff;
}

.carousel__btn--prev {
  left: 0.45rem;
}

.carousel__btn--next {
  right: 0.45rem;
}

.carousel__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.55rem;
  display: flex;
  justify-content: center;
  gap: 0.35rem;
}

.carousel__dots button {
  width: 8px;
  height: 8px;
  min-width: 8px;
  min-height: 8px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  padding: 0;
}

.carousel__dots button[aria-current="true"] {
  background: var(--primary);
  width: 16px;
  border-radius: 999px;
}

.carousel__status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.machine__body {
  padding: 1.05rem 1.15rem 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.machine__body h3 {
  margin: 0;
  font-size: 1.08rem;
  letter-spacing: -0.02em;
}

.machine__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  border: 0;
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--primary-deep);
  color: #fff;
}

.btn--primary:hover {
  background: var(--primary);
  color: #fff;
}

.btn--whatsapp {
  background: #1f9e52;
  color: #fff;
  width: 100%;
}

.btn--whatsapp:hover {
  background: #188645;
  color: #fff;
}

.btn--doc {
  width: 100%;
  background: transparent;
  color: var(--primary-deep);
  border: 1px solid #b9d4e2;
}

.btn--doc:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-deep);
}

.btn--share {
  width: 100%;
  background: transparent;
  color: var(--slate);
  border: 1px solid var(--line);
}

.btn--share:hover {
  border-color: #25d366;
  color: #128c7e;
  background: rgba(37, 211, 102, 0.08);
}

.machine--detail {
  max-width: 720px;
  margin: 0 auto 2.5rem;
}

/* ——— Ficha: un pantallazo (carrusel | info) ——— */
.page-maquina .wrap {
  max-width: min(1200px, 96vw);
}

.detail-top {
  padding: 0.85rem 0 0.65rem;
}

.detail-top .breadcrumb {
  margin-bottom: 0.35rem;
}

.detail-top__title {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.detail-top__price {
  margin: 0.25rem 0 0;
}

.detail-top__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.detail-top__chips {
  margin: 0;
}

.detail-split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 1fr);
  gap: 1rem 1.25rem;
  align-items: stretch;
  min-height: calc(100dvh - 11.5rem);
  margin-bottom: 1.5rem;
}

.detail-split__media {
  min-height: 0;
  display: flex;
}

.carousel--detail {
  flex: 1;
  width: 100%;
  min-height: 280px;
  height: 100%;
  aspect-ratio: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.detail-split__info {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.9rem 1rem 1.05rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
}

.detail-split__info .machine__desc {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.detail-split__info .detail-heading {
  margin: 0.55rem 0 0.35rem;
  font-size: 0.92rem;
}

.detail-split__info .detail-heading:first-of-type {
  margin-top: 0;
}

.spec-table--compact th,
.spec-table--compact td {
  padding: 0.35rem 0.25rem;
  font-size: 0.86rem;
}

.detail-split__info .machine__actions {
  margin-top: auto;
  padding-top: 0.75rem;
}

.machine__desc {
  margin: 0 0 1rem;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.95rem;
}

.machine-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.55rem 0 0.85rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  border: 1px solid #c9d7e0;
  background: #f3f7fa;
  color: var(--primary-deep);
  font-size: 0.75rem;
  font-weight: 600;
}

.detail-heading {
  margin: 1.25rem 0 0.55rem;
  font-size: 1rem;
  color: var(--slate);
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin-bottom: 0.5rem;
}

.spec-table th,
.spec-table td {
  padding: 0.55rem 0.35rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.spec-table th {
  width: 42%;
  color: var(--muted);
  font-weight: 600;
}

.stars {
  color: #e6a800;
  letter-spacing: 0.08em;
  font-size: 1.05rem;
}

.stars--empty {
  color: var(--muted);
}

/* ——— Similares ——— */
.similares {
  padding: 0.5rem 0 2.5rem;
}

.similares__title {
  margin: 0 0 1rem;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.similares__block {
  margin-bottom: 1.35rem;
}

.similares__subtitle {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
  color: var(--slate);
}

.similares__row {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.sim-card {
  flex: 0 0 168px;
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease;
}

.sim-card:hover {
  border-color: var(--primary);
}

.sim-card__img {
  aspect-ratio: 4 / 3;
  background: #d7e3eb center/cover no-repeat;
}

.sim-card__body {
  padding: 0.55rem 0.65rem 0.7rem;
  display: grid;
  gap: 0.15rem;
}

.sim-card__body strong {
  font-size: 0.88rem;
  line-height: 1.25;
}

.sim-card__body span {
  font-size: 0.82rem;
  color: var(--slate);
}

.sim-card__meta {
  color: var(--muted) !important;
  font-size: 0.75rem !important;
}

@media (max-width: 860px) {
  .detail-split {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 0.85rem;
  }

  .carousel--detail {
    min-height: 0;
    height: auto;
    max-height: 42vh;
    aspect-ratio: 4 / 3;
  }

  .detail-split__info {
    max-height: none;
  }

  .detail-top__title {
    font-size: 1.3rem;
  }
}

@media (max-width: 860px) and (orientation: portrait) {
  .detail-split {
    /* Carrusel + info caben en el primer scroll útil */
    min-height: calc(100dvh - 10.5rem);
  }

  .carousel--detail {
    max-height: min(38vh, 280px);
  }

  .detail-split__info {
    overflow: auto;
  }
}

.btn--ghost {
  background: transparent;
  color: var(--slate);
  border: 1px solid var(--line);
}

.btn--ghost:hover {
  border-color: var(--primary);
  color: var(--primary-deep);
}

.btn--danger {
  background: transparent;
  color: var(--accent);
  border: 1px solid #f0c4c1;
}

.empty {
  display: none;
  text-align: center;
  padding: 2.5rem 1.25rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  margin-bottom: 2rem;
}

.empty.is-visible {
  display: block;
}

.empty p {
  margin: 0 0 1rem;
}

.stat__hint {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

/* Admin */
.admin-body {
  background: #eef2f5;
}

/* SweetAlert forms (usuarios / admin) */
.ul-swal-form {
  text-align: left;
  margin: 0.25rem 0 0;
  display: grid;
  gap: 0.85rem;
}

.ul-swal-form__field {
  display: grid;
  gap: 0.35rem;
}

.ul-swal-form__field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--slate, #383f48);
}

.ul-swal-form__field input,
.ul-swal-form__field select {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  min-height: 42px;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line, #d5dde4);
  border-radius: 8px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--slate, #383f48);
  background: #fff;
}

.ul-swal-form__field input:focus,
.ul-swal-form__field select:focus {
  outline: none;
  border-color: var(--primary, #0077b3);
  box-shadow: 0 0 0 3px rgba(0, 119, 179, 0.15);
}

.ul-swal-form__hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted, #6b7785);
}

.swal2-popup.ul-swal-popup {
  width: min(100%, 420px);
  padding: 1.5rem 1.35rem 1.25rem;
  border-radius: 12px;
}

.swal2-popup.ul-swal-popup .swal2-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--slate, #383f48);
  padding: 0;
  margin: 0 0 1rem;
}

.swal2-popup.ul-swal-popup .swal2-html-container {
  margin: 0;
  padding: 0;
  overflow: visible;
}

.swal2-popup.ul-swal-popup .swal2-actions {
  margin: 1.15rem 0 0;
  gap: 0.5rem;
  width: 100%;
}

.swal2-popup.ul-swal-popup .swal2-styled {
  min-height: 42px;
  padding: 0.55rem 1.15rem;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: none !important;
}

.swal2-popup.ul-swal-popup .swal2-confirm {
  background: #0077b3 !important;
}

.swal2-popup.ul-swal-popup .swal2-cancel {
  background: #fff !important;
  color: var(--slate, #383f48) !important;
  border: 1px solid var(--line, #d5dde4) !important;
}

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

.admin-aside {
  background: var(--slate);
  color: #d7dde3;
  padding: 1.25rem 1rem;
}

.admin-aside .brand {
  color: #fff;
  margin-bottom: 2rem;
  padding-inline: 0.4rem;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.admin-nav a {
  color: #c5ced6;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  font-size: 0.92rem;
}

.admin-nav a:hover,
.admin-nav a[aria-current="page"] {
  background: rgba(91, 194, 231, 0.16);
  color: #fff;
}

.admin-main {
  padding: 1.5rem 1.75rem 3.5rem;
}

.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.admin-top h1 {
  margin: 0 0 0.25rem;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.admin-top p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  box-shadow: var(--shadow);
}

.stat__label {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat__value {
  margin: 0.35rem 0 0;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid var(--line);
}

.panel__head h2 {
  margin: 0;
  font-size: 1rem;
}

.panel__body {
  padding: 1rem 1.15rem 1.25rem;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table th,
.table td {
  text-align: left;
  padding: 0.7rem 0.5rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 600;
}

.table tr:last-child td {
  border-bottom: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge--ok {
  background: #e6f6ec;
  color: #1f9e52;
}

.badge--off {
  background: #f4f4f4;
  color: var(--muted);
}

.thumb {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background: linear-gradient(145deg, #c8d9e4, #9bb4c4);
  flex-shrink: 0;
}

.row-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-grid .full {
  grid-column: 1 / -1;
}

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--slate);
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--primary-soft);
  border-color: var(--primary);
}

textarea {
  min-height: 96px;
  resize: vertical;
}

.photo-slots {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
}

.photo-slot {
  position: relative;
  aspect-ratio: 1;
  border: 1.5px dashed #c9d2d9;
  border-radius: 8px;
  background: #f8fafb;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  padding: 0.35rem;
  overflow: hidden;
  user-select: none;
}

.photo-slot.is-filled {
  border-style: solid;
  border-color: var(--primary);
  background-color: #d7e3eb;
  background-size: cover;
  background-position: center;
  color: #fff;
  font-weight: 600;
  cursor: grab;
}

.photo-slot.is-filled::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 40, 70, 0.15), rgba(0, 40, 70, 0.55));
  pointer-events: none;
}

.photo-slot__label {
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.photo-slot__remove {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 2;
  width: 1.5rem;
  height: 1.5rem;
  border: 0;
  border-radius: 6px;
  background: rgba(227, 97, 89, 0.95);
  color: #fff;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}

.photo-slot__remove:hover {
  background: #c94a42;
}

.photo-slot.is-dragging {
  opacity: 0.45;
  cursor: grabbing;
}

.photo-slot.is-drag-over {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.chart-bars {
  display: grid;
  gap: 0.75rem;
}

.chart-row {
  display: grid;
  grid-template-columns: 120px 1fr 48px;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.88rem;
}

.chart-row__bar {
  height: 10px;
  background: #e8eef2;
  border-radius: 999px;
  overflow: hidden;
}

.chart-row__bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-deep));
  border-radius: inherit;
}

.chart-row__n {
  text-align: right;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.note {
  margin: 0 0 1.25rem;
  padding: 0.65rem 0.9rem;
  background: var(--primary-soft);
  border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0;
  font-size: 0.82rem;
  color: var(--slate);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.modal.is-open {
  display: flex;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(33, 37, 41, 0.45);
}

.modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 640px);
  max-height: min(92vh, 820px);
  overflow: auto;
  background: var(--surface);
  border-radius: 14px 14px 0 0;
  box-shadow: var(--shadow);
  margin: 0;
}

@media (min-width: 768px) {
  .modal {
    align-items: center;
    padding: 1.5rem;
  }

  .modal__dialog {
    border-radius: var(--radius);
    max-height: 90vh;
  }
}

.modal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 2;
}

.modal__head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.modal__body {
  padding: 1.15rem;
}

.modal__close {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--muted);
  border-radius: 8px;
}

.modal__close:hover {
  background: var(--canvas);
  color: var(--ink);
}

body.modal-open {
  overflow: hidden;
}

/* Mobile admin cards */
.table-desktop {
  display: block;
  overflow-x: auto;
}

.cards-mobile {
  display: none;
  gap: 0.75rem;
}

.m-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem;
  display: grid;
  gap: 0.55rem;
}

.m-card__top {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.m-card__meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.boceto-bar {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  gap: 0.35rem;
  padding: 0.4rem;
  background: rgba(33, 37, 41, 0.92);
  border-radius: 999px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}

.boceto-bar a {
  color: #fff;
  font-size: 0.78rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
}

.boceto-bar a[aria-current="page"],
.boceto-bar a:hover {
  background: var(--primary);
  color: #fff;
}

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

  .admin-aside {
    padding-bottom: 0.75rem;
  }

  .admin-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .photo-slots {
    grid-template-columns: repeat(3, 1fr);
  }

  .chart-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .table-desktop {
    display: none;
  }

  .cards-mobile {
    display: grid;
  }

  .boceto-bar {
    left: 0.75rem;
    right: 0.75rem;
    transform: none;
    overflow-x: auto;
    border-radius: 12px;
  }
}

/* ——— Splash: video splash_sin_fondo (sin chroma / sin imágenes) ——— */
.splash {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: #0b0f14;
  view-transition-name: none;
  pointer-events: auto;
  transition: opacity 0.45s ease;
  opacity: 1;
}

.splash[hidden] {
  display: none !important;
}

.splash.is-leaving {
  opacity: 0;
  pointer-events: none;
}

.splash__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center;
  background: #0b0f14;
  pointer-events: auto;
  cursor: pointer;
}

.splash__skip {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 2;
  min-height: 40px;
  padding: 0.45rem 1rem;
  border: 1px solid rgba(56, 63, 72, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--slate);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(6px);
}

.splash__skip:hover {
  border-color: var(--primary-deep);
  color: var(--primary-deep);
}

html.splash-active,
html.splash-active body {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .splash.is-leaving {
    transition: opacity 0.2s ease;
  }
}
