:root {
    color-scheme: light;
    font: .9375rem/1.5 system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: #202124;
    background: #f1f3f6;
    --muted: #535b66;
    --linea: #dadce3;
    --superficie: #fff;
    --azul: #1a73e8;
    --azul-texto: #185abc;
    --azul-fuerte: #1558b3;
    --azul-suave: #e8f0fe;
    --alto-barra: 4rem;
    --radio: .55rem;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--azul-texto); text-underline-offset: .18em; }
button, input, select, textarea { font: inherit; }
button, select, summary { cursor: pointer; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
:where(button, input, select, textarea, a, summary):focus-visible { outline: 2px solid var(--azul); outline-offset: 3px; }

.contenedor { min-width: 0; width: 100%; max-width: 110rem; margin-inline: auto; padding-inline: clamp(.95rem, 2.4vw, 2.3rem); }
.barra { position: sticky; top: 0; z-index: 5; background: #f9fbfe; border-bottom: 1px solid var(--linea); }
.barra-interior { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: var(--alto-barra); max-width: none; }
.marca { display: inline-flex; align-items: center; gap: .7rem; color: #3c4043; font-size: 1.35rem; letter-spacing: -.035em; font-weight: 630; text-decoration: none; }
.marca-icono { display: grid; place-items: center; width: 2.15rem; height: 2.15rem; border-radius: .55rem; background: var(--azul); color: white; }
.icono { display: inline-block; width: 1.2rem; height: 1.2rem; flex: 0 0 auto; vertical-align: middle; }
.barra-acciones { display: flex; align-items: center; gap: 1.1rem; }
.actualizar { display: inline-flex; align-items: center; gap: .38rem; color: #3c4858; font-size: .83rem; font-weight: 580; text-decoration: none; }
.actualizar:hover { color: var(--azul-texto); }
.cuenta, .periodo { position: relative; }
.cuenta summary { display: grid; place-items: center; width: 2.05rem; height: 2.05rem; border-radius: 50%; background: #d8e7fc; color: #174e9c; font-size: .87rem; font-weight: 750; }
.cuenta form, .periodo nav {
    position: absolute;
    z-index: 4;
    top: calc(100% + .4rem);
    right: 0;
    min-width: 10.5rem;
    padding: .65rem;
    border: 1px solid var(--linea);
    border-radius: .55rem;
    background: white;
    box-shadow: 0 6px 18px #26364b20;
}
.cuenta form { display: grid; gap: .55rem; }
.cuenta form p { overflow-wrap: anywhere; font-size: .86rem; font-weight: 630; }

.marco-con-riel { display: grid; grid-template-columns: 5rem minmax(0, 1fr); align-items: start; }
.riel { position: sticky; top: calc(var(--alto-barra) + 1px); min-height: calc(100dvh - var(--alto-barra) - 1px); border-right: 1px solid #e0e4eb; padding: 1rem .2rem; background: #edf1f6; }
.riel a { display: flex; flex-direction: column; align-items: center; gap: .23rem; margin-bottom: .7rem; border-radius: .55rem; color: #465463; font-size: .72rem; font-weight: 630; text-decoration: none; }
.riel a > span { display: grid; place-items: center; }
.riel-crear > span { width: 2.9rem; height: 2.9rem; margin-bottom: .08rem; border: 1px solid #e4e7ed; border-radius: 50%; background: white; box-shadow: 0 3px 8px #293a5125; }
.riel .riel-crear { margin-bottom: 1.4rem; }
.riel-crear .icono { width: 1.38rem; height: 1.38rem; }
.riel-enlace { padding-block: .3rem; }
.riel-enlace > span { width: 3.05rem; height: 1.85rem; border-radius: 1rem; transition: background-color .15s ease, color .15s ease; }
.riel-enlace:hover > span { background: #dbe8fc; color: #174ea6; }
.riel-enlace[aria-current="page"] > span { background: var(--azul-fuerte); color: white; }
.riel-enlace[aria-current="page"] { color: #174ea6; }
.riel-crear:hover > span { border-color: #c6d8f2; }

main { padding-block: 1.55rem 2.6rem; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.7rem, 3vw, 2.2rem); line-height: 1.17; letter-spacing: -.035em; font-weight: 650; overflow-wrap: anywhere; }
h2 { font-size: 1.02rem; font-weight: 680; letter-spacing: -.015em; }
h3 { font-size: 1.04rem; }
.etiqueta, .grupo-etiqueta { color: var(--muted); font-size: .7rem; font-weight: 740; letter-spacing: .09em; text-transform: uppercase; }
.etiqueta { margin-bottom: .45rem; color: var(--azul-texto); }
.secundario { margin-top: .35rem; color: var(--muted); overflow-wrap: anywhere; }
.tarjeta { background: var(--superficie); border: 1px solid var(--linea); border-radius: var(--radio); }
.cabecera-pagina { display: flex; align-items: flex-end; justify-content: space-between; gap: .75rem; }
.ruta { display: flex; align-items: center; gap: .25rem; color: var(--muted); font-size: .79rem; margin-bottom: .36rem; }
.ruta .icono { width: .85rem; height: .85rem; }
.nuevo { white-space: nowrap; }
.nuevo .icono { width: 1.1rem; height: 1.1rem; }

button, .boton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .42rem;
    min-height: 2.4rem;
    padding: .5rem .8rem;
    border: 1px solid transparent;
    border-radius: .35rem;
    background: var(--azul-fuerte);
    color: white;
    font-size: .86rem;
    font-weight: 650;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
button:hover, .boton:hover { background: #104991; }
.boton-claro, .boton-secundario { min-height: 2.15rem; border-color: var(--linea); background: white; color: var(--azul-texto); white-space: nowrap; }
.boton-claro:hover, .boton-secundario:hover { background: var(--azul-suave); border-color: #c3d6f5; color: #174ea6; }
.vistas { display: flex; gap: 1.25rem; border-bottom: 1px solid var(--linea); margin: .9rem 0 .95rem; }
.vistas a { display: inline-flex; align-items: center; padding: .7rem .15rem .58rem; border-bottom: 3px solid transparent; color: var(--muted); font-size: .88rem; text-decoration: none; font-weight: 620; transition: color .15s ease, border-color .15s ease; }
.vistas a:hover, .vistas a[aria-current="page"] { color: var(--azul-texto); }
.vistas a[aria-current="page"] { border-bottom-color: var(--azul); }

.distribucion { display: grid; grid-template-columns: minmax(0, 1fr) minmax(14.5rem, 17.6rem); grid-template-areas: "actividad filtros" "listado filtros"; column-gap: .8rem; align-items: start; }
.actividad { grid-area: actividad; min-width: 0; padding: 1rem 1.2rem .75rem; border-radius: var(--radio) var(--radio) 0 0; border-bottom: 0; }
.actividad-cabecera { display: flex; justify-content: space-between; align-items: flex-start; gap: .65rem; }
.actividad-cabecera .secundario { margin-top: .15rem; font-size: .79rem; }
.periodo-boton { display: inline-flex; align-items: center; gap: .38rem; min-height: 2rem; padding: .3rem .52rem; border: 1px solid #cdd2db; border-radius: .35rem; background: white; color: #404957; font-size: .77rem; font-weight: 630; white-space: nowrap; }
.periodo-boton .icono { width: .95rem; height: .95rem; }
.periodo-boton:hover { background: #f6f8fc; }
.periodo nav p { padding: .25rem .38rem; color: var(--muted); font-size: .75rem; white-space: nowrap; }
.periodo nav a { display: block; padding: .32rem .42rem; border-radius: .25rem; font-size: .86rem; text-decoration: none; }
.periodo nav a:hover, .periodo nav a[aria-current="true"] { background: var(--azul-suave); }
.leyenda { display: flex; align-items: center; gap: .36rem; margin: .85rem 0 .8rem; color: var(--muted); font-size: .75rem; }
.leyenda span { width: .8rem; height: 3px; border-radius: 2px; background: var(--azul); }
.grafica { display: grid; grid-template-columns: 1.65rem minmax(0, 1fr); grid-template-rows: clamp(5.9rem, 8.6vw, 8rem) 1.3rem; align-items: stretch; padding-right: .22rem; color: var(--muted); font-size: .69rem; font-variant-numeric: tabular-nums; }
.grafica-eje { display: flex; flex-direction: column; justify-content: space-between; margin: -.48rem 0; }
.grafica-trazado { position: relative; min-width: 0; }
.grafica-trazado svg { display: block; width: 100%; height: 100%; overflow: visible; }
.grafica-guia { fill: none; stroke: #dce1e8; stroke-width: 1; }
.grafica-linea { fill: none; stroke: var(--azul); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.grafica-punto { position: absolute; top: var(--y); left: var(--x); width: .44rem; height: .44rem; border-radius: 50%; border: 1px solid white; background: var(--azul); transform: translate(-50%, -50%); }
.grafica-punto:hover { width: .7rem; height: .7rem; }
.grafica-vacia { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); padding: .2rem .52rem; background: white; color: var(--muted); text-align: center; font-size: .8rem; }
.grafica-fechas { grid-column: 2; display: flex; justify-content: space-between; align-items: end; }

.panel-filtros { grid-area: filtros; position: sticky; top: calc(var(--alto-barra) + .85rem); }
.filtros-cabecera { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .76rem .85rem; font-weight: 670; }
.filtros-cabecera > span, .enlace-icono { display: inline-flex; align-items: center; gap: .4rem; }
.filtros-cabecera > span .icono { color: var(--azul-texto); }
.desplegable { color: var(--muted); width: .96rem; height: .96rem; }
.panel-filtros[open] .desplegable { transform: rotate(180deg); }
.filtros-contenido { padding: .65rem .75rem .8rem; border-top: 1px solid #e5e8ee; }
.categoria-cabecera { display: flex; align-items: center; justify-content: space-between; gap: .45rem; padding: .1rem .25rem .38rem; }
.categoria-cabecera a { font-size: .77rem; }
.categorias { display: grid; gap: .14rem; }
.categoria { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .48rem; padding: .28rem .36rem; border: 1px solid transparent; border-radius: .37rem; color: #333c49; font-size: .8rem; font-weight: 590; text-decoration: none; transition: background-color .15s ease, border-color .15s ease; }
.categoria:hover { background: #f4f7fb; }
.categoria[aria-current="true"] { border-color: #d7e5fc; background: var(--azul-suave); color: #174ea6; }
.contador { min-width: 1.38rem; color: #576677; text-align: center; font-size: .73rem; font-variant-numeric: tabular-nums; }
.plataforma-icono { display: inline-grid; place-items: center; flex: 0 0 auto; width: 1.78rem; height: 1.78rem; border-radius: .42rem; }
.plataforma-icono .icono { width: 1.08rem; height: 1.08rem; }
.plataforma-todas { background: #e5edf9; color: #285b9e; }
.plataforma-facebook { background: #e8f1ff; color: #0866ff; }
.plataforma-google-ads { background: #edf4ff; color: #0b57d0; }
.plataforma-servicios { background: #e1f5ee; color: #087055; }
.plataforma-reputacion { background: #fff3d9; color: #865300; }
.plataforma-yelp { background: #ffebeb; color: #c61d23; }
.filtros { display: grid; gap: .63rem; border-top: 1px solid #e5e8ee; margin-top: .7rem; padding-top: .7rem; }

.listado { grid-area: listado; min-width: 0; overflow: hidden; border-radius: 0 0 var(--radio) var(--radio); }
.barra-listado { display: flex; justify-content: space-between; align-items: center; gap: .65rem; padding: .6rem .85rem; }
.filtro-actual { display: inline-flex; align-items: center; gap: .3rem; margin-top: .25rem; color: var(--muted); font-size: .74rem; font-weight: 590; }
.filtro-actual .plataforma-icono { width: 1.3rem; height: 1.3rem; }
.filtro-actual .icono { width: .85rem; height: .85rem; }
.busqueda { display: flex; align-items: center; gap: .35rem; width: min(100%, 19rem); }
.busqueda > .icono { width: .99rem; height: .99rem; color: var(--muted); }
.busqueda input { min-height: 2.15rem; }
.tabla-contenedor { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .85rem; }
th, td { padding: .61rem .8rem; border-bottom: 1px solid #e7eaf0; vertical-align: middle; }
th { border-top: 1px solid #e5e8ef; background: #f5f7fb; color: #475364; white-space: nowrap; font-size: .73rem; font-weight: 680; }
th + th { border-left: 1px solid #e7ebf1; }
th:last-child, .accion-celda { text-align: right; }
tbody tr:hover { background: #f7faff; }
tr:last-child td { border-bottom: 0; }
.cliente-celda { width: 35%; }
.cliente-nombre { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem .45rem; overflow-wrap: anywhere; }
td small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.celda-plataforma { display: inline-flex; align-items: center; gap: .4rem; color: #384457; font-weight: 580; }
.estado { display: inline-flex; align-items: center; gap: .34rem; padding: .17rem .44rem; border-radius: 1rem; background: #eef2f7; color: #485669; font-size: .73rem; font-weight: 630; white-space: nowrap; }
.estado::before { content: ""; width: .37rem; height: .37rem; border-radius: 50%; background: currentColor; }
.estado-pendiente { background: #fff3dc; color: #805005; }
.estado-en-curso { background: #e2f6ec; color: #116248; }
.estado-pausada { background: #f1eaff; color: #6841a3; }
.estado-completada { background: #e6f0ff; color: #154f9c; }
.estado-cancelada { background: #fce8eb; color: #9e2838; }
.marca-nueva { border-radius: .24rem; padding: .04rem .3rem; background: #e8f0fe; color: #174ea6; font-size: .68rem; font-weight: 690; }
.accion { display: inline-flex; align-items: center; justify-content: flex-end; gap: .15rem; font-weight: 650; text-decoration: none; white-space: nowrap; }
.accion:hover { text-decoration: underline; }
.accion .icono { width: .9rem; height: .9rem; }
.fecha { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.vacio { display: grid; justify-items: center; gap: .4rem; padding: 2.5rem 1rem; border-top: 1px solid #e5e8ee; color: var(--muted); text-align: center; }
.vacio h3 { color: #263447; }
.vacio-icono { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--azul-suave); color: var(--azul-texto); }
.paginas { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .65rem; padding: .66rem .85rem; border-top: 1px solid #e5e8ee; font-size: .81rem; }
.paginas a:last-child { margin-left: auto; }

.acceso { max-width: 27rem; margin: 2rem auto; padding: clamp(1.2rem, 5vw, 2rem); }
.campos { display: grid; gap: .9rem; margin-top: 1.2rem; }
label { display: grid; gap: .25rem; min-width: 0; font-size: .82rem; font-weight: 650; }
input, select, textarea { width: 100%; min-width: 0; min-height: 2.28rem; border: 1px solid #cbd3df; border-radius: .33rem; padding: .37rem .55rem; background: white; color: inherit; font-size: .84rem; font-weight: 400; }
textarea { resize: vertical; }
.volver { margin-bottom: .9rem; }
.volver a { display: inline-flex; align-items: center; gap: .26rem; font-weight: 630; }
.flecha-atras { transform: rotate(180deg); }
.cabecera-detalle { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.cabecera-detalle > div { flex: 1 1 12rem; min-width: 0; }
.cabecera-detalle > .plataforma-icono { width: 3rem; height: 3rem; }
.cabecera-detalle > .plataforma-icono .icono { width: 1.62rem; height: 1.62rem; }
.editor { max-width: 48rem; margin-top: 1.15rem; padding: clamp(1rem, 4vw, 1.5rem); }
.seguimiento-panel { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1rem; max-width: 78rem; align-items: start; }
.seguimiento-panel .editor { max-width: none; }
.historial-avances ol { margin: .8rem 0 0; padding: 0; list-style: none; }
.historial-avances li { padding: .8rem 0; border-top: 1px solid var(--linea); }
.historial-avances li:last-child { padding-bottom: 0; }
.avance-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; color: var(--muted); font-size: .8rem; }
.avance-texto { margin-top: .4rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.ficha-tarjetas { margin-top: .9rem; }
.ficha-tarjetas > div { padding: .72rem; border: 1px solid var(--linea); border-radius: .55rem; }
.ficha-tarjetas p { margin: .28rem 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.ficha-tarjetas button { margin-top: .4rem; }
.dialogo-tarjeta { width: min(30rem, calc(100% - 2rem)); padding: 1.35rem; color: inherit; }
.dialogo-tarjeta::backdrop { background: #18213099; }
.dialogo-tarjeta > button { margin-top: .8rem; }
.dialogo-tarjeta output:not([hidden]) { display: block; margin-top: .9rem; padding: .7rem; border: 1px solid var(--linea); border-radius: .45rem; font: 650 1rem/1.5 ui-monospace, monospace; overflow-wrap: anywhere; }
.doble { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
.acciones { display: flex; align-items: center; flex-wrap: wrap; gap: .85rem; }
.aviso { max-width: 48rem; margin-top: .85rem; padding: .68rem .8rem; border-radius: .45rem; }
.error { color: #861923; background: #fcebed; }
.exito { color: #0b5a4b; background: #e1f6ee; }

@keyframes entrar {
    from { opacity: .65; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
.entrada > .cabecera-pagina, .actividad { animation: entrar .16s ease-out; }
@media (max-width: 64rem) {
    .distribucion { grid-template-columns: minmax(0, 1fr); grid-template-areas: "actividad" "filtros" "listado"; gap: .65rem; }
    .actividad, .listado { border: 1px solid var(--linea); border-radius: var(--radio); }
    .panel-filtros { position: static; }
    .categorias { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .categoria-cabecera { grid-column: 1 / -1; }
    .filtros { grid-template-columns: 1fr auto; align-items: end; }
}
@media (max-width: 45rem) {
    .seguimiento-panel { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .marco-con-riel { grid-template-columns: minmax(0, 1fr); }
    .riel { display: none; }
    .categorias { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .categoria { gap: .33rem; }
    .categoria .plataforma-icono { width: 1.55rem; height: 1.55rem; }
    .categoria .plataforma-icono .icono { width: .94rem; height: .94rem; }
    .actividad { padding: .85rem .78rem .65rem; }
    .actividad-cabecera { flex-wrap: wrap; }
    .periodo nav { right: auto; left: 0; }
    .grafica { grid-template-columns: 1.28rem minmax(0, 1fr); }
    .barra-listado { flex-wrap: wrap; }
    table, tbody { display: block; }
    thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "cliente accion" "plataforma estado" "fecha fecha"; gap: .3rem .5rem; align-items: center; padding: .7rem .8rem; border-top: 1px solid #e7eaf0; }
    td { min-width: 0; padding: 0; border-bottom: 0; }
    .cliente-celda { grid-area: cliente; width: auto; }
    .plataforma-celda { grid-area: plataforma; }
    .estado-celda { grid-area: estado; justify-self: end; }
    .fecha { grid-area: fecha; font-size: .76rem; }
    .accion-celda { grid-area: accion; }
}
@media (max-width: 27rem) {
    .barra-acciones { gap: .8rem; }
    .actualizar > span { display: none; }
    .nuevo { padding-inline: .55rem; font-size: .79rem; }
    .ruta { font-size: .72rem; }
    .busqueda { width: 100%; }
    .doble { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
