/* estilos del panel de administracion */

:root {
  --bg: #121110;
  --bg-2: #1b1917;
  --bg-3: #242220;
  --paper: #f6f2ec;
  --text: #eae5dc;
  --muted: #97907f;
  --gold: #b08d4f;
  --gold-2: #d4b477;
  --line: rgba(246, 242, 236, 0.09);
  --danger: #c8524a;
  --ok: #4caf78;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Jost', 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* el atributo hidden siempre gana, aunque el elemento tenga display propio */
[hidden] { display: none !important; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-weight: 300;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--gold); color: #fff; }

@keyframes cardUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* botones */
.abtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.8rem 1.6rem;
  border-radius: 100px;
  border: 1px solid transparent;
  transition: all 0.35s var(--ease);
  background: none;
  color: var(--text);
}
.abtn--gold { background: var(--gold); color: #fff; }
.abtn--gold:hover { background: var(--gold-2); color: var(--bg); }
.abtn--ghost { border-color: var(--line); color: var(--muted); }
.abtn--ghost:hover { border-color: var(--gold); color: var(--text); }
.abtn--danger { background: var(--danger); color: #fff; }
.abtn--danger:hover { filter: brightness(1.12); }
.abtn--sm { padding: 0.6rem 1rem; font-size: 0.66rem; white-space: nowrap; }
.abtn:disabled { opacity: 0.5; pointer-events: none; }

.iconbtn {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: none;
  color: var(--muted);
  display: grid;
  place-items: center;
  transition: all 0.3s;
}
.iconbtn:hover { color: var(--gold-2); border-color: var(--gold); }
.iconbtn--del:hover { color: var(--danger); border-color: var(--danger); }

/* campos */
.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field span, .field-label {
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.field small { color: var(--muted); font-size: 0.76rem; font-weight: 300; text-transform: none; letter-spacing: 0.02em; }
.field input, .field select, .field textarea, .toolbar select {
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: inherit;
  font-weight: 300;
  font-size: 0.94rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(176, 141, 79, 0.14);
}
.field textarea { resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field-label { margin-bottom: 0.6rem; display: block; }
.field-label small { display: block; text-transform: none; letter-spacing: 0.02em; margin-top: 0.2rem; font-size: 0.72rem; color: var(--muted); }

/* login */
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(600px 400px at 80% 10%, rgba(176, 141, 79, 0.1), transparent 70%),
    radial-gradient(500px 380px at 10% 90%, rgba(176, 141, 79, 0.07), transparent 70%),
    var(--bg);
}
.login__card {
  width: min(420px, 100%);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 3rem 2.4rem 2.2rem;
  text-align: center;
  animation: cardUp 0.8s var(--ease);
}
.login__brand {
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--paper);
}
.login__brand em, .sidebar__brand em { color: var(--gold-2); font-style: italic; font-weight: 500; }
.login__sub {
  font-size: 0.68rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0.4rem 0 2.2rem;
}
.login form { display: flex; flex-direction: column; gap: 1.2rem; text-align: left; }
.login__error { color: var(--danger); font-size: 0.85rem; text-align: center; }
.login__back {
  display: inline-block;
  margin-top: 1.6rem;
  font-size: 0.8rem;
  color: var(--muted);
  transition: color 0.3s;
}
.login__back:hover { color: var(--gold-2); }

/* layout */
.panel { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  padding: 2rem 1.1rem;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar__brand {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--paper);
  padding-left: 0.8rem;
}
.sidebar__tag {
  font-size: 0.6rem;
  letter-spacing: 0.44em;
  text-transform: uppercase;
  color: var(--gold);
  padding-left: 0.85rem;
  margin: 0.1rem 0 2.2rem;
}
.sidebar__nav { display: flex; flex-direction: column; gap: 0.2rem; }
.sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: 8px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 0.87rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  transition: all 0.3s var(--ease);
  width: 100%;
  text-align: left;
}
.sidebar__link:hover { color: var(--text); background: var(--bg-3); }
.sidebar__link.is-active { color: var(--gold-2); background: rgba(176, 141, 79, 0.1); }
.sidebar__pill {
  margin-left: auto;
  background: var(--gold);
  color: #fff;
  font-size: 0.6rem;
  border-radius: 100px;
  padding: 0.08rem 0.5rem;
}
.sidebar__foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
}

