:root {
    --bg: #f4f5f7;
    --panel: #ffffff;
    --text: #1d2330;
    --muted: #677084;
    --line: #dde1e8;
    --accent: #364f9e;
    --accent-hover: #2b3f7f;
    --rosa: #ed70a4;
    --rosa-soft: #fde9f2;
    --accent-soft: #e9ecf6;
    --danger: #b3261e;
    --warn: #b76e00;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 24px; }
h2 { font-size: 18px; }

.page { max-width: 1280px; margin: 0 auto; padding: 24px 20px 80px; }

.topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    margin-bottom: 24px; flex-wrap: wrap;
}
.topbar .left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.back { text-decoration: none; font-size: 14px; color: var(--muted); }

.btn, .btn-primary, .btn-danger {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid var(--line); background: var(--panel); color: var(--text);
    padding: 8px 14px; border-radius: 8px; font: inherit; font-size: 14px;
    cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: #b9c0cc; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); }
.btn-sm { padding: 4px 10px; font-size: 13px; }
button:disabled { opacity: .5; cursor: default; }

input[type=text] {
    font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
    background: #fff; color: var(--text); min-width: 0;
}
input[type=text]:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }

.panel {
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 18px; margin-bottom: 20px;
}
.panel-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin-bottom: 14px; flex-wrap: wrap;
}
.panel-head .hint { color: var(--muted); font-size: 13px; }
.step {
    display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
    background: var(--accent); color: #fff; font-size: 13px; margin-right: 8px; vertical-align: 2px;
}
.muted { color: var(--muted); }
.warn { color: var(--warn); }

