/* Dòk Mái Cha · pedidos para recoger
   Identidad del menú: rojo Dòk, blanco, durazno; Montserrat (tipo Gotham) + Prata en los nombres de bebida. */
:root {
  color-scheme: light;
  --rojo: #DF0D0B;          /* portada del menú */
  --rojo-texto: #D2181C;    /* nombres y precios */
  --rojo-osc: #B50B09;
  --negro: #020602;
  --texto: #2A2A2A;
  --gris: #6B6563;
  --papel: #FFFFFF;
  --fondo: #FFFFFF;
  --durazno: #F6CBBF;       /* base leche / divisores */
  --durazno-claro: #FBE8E2;
  --linea: #EFDDD7;
  --salvia: #8FAE9A;        /* té verde */
  --agua: #9DB8D9;          /* base agua */
  --oro: #CBA774;           /* Golden 5 */
  --ok: #4F7D60;
  --sans: "Montserrat", "Gotham", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --serif: "Prata", "Didot", Georgia, serif;
  --radio: 16px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 1rem/1.5 var(--sans);
  color: var(--texto);
  background: var(--fondo);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
h1, h2, h3 { margin: 0; line-height: 1.15; color: var(--negro); }
a { color: var(--rojo-texto); }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--rojo); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ── Marca ── */
.marca-dok { display: inline-flex; align-items: center; gap: .6em; color: inherit; text-decoration: none; margin: 0; font-weight: 300; }
.marca-dok .flor { width: 1.25em; height: 1.25em; flex: none; }
.marca-dok .nombre-marca { text-transform: uppercase; letter-spacing: .14em; font-weight: 300; line-height: 1; }
.marca-dok .logo { height: 3.2em; width: auto; display: block; }