.content { padding: clamp(1.4rem, 3.5vw, 2.8rem); min-width: 0; }
.content__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.6rem;
}
.content__head h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--paper);
}
.content__sub { color: var(--muted); font-size: 0.88rem; margin-top: 0.15rem; }
.content__actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }

/* stats */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.4rem;
  animation: cardUp 0.6s var(--ease);
}
.stat {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  padding: 1.05rem 1.4rem;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.stat:last-child { border-right: 0; }
.stat__num {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 500;
  color: var(--paper);
  line-height: 1;
}
.stat__num em { color: var(--gold-2); font-style: normal; }
.stat--warn .stat__num { color: var(--danger); }
.stat__label {
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.stat__sub {
  font-size: 0.56rem;
  letter-spacing: 0.16em;
  color: var(--gold);
  text-transform: uppercase;
  font-style: normal;
}

/* grid de 6 stats (2 filas × 3 columnas) */
.stats--6 .stat:nth-child(3n) { border-right: 0; }
.stats--6 .stat:nth-child(n+4) { border-top: 1px solid var(--line); }

@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; }
  .stats--6 .stat:nth-child(3n) { border-right: 0; }
  .stats--6 .stat:nth-child(n+4) { border-top: 0; }
}

/* ── dashboard ────────────────────────────────────────────── */

/* bienvenida */
.dwelcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.1rem 1.5rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 1.3rem;
  animation: cardUp 0.5s var(--ease);
}
.dwelcome__greeting {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--paper);
}
.dwelcome__greeting em { color: var(--gold-2); font-style: italic; }
.dwelcome__date {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.18rem;
}
.dwelcome__alert {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(200, 82, 74, 0.1);
  border: 1px solid rgba(200, 82, 74, 0.3);
  color: #e88880;
  border-radius: 100px;
  padding: 0.5rem 1rem;
  font-size: 0.78rem;
  font-weight: 400;
}
.dwelcome__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--danger);
  animation: pulse 1.6s ease-in-out infinite;
  flex: none;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.55; transform: scale(0.85); }
}
.dwelcome__ok {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(76, 175, 120, 0.1);
  border: 1px solid rgba(76, 175, 120, 0.25);
  color: var(--ok);
  border-radius: 100px;
  padding: 0.5rem 1rem;
  font-size: 0.78rem;
}

/* KPI cards */
.dash-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.3rem;
}
.kpi-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.3rem 1.5rem 1.2rem;
  animation: cardUp 0.6s var(--ease) backwards;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.kpi-card:nth-child(1) { animation-delay: 0.05s; }
.kpi-card:nth-child(2) { animation-delay: 0.12s; }
.kpi-card:nth-child(3) { animation-delay: 0.19s; }
.kpi-card:hover { border-color: rgba(176, 141, 79, 0.3); box-shadow: 0 4px 20px rgba(0,0,0,0.2); }
.kpi-card--accent {
  background: linear-gradient(135deg, rgba(176, 141, 79, 0.1), rgba(176, 141, 79, 0.03));
  border-color: rgba(176, 141, 79, 0.28);
}
.kpi__label {
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}
.kpi__val {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 500;
  color: var(--paper);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.kpi-card--accent .kpi__val { color: var(--gold-2); }
.kpi__meta {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.kpi__trend {
  font-size: 0.65rem;
  padding: 0.15rem 0.55rem;
  border-radius: 100px;
  font-weight: 400;
}
.kpi__trend--up   { background: rgba(76,175,120,0.14); color: var(--ok); }
.kpi__trend--down { background: rgba(200,82,74,0.14);  color: var(--danger); }
@media (max-width: 760px) { .dash-kpis { grid-template-columns: 1fr; } }

/* layout inferior del dashboard */
.dash-bottom {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.2rem;
  margin-top: 1.2rem;
}
@media (max-width: 1080px) { .dash-bottom { grid-template-columns: 1fr; } }
.dash-right { display: flex; flex-direction: column; gap: 1.2rem; }

/* tarjetas del dashboard */
.dash-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.2rem 1.4rem;
  animation: cardUp 0.65s var(--ease);
}
.dash-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 1rem;
}
.dash-card__title {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--paper);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.dash-card__sub {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.18rem;
}
.dash-pill {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  padding: 0.18rem 0.55rem;
  border-radius: 100px;
  font-weight: 500;
}
.dash-pill--danger { background: rgba(200,82,74,0.18); color: var(--danger); border: 1px solid rgba(200,82,74,0.3); }

