/* Identidad visual: los colores del logo (2026-11-27) */
:root {
  --petroleo: #045465;
  --dorado:   #F3AB14;  /* amarillo del logo */
  --marfil:   #FFFFFF;  /* texto sobre fondo oscuro */
  --fondo:    #F4F7F8;  /* fondo de los portales y el editor */
  --coral:    #FD5C5A;
  --grafito:  #23343B;

  /* Alias usados por la portada y el ingreso */
  --logo-petroleo: #045465;
  --logo-amarillo: #F3AB14;
  --logo-coral:    #FD5C5A;
}

* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }

body {
  min-height: 100vh;
  background: #fff;
  color: var(--logo-petroleo);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  accent-color: var(--petroleo);
}

.portada {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1rem;
  padding: 2rem;
  text-align: center;
}

.portada-logo img { width: min(220px, 60vw); height: auto; }

.portada .eslogan {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--logo-petroleo);
  max-width: 26rem;
}

.portada .detalle {
  font-size: .95rem;
  color: #5b6670;
  max-width: 26rem;
}

/* ---------- portales (con sesión) ---------- */
body.app, body:has(.centro) {
  background: var(--fondo);
  color: var(--grafito);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.barra {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem 1rem; flex-wrap: wrap;
  padding: .8rem 1.5rem; background: var(--petroleo); color: var(--marfil);
}
.barra .marca { color: var(--marfil); text-decoration: none; font-weight: 800; letter-spacing: .01em; font-size: 1.15rem; }
.barra .marca span { color: var(--dorado); font-weight: 600; font-size: .95rem; margin-left: .4rem; }
.barra nav { display: flex; align-items: center; gap: 1rem; font-size: .9rem; }
.barra nav a { color: var(--marfil); }
.barra .tenant { color: var(--dorado); font-weight: 600; }
.barra form { margin: 0; }

.soporte {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  padding: .5rem 1rem; background: var(--dorado); color: var(--grafito); font-size: .9rem;
}
.soporte form { margin: 0; }
.soporte button { padding: .2rem .8rem; font-size: .85rem; background: var(--petroleo); color: #fff; }

.centro { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
body.app .centro { min-height: calc(100vh - 4rem); }

.tarjeta {
  width: 100%; max-width: 24rem; padding: 2rem; background: #fff;
  border-radius: 12px; box-shadow: 0 8px 30px rgba(4, 84, 101, .12);
  display: flex; flex-direction: column; gap: 1rem;
}
.tarjeta h1 { font-weight: 800; letter-spacing: .01em; text-align: center; color: var(--petroleo); }
.tarjeta h2 { color: var(--petroleo); }
.subtitulo { text-align: center; color: var(--coral); font-style: italic; margin-top: -.6rem; }

label { display: flex; flex-direction: column; gap: .35rem; font-size: .9rem; font-weight: 600; }
label small { font-weight: normal; opacity: .7; }
input {
  font: inherit; padding: .65rem .8rem; border: 1px solid #cfd6da; border-radius: 8px; background: #fff;
}
input:focus { outline: 2px solid var(--dorado); outline-offset: 1px; border-color: transparent; }

button {
  font: inherit; font-weight: 600; padding: .7rem 1rem; border: 0; border-radius: 8px;
  background: var(--dorado); color: var(--petroleo); cursor: pointer;
}
button:hover, a.boton:hover { filter: brightness(1.06); }
button.chico { padding: .35rem .8rem; font-size: .85rem; }
button.enlace { background: none; padding: 0; color: inherit; text-decoration: underline; font-weight: normal; }
button.opcion {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  background: var(--fondo); color: var(--grafito); border: 1px solid #dfe6e8;
}
button.opcion small { color: var(--coral); }

.aviso { padding: .7rem .9rem; border-radius: 8px; background: #eef3f4; font-size: .9rem; }
.aviso.error { background: #fbe9e7; color: #8a2a1b; }
.nota { font-size: .8rem; opacity: .7; }

.contenido { max-width: 64rem; margin: 0 auto; padding: 2rem 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.contenido h2 { color: var(--petroleo); }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
th, td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid #e8eef0; font-size: .9rem; }
th { background: #eef3f4; font-weight: 600; }
td form { margin: 0; }
code { font-size: .85em; }

/* ---------- administración ---------- */
.barra .menu { gap: .4rem 1rem; margin-right: auto; margin-left: 1.5rem; flex-wrap: wrap; }
.barra a, .barra .tenant { white-space: nowrap; }
.contenido a:not(.boton) { color: var(--petroleo); }
.barra .menu a { text-decoration: none; opacity: .85; }
.barra .menu a:hover { opacity: 1; text-decoration: underline; }

.flash { max-width: 64rem; margin: 1rem auto 0; padding: .7rem 1rem; border-radius: 8px; background: #e6f2ec; color: #1d5b3c; }

.titulo { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.botones { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
td.botones { justify-content: flex-end; }

a.boton {
  display: inline-block; padding: .7rem 1rem; border-radius: 8px; text-decoration: none; text-align: center;
  background: var(--dorado); color: var(--petroleo); font-weight: 700;
}
button.secundario { background: #fff; color: var(--petroleo); border: 1px solid #cfd6da; }
button.peligro { background: #fff; color: #8a2a1b; border: 1px solid #e6b8b0; }

section { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }
h3 { color: var(--petroleo); }
h4 { color: var(--grafito); }

.formulario { display: flex; flex-direction: column; gap: 1rem; background: #fff; padding: 1.5rem; border-radius: 10px; }
.formulario.agregar { border: 1px dashed #cfd9dc; }
fieldset { border: 0; padding: 0; display: flex; flex-direction: column; gap: .8rem; }
legend { font-weight: 700; color: var(--petroleo); margin-bottom: .6rem; }
legend small { font-weight: normal; opacity: .7; }
.fila { display: flex; gap: 1rem; flex-wrap: wrap; }
.fila > label { flex: 1 1 14rem; }
label.angosto { flex: 0 1 12rem; max-width: 16rem; }
label.opcion-radio { flex-direction: row; align-items: center; gap: .5rem; font-weight: normal; }
label.opcion-radio input { width: auto; }
.acciones { display: flex; justify-content: flex-end; }
select { font: inherit; padding: .6rem .7rem; border: 1px solid #cfd6da; border-radius: 8px; background: #fff; }
form.en-linea { display: flex; gap: .4rem; align-items: center; }
form.en-linea select { padding: .3rem .4rem; font-size: .85rem; }

.error-campo { color: #8a2a1b; font-weight: normal; font-size: .82rem; }

.estado { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .78rem; background: #eee; }
.estado-activo { background: #e6f2ec; color: #1d5b3c; }
.estado-suspendido, .estado-baja { background: #fbe9e7; color: #8a2a1b; }

.clave-temporal { padding: 1rem 1.2rem; border-radius: 10px; background: #fff7e6; border: 1px solid var(--dorado); }
.clave { font-family: ui-monospace, Consolas, monospace; font-size: 1.6rem; letter-spacing: .12em; color: var(--petroleo); margin: .4rem 0; user-select: all; }

/* ---------- prueba de subida ---------- */
.pasos { margin: 0; padding-left: 1.2rem; font-size: .9rem; display: flex; flex-direction: column; gap: .3rem; }
.pasos .ok { color: #1d5b3c; font-weight: 600; }
.pasos .error { color: #8a2a1b; font-weight: 600; }
.resultado { display: flex; gap: 2rem; flex-wrap: wrap; }
.resultado img { max-width: 400px; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.resultado dl { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; font-size: .9rem; }
.resultado dt { font-weight: 600; }

/* ---------- producción ---------- */
body:has(.imprenta) {
  background: var(--fondo); color: var(--grafito);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
.imprenta-cabecera { text-align: center; padding: 1rem 0; }
.imprenta-cabecera h1 { font-weight: 800; letter-spacing: .01em; color: var(--petroleo); }
.aviso-nfc { padding: 1rem 1.2rem; border-radius: 10px; background: #fff7e6; border: 2px solid var(--dorado); }
.datos { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1.2rem; }
.datos dt { font-weight: 600; }

a.boton.secundario-enlace { background: #fff; color: var(--petroleo); border: 1px solid #cfd6da; }
.enlace-imprenta { font-family: ui-monospace, Consolas, monospace; font-size: .95rem; word-break: break-all; user-select: all; color: var(--petroleo); }

.tarjetas-estado { display: flex; flex-direction: row; gap: .8rem; flex-wrap: wrap; }
.tarjetas-estado > div {
  flex: 1 1 8rem; background: #fff; border-radius: 10px; padding: .8rem 1rem; font-size: .85rem; color: #5b6670;
}
.tarjetas-estado span { display: block; font-size: 1.8rem; font-weight: 700; color: var(--petroleo); }
.tarjetas-estado .ok span { color: #1d5b3c; }
.tarjetas-estado .mal span { color: #8a2a1b; }

table.compacta td, table.compacta th { padding: .35rem .7rem; }
.estado-orden-borrador { background: #eee; }
.estado-orden-enviada, .estado-orden-recibiendo { background: #fff7e6; color: #7a5420; }
.estado-orden-cerrada { background: #e6f2ec; color: #1d5b3c; }
.estado-orden-anulada { background: #fbe9e7; color: #8a2a1b; }

/* recepción (celular) */
.recepcion .camara { display: flex; flex-direction: column; gap: .5rem; }
.recepcion video { width: 100%; max-height: 50vh; object-fit: cover; border-radius: 10px; background: #000; }
.recepcion .actual { border-radius: 10px; padding: 1rem; background: #f4f7f8; }
.recepcion .mensaje { font-weight: 700; font-size: 1.05rem; }
.recepcion .mensaje.ok { color: #1d5b3c; }
.recepcion .mensaje.mal { color: #8a2a1b; }
.recepcion .serie-grande { font-size: 1.6rem; font-weight: 700; color: var(--petroleo); }
.recepcion .controles { gap: .3rem; margin: .6rem 0; }
.recepcion .botones.grandes button { flex: 1; padding: 1rem; font-size: 1.1rem; }
.recepcion #motivo-box { margin-top: .8rem; }
.fila-aprobada td { background: #f1f8f4; }
.fila-rechazada td { background: #fdf1ef; }
@media (max-width: 600px) {
  .contenido { padding: 1rem .8rem; }
  .barra { flex-wrap: wrap; }
  .barra .menu { margin-left: 0; order: 3; width: 100%; overflow-x: auto; }
}

/* ---------- portal del comercio ---------- */
a.boton.boton-principal, button.boton-principal { font-size: 1.15rem; padding: 1rem 1.4rem; align-self: flex-start; }
.activar .camara { display: flex; flex-direction: column; gap: .5rem; }
.activar video { width: 100%; max-height: 45vh; object-fit: cover; border-radius: 10px; background: #000; }
.activada .exito { text-align: center; padding: 1rem; }
.activada .exito .icono {
  width: 3.5rem; height: 3.5rem; margin: 0 auto .6rem; border-radius: 50%; display: grid; place-items: center;
  background: #e6f2ec; color: #1d5b3c; font-size: 2rem; font-weight: 700;
}
a.boton.boton-whatsapp { background: #1f8f4e; color: #fff; font-size: 1.15rem; padding: 1rem; }
.activada input[readonly] { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; background: #f4f7f8; }
.filtros { display: flex; flex-direction: column; gap: .7rem; }
.pestanas { display: flex; gap: .3rem; flex-wrap: wrap; }
.pestanas a { padding: .4rem .8rem; border-radius: 999px; background: #fff; text-decoration: none; color: var(--grafito); font-size: .88rem; border: 1px solid #dfe6e8; }
.pestanas a.activa { background: var(--petroleo); color: var(--marfil); border-color: var(--petroleo); }
.estado-lic-asignada { background: #eef3f7; color: var(--petroleo); }
.estado-lic-activada { background: #e6f2ec; color: #1d5b3c; }
.estado-lic-vencida { background: #f2f0ec; color: #6b6b6b; }

/* ---------- editor ---------- */
body:has(.editor) {
  background: var(--fondo); color: var(--grafito);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
.editor { max-width: 44rem; }
.editor-cabecera .marca-chica { color: var(--petroleo); }
.marca-chica { font-family: system-ui, sans-serif; font-weight: 800; font-size: 1rem; opacity: .9; }
.guardado.ok { color: #1d5b3c; }
.guardado.mal { color: #8a2a1b; }
.editor textarea {
  font: inherit; font-size: 1.05rem; line-height: 1.5; padding: .8rem; border: 1px solid #cfd6da;
  border-radius: 8px; resize: vertical; width: 100%;
}
.editor textarea:focus { outline: 2px solid var(--dorado); border-color: transparent; }
.contador { text-align: right; margin-top: -.4rem; }
.zona-subida {
  border: 2px dashed #f7d58c; border-radius: 12px; padding: 1.4rem 1rem; text-align: center; cursor: pointer;
  background: #fffcf5; transition: background .15s, border-color .15s;
}
.zona-subida:hover, .zona-subida:focus, .zona-subida.encima { background: #fff3d6; border-color: var(--dorado); outline: none; }
.fotos { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: .6rem; }
.foto { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #e8eef0; display: grid; place-items: center; }
.foto img { width: 100%; height: 100%; object-fit: cover; }
.foto p { font-size: .75rem; padding: .4rem; text-align: center; }
.foto-error { background: #fbe9e7; color: #8a2a1b; }
.foto-acciones { position: absolute; bottom: .3rem; left: 0; right: 0; display: flex; justify-content: center; gap: .25rem; }
.foto-acciones button { padding: .15rem .45rem; font-size: .8rem; background: rgba(255,255,255,.92); }
/* Voz y video en el editor */
.seccion-clip.encima { outline: 2px dashed var(--dorado); outline-offset: 4px; border-radius: 12px; }
.grabador { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.boton-grabar { display: inline-flex; align-items: center; gap: .5rem; background: var(--coral); color: #fff; }
.boton-grabar.detener { background: var(--grafito); }
.boton-grabar .punto, .grabando .punto { width: .7rem; height: .7rem; border-radius: 50%; background: currentColor; display: inline-block; }
.grabando { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--coral); font-variant-numeric: tabular-nums; }
.grabando .punto { animation: parpadeo 1s ease-in-out infinite; }
@keyframes parpadeo { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .grabando .punto { animation: none; } }
.voz-revisar, .clip { display: grid; gap: .6rem; padding: .9rem; border-radius: 12px; background: #fff; border: 1px solid #dfe6e9; }
.clip { margin-bottom: .6rem; }
.clip audio, .voz-revisar audio { width: 100%; }
.clip video { width: 100%; max-height: 60svh; border-radius: 10px; background: #000; }
.clip progress { width: 100%; accent-color: var(--petroleo); }
.clip-error { background: #fbe9e7; border-color: #e6b8b0; }
.botones-fila { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.botones-fila .nota { margin: 0; margin-right: auto; }
.foto[draggable="true"] { cursor: grab; }
.acciones-editor { display: flex; gap: .8rem; justify-content: flex-end; flex-wrap: wrap; }
.aviso.ok { background: #e6f2ec; color: #1d5b3c; }
.nota.ok { color: #1d5b3c; opacity: 1; }

/* ---------- dedicatoria (lo que ve el destinatario) ---------- */
body:has(> .dedicatoria) { background: #fff; color: var(--grafito); }
.dedicatoria {
  max-width: 36rem; margin: 0 auto; font-family: var(--t-fuente, Georgia, "Times New Roman", serif);
  background: var(--t-papel, #fff); color: var(--t-texto, var(--grafito));
}
.marca-preview {
  position: sticky; top: 0; z-index: 2; text-align: center; padding: .4rem; font: 600 .85rem system-ui, sans-serif;
  background: var(--dorado); color: var(--petroleo);
}
/* DEMO: indicación discreta (contexto §28.1) */
.dedicatoria { position: relative; }
.marca-demo {
  position: absolute; top: .7rem; right: .7rem; z-index: 2; padding: .2rem .65rem; border-radius: 999px;
  font: 600 .72rem system-ui, sans-serif; letter-spacing: .06em; text-transform: uppercase;
  background: rgba(255,255,255,.18); color: var(--t-sobre-texto, #fff); border: 1px solid rgba(255,255,255,.35);
}
.sobre {
  min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2rem;
  padding: 2rem 1.5rem; margin-top: 0; text-align: center; color: var(--t-sobre-texto, var(--marfil));
  background: radial-gradient(circle at 50% 30%, var(--t-fondo2, #0b7189), var(--t-fondo, var(--petroleo)) 70%);
}
.sobre .sorpresa { font-size: clamp(1.6rem, 7vw, 2.2rem); line-height: 1.3; }
.sobre .sorpresa .nombre { color: var(--t-acento, var(--dorado)); font-style: italic; }
.boton-abrir {
  display: inline-block; padding: 1rem 1.8rem; border-radius: 999px; text-decoration: none;
  background: var(--t-acento, var(--dorado)); color: var(--t-boton-texto, var(--petroleo)); font: 700 1.05rem system-ui, sans-serif; letter-spacing: .02em;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: latido 2.2s ease-in-out infinite;
}
@keyframes latido { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .boton-abrir { animation: none; } }

/* La carta se muestra al abrir (con JavaScript) o con #contenido (sin JavaScript). */
.carta { display: none; padding: 2.5rem 1.4rem 2rem; flex-direction: column; gap: 1.4rem; }
.dedicatoria.abierta .carta, .carta:target { display: flex; }
.dedicatoria.abierta .sobre { min-height: 60svh; }
.carta .para { font-style: italic; color: var(--t-tinta, var(--coral)); font-size: 1.15rem; }
.carta h1 { font-weight: normal; font-size: clamp(1.8rem, 8vw, 2.4rem); color: var(--t-tinta, var(--petroleo)); line-height: 1.2; }
.carta .texto { font-size: 1.15rem; line-height: 1.65; white-space: pre-line; }
.carta .de { text-align: right; font-style: italic; font-size: 1.1rem; }
.carta .de strong { font-style: normal; color: var(--t-tinta, var(--petroleo)); }
.carrusel {
  display: flex; gap: .7rem; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -1.4rem; padding: 0 1.4rem;
  scrollbar-width: none;
}
.carrusel::-webkit-scrollbar { display: none; }
.carrusel img {
  flex: 0 0 88%; width: 88%; height: auto; max-height: 75svh; object-fit: cover; border-radius: 14px;
  scroll-snap-align: center; box-shadow: 0 8px 24px rgba(4, 84, 101, .18);
}
.carrusel img:only-child { flex-basis: 100%; width: 100%; }
.nota.centrada { text-align: center; font-family: system-ui, sans-serif; }
.musica iframe { width: 100%; border: 0; border-radius: 14px; }
.musica.youtube iframe { aspect-ratio: 16 / 9; }
.musica.spotify iframe { height: 152px; }
.voz { background: rgba(255,255,255,.6); border: 1px solid rgba(0,0,0,.08); border-radius: 14px; padding: .9rem 1rem; }
.voz-titulo { font: 600 .95rem system-ui, sans-serif; color: var(--t-tinta, var(--petroleo)); margin: 0 0 .5rem; }
.voz audio { width: 100%; }
.video video { width: 100%; height: auto; max-height: 80svh; border-radius: 14px; background: #000; box-shadow: 0 8px 24px rgba(4, 84, 101, .18); }
.pie-comercio {
  padding: 2rem 1.4rem 3rem; text-align: center; font: .9rem system-ui, sans-serif; color: #5b6670;
  border-top: 1px solid #e8eef0; display: flex; flex-direction: column; gap: .5rem;
}
.pie-comercio .enlaces { display: flex; justify-content: center; gap: 1rem; }
.pie-comercio a { color: var(--petroleo); }
.pie-comercio .firma { font-weight: 800; font-size: .78rem; opacity: .7; margin-top: .8rem; }

/* ---------- página de ingreso: colores del logo, fondo blanco (en prueba) ---------- */
body:has(.ingreso) {
  background: #fff; color: var(--logo-petroleo);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
.ingreso {
  min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.6rem; padding: 2rem 1.2rem;
}
.ingreso .logo { width: min(300px, 70vw); height: auto; }
.tarjeta-ingreso {
  width: 100%; max-width: 22rem; display: flex; flex-direction: column; gap: 1rem;
  padding: 1.8rem; border-radius: 16px; background: #fff;
  border: 1px solid #ececec; box-shadow: 0 10px 40px rgba(4, 84, 101, .10);
  border-top: 5px solid var(--logo-amarillo);
}
.tarjeta-ingreso .portal {
  text-align: center; font-weight: 700; letter-spacing: .08em; text-transform: lowercase;
  color: var(--logo-petroleo); font-size: 1.05rem;
}
.tarjeta-ingreso label { color: var(--logo-petroleo); }
.tarjeta-ingreso input { border-color: #d9dfe1; }
.tarjeta-ingreso input:focus { outline: 2px solid var(--logo-amarillo); border-color: transparent; }
.tarjeta-ingreso button {
  background: var(--logo-amarillo); color: var(--logo-petroleo); font-size: 1.05rem; padding: .85rem;
}
.tarjeta-ingreso button:hover { filter: brightness(1.05); }
.tarjeta-ingreso .nota { text-align: center; color: #5b6670; }

/* ---------- sitio comercial (dedinova.com) ---------- */
.sitio { max-width: 60rem; margin: 0 auto; padding: 0 1.2rem; }
.sitio-cabecera {
  min-height: min(92svh, 46rem); display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 1.2rem; padding: 2rem 0;
}
.sitio-logo { width: min(340px, 78vw); height: auto; }
.sitio h1 { font-size: clamp(1.7rem, 6vw, 2.6rem); line-height: 1.15; color: var(--logo-petroleo); max-width: 34rem; }
.sitio .bajada { font-size: 1.1rem; line-height: 1.55; color: #3d5560; max-width: 34rem; }
.sitio-acciones { display: flex; gap: .8rem; flex-wrap: wrap; justify-content: center; margin-top: .4rem; }
.boton-sitio {
  display: inline-block; padding: .9rem 1.5rem; border-radius: 999px; text-decoration: none; font-weight: 700;
  background: var(--logo-amarillo); color: var(--logo-petroleo); box-shadow: 0 6px 18px rgba(243, 171, 20, .35);
}
.boton-sitio:hover { filter: brightness(1.05); }
.boton-sitio.secundario { background: #fff; color: var(--logo-petroleo); border: 2px solid var(--logo-petroleo); box-shadow: none; }
.sitio-seccion { padding: 3.5rem 0; display: flex; flex-direction: column; gap: 1rem; align-items: center; text-align: center; }
.sitio-seccion h2 { font-size: clamp(1.4rem, 5vw, 2rem); color: var(--logo-petroleo); }
.sitio-seccion h2::after {
  content: ""; display: block; width: 3rem; height: 4px; border-radius: 2px; margin: .6rem auto 0; background: var(--logo-amarillo);
}
.sitio-seccion p { max-width: 38rem; line-height: 1.6; color: #3d5560; font-size: 1.05rem; }
.pasos-sitio {
  list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); width: 100%;
}
.pasos-sitio li { background: #fff; border: 1px solid #eef0f1; border-radius: 16px; padding: 1.6rem 1.2rem; box-shadow: 0 6px 24px rgba(4, 84, 101, .06); }
.pasos-sitio .numero {
  display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: var(--logo-amarillo); color: var(--logo-petroleo); font-weight: 800; font-size: 1.2rem; margin-bottom: .6rem;
}
.pasos-sitio h3 { color: var(--logo-petroleo); margin-bottom: .4rem; }
.pasos-sitio p { font-size: .98rem; }
.etiquetas { list-style: none; padding: 0; display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; }
.etiquetas li {
  padding: .5rem 1rem; border-radius: 999px; background: #fff7e6; color: var(--logo-petroleo); font-weight: 600;
  border: 1px solid #f7d58c;
}
.etiquetas li:first-child::before { content: "♥ "; color: var(--logo-coral); }
.nota-sitio { font-size: .95rem !important; color: #5b6670 !important; }
.sitio-seccion.destacada { background: #fff7e6; border-radius: 24px; padding: 3rem 1.5rem; margin: 1rem 0; }
.sitio-pie {
  padding: 2.5rem 0 3rem; border-top: 1px solid #eef0f1; text-align: center; display: flex; flex-direction: column; gap: .8rem;
  color: #5b6670; font-size: .9rem;
}
.sitio-pie nav { display: flex; gap: 1.4rem; justify-content: center; }
.sitio-pie a { color: var(--logo-petroleo); }
.firma-sitio { font-weight: 700; letter-spacing: .04em; color: var(--logo-petroleo); }

/* ---------- plantillas (administración y editor) ---------- */
.muestra { display: inline-flex; border-radius: 8px; overflow: hidden; border: 1px solid #dfe6e8; }
.muestra i { width: 1.4rem; height: 1.6rem; }
.muestra .m-fondo { background: var(--t-fondo, var(--petroleo)); }
.muestra .m-acento { background: var(--t-acento, var(--dorado)); }
.muestra .m-papel { background: var(--t-papel, #fff); }
.plantilla-edicion { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 1.5rem; align-items: start; }
@media (max-width: 860px) { .plantilla-edicion { grid-template-columns: 1fr; } }
.vista-plantilla-marco { position: sticky; top: 1rem; display: flex; flex-direction: column; gap: .6rem; }
.vista-plantilla { border-radius: 18px; overflow: hidden; box-shadow: 0 10px 30px rgba(4, 84, 101, .15); }
.vista-plantilla .sobre { min-height: 17rem; gap: 1rem; padding: 1.5rem 1rem; }
.vista-plantilla .sorpresa { font-size: 1.45rem; }
.vista-plantilla .boton-abrir { animation: none; font-size: .9rem; padding: .7rem 1.2rem; }
.vista-plantilla .carta { display: flex; padding: 1.4rem 1.2rem; gap: .8rem; }
.vista-plantilla .carta h1 { font-size: 1.6rem; }
.vista-plantilla .carta .texto { font-size: 1rem; }
.colores input[type=color] { width: 100%; height: 2.6rem; padding: .2rem; cursor: pointer; }
.colores > label { flex: 1 1 7rem; }
.imagen-actual { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.imagen-actual img { width: 12rem; max-width: 100%; border-radius: 10px; }
.zona-archivo.con-archivo { border-style: solid; border-color: var(--dorado); }

/* selector de diseño en el editor */
.disenos { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .7rem; }
.disenos label { cursor: pointer; font-weight: 600; font-size: .85rem; gap: .4rem; }
.disenos input { position: absolute; opacity: 0; }
.diseno-mini {
  display: grid; place-items: center; height: 5.5rem; border-radius: 12px; padding: .5rem; text-align: center;
  border: 3px solid transparent; font: 1rem var(--t-fuente, Georgia, serif);
  background: radial-gradient(circle at 50% 30%, var(--t-fondo2, #0b7189), var(--t-fondo, var(--petroleo)) 70%);
  color: var(--t-sobre-texto, #fff);
}
.diseno-mini span { color: var(--t-acento, var(--dorado)); font-style: italic; }
.disenos input:checked + .diseno-mini { border-color: var(--dorado); box-shadow: 0 0 0 2px var(--petroleo); }
.disenos input:focus-visible + .diseno-mini { outline: 2px solid var(--petroleo); outline-offset: 2px; }

/* Licencias digitales: descargas y planilla imprimible (contexto §4.2) */
.descargas { margin: 1rem 0; }
.instrucciones { margin: 0 0 1.2rem; }
.instrucciones summary { cursor: pointer; color: var(--petroleo); font-weight: 600; }
.instrucciones ul { margin: .6rem 0 0 1.2rem; display: grid; gap: .25rem; }
a.boton.actual { background: var(--petroleo); color: #fff; border-color: var(--petroleo); }
.grilla-qr { list-style: none; padding: 0; margin: 1.2rem 0 0; display: flex; flex-wrap: wrap; gap: .4cm; }
.grilla-qr li { display: flex; flex-direction: column; align-items: center; gap: .1cm; break-inside: avoid; page-break-inside: avoid; }
.grilla-qr img { width: 4cm; height: 4cm; background: #fff; }
.qr-chico .grilla-qr img { width: 2.5cm; height: 2.5cm; }
.qr-grande .grilla-qr img { width: 6cm; height: 6cm; }
.grilla-qr span { font: 600 9pt system-ui, sans-serif; letter-spacing: .05em; color: #000; }
@media print {
  @page { size: A4; margin: 1cm; }
  body, body.app { background: #fff; }
  .barra, .flash, .no-imprimir { display: none !important; }
  .contenido.planilla-qr { max-width: none; margin: 0; padding: 0; }
  .grilla-qr { margin: 0; }
}

/* Pedidos (contexto §32) */
.estado-pedido-solicitado { background: #fff3d6; color: #7a5300; }
.estado-pedido-confirmado { background: #e3f0f3; color: var(--petroleo); }
.estado-pedido-pagado { background: #e6f4ea; color: #1d5b3c; }
.estado-pedido-entregado { background: #1d5b3c; color: #fff; }
.estado-pedido-anulado { background: #eee; color: #666; text-decoration: line-through; }
.mensaje-dedinova { border-left: 4px solid var(--dorado); background: #fff; padding: .8rem 1rem; border-radius: 8px; margin: 1rem 0; }
.texto-libre { white-space: pre-line; }
.lineas-pedido select, .lineas-pedido input { width: 100%; }
.atencion { color: var(--coral); font-size: .85rem; }
form.en-linea { display: inline; }
details.rechazo { display: inline-block; margin-left: .5rem; }
details.rechazo summary { cursor: pointer; color: #8a2a1b; font-size: .85rem; }
details.rechazo form { margin-top: .4rem; }
.formulario textarea { font: inherit; font-weight: normal; }

/* Estadísticas (contexto §31) */
.cifras { list-style: none; padding: 0; margin: 1rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .7rem; }
.cifras li { background: #fff; border-radius: 12px; padding: .9rem 1rem; display: flex; flex-direction: column; gap: .15rem; box-shadow: 0 1px 3px rgba(4,84,101,.08); }
.cifras strong { font-size: 1.6rem; color: var(--petroleo); font-variant-numeric: tabular-nums; }
.cifras span { font-size: .82rem; color: #5b6670; }
.cifras.demo strong { color: var(--coral); }
.grafico { display: flex; align-items: flex-end; gap: 2px; height: 11rem; background: #fff; border-radius: 12px; padding: .8rem .8rem 1.6rem; margin: .5rem 0 1.5rem; }
.barra-dia { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; min-width: 0; }
.barra-dia .valor { display: block; background: var(--dorado); border-radius: 3px 3px 0 0; }
.barra-dia small { position: absolute; bottom: -1.3rem; left: 50%; transform: translateX(-50%); font-size: .68rem; color: #5b6670; white-space: nowrap; }
.barra-dia .h0 { height: 0%; }
.barra-dia .h1 { height: 5%; }
.barra-dia .h2 { height: 10%; }
.barra-dia .h3 { height: 15%; }
.barra-dia .h4 { height: 20%; }
.barra-dia .h5 { height: 25%; }
.barra-dia .h6 { height: 30%; }
.barra-dia .h7 { height: 35%; }
.barra-dia .h8 { height: 40%; }
.barra-dia .h9 { height: 45%; }
.barra-dia .h10 { height: 50%; }
.barra-dia .h11 { height: 55%; }
.barra-dia .h12 { height: 60%; }
.barra-dia .h13 { height: 65%; }
.barra-dia .h14 { height: 70%; }
.barra-dia .h15 { height: 75%; }
.barra-dia .h16 { height: 80%; }
.barra-dia .h17 { height: 85%; }
.barra-dia .h18 { height: 90%; }
.barra-dia .h19 { height: 95%; }
.barra-dia .h20 { height: 100%; }
.pestanas.periodo { margin: .5rem 0 1rem; }

/* Denuncias (contexto §40.1) */
.pie-comercio .denunciar { margin-top: 1rem; font-size: .75rem; }
.pie-comercio .denunciar a { color: #8a949b; }
.denuncia { max-width: 34rem; }
.contenido-denunciado { background: #fff; border-radius: 12px; padding: 1rem 1.2rem; margin: 1rem 0; }
.contenido-denunciado dd { white-space: pre-line; }
.denuncia .acciones { gap: 1.2rem; align-items: center; }