/* ── Botones y formularios ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 46px; padding: .55em 1.2em;
  font: 700 .95rem/1.2 var(--sans); letter-spacing: .01em;
  color: var(--negro); background: var(--papel);
  border: 1.5px solid var(--linea); border-radius: 999px;
  cursor: pointer; text-decoration: none;
}
.btn:hover { border-color: var(--durazno); background: var(--durazno-claro); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primario { background: var(--rojo); border-color: var(--rojo); color: #fff; }
.btn-primario:hover { background: var(--rojo-osc); border-color: var(--rojo-osc); }
.btn-peligro { color: var(--rojo-texto); border-color: var(--durazno); }
.btn-claro { background: #fff; border-color: #fff; color: var(--negro); }
.btn-claro:hover { background: var(--durazno-claro); border-color: var(--durazno-claro); }
.btn-grande { width: 100%; min-height: 56px; font-size: 1.05rem; }
.btn-chico { min-height: 36px; padding: .35em .85em; font-size: .85rem; }

.form { display: grid; gap: 1rem; }
.form h2 { font-size: 1.05rem; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; margin-top: .6rem; }
.form label { display: grid; gap: .35rem; font-weight: 600; font-size: .92rem; color: var(--negro); }
.form input, .form textarea, .form select {
  width: 100%; min-height: 50px; padding: .6em .85em;
  font: 400 1rem/1.4 var(--sans); color: var(--negro);
  background: var(--papel); border: 1.5px solid var(--linea); border-radius: 12px;
}
.form textarea { min-height: 76px; resize: vertical; }
.form input::placeholder, .form textarea::placeholder { color: #A9A09D; }
.form input:focus, .form textarea:focus, .form select:focus { border-color: var(--rojo); outline: none; box-shadow: 0 0 0 3px rgba(223, 13, 11, .14); }
.form .check { display: flex; align-items: center; gap: .6rem; font-weight: 500; }
.form .check input { width: 22px; min-height: 22px; accent-color: var(--rojo); }
.fila { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.opcional { font-weight: 400; color: var(--gris); }
.ayuda { color: var(--gris); font-size: .9rem; margin: 0; }
.centro { text-align: center; }

.msg { padding: .85rem 1rem; border-radius: 12px; background: var(--durazno-claro); border: 1.5px solid var(--durazno); margin: 0 0 1rem; color: var(--negro); }
.msg.error { background: #FDECEB; border-color: #F3B3AF; color: var(--rojo-osc); font-weight: 600; }
.msg.ok { background: #EEF5F0; border-color: #C5DACC; color: var(--ok); font-weight: 600; }
.msg.aviso { background: #FBF3E4; border-color: var(--oro); }

/* ══════════ CLIENTE ══════════ */
.cliente .encabezado {
  background: var(--rojo); color: #fff;
  padding: calc(env(safe-area-inset-top, 0px) + 2.4rem) 1.25rem 2rem;
}
.encabezado-in { max-width: 560px; margin: 0 auto; }
.cliente .encabezado h1 { color: #fff; font-size: clamp(1.7rem, 7.5vw, 2.4rem); }
.cliente .encabezado .lema { margin: 1.2rem 0 0; font-size: 1.5rem; font-weight: 300; letter-spacing: .01em; }
.cliente .encabezado .lema b { font-weight: 800; }
.cliente .encabezado .bajada { margin: .3rem 0 0; font-size: 1rem; color: rgba(255, 255, 255, .9); }
.cliente .encabezado.compacto { padding-top: calc(env(safe-area-inset-top, 0px) + 1rem); padding-bottom: 1rem; }
.cliente .encabezado.compacto .marca-dok { display: flex; max-width: 560px; margin: 0 auto; font-size: 1.15rem; color: #fff; }

.contenido { max-width: 560px; margin: 0 auto; padding: 1.25rem 1.25rem 7rem; }

.pedido-activo {
  display: block; max-width: 560px; margin: 0 auto; padding: .9rem 1.25rem;
  background: var(--durazno-claro); color: var(--rojo-texto); font-weight: 700; text-decoration: none;
  border-bottom: 1.5px solid var(--durazno);
}
@media (min-width: 600px) { .pedido-activo { margin-top: 1rem; border-radius: 12px; border: 1.5px solid var(--durazno); } }

.cerrado { padding: 2rem 0; }
.cerrado h2 { font-family: var(--serif); font-weight: 400; color: var(--rojo-texto); font-size: 1.7rem; margin-bottom: .5rem; }

.categoria {
  font-size: 1.3rem; font-weight: 800; text-transform: uppercase; letter-spacing: .01em;
  margin: 2rem 0 .4rem; padding-top: 1.4rem; border-top: 1.5px solid var(--durazno);
}
.categoria:first-child { margin-top: .4rem; padding-top: 0; border-top: 0; }
.producto {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .9rem;
  padding: .95rem 0;
}
.producto + .producto { border-top: 1px solid var(--linea); }
.producto.con-foto { grid-template-columns: 72px 1fr auto; }
.producto img { width: 72px; height: 72px; object-fit: cover; border-radius: 14px; background: var(--durazno-claro); }
.producto h3 { font-family: var(--serif); font-weight: 400; font-size: 1.28rem; color: var(--rojo-texto); line-height: 1.2; }
.producto p { margin: .2rem 0 .3rem; color: var(--texto); font-size: .9rem; line-height: 1.4; }
.precio { font-weight: 700; color: var(--rojo-texto); font-size: 1.05rem; }

.contador { display: flex; align-items: center; gap: .25rem; }
.contador button {
  width: 44px; height: 44px; border-radius: 50%;
  font: 600 1.4rem/1 var(--sans); color: var(--rojo-texto);
  background: var(--papel); border: 1.5px solid var(--durazno); cursor: pointer;
}
.contador button.mas { background: var(--rojo); border-color: var(--rojo); color: #fff; }
.contador button.mas:hover { background: var(--rojo-osc); }
.contador button:disabled { opacity: .3; cursor: default; }
.contador output { min-width: 1.8em; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--negro); }

.barra-carrito {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; align-items: center; gap: 1rem;
  padding: .8rem max(1.25rem, calc((100vw - 560px) / 2 + 1.25rem)) calc(.8rem + env(safe-area-inset-bottom, 0px));
  background: var(--papel); border-top: 1.5px solid var(--durazno);
  box-shadow: 0 -8px 24px rgba(223, 13, 11, .08);
}
.barra-carrito span { color: var(--gris); font-weight: 500; }
.barra-carrito strong { font-size: 1.2rem; font-weight: 800; color: var(--negro); margin-right: auto; font-variant-numeric: tabular-nums; }

.volver { background: none; border: 0; padding: .4rem 0; margin-bottom: 1rem; font: 700 .95rem var(--sans); color: var(--rojo-texto); cursor: pointer; }
.volver::before { content: "‹ "; }
#titulo-datos { font-size: 1.3rem; font-weight: 800; text-transform: uppercase; }
.resumen { list-style: none; margin: .8rem 0 0; padding: 0; border-top: 1.5px solid var(--durazno); }
.resumen li { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem 0; border-bottom: 1px solid var(--linea); }
.resumen-total { display: flex; justify-content: space-between; margin: .8rem 0 1.6rem; font-size: 1.1rem; font-weight: 600; }
.resumen-total strong { color: var(--rojo-texto); font-weight: 800; }

/* Botón agregar en cada bebida */
.agregar { display: grid; justify-items: end; gap: .3rem; }
.agregar .mas {
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  font: 600 1.5rem/1 var(--sans); color: #fff; background: var(--rojo); border: 0;
}
.agregar .mas:hover { background: var(--rojo-osc); }
.en-carrito { font-size: .74rem; font-weight: 700; color: var(--rojo-texto); white-space: nowrap; }
.etiqueta-version {
  display: inline-block; margin: .35rem .35rem 0 0; padding: .12rem .55rem; border-radius: 999px;
  font-size: .72rem; font-weight: 700; color: #3E6390; background: #E8EFF8;
}
.producto-info .precio { margin-right: .5rem; }
.producto.elegido h3::after { content: " ✓"; font-family: var(--sans); font-size: .9rem; }

/* Hoja para personalizar */
.hoja {
  padding: 0; border: 0; width: 100%; max-width: 560px; max-height: 92vh;
  margin: auto auto 0; border-radius: 24px 24px 0 0;
  background: var(--papel); color: var(--texto);
  box-shadow: 0 -10px 40px rgba(2, 6, 2, .25);
}
.hoja[open] { display: flex; flex-direction: column; }
.hoja::backdrop { background: rgba(2, 6, 2, .5); }
@media (min-width: 640px) { .hoja { margin: auto; border-radius: 24px; } }
.hoja-cabeza { display: flex; align-items: flex-start; gap: 1rem; padding: 1.3rem 1.25rem .8rem; border-bottom: 1.5px solid var(--durazno); }
.hoja-cabeza h2 { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; color: var(--rojo-texto); }
.hoja-desc { margin: .3rem 0 0; font-size: .9rem; }
.cerrar { margin-left: auto; flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--linea); background: var(--papel); font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--negro); }
.hoja-cuerpo { flex: 1; overflow-y: auto; padding: .4rem 1.25rem 1rem; overscroll-behavior: contain; }
.hoja-pie {
  display: flex; align-items: center; gap: 1rem;
  padding: .85rem 1.25rem calc(.85rem + env(safe-area-inset-bottom, 0px));
  border-top: 1.5px solid var(--durazno); background: var(--papel);
}
.hoja-pie .btn { flex: 1; min-height: 52px; font-size: 1.02rem; }