/* top productos */
.tpchart { overflow: visible; }
.tp-empty { font-size: 0.82rem; color: var(--muted); text-align: center; padding: 2rem 0; }

/* alertas de stock */
.alert-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
}
.alert-row:last-child { border-bottom: 0; padding-bottom: 0; }
.alert-row__img {
  width: 36px; height: 44px;
  object-fit: cover;
  border-radius: 5px;
  background: var(--bg-3);
}
.alert-row__info { min-width: 0; }
.alert-row__name {
  font-size: 0.84rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.alert-tag {
  display: inline-block;
  font-size: 0.56rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.12rem 0.5rem;
  border-radius: 100px;
  margin-top: 0.22rem;
}
.alert-tag--soldout { background: rgba(200,82,74,0.15); color: var(--danger); border: 1px solid rgba(200,82,74,0.28); }
.alert-tag--nostock { background: rgba(208,160,138,0.15); color: #d0a08a; border: 1px solid rgba(208,160,138,0.28); }
.alert-tag--last    { background: rgba(176,141,79,0.15); color: var(--gold-2); border: 1px solid rgba(176,141,79,0.28); }

/* pedidos recientes */
.rorder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}
.rorder:last-child { border-bottom: 0; }
.rorder__main { min-width: 0; }
.rorder__id {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rorder__info { font-size: 0.76rem; color: var(--muted); margin-top: 0.12rem; }
.rorder__right { text-align: right; flex: none; }
.rorder__total { font-family: var(--serif); font-size: 1rem; color: var(--paper); }
.rorder__badge {
  display: inline-block;
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.12rem 0.5rem;
  border-radius: 100px;
  margin-top: 0.22rem;
  border: 1px solid currentColor;
}
.rorder__badge--pagado    { color: var(--ok); }
.rorder__badge--pendiente { color: var(--gold-2); }
.rorder__badge--preparando{ color: #9db9e8; }
.rorder__badge--enviado   { color: var(--gold-2); }
.rorder__badge--entregado { color: var(--muted); }
.rorder__badge--cancelado { color: var(--danger); }

/* gráfica de ventas */
.chart-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.3rem 1.4rem 0.7rem;
  margin-bottom: 1.4rem;
  animation: cardUp 0.7s var(--ease);
  position: relative;
}
.chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.chart-title {
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 500;
  color: var(--paper);
  line-height: 1.2;
}
.chart-sub {
  font-size: 0.64rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.22rem;
}
.chart-range {
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.74rem;
  padding: 0.38rem 0.7rem;
  border-radius: 6px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.3s;
  flex: none;
}
.chart-range:focus { border-color: var(--gold); color: var(--text); }
.chart-wrap { position: relative; }
.chart__svg { width: 100%; display: block; overflow: visible; }
.chart__hit { cursor: crosshair; }
.chart__tooltip {
  position: absolute;
  background: var(--bg);
  border: 1px solid rgba(176, 141, 79, 0.55);
  border-radius: 9px;
  padding: 0.65rem 1rem;
  pointer-events: none;
  z-index: 20;
  min-width: 128px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
}
.chart__tt-date {
  font-size: 0.6rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-2);
  margin-bottom: 0.18rem;
}
.chart__tt-val {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--paper);
  line-height: 1.15;
}
.chart__tt-count {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 0.12rem;
}