/* ------------------------------------------------------------ listado revistas */
.grid-revistas {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px;
}
.card-revista {
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
}
.card-revista .cover {
    background: #e9ecf1; display: flex; justify-content: center; padding: 14px;
    text-decoration: none; min-height: 150px; align-items: center;
}
.card-revista .body { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-revista .acciones { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.sin-portada { color: var(--muted); font-size: 13px; }

.nueva-revista { display: flex; gap: 8px; }
.empty-state {
    text-align: center; color: var(--muted); padding: 60px 20px;
    border: 2px dashed var(--line); border-radius: var(--radius);
}

/* ------------------------------------------------------------ miniaturas */
.thumb {
    position: relative; width: 112px; flex: 0 0 auto; user-select: none; cursor: grab;
    border-radius: 6px; padding: 4px; border: 2px solid transparent;
}
.thumb:active { cursor: grabbing; }
.thumb-frame {
    position: relative; width: 100px; height: 141px; overflow: hidden; background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.25); border-radius: 2px;
}
.thumb-frame iframe {
    position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0;
    pointer-events: none; background: #fff;
}
.thumb-label {
    font-size: 11px; color: var(--muted); margin-top: 4px; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; width: 100px;
}
.thumb .badge-warn {
    position: absolute; top: 0; right: 0; background: var(--warn); color: #fff;
    border-radius: 50%; width: 20px; height: 20px; display: grid; place-items: center;
    font-size: 12px; font-weight: 700; box-shadow: 0 0 0 2px #fff;
}
.thumb .num {
    position: absolute; left: 0; top: 0; background: rgba(0,0,0,.6); color: #fff;
    font-size: 11px; padding: 1px 6px; border-radius: 6px 0 6px 0;
}
.thumb.selected { border-color: var(--accent); background: var(--accent-soft); }
.thumb.dragging { opacity: .35; }
.thumb.insert-before::before {
    content: ""; position: absolute; left: -5px; top: 4px; bottom: 4px; width: 4px;
    border-radius: 2px; background: var(--accent);
}
.thumb .quitar {
    position: absolute; right: 2px; bottom: 22px; display: none;
    border: 0; background: rgba(0,0,0,.65); color: #fff; border-radius: 4px;
    font-size: 11px; padding: 2px 6px; cursor: pointer;
}
.thumb:hover .quitar { display: block; }

/* ------------------------------------------------------------ zonas de soltar */
.dropzone {
    border: 2px dashed #c3cad6; border-radius: var(--radius); padding: 18px;
    color: var(--muted); text-align: center; transition: background .12s, border-color .12s;
}
.dropzone.over, .strip.over, .bandeja.over {
    border-color: var(--accent); background: var(--accent-soft);
}
.dropzone strong { color: var(--text); }
.dropzone .sub { font-size: 13px; margin-top: 4px; }

.portada-wrap { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.portada-caja { display: flex; flex-direction: column; gap: 6px; }
.rotulo-slot { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.portada-slot {
    min-width: 200px; min-height: 282px; display: flex; align-items: center; justify-content: center;
    padding: 8px;
}
.portada-slot .thumb { width: auto; cursor: grab; }
.portada-slot .thumb-frame { width: 180px; height: 254px; }
.portada-slot .thumb-label { width: 180px; }
.portada-slot .thumb.doble .thumb-label { width: 360px; }
.portada-help { flex: 1; min-width: 240px; color: var(--muted); font-size: 14px; }
.portada-help ol { padding-left: 20px; margin: 8px 0; }

.strip {
    display: flex; gap: 8px; overflow-x: auto; padding: 8px; min-height: 186px;
    border: 2px dashed transparent; border-radius: var(--radius); background: #f7f8fa;
    align-items: flex-start;
}
.strip.vacia { border-color: #c3cad6; align-items: center; justify-content: center; color: var(--muted); }
.strip .fin { flex: 0 0 24px; align-self: stretch; position: relative; }
.strip .fin.insert-before::before {
    content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 4px;
    border-radius: 2px; background: var(--accent);
}

.articulo {
    border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 14px;
    background: #fff;
}
.articulo-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.articulo-head .n {
    font-weight: 700; color: var(--accent); font-size: 13px; background: var(--accent-soft);
    padding: 3px 8px; border-radius: 6px;
}
.articulo-head .titulo { flex: 1 1 260px; font-weight: 600; }
.articulo-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.articulo-meta label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 3px; }
.articulo-meta > div { flex: 1 1 280px; }

.chips {
    display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 38px;
    border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; background: #fff;
}
.chips input { border: 0; outline: 0; flex: 1; min-width: 120px; padding: 4px; font: inherit; }
.chip {
    background: var(--accent-soft); color: var(--accent); border-radius: 999px;
    padding: 2px 4px 2px 10px; font-size: 13px; display: inline-flex; align-items: center; gap: 2px;
}
.chip button {
    border: 0; background: none; color: inherit; cursor: pointer; font-size: 15px; line-height: 1;
    padding: 0 4px;
}

.nuevo-articulo { padding: 26px; }

.bandeja {
    display: flex; flex-wrap: wrap; gap: 8px; min-height: 120px; padding: 8px;
    border: 2px dashed #c3cad6; border-radius: var(--radius); align-content: flex-start;
}
.bandeja .vacio { color: var(--muted); margin: auto; text-align: center; padding: 20px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.faltantes { font-size: 13px; }
.faltantes summary { cursor: pointer; }
.faltantes ul { max-height: 180px; overflow: auto; margin: 6px 0; }

/* ------------------------------------------------------------ progreso / avisos */
.progreso {
    position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
    background: #1d2330; color: #fff; padding: 12px 18px; border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,.25); min-width: 320px; z-index: 50; font-size: 14px;
}
.progreso .barra { height: 6px; background: rgba(255,255,255,.2); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.progreso .barra div { height: 100%; background: #5fc3ea; width: 0; transition: width .15s; }
.toast {
    position: fixed; right: 20px; top: 20px; background: #1d2330; color: #fff; z-index: 60;
    padding: 10px 16px; border-radius: 8px; box-shadow: 0 8px 30px rgba(0,0,0,.25);
    max-width: 420px; font-size: 14px; animation: aparecer .15s ease-out;
}
.toast.error { background: var(--danger); }
@keyframes aparecer { from { opacity: 0; transform: translateY(-6px); } }

.drop-global {
    position: fixed; inset: 0; background: rgba(54, 79, 158, .12); border: 4px dashed var(--accent);
    display: none; place-items: center; z-index: 40; pointer-events: none;
    font-size: 22px; color: var(--accent); font-weight: 600;
}
.drop-global.on { display: grid; }
.drop-global span { background: #fff; padding: 16px 26px; border-radius: 12px; box-shadow: var(--shadow); }

/* ------------------------------------------------------------ artículos vinculados */
.articulo.vinculado { background: #fbfcfe; border-style: dashed; }
.articulo.vinculado .thumb { cursor: default; }
.titulo-fijo { flex: 1 1 260px; font-weight: 600; }
.chip-vinculo {
    background: #fff4e0; color: #8a5300; border-radius: 999px; padding: 2px 10px;
    font-size: 12px; font-weight: 600; white-space: nowrap;
}
.vinculo-info { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.tambien-en { font-size: 12px; color: #8a5300; margin: -4px 0 10px; }

.modal-fondo {
    position: fixed; inset: 0; background: rgba(16, 24, 40, .45); z-index: 70;
    display: grid; place-items: center; padding: 16px;
}
.modal {
    background: #fff; border-radius: 12px; width: min(760px, 100%); max-height: calc(100vh - 32px);
    display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.modal-head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: center; }
.modal-body { overflow: auto; padding: 14px 18px 18px; }
.disp-grupo {
    font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em;
    margin: 16px 0 8px;
}
.disp-item {
    display: flex; gap: 12px; align-items: center; padding: 8px 10px; margin-bottom: 8px;
    border: 1px solid var(--line); border-radius: 10px;
}
.disp-item:hover { border-color: #b9c0cc; }
.disp-item .thumb-frame { width: 60px; height: 85px; flex: 0 0 auto; }
.disp-item .info { flex: 1; min-width: 0; }
.disp-item .t { font-weight: 600; }
.disp-item .m { font-size: 12px; color: var(--muted); }

/* ------------------------------------------------------------ navegación y usuarios */
.nav {
    display: flex; align-items: center; gap: 18px; padding: 10px 20px; background: #fff;
    border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.nav .marca { font-weight: 800; color: var(--accent); text-decoration: none; font-size: 17px; }
.nav-enlaces { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav-enlaces a { color: var(--text); text-decoration: none; padding: 6px 10px; border-radius: 8px; font-size: 14px; }
.nav-enlaces a:hover { background: var(--bg); }
.nav-enlaces a.activo { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-usuario { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 14px; color: var(--muted); }

.pantalla-login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login { width: min(380px, 100%); display: flex; flex-direction: column; gap: 14px; }
.login h1 { color: var(--accent); }
.login p { margin: -8px 0 4px; }
.login label, .form-usuario label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.login input { font-size: 16px; }
.login button { justify-content: center; padding: 10px; }
.alerta { background: #fdecea; color: var(--danger); padding: 10px 12px; border-radius: 8px; font-size: 14px; }
input[type=password], input[type=email], select {
    font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text);
}
input[type=password]:focus, input[type=email]:focus, select:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.invalido { border-color: var(--danger) !important; }

.filtros { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.filtros input { flex: 1 1 260px; }
.tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabla th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.tabla td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla .muted { font-size: 12px; }
.acciones-fila { white-space: nowrap; text-align: right; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.badge.admin { background: #ede7fb; color: #5b3aa8; }
.badge.vendedor { background: #fff4e0; color: #8a5300; }
.badge.cliente { background: var(--accent-soft); color: var(--accent); }
.tabla .chip { padding: 2px 10px; }

.form-usuario { display: flex; flex-direction: column; gap: 14px; }
.form-usuario .campos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-usuario input:disabled { background: var(--bg); color: var(--muted); }
.form-usuario fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.form-usuario legend { font-size: 13px; font-weight: 600; padding: 0 6px; }
.form-usuario .sub-campo { margin-left: 26px; }
.check { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; color: var(--text) !important; font-size: 14px !important; }
.error-form { background: #fdecea; color: var(--danger); padding: 8px 12px; border-radius: 8px; font-size: 14px; }
.acciones-form { display: flex; justify-content: flex-end; gap: 8px; }

.suscripcion .nombre { flex: 1 1 240px; font-weight: 600; }
.revistas-check { display: flex; flex-wrap: wrap; gap: 8px 20px; }

@media (max-width: 700px) {
    .nav { padding: 10px 12px; gap: 10px; }
    .nav-usuario span { display: none; }
    .form-usuario .campos { grid-template-columns: 1fr; }
    .tabla thead { display: none; }
    .tabla tr { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); }
    .tabla td { display: flex; gap: 10px; padding: 3px 0; border: 0; }
    .tabla td[data-etiqueta]::before { content: attr(data-etiqueta); color: var(--muted); font-size: 12px; min-width: 96px; }
    .acciones-fila { justify-content: flex-end; padding-top: 8px !important; }
}
.aviso-ok { background: #e7f6ec; color: #1e6b3a; padding: 12px 14px; border-radius: 8px; font-size: 14px; }
.badge.sin-acceso { background: #f1f2f5; color: var(--muted); }

.datos-revista { display: grid; grid-template-columns: 120px 120px 1fr; gap: 12px; }
.datos-revista label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.datos-revista .ancho { grid-column: 3; }
.datos-revista label:last-child { grid-column: 1 / -1; }
.datos-revista input[type=number], .datos-revista textarea {
    font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: #fff;
}
.datos-revista textarea { resize: vertical; }
@media (max-width: 700px) {
    .datos-revista { grid-template-columns: 1fr 1fr; }
    .datos-revista .ancho, .datos-revista label:last-child { grid-column: 1 / -1; }
}
.edicion { color: var(--muted); font-size: 13px; }
input[type=number] {
    font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); min-width: 0;
}
input[type=number]:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.nueva-revista { flex-wrap: wrap; }
.articulo .subtitulo { width: 100%; margin: -2px 0 10px; font-size: 14px; }
.subtitulo-fijo { font-size: 14px; color: var(--text); margin: -4px 0 6px; font-style: italic; }

.thumb-frame img { display: block; width: 100%; height: auto; pointer-events: none; }
.thumb-frame.generando {
    background: linear-gradient(100deg, #eef0f4 30%, #f8f9fb 50%, #eef0f4 70%) 0 0 / 300% 100%;
    animation: brillo 1.2s linear infinite;
}
@keyframes brillo { to { background-position: -150% 0; } }
.optimizar { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }

/* páginas dobles (pliegos exportados en un solo archivo) */
.thumb.doble { width: 212px; }
.thumb.doble .thumb-frame { width: 200px; height: 141px; }
.thumb.doble .thumb-label { width: 200px; }
.portada-slot .thumb.doble .thumb-frame { width: 360px; height: 254px; }
.badge-doble {
    position: absolute; left: 6px; bottom: 26px; background: #5b3aa8; color: #fff;
    font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px;
}
.thumb .tipo-pagina {
    position: absolute; right: 2px; top: 2px; display: none; border: 0; background: rgba(0,0,0,.65); color: #fff;
    border-radius: 4px; font-size: 11px; padding: 2px 6px; cursor: pointer;
}
.thumb:hover .tipo-pagina { display: block; }

/* ------------------------------------------------------------ panel de administración */
.nav-admin { background: #1d2330; border-bottom-color: #1d2330; }
.nav-admin .marca { color: #fff; }
.nav-admin .nav-enlaces a { color: #cfd6e2; }
.nav-admin .nav-enlaces a:hover { background: rgba(255, 255, 255, .08); }
.nav-admin .nav-enlaces a.activo { background: rgba(255, 255, 255, .14); color: #fff; }
.nav-admin .nav-usuario { color: #cfd6e2; }
.tarjetas-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.tarjeta-admin { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; }
.tarjeta-admin:hover { border-color: var(--accent); }
.tarjeta-admin .titulo { font-weight: 700; font-size: 17px; }
.tarjeta-admin .cifra { font-size: 32px; font-weight: 800; color: var(--accent); line-height: 1.1; }

/* ------------------------------------------------------------ anuncios (inicio y vista previa del panel) */
.anuncio {
    position: relative; display: flex; align-items: stretch; min-height: 240px; border-radius: 24px; overflow: hidden;
    background: var(--accent); color: #fff;
}
.anuncio-rosa { background: var(--rosa); color: #2b1020; }
.anuncio-claro { background: #f1f2f6; color: var(--text); }
.anuncio-texto { flex: 1 1 55%; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 10px; padding: 32px 36px; min-width: 0; }
.anuncio-texto h2 { margin: 0; font-size: clamp(22px, 3vw, 34px); line-height: 1.1; letter-spacing: -.01em; }
.anuncio-texto p { margin: 0; font-size: 16px; line-height: 1.45; max-width: 60ch; opacity: .92; }
.anuncio-etiqueta {
    font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 4px 10px; border-radius: 999px;
    background: var(--rosa); color: #fff;
}
.anuncio-rosa .anuncio-etiqueta { background: #fff; color: #b0306a; }
.anuncio-claro .anuncio-etiqueta { background: var(--rosa-soft); color: #b0306a; }
.anuncio-boton {
    margin-top: 6px; display: inline-block; padding: 12px 20px; border-radius: 999px; font-weight: 700; font-size: 15px;
    text-decoration: none; background: #fff; color: var(--accent);
}
.anuncio-boton:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.anuncio-rosa .anuncio-boton { color: #2b1020; }
.anuncio-claro .anuncio-boton { background: var(--accent); color: #fff; }
.anuncio-imagen { flex: 1 1 45%; position: relative; min-height: 200px; }
.anuncio-imagen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 700px) {
    .anuncio { flex-direction: column-reverse; min-height: 0; border-radius: 20px; }
    .anuncio-texto { padding: 22px 22px 24px; }
    .anuncio-imagen { min-height: 0; aspect-ratio: 16 / 9; flex: 0 0 auto; }
}

.lista-anuncios { display: flex; flex-direction: column; gap: 12px; }
.fila-anuncio { display: flex; align-items: center; gap: 16px; padding: 12px 14px; margin: 0; }
.fila-anuncio .mini-anuncio {
    flex: 0 0 auto; width: 120px; height: 68px; border-radius: 10px; overflow: hidden; display: grid; place-items: center;
    font-size: 11px; font-weight: 700; padding: 6px; text-align: center; line-height: 1.2;
}
.fila-anuncio .mini-anuncio img { width: 100%; height: 100%; object-fit: cover; }
.fila-anuncio .info { flex: 1; min-width: 0; }
.fila-anuncio .info strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fila-anuncio .info .muted { font-size: 13px; }
.fila-anuncio .orden { display: flex; flex-direction: column; gap: 4px; }
.fila-anuncio .orden button { padding: 0 8px; line-height: 1.4; }
.estado-anuncio { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }
.estado-anuncio.visible { background: #e3f4e8; color: #1e6b3a; }
.estado-anuncio.programado { background: var(--accent-soft); color: var(--accent); }
.estado-anuncio.vencido, .estado-anuncio.inactivo { background: #eef0f4; color: var(--muted); }
.form-anuncio textarea, .form-anuncio input[type=date], .form-anuncio input[type=text] {
    font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); resize: vertical;
}
.form-anuncio .anuncio-previa .anuncio { min-height: 170px; border-radius: 18px; }
.form-anuncio .anuncio-previa .anuncio-texto { padding: 20px 24px; }
.form-anuncio .anuncio-previa .anuncio-texto h2 { font-size: 22px; }
.form-anuncio .anuncio-previa .anuncio-texto p { font-size: 14px; }
.imagen-anuncio { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
@media (max-width: 700px) {
    .fila-anuncio { flex-wrap: wrap; }
    .fila-anuncio .mini-anuncio { width: 96px; height: 54px; }
}

/* ------------------------------------------------------------ clientes: selección y link para el cliente */
.col-check { width: 36px; }
.col-check input { width: 16px; height: 16px; accent-color: var(--accent); }
.barra-seleccion {
    position: sticky; top: 8px; z-index: 5; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    background: var(--accent-soft); border: 1px solid #c9d1ec; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px;
}
.barra-seleccion label { display: flex; align-items: center; gap: 8px; }
.barra-seleccion[hidden] { display: none; }
.caja-enlace { display: flex; flex-direction: column; gap: 14px; }
.caja-enlace p { margin: 0; }
.fila-enlace { display: flex; gap: 8px; }
.fila-enlace input {
    flex: 1; min-width: 0; font: inherit; font-size: 14px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text);
}
.caja-enlace .whatsapp { text-decoration: none; }
@media (max-width: 700px) {
    .col-check { width: auto; }
    .fila-enlace { flex-direction: column; }
}