.grupo { border: 0; margin: 0; padding: 1rem 0 .4rem; }
.grupo + .grupo { border-top: 1px solid var(--linea); }
.grupo legend { float: left; width: 100%; padding: 0; font-weight: 800; text-transform: uppercase; font-size: .95rem; color: var(--negro); letter-spacing: .02em; }
.grupo legend + * { clear: both; }
.grupo-ayuda { margin: .15rem 0 0; padding-top: .1rem; font-size: .82rem; color: var(--gris); }
.opciones { margin-top: .7rem; }
.opcion input { position: absolute; opacity: 0; width: 1px; height: 1px; }

/* Lista: versión, leche, toppings, quitar */
.lista-opciones { display: grid; gap: .45rem; }
.lista-opciones .opcion {
  position: relative; display: flex; align-items: center; gap: .7rem;
  min-height: 48px; padding: .55rem .9rem; border: 1.5px solid var(--linea); border-radius: 12px; cursor: pointer;
}
.lista-opciones .opcion::before {
  content: ""; flex: none; width: 20px; height: 20px; border: 2px solid #CDBFBB; border-radius: 50%; background: var(--papel);
}
.lista-opciones .opcion:has(input[type="checkbox"])::before { border-radius: 6px; }
.lista-opciones .opcion:has(input:checked) { border-color: var(--rojo); background: #FFF6F4; }
.lista-opciones .opcion:has(input:checked)::before { border-color: var(--rojo); background: var(--rojo); box-shadow: inset 0 0 0 3px #fff; }
.lista-opciones .opcion:has(input:focus-visible) { outline: 3px solid var(--rojo); outline-offset: 2px; }
.opcion-nombre { font-weight: 600; color: var(--negro); }
.opcion-precio { margin-left: auto; font-weight: 700; color: var(--rojo-texto); font-size: .92rem; }
.opcion.bloqueada { opacity: .45; cursor: not-allowed; }

/* Escalas 1–4 como en el menú: dulzura en dorado, hielo en azul */
.segmentos { display: grid; grid-template-columns: repeat(auto-fit, minmax(48px, 1fr)); border-radius: 999px; overflow: hidden; border: 1.5px solid var(--linea); }
.segmentos .opcion { position: relative; display: grid; place-items: center; min-height: 48px; cursor: pointer; font-weight: 800; font-size: 1.1rem; }
.segmentos .opcion .opcion-nombre { color: inherit; }
.segmentos .opcion:has(input:focus-visible) { outline: 3px solid var(--negro); outline-offset: -3px; }
.segmentos .opcion:has(input:checked) { box-shadow: inset 0 0 0 3px var(--negro); }
.segmentos .opcion:has(input:checked) .opcion-nombre::after { content: " ✓"; font-size: .85rem; }
.segmentos .opcion { background: var(--durazno-claro); color: var(--rojo-texto); }
.grupo[data-code="dulzura"] .opcion:nth-child(1) { background: #EBD6B4; color: #7A5A2C; }
.grupo[data-code="dulzura"] .opcion:nth-child(2) { background: #DDBE8E; color: #5E4420; }
.grupo[data-code="dulzura"] .opcion:nth-child(3) { background: #CBA774; color: #fff; }
.grupo[data-code="dulzura"] .opcion:nth-child(4) { background: #B08A55; color: #fff; }
.grupo[data-code="hielo"] .opcion:nth-child(1) { background: #CFE0F2; color: #3E6390; }
.grupo[data-code="hielo"] .opcion:nth-child(2) { background: #A9C6E6; color: #2F527D; }
.grupo[data-code="hielo"] .opcion:nth-child(3) { background: #7FA6D6; color: #fff; }
.grupo[data-code="hielo"] .opcion:nth-child(4) { background: #4F7FBF; color: #fff; }

/* Resumen con opciones */
.resumen-lineas li { align-items: center; }
.linea-info { display: grid; gap: .15rem; min-width: 0; }
.linea-info strong { color: var(--negro); }
.linea-opciones { font-size: .84rem; color: var(--gris); line-height: 1.35; }
.linea-derecha { display: grid; justify-items: end; gap: .35rem; flex: none; }
.linea-precio { font-weight: 800; color: var(--negro); }
.contador-chico button { width: 34px; height: 34px; font-size: 1.15rem; }
.contador-chico output { min-width: 1.5em; }

/* ── Seguimiento: el vaso ── */
.vaso-estado { text-align: center; padding: 1.2rem 0 .5rem; }
.vaso { width: 150px; height: auto; display: block; margin: 0 auto 1rem; color: var(--negro); }
.vaso .contorno { fill: none; stroke: currentColor; stroke-width: 3; stroke-linejoin: round; }
.vaso .tapa { stroke: currentColor; stroke-width: 5; stroke-linecap: round; }
.vaso .popote { stroke: var(--rojo); stroke-width: 7; stroke-linecap: round; }
.liquido { fill: var(--durazno); transform: translateY(142px); transition: transform 1.4s cubic-bezier(.2, .7, .2, 1), fill 1.4s ease; }
.burbujas circle { fill: rgba(255, 255, 255, .7); opacity: 0; }
.vaso.activo .burbujas circle { animation: subir 2.6s ease-in infinite; }
.vaso.activo .burbujas circle:nth-child(2) { animation-delay: .9s; }
.vaso.activo .burbujas circle:nth-child(3) { animation-delay: 1.7s; }
.vaso.apagado { color: #B9B1AE; }
.vaso.apagado .liquido { fill: #E4DEDC !important; }
@keyframes subir { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-110px); opacity: 0; } }

.numero { margin: 0; color: var(--gris); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; }
.vaso-estado h1 { font-family: var(--serif); font-weight: 400; color: var(--rojo-texto); font-size: clamp(1.9rem, 8vw, 2.5rem); margin-top: .35rem; }
.estado-texto { margin: .4rem 0 0; font-size: 1.02rem; }

.llegada { margin: 1.6rem 0; }
.llegada.espera { text-align: center; }
.btn-llegue {
  width: 100%; min-height: 66px; border-radius: 999px;
  font-size: 1.15rem; font-weight: 800; color: #fff; background: var(--rojo); border-color: var(--rojo);
  box-shadow: 0 10px 26px rgba(223, 13, 11, .28);
}
.btn-llegue:hover { background: var(--rojo-osc); border-color: var(--rojo-osc); }
.llegada .ayuda { text-align: center; margin-top: .7rem; }
.llegada.avisado { background: var(--durazno-claro); border: 2px solid var(--rojo); border-radius: var(--radio); padding: 1.2rem; text-align: center; }
.llegada.avisado h2 { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; color: var(--rojo-texto); }
.llegada.avisado p { margin: .4rem 0 0; }
.llegada.avisado .auto { font-weight: 800; font-size: 1.1rem; color: var(--negro); }

.pasos { list-style: none; counter-reset: paso; margin: 1.6rem 0; padding: 0; }
.pasos li {
  counter-increment: paso; position: relative;
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .7rem 0 .7rem 2.7rem; color: var(--gris);
}
.pasos li::before {
  content: counter(paso); position: absolute; left: 0; top: .55rem;
  width: 1.85rem; height: 1.85rem; display: grid; place-items: center;
  border-radius: 50%; border: 1.5px solid var(--durazno); background: var(--papel);
  font-weight: 800; font-size: .85rem; color: var(--rojo-texto);
}
.pasos li:not(:last-child)::after { content: ""; position: absolute; left: .9rem; top: 2.45rem; bottom: -.5rem; border-left: 1.5px solid var(--durazno); }
.pasos li.hecho { color: var(--negro); }
.pasos li.hecho::before { content: "✓"; background: var(--durazno); border-color: var(--durazno); color: var(--rojo-texto); }
.pasos li.actual { color: var(--negro); font-weight: 800; }
.pasos li.actual::before { background: var(--rojo); border-color: var(--rojo); color: #fff; }
.paso-hora { font-variant-numeric: tabular-nums; font-weight: 500; }

.detalle h2 { font-size: 1.15rem; font-weight: 800; text-transform: uppercase; margin-top: 1rem; }

@media (prefers-reduced-motion: reduce) {
  .liquido { transition: none; }
  .vaso.activo .burbujas circle { animation: none; }
}

/* ══════════ PANEL DE LA TIENDA ══════════ */
.admin { background: #FBF8F7; }
.admin-top {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.6rem;
  padding: calc(env(safe-area-inset-top, 0px) + .75rem) 1.25rem .75rem;
  background: var(--rojo); color: #fff;
}
.admin-top .marca-dok { font-size: 1.05rem; color: #fff; }
.admin-top .marca-dok .logo { height: 2.4em; }
.admin-top nav { display: flex; gap: .25rem; flex-wrap: wrap; }
.admin-top nav a { color: rgba(255, 255, 255, .85); text-decoration: none; padding: .45rem .8rem; border-radius: 999px; font-weight: 700; font-size: .92rem; }
.admin-top nav a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.admin-top nav a[aria-current="page"] { background: #fff; color: var(--rojo-texto); }
.admin-top .quien { margin-left: auto; display: flex; align-items: center; gap: 1rem; font-weight: 600; }
.admin-top .quien small { color: rgba(255, 255, 255, .75); margin-left: .35rem; font-weight: 500; }
.admin-top .quien a { color: #fff; }
.admin-main { padding: 1.25rem; max-width: 1500px; margin: 0 auto; }
.admin-main > h1 { font-size: 1.5rem; font-weight: 800; text-transform: uppercase; margin-bottom: 1rem; }

.panel-barra { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; margin-bottom: 1rem; }
#activar-sonido.activo { background: var(--papel); color: var(--ok); border-color: #C5DACC; }
.conexion { font-weight: 700; color: var(--gris); font-size: .92rem; }
.conexion.ok::before { content: ""; display: inline-block; width: .6rem; height: .6rem; margin-right: .45rem; border-radius: 50%; background: #3BA36B; }
.conexion.error { color: var(--rojo-texto); }
#toggle-pedidos { margin-left: auto; }

/* Alerta: cliente afuera (negro + aro rojo, para distinguirse del rojo del encabezado) */
.alertas { display: grid; gap: .7rem; margin-bottom: 1rem; }
.alerta-afuera {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem;
  padding: 1.05rem 1.25rem; border-radius: var(--radio);
  background: var(--negro); color: #fff;
  box-shadow: 0 0 0 3px var(--rojo);
  animation: llamar 1.6s ease-in-out infinite;
}
.alerta-texto { display: grid; gap: .15rem; margin-right: auto; }
.alerta-texto strong { font-size: 1.35rem; font-weight: 800; }
.alerta-auto { font-family: var(--serif); font-size: 1.3rem; color: var(--durazno); }
.alerta-acciones { display: flex; gap: .6rem; flex-wrap: wrap; }
@keyframes llamar { 0%, 100% { box-shadow: 0 0 0 3px var(--rojo), 0 0 0 3px rgba(223, 13, 11, .5); } 50% { box-shadow: 0 0 0 3px var(--rojo), 0 0 0 14px rgba(223, 13, 11, 0); } }

.tablero { display: grid; gap: 1rem; grid-template-columns: repeat(4, minmax(250px, 1fr)); align-items: start; }
@media (max-width: 1100px) { .tablero { grid-template-columns: repeat(2, minmax(250px, 1fr)); } }
@media (max-width: 620px) { .tablero { grid-template-columns: 1fr; } }
.columna h2 { font-size: 1rem; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; margin: 0 0 .7rem; display: flex; align-items: center; gap: .5rem; padding-bottom: .55rem; border-bottom: 2px solid var(--durazno); }
.cuenta:not(:empty) { display: inline-grid; place-items: center; min-width: 1.6rem; height: 1.6rem; padding: 0 .4rem; border-radius: 999px; background: var(--rojo); color: #fff; font-size: .82rem; }
.columna > div { display: grid; gap: .75rem; }
.vacio { color: var(--gris); margin: 0; padding: 1rem; border: 1.5px dashed var(--linea); border-radius: var(--radio); font-size: .92rem; }

.tarjeta {
  background: var(--papel); border-radius: var(--radio); padding: .95rem 1rem;
  border: 1.5px solid var(--linea); border-top: 5px solid var(--linea);
}
.tarjeta.est-nuevo { border-top-color: var(--rojo); }
.tarjeta.est-aceptado { border-top-color: var(--durazno); }
.tarjeta.est-preparando { border-top-color: var(--agua); }
.tarjeta.est-lista { border-top-color: var(--salvia); }
.tarjeta.est-entregada, .tarjeta.est-cancelada { opacity: .65; }
.tarjeta.con-cliente { border-color: var(--negro); border-top-color: var(--negro); }
.tarjeta header { display: flex; align-items: baseline; gap: .5rem; }
.tarjeta .num { font-weight: 800; font-size: 1.15rem; color: var(--rojo-texto); }
.tarjeta .cliente { font-weight: 700; color: var(--negro); margin-right: auto; }
.tarjeta .tiempo { color: var(--gris); font-size: .85rem; font-weight: 600; white-space: nowrap; }
.tarjeta .etiqueta { margin: .25rem 0 0; font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #5D7FA8; }
.tarjeta .productos { list-style: none; margin: .65rem 0; padding: 0; }
.tarjeta .productos li { padding: .12rem 0; font-family: var(--serif); font-size: 1.12rem; color: var(--negro); }
.tarjeta .productos b { font-family: var(--sans); font-weight: 800; color: var(--rojo-texto); }
.item-opciones { display: block; margin: .1rem 0 .3rem 1.6rem; font-family: var(--sans); font-size: .86rem; font-weight: 600; color: #5D4E4A; line-height: 1.35; }
.tarjeta .notas { margin: 0 0 .55rem; padding: .5rem .65rem; background: var(--durazno-claro); border-radius: 10px; font-size: .92rem; font-weight: 500; }
.tarjeta .auto { margin: 0; font-size: .92rem; }
.tarjeta.con-cliente .auto { color: var(--negro); font-weight: 600; }
.tarjeta .contacto { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin: .45rem 0 0; font-size: .88rem; font-weight: 600; }
.tarjeta .total { margin-left: auto; font-weight: 800; color: var(--negro); }
.tarjeta .acciones { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .85rem; }
.tarjeta .acciones .btn-primario { flex: 1; }

/* Login e instalación */
.login { display: grid; place-items: center; min-height: 100vh; padding: 1.25rem; background: var(--rojo); }
.caja-login { width: 100%; max-width: 390px; background: var(--papel); padding: 2rem 1.7rem; border-radius: 22px; }
.caja-login h1 { font-size: 1.45rem; color: var(--rojo-texto); }
.caja-login h1:not(.marca-dok) { font-weight: 800; text-transform: uppercase; color: var(--negro); }
.caja-login > p { color: var(--gris); margin: .5rem 0 1.4rem; font-weight: 500; }

/* Tablas de administración */
.tarjeta-form { background: var(--papel); border: 1.5px solid var(--linea); border-radius: var(--radio); padding: 1.25rem; margin-bottom: 1.5rem; max-width: 760px; }
.tarjeta-form h2 { margin-top: 0; }
.tarjeta-form .acciones { display: flex; gap: .6rem; }
.tabla-scroll { overflow-x: auto; background: var(--papel); border: 1.5px solid var(--linea); border-radius: var(--radio); }
.tabla { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tabla th, .tabla td { padding: .75rem .85rem; text-align: left; border-bottom: 1px solid var(--linea); vertical-align: top; }
.tabla th { font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--rojo-texto); background: var(--durazno-claro); }
.tabla tr:last-child td { border-bottom: 0; }
.tabla tr.inactivo td { color: var(--gris); }
.tabla td.acciones > * { display: inline-flex; vertical-align: middle; margin: .15rem .3rem .15rem 0; }
.tabla form { margin: 0; }
.form-linea { display: flex; gap: .4rem; }
.form-linea input { min-height: 36px; padding: .3em .6em; border: 1.5px solid var(--linea); border-radius: 10px; font: inherit; width: 11rem; }
.form-filtros { display: flex; flex-wrap: wrap; align-items: end; gap: 1rem; margin-bottom: 1rem; }
.form-filtros label { min-width: 160px; }
.resumen-ventas { margin-bottom: 1rem; }
.resumen-ventas p { margin: .2rem 0; }
.resumen-ventas strong { font-weight: 800; font-size: 1.7rem; color: var(--rojo-texto); }

@media (prefers-reduced-motion: reduce) {
  .alerta-afuera { animation: none; }
}

/* Panel: personalización */
.grupo-config { border: 1.5px solid var(--linea); border-radius: 12px; padding: .6rem .9rem .9rem; margin: 0; }
.grupo-config legend { padding: 0 .3rem; font-weight: 800; }
.grupo-config legend small { color: var(--gris); font-weight: 500; }
.opciones-config { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; margin: .4rem 0 .6rem; }
.opciones-config .check { font-weight: 500; font-size: .9rem; }
.opciones-config small { color: var(--rojo-texto); font-weight: 700; }
.grupo-admin { background: var(--papel); border: 1.5px solid var(--linea); border-radius: var(--radio); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.grupo-admin.inactivo { opacity: .6; }
.grupo-admin-cabeza { display: flex; flex-wrap: wrap; align-items: end; gap: .8rem; padding-bottom: .9rem; margin-bottom: .6rem; border-bottom: 2px solid var(--durazno); }
.grupo-admin-cabeza .nombre-grupo { flex: 1 1 220px; }
.grupo-admin-cabeza label:not(.check):not(.nombre-grupo) { width: 120px; }
.grupo-admin-cabeza input, .grupo-admin-cabeza select { min-height: 42px; }
.opciones-admin { display: grid; gap: .35rem; overflow-x: auto; }
.opcion-admin { display: grid; grid-template-columns: minmax(180px, 1fr) 110px 80px auto auto auto; align-items: center; gap: .6rem; min-width: 640px; }
.opcion-admin input:not([type="checkbox"]) { min-height: 40px; padding: .3em .6em; border: 1.5px solid var(--linea); border-radius: 10px; font: inherit; width: 100%; }
.opcion-admin .check { display: flex; align-items: center; gap: .35rem; font-size: .88rem; font-weight: 600; }
.opcion-admin.inactivo input:not([type="checkbox"]) { color: var(--gris); background: #F7F3F2; }
.encabezado-opciones span { font-size: .75rem; font-weight: 800; text-transform: uppercase; color: var(--rojo-texto); letter-spacing: .05em; }