/* toolbar */
.toolbar { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.asearch {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 1rem;
  color: var(--muted);
  transition: border-color 0.3s;
}
.asearch:focus-within { border-color: var(--gold); }
.asearch input {
  background: none;
  border: 0;
  outline: none;
  color: var(--text);
  font-family: inherit;
  font-weight: 300;
  font-size: 0.92rem;
  width: 100%;
  padding: 0.72rem 0;
}
.toolbar select { width: auto; }

/* lista de productos */
.plist { display: flex; flex-direction: column; gap: 0.6rem; }
.plist__empty { color: var(--muted); text-align: center; padding: 3rem 0; }
.prow {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 1.1rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem 1.1rem;
  transition: border-color 0.3s;
  animation: cardUp 0.5s var(--ease) backwards;
  animation-delay: calc(var(--i) * 35ms);
}
.prow:hover { border-color: rgba(176, 141, 79, 0.4); }
.prow__img {
  width: 56px; height: 70px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--bg-3);
}
.prow--soldout .prow__img { filter: grayscale(1) brightness(0.7); }
.prow__name {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 500;
  color: var(--paper);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prow--soldout .prow__name { color: var(--muted); }
.prow__meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.prow__meta b { color: var(--gold-2); font-weight: 500; }
.prow__meta s { opacity: 0.7; }
.prow__meta .dot { color: var(--ok); }
.prow--soldout .prow__meta .dot { color: var(--danger); }
.prow__meta .warn { color: #d0a08a; }

/* interruptor agotado */
.stockctl { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; }
.stockctl__label {
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.switch { position: relative; width: 48px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; position: absolute; margin: 0; cursor: pointer; z-index: 2; }
.switch i {
  position: absolute;
  inset: 0;
  border-radius: 100px;
  background: var(--ok);
  transition: background 0.35s;
}
.switch i::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.35s var(--ease);
}
.switch input:checked + i { background: var(--danger); }
.switch input:checked + i::after { transform: translateX(22px); }

.prow__actions { display: flex; gap: 0.4rem; }

@media (max-width: 980px) {
  .panel { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    overflow-x: auto;
  }
  .sidebar__brand { font-size: 1.15rem; padding: 0; white-space: nowrap; }
  .sidebar__tag { display: none; }
  .sidebar__nav { flex-direction: row; margin-left: 0.5rem; }
  .sidebar__foot { margin: 0 0 0 auto; flex-direction: row; border: 0; padding: 0; }
  .sidebar__link { white-space: nowrap; padding: 0.5rem 0.75rem; }
  .sidebar__pill { margin-left: 0.4rem; }
}
@media (max-width: 640px) {
  .prow { grid-template-columns: 48px minmax(0, 1fr) auto; }
  .prow__img { width: 48px; height: 60px; }
  .stockctl { grid-column: 3; }
  .prow__actions { grid-column: 2 / -1; justify-content: flex-end; }
}

/* pedidos */
.topcard {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.1rem 1.3rem;
  margin-bottom: 1.2rem;
}
.topcard__title {
  font-size: 0.64rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-2);
  margin-bottom: 0.8rem;
}
.toprow { display: flex; align-items: center; gap: 0.9rem; padding: 0.4rem 0; }
.toprow__rank { font-family: var(--serif); font-style: italic; color: var(--gold-2); width: 18px; }
.toprow__name { flex: 1; font-size: 0.9rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toprow__bar { flex: 2; height: 4px; border-radius: 100px; background: var(--bg-3); overflow: hidden; }
.toprow__bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); border-radius: 100px; }
.toprow__count { font-size: 0.76rem; color: var(--muted); white-space: nowrap; }

