/* Publicador CCE — colores de marca: navy #071A2F, azul #1B7EC4, cyan #00D4FF */
:root {
  --navy: #071A2F; --azul: #1B7EC4; --cyan: #00D4FF;
  --bg: #f4f6f9; --card: #fff; --txt: #142235; --sub: #5b6b7f; --borde: #dfe5ec;
  --ok: #138a52; --okbg: #e6f6ee; --err: #c62f2f; --errbg: #fdeceb; --warn: #9a6400; --warnbg: #fff5e0;
  --r: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: hidden; font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--txt); background: var(--bg); }
a { color: var(--azul); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.45rem; line-height: 1.25; margin: 0 0 .3rem; }
h2 { font-size: 1.1rem; margin: 1.4rem 0 .6rem; }
h3 { font-size: 1rem; margin: 1rem 0 .4rem; }
small, .sub { color: var(--sub); }

/* barra superior */
.top { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 10; }
.top__in { max-width: 1180px; margin: auto; display: flex; align-items: center; gap: 14px; padding: 10px 16px; flex-wrap: wrap; }
.top a { color: #cfe3f5; font-weight: 500; }
.top a:hover { color: #fff; text-decoration: none; }
.logo { font-weight: 800; letter-spacing: .02em; color: #fff !important; display: flex; align-items: center; gap: 8px; }
.logo i { width: 10px; height: 10px; border-radius: 3px; background: var(--cyan); display: inline-block; box-shadow: 0 0 10px var(--cyan); }
.top nav { display: flex; gap: 14px; margin-left: auto; flex-wrap: wrap; font-size: .93rem; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 18px 16px 60px; }
.card { background: var(--card); border: 1px solid var(--borde); border-radius: var(--r); padding: 18px; margin-bottom: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }

/* avisos */
.flash { border-radius: 10px; padding: 11px 14px; margin-bottom: 14px; font-weight: 500; }
.flash.ok { background: var(--okbg); color: var(--ok); }
.flash.err { background: var(--errbg); color: var(--err); }

/* botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--borde);
  background: #fff; color: var(--txt); font: inherit; font-weight: 600; padding: 9px 15px; border-radius: 9px; cursor: pointer; min-height: 40px; }
.btn:hover { border-color: var(--azul); text-decoration: none; }
.btn.prim { background: var(--azul); border-color: var(--azul); color: #fff; }
.btn.prim:hover { background: #166aa6; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.peligro { color: var(--err); }
.btn.chico { padding: 5px 10px; min-height: 32px; font-size: .88rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* formularios */
label { display: block; font-weight: 600; margin: 12px 0 5px; font-size: .93rem; }
label small { font-weight: 400; }
input[type=text], input[type=password], input[type=number], select, textarea {
  width: 100%; font: inherit; color: inherit; border: 1px solid var(--borde); border-radius: 9px; padding: 9px 11px; background: #fff; }
textarea { min-height: 110px; resize: vertical; }
textarea.alta { min-height: 260px; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(27,126,196,.25); border-color: var(--azul); }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; }
.check input { margin-top: 4px; }
.grid2 { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid2 { grid-template-columns: 1fr 1fr; } }

/* tipo de publicación */
.tipos { display: grid; gap: 10px; grid-template-columns: repeat(3, 1fr); }
.tipo { position: relative; }
.tipo input { position: absolute; opacity: 0; }
.tipo span { display: block; border: 2px solid var(--borde); border-radius: 12px; padding: 14px 10px; text-align: center; font-weight: 700; cursor: pointer; background: #fff; }
.tipo span em { display: block; font-style: normal; font-weight: 400; color: var(--sub); font-size: .82rem; }
.tipo input:checked + span { border-color: var(--azul); background: #eef6fc; color: var(--navy); }
.tipo input:focus-visible + span { outline: 2px solid var(--cyan); }

.subir { border: 2px dashed #b9c7d6; border-radius: 12px; padding: 20px; text-align: center; background: #fafcfe; }
.subir input { width: 100%; }

/* lista */
.estados { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { display: inline-block; border-radius: 99px; padding: 3px 11px; font-size: .82rem; font-weight: 600; background: #e8edf3; color: var(--sub); white-space: nowrap; }
.chip.on { background: var(--navy); color: #fff; }
.e-generando { background: #e6f3fc; color: var(--azul); }
.e-revisar { background: var(--warnbg); color: var(--warn); }
.e-aprobado, .e-publicado { background: var(--okbg); color: var(--ok); }
.e-error { background: var(--errbg); color: var(--err); }
.lista { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.item { background: #fff; border: 1px solid var(--borde); border-radius: var(--r); overflow: hidden; color: inherit; display: flex; flex-direction: column; }
.item:hover { border-color: var(--azul); text-decoration: none; }
.item__img { aspect-ratio: 16/9; background: #dbe3ec center/cover; }
.item__b { padding: 12px 14px; }
.item__t { font-weight: 700; margin: 6px 0 4px; }
.vacio { text-align: center; padding: 50px 16px; color: var(--sub); }

/* detalle */
.det { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.det > * { min-width: 0; }
@media (min-width: 980px) { .det { grid-template-columns: minmax(0, 1fr) 320px; } }
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--borde); margin-bottom: 16px; }
.tabs a { padding: 10px 14px; font-weight: 600; color: var(--sub); border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--navy); border-color: var(--azul); }
.tabs a:hover { text-decoration: none; color: var(--navy); }
.tabs b { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; font-size: .75rem; background: var(--errbg); color: var(--err); margin-left: 4px; }
.tabs b.w { background: var(--warnbg); color: var(--warn); }

.chq { list-style: none; margin: 0; padding: 0; }
.chq li { padding: 8px 10px; border-radius: 8px; margin-bottom: 6px; font-size: .9rem; }
.chq .error { background: var(--errbg); color: var(--err); }
.chq .aviso { background: var(--warnbg); color: var(--warn); }
.chq li strong { font-weight: 700; }

.google { border: 1px solid var(--borde); border-radius: 10px; padding: 12px 14px; font-family: Arial, sans-serif; background: #fff; }
.google .u { color: #202124; font-size: 13px; }
.google .t { color: #1a0dab; font-size: 19px; line-height: 1.3; margin: 3px 0; }
.google .d { color: #4d5156; font-size: 14px; }

/* vista previa de la web (imita los estilos de cceindustrial.com) */
.web { border: 1px solid var(--borde); border-radius: 12px; overflow: hidden; background: #fff; }
.web__hero { background: var(--navy) center/cover; color: #fff; padding: 46px 22px 26px; position: relative; }
.web__hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7,26,47,.45), rgba(7,26,47,.9)); }
.web__hero > * { position: relative; }
.web__badge { display: inline-block; background: var(--cyan); color: var(--navy); font-weight: 700; font-size: .78rem; border-radius: 99px; padding: 2px 10px; }
.web__hero h1 { color: #fff; font-size: 1.6rem; margin-top: 8px; }
.web__body { padding: 18px 22px; }
.web__body h2 { color: var(--navy); font-size: 1.15rem; }
.cce-caso-ficha { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); background: #f1f6fb; border-radius: 10px; padding: 12px 14px; margin: 0 0 14px; }
.cce-caso-ficha dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--sub); }
.cce-caso-ficha dd { margin: 0; font-weight: 600; }
.cce-caso-lead { font-size: 1.12rem; color: var(--navy); font-weight: 500; }
.web__gal { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; padding: 0 22px 18px; }
.web__gal img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 6px; }
.faq { border-top: 1px solid var(--borde); padding: 14px 22px; }
.faq details { padding: 6px 0; }
.faq summary { font-weight: 600; cursor: pointer; }

/* vista previa de redes */
.tel { max-width: 420px; margin: 0 auto; background: #fff; border: 1px solid var(--borde); border-radius: 14px; overflow: hidden; }
.tel__head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-weight: 700; font-size: .92rem; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: var(--cyan); display: grid; place-items: center; font-size: .7rem; font-weight: 800; }
.carrusel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; background: #000; }
.carrusel > * { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 4/5; object-fit: cover; width: 100%; }
.puntos { text-align: center; color: var(--azul); font-size: .7rem; padding-top: 6px; letter-spacing: 2px; }
.caption { padding: 10px 12px 14px; white-space: pre-wrap; font-size: .92rem; word-wrap: break-word; }
.caption .h { color: #00376b; }
.li-texto { padding: 4px 14px 12px; white-space: pre-wrap; font-size: .92rem; word-wrap: break-word; }
.li-grid { display: grid; gap: 2px; grid-template-columns: repeat(2, 1fr); }
.li-grid > :first-child:nth-last-child(1) { grid-column: span 2; }
.li-grid > * { width: 100%; aspect-ratio: 1; object-fit: cover; }
.li-grid > :first-child { grid-column: span 2; aspect-ratio: 16/10; }

.copiar { margin-top: 10px; }
.medios { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.medio { border: 1px solid var(--borde); border-radius: 10px; overflow: hidden; background: #fff; font-size: .8rem; }
.medio img, .medio video { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: #000; }
.medio div { padding: 6px 8px; }
.orden { display: flex; align-items: center; gap: 6px; padding: 6px 8px; }
.orden input { width: 64px; }
.num { position: absolute; top: 6px; left: 6px; background: var(--navy); color: #fff; border-radius: 6px; padding: 0 6px; font-size: .75rem; font-weight: 700; }
.rel { position: relative; }

details.editar > summary { list-style: none; cursor: pointer; display: inline-flex; }
details.editar > summary::-webkit-details-marker { display: none; }
details.editar[open] > summary { margin-bottom: 8px; }
.acciones { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

.spinner { width: 46px; height: 46px; border-radius: 50%; border: 4px solid #dbe8f4; border-top-color: var(--azul); animation: g 1s linear infinite; margin: 10px auto 14px; }
@keyframes g { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

.hist { list-style: none; padding: 0; margin: 0; font-size: .85rem; }
.hist li { padding: 6px 0; border-bottom: 1px solid #eef1f5; }
table { width: 100%; border-collapse: collapse; }
td, th { text-align: left; padding: 9px 6px; border-bottom: 1px solid var(--borde); vertical-align: middle; }
th { font-size: .8rem; color: var(--sub); text-transform: uppercase; letter-spacing: .04em; }

.login { max-width: 380px; margin: 9vh auto; }
.login .logo { justify-content: center; color: var(--navy) !important; font-size: 1.3rem; margin-bottom: 14px; }
.ayuda { background: #eef6fc; border-radius: 10px; padding: 12px 14px; font-size: .9rem; color: #234; }
.ayuda ul { margin: 6px 0 0; padding-left: 18px; }