.olist { display: flex; flex-direction: column; gap: 0.6rem; }
.orow {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  animation: cardUp 0.5s var(--ease) backwards;
  animation-delay: calc(var(--i) * 25ms);
}
.otag {
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.28rem 0.7rem;
  border-radius: 100px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.otag--pedido { border-color: var(--ok); color: var(--ok); }
.otag--consulta { border-color: var(--gold); color: var(--gold-2); }
.otag--restock { border-color: var(--danger); color: var(--danger); }
.otag--look { border-color: #7d9fd4; color: #9db9e8; }
.orow__items { font-size: 0.88rem; min-width: 0; }
.orow__items small { color: var(--muted); display: block; margin-top: 0.1rem; }
.orow__meta { text-align: right; white-space: nowrap; }
.orow__total { font-family: var(--serif); font-size: 1.1rem; color: var(--gold-2); }
.orow__date { font-size: 0.7rem; color: var(--muted); margin-top: 0.1rem; }
@media (max-width: 640px) {
  .orow { grid-template-columns: 1fr; gap: 0.5rem; }
  .otag { justify-self: start; }
  .orow__meta { text-align: left; display: flex; gap: 0.8rem; align-items: baseline; }
}

/* lookbook */
.lklist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.9rem;
}
.lkcard {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  animation: cardUp 0.6s var(--ease) backwards;
}
.lkcard__img { aspect-ratio: 4 / 5; width: 100%; object-fit: cover; background: var(--bg-3); }
.lkcard__body { padding: 0.85rem 1rem 1rem; }
.lkcard__title { font-family: var(--serif); font-size: 1.15rem; font-weight: 500; color: var(--paper); }
.lkcard__meta { font-size: 0.7rem; color: var(--muted); letter-spacing: 0.14em; text-transform: uppercase; margin: 0.15rem 0 0.7rem; }
.lkcard__actions { display: flex; gap: 0.4rem; }

.lkpicker {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-3);
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.lkopt {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
.lkopt:hover { background: var(--bg-2); }
.lkopt input { display: none; }
.lkopt i {
  width: 17px; height: 17px;
  border: 1px solid var(--line);
  border-radius: 4px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: all 0.2s;
}
.lkopt i::after { content: '✓'; font-size: 0.62rem; color: #fff; opacity: 0; }
.lkopt input:checked + i { background: var(--gold); border-color: var(--gold); }
.lkopt input:checked + i::after { opacity: 1; }
.lkopt img { width: 28px; height: 36px; object-fit: cover; border-radius: 4px; background: var(--bg-2); }
.lkopt__name { font-size: 0.84rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lkopt__soldout { font-size: 0.58rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--danger); }

/* ajustes */
.settings-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.8rem;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
  animation: cardUp 0.6s var(--ease);
}
.settings-card .abtn { align-self: flex-start; }

/* modales */
.amodal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  visibility: hidden;
  pointer-events: none;
}
.amodal.is-open { visibility: visible; pointer-events: auto; }
.amodal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 9, 8, 0.7);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.4s;
}
.amodal.is-open .amodal__backdrop { opacity: 1; }
.amodal__panel {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  width: min(860px, 100%);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(30px) scale(0.98);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
.amodal.is-open .amodal__panel { opacity: 1; transform: none; }
.amodal__panel--sm { width: min(430px, 100%); }
.amodal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.3rem 1.7rem;
  border-bottom: 1px solid var(--line);
}
.amodal__head h2 { font-family: var(--serif); font-weight: 500; font-size: 1.55rem; color: var(--paper); }
.amodal__close {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: none;
  color: var(--muted);
  display: grid;
  place-items: center;
  transition: all 0.3s;
}
.amodal__close:hover { color: var(--text); border-color: var(--gold); transform: rotate(90deg); }
.amodal__body { padding: 1.7rem; overflow-y: auto; }
.amodal__cols { display: grid; grid-template-columns: 270px 1fr; gap: 1.5rem; }
.amodal__fields { display: flex; flex-direction: column; gap: 1.05rem; min-width: 0; }
.amodal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
  padding: 1.1rem 1.7rem;
  border-top: 1px solid var(--line);
}
@media (max-width: 760px) {
  .amodal__cols { grid-template-columns: 1fr; }
}

/* galeria de fotos */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.gallery.is-drag .gthumb--add { border-color: var(--gold-2); background: rgba(176, 141, 79, 0.12); }
.gthumb {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-3);
  border: 1px solid var(--line);
}
.gthumb img { width: 100%; height: 100%; object-fit: cover; }
.gthumb__main {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(176, 141, 79, 0.9);
  color: #fff;
  font-size: 0.52rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  padding: 0.18rem;
}
.gthumb__del {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 0;
  background: rgba(10, 9, 8, 0.75);
  color: #fff;
  font-size: 0.72rem;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: background 0.25s;
}
.gthumb__del:hover { background: var(--danger); }
.gthumb--add {
  border: 1.5px dashed rgba(176, 141, 79, 0.45);
  background: var(--bg-3);
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s;
}
.gthumb--add:hover { border-color: var(--gold-2); color: var(--gold-2); }
.gallery__hint { color: var(--muted); font-size: 0.73rem; margin-top: 0.5rem; }

/* uploader de una sola imagen (looks) */
.uploader {
  position: relative;
  border: 1.5px dashed rgba(176, 141, 79, 0.45);
  border-radius: 8px;
  background: var(--bg-3);
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.3s, background 0.3s;
}
.uploader:hover, .uploader.is-drag { border-color: var(--gold-2); background: rgba(176, 141, 79, 0.08); }
.uploader__empty { padding: 1.3rem; color: var(--muted); display: flex; flex-direction: column; gap: 0.5rem; align-items: center; }
.uploader__empty strong { color: var(--text); font-weight: 400; }
.uploader__hint { font-size: 0.74rem; }
.uploader img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.uploader__change {
  position: absolute;
  bottom: 0.7rem; left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 9, 8, 0.75);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
  backdrop-filter: blur(4px);
}

/* editor de tallas */
.sizeadd { display: flex; gap: 0.5rem; }
.sizeadd input { flex: 1; }
.sizechips { display: flex; flex-wrap: wrap; gap: 0.4rem; min-height: 8px; }
.szchip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--ok);
  color: var(--text);
  border-radius: 100px;
  padding: 0.3rem 0.45rem 0.3rem 0.85rem;
  font-size: 0.8rem;
  cursor: pointer;
  user-select: none;
  transition: all 0.25s;
}
.szchip--off { border-color: var(--danger); color: var(--muted); }
.szchip--off .szchip__label { text-decoration: line-through; }
.szchip__x {
  width: 18px; height: 18px;
  border: 0;
  border-radius: 50%;
  background: var(--bg-3);
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: all 0.25s;
}
.szchip__x:hover { background: var(--danger); color: #fff; }

/* checkboxes */
.checks { display: flex; flex-wrap: wrap; gap: 0.8rem 1.3rem; }
.check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.check input { display: none; }
.check i {
  width: 19px; height: 19px;
  border: 1px solid var(--line);
  border-radius: 5px;
  display: inline-grid;
  place-items: center;
  transition: all 0.25s;
  background: var(--bg-3);
  flex: none;
}
.check i::after {
  content: '✓';
  font-size: 0.7rem;
  color: #fff;
  opacity: 0;
  transform: scale(0.4);
  transition: all 0.25s var(--ease);
}
.check input:checked + i { background: var(--gold); border-color: var(--gold); }
.check input:checked + i::after { opacity: 1; transform: scale(1); }
.check input:checked ~ * { color: var(--text); }

/* confirmacion */
.confirm__body { padding: 2rem 1.7rem 0.5rem; text-align: center; }
.confirm__icon {
  width: 50px; height: 50px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: rgba(200, 82, 74, 0.14);
  color: var(--danger);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}
.confirm__body h3 { font-family: var(--serif); font-weight: 500; font-size: 1.45rem; color: var(--paper); }
.confirm__name { color: var(--gold-2); margin-top: 0.3rem; }
.confirm__warn { color: var(--muted); font-size: 0.8rem; margin-top: 0.5rem; }
.amodal--confirm .amodal__foot { border-top: 0; justify-content: center; padding-bottom: 1.7rem; }

/* logo */
.alogo {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.7rem;
  color: var(--paper);
  line-height: 1;
  padding-left: 0.8rem;
}
.alogo__inf {
  height: 0.5em;
  width: auto;
  margin: 0 0.05em;
  color: var(--gold-2);
}
.alogo__mx {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.42em;
  letter-spacing: 0.3em;
  margin-left: 0.5em;
  color: var(--muted);
}
.alogo--big { font-size: 2.6rem; padding-left: 0; justify-content: center; }

/* pedidos pagados */
.orow--order { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
.orow__main { min-width: 0; }
.orow__id { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-2); }
.orow--order .orow__items { margin-top: 0.3rem; }
.orow__client { font-size: 0.82rem; color: var(--muted); margin-top: 0.25rem; }
.orow__client a { color: var(--ok); text-decoration: underline; text-underline-offset: 3px; }
.orow__addr { font-size: 0.78rem; color: var(--muted); margin-top: 0.2rem; }
.ostatus {
  margin-top: 0.5rem;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.8rem;
  padding: 0.45rem 0.7rem;
  outline: none;
  width: 100%;
}
.ostatus--pagado { border-color: var(--ok); color: var(--ok); }
.ostatus--pendiente { border-color: var(--gold); color: var(--gold-2); }
.ostatus--preparando { border-color: #7d9fd4; color: #9db9e8; }
.ostatus--enviado { border-color: var(--gold-2); color: var(--gold-2); }
.ostatus--entregado { color: var(--muted); }
.ostatus--cancelado { border-color: var(--danger); color: var(--danger); }
@media (max-width: 640px) {
  .orow--order { grid-template-columns: 1fr; }
  .orow--order .orow__meta { text-align: left; }
}

/* consultas por WhatsApp */
.interest { margin-top: 2.2rem; border-top: 1px solid var(--line); padding-top: 1.6rem; }
.interest__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}
.interest__head .topcard__title { margin-bottom: 0; }
.ilist { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.9rem; }
.irow { font-size: 0.86rem; color: var(--text); display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }

/* secciones de ajustes */
.settings-card__section {
  font-size: 0.64rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-2);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.5rem;
  margin-top: 0.6rem;
}
.settings-card__section:first-child { margin-top: 0; }
.settings-card__hint {
  font-size: 0.78rem;
  color: var(--text-3);
  line-height: 1.55;
  margin-bottom: 0.4rem;
}
.settings-card__hint b { color: var(--gold-2); font-weight: 500; }
.field small b { color: var(--gold-2); font-weight: 500; }

/* reseñas */
.rvrow {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  animation: rowIn 0.3s var(--ease) calc(var(--i)*0.04s) both;
}
.rvrow:last-child { border-bottom: none; }
.rvrow__main { flex: 1; min-width: 0; }
.rvrow__top { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.3rem; }
.rvrow__stars { color: var(--gold-2); font-size: 0.88rem; letter-spacing: 0.05em; }
.rvrow__author { font-size: 0.84rem; font-weight: 400; color: var(--paper); }
.rvrow__product { font-size: 0.7rem; color: var(--text-3); letter-spacing: 0.1em; background: var(--bg-2); padding: 0.15rem 0.5rem; border-radius: 8px; }
.rvrow__text { font-size: 0.85rem; color: var(--text-2); font-style: italic; line-height: 1.55; }
.rvrow__actions { display: flex; align-items: center; gap: 0.4rem; flex: none; }
.amodal__panel--sm { max-width: 520px; }

/* toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translate(-50%, 140%);
  background: var(--bg-3);
  border: 1px solid var(--gold);
  color: var(--text);
  border-radius: 100px;
  padding: 0.8rem 1.7rem;
  font-size: 0.86rem;
  z-index: 300;
  transition: transform 0.5s var(--ease);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  max-width: min(90vw, 480px);
  text-align: center;
}
.toast.is-show { transform: translate(-50%, 0); }
.toast.is-error { border-color: var(--danger); }
