:root {
  --fondo: #f5f6f8; --papel: #ffffff; --texto: #151a21; --suave: #5a6472; --linea: #e2e5ea;
  --acento: #1e4fd6; --ig: #c13584; --fb: #1877f2;
  --gris: #8a93a0; --azul: #2563eb; --verde: #15803d; --rojo: #c62828; --ambar: #b45309;
  --radio: 8px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fondo); color: var(--texto); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h2, h3 { margin: 0; line-height: 1.2; }

.barra { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 24px; padding: 0 20px; height: 56px; background: var(--papel); border-bottom: 1px solid var(--linea); }
.marca { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.marca strong { font-size: 16px; }
.marca span { font-size: 12px; color: var(--suave); }
.pestanas { display: flex; gap: 4px; margin-left: 8px; flex: 1; }
.pestana { border: 0; background: none; padding: 8px 12px; border-radius: 6px; color: var(--suave); font-weight: 500; }
.pestana:hover { background: var(--fondo); color: var(--texto); }
.pestana[aria-selected="true"] { color: var(--acento); background: #e9efff; }
.boton { border: 1px solid var(--linea); background: var(--papel); border-radius: 6px; padding: 7px 12px; font-weight: 500; }
.boton:hover { border-color: #c9ced6; }
.boton.suave { color: var(--suave); }
.boton.primario { background: var(--acento); border-color: var(--acento); color: #fff; }
.boton.primario:hover { background: #1941b3; }
.boton.peligro { color: var(--rojo); }
.boton:disabled { opacity: .5; cursor: default; }
.aviso-equipo { background: #fff7e6; border-bottom: 1px solid #f0d9a8; color: #6b4a00; padding: 6px 20px; font-size: 13px; }

main { max-width: 1280px; margin: 0 auto; padding: 20px; }
.vacio { color: var(--suave); text-align: center; padding: 60px 0; }

/* cabecera de vista */
.cabecera { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.cabecera h2 { font-size: 22px; margin-right: 6px; }
.leyenda { margin-left: auto; display: flex; gap: 14px; font-size: 12.5px; color: var(--suave); flex-wrap: wrap; }
.leyenda i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: baseline; }

/* calendario */
.mes { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); overflow: hidden; }
.dias-semana, .semana { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.dias-semana div { padding: 8px 10px; font-size: 12px; font-weight: 600; color: var(--suave); text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--linea); }
.dia { min-height: 118px; padding: 6px 6px 8px; border-right: 1px solid var(--linea); border-bottom: 1px solid var(--linea); display: flex; flex-direction: column; gap: 4px; }
.semana .dia:nth-child(7n) { border-right: 0; }
.semana:last-child .dia { border-bottom: 0; }
.dia .num { font-size: 12.5px; color: var(--suave); padding: 0 4px; }
.dia.fuera { background: #fafbfc; }
.dia.fuera .num { color: #b5bcc6; }
.dia.hoy .num { color: #fff; background: var(--acento); border-radius: 10px; padding: 0 7px; align-self: flex-start; font-weight: 600; }
.ficha { display: flex; align-items: flex-start; gap: 6px; width: 100%; text-align: left; border: 1px solid var(--linea); border-left: 3px solid var(--gris); background: var(--papel); border-radius: 5px; padding: 3px 6px; font-size: 12px; line-height: 1.3; }
.ficha:hover { background: var(--fondo); }
.ficha .h { color: var(--suave); font-variant-numeric: tabular-nums; flex: none; }
.ficha .t { flex: 1; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.ficha .redes { flex: none; display: flex; gap: 3px; margin-top: 1px; }
.tarjeta .img video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ficha.oculto { border-style: dashed; border-left-style: solid; opacity: .8; }
.e-gris { border-left-color: var(--gris) !important; }
.e-azul { border-left-color: var(--azul) !important; }
.e-verde { border-left-color: var(--verde) !important; }
.e-rojo { border-left-color: var(--rojo) !important; }

.red { width: 13px; height: 13px; display: inline-block; vertical-align: -2px; }
.red.instagram { color: var(--ig); }
.red.facebook { color: var(--fb); }

/* lista */
.lista { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radio); }
.lista h3 { padding: 12px 16px 6px; font-size: 13px; color: var(--suave); border-top: 1px solid var(--linea); }
.lista h3:first-child { border-top: 0; }
.fila { display: grid; grid-template-columns: 56px 1fr auto auto auto; gap: 14px; align-items: center; width: 100%; text-align: left; border: 0; background: none; padding: 9px 16px; border-top: 1px solid #eef0f3; }
.fila:hover { background: var(--fondo); }
.fila .t { font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fila .h { color: var(--suave); font-variant-numeric: tabular-nums; }
.tipo { font-size: 12px; color: var(--suave); border: 1px solid var(--linea); border-radius: 4px; padding: 1px 6px; }
.estado { font-size: 12px; font-weight: 600; white-space: nowrap; }
.estado.gris { color: var(--gris); } .estado.azul { color: var(--azul); } .estado.verde { color: var(--verde); } .estado.rojo { color: var(--rojo); }

/* previews */
.galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.tarjeta { border: 1px solid var(--linea); background: var(--papel); border-radius: var(--radio); padding: 0; overflow: hidden; text-align: left; display: flex; flex-direction: column; }
.tarjeta:hover { border-color: #c4cad3; }
.tarjeta .img { aspect-ratio: 4 / 5; background: #e8ebef center / cover no-repeat; position: relative; }
.tarjeta .img .tipo { position: absolute; left: 8px; top: 8px; background: rgba(255,255,255,.94); }
.tarjeta .pie { padding: 9px 11px 11px; display: flex; flex-direction: column; gap: 3px; }
.tarjeta .pie b { font-weight: 600; font-size: 13.5px; line-height: 1.3; }
.tarjeta .pie small { color: var(--suave); }

/* ficha en ventana */
.velo { position: fixed; inset: 0; z-index: 20; background: rgba(15, 20, 28, .55); overflow-y: auto; padding: 28px 16px; }
.ventana { max-width: 960px; margin: 0 auto; background: var(--papel); border-radius: 12px; display: grid; grid-template-columns: minmax(260px, 340px) 1fr; overflow: hidden; }
.ventana .izq { background: #eceff3; padding: 22px 18px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.mock { width: 100%; max-width: 300px; background: #000; border-radius: 10px; overflow: hidden; position: relative; }
.mock.v916 { aspect-ratio: 9 / 16; } .mock.v45 { aspect-ratio: 4 / 5; }
.mock img, .mock video { width: 100%; height: 100%; object-fit: cover; display: block; }
.mock .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); }
.mock .nav.ant { left: 8px; } .mock .nav.sig { right: 8px; }
.puntos { display: flex; gap: 5px; } .puntos i { width: 6px; height: 6px; border-radius: 50%; background: #b9c0ca; } .puntos i.on { background: var(--acento); }
.aviso-mock { font-size: 12px; color: var(--suave); text-align: center; }
.ventana .der { padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ventana .cab { display: flex; gap: 12px; align-items: flex-start; }
.ventana .cab h2 { font-size: 20px; flex: 1; }
.cerrar { border: 0; background: none; font-size: 26px; line-height: 1; color: var(--suave); padding: 0 4px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--suave); font-size: 13.5px; align-items: center; }
.texto { white-space: pre-wrap; background: var(--fondo); border-radius: 8px; padding: 12px 14px; max-height: 220px; overflow: auto; font-size: 14px; }
.acciones { display: flex; gap: 8px; flex-wrap: wrap; }
.hilo h3 { font-size: 14px; margin-bottom: 8px; }
.coment { padding: 8px 0; border-top: 1px solid #eef0f3; font-size: 14px; }
.coment b { font-weight: 600; } .coment small { color: var(--suave); margin-left: 6px; }
.coment.equipo b::after { content: "equipo"; font-size: 11px; font-weight: 500; color: var(--acento); background: #e9efff; border-radius: 4px; padding: 0 5px; margin-left: 6px; }
.form-coment { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.form-coment input, .form-coment textarea { border: 1px solid var(--linea); border-radius: 6px; padding: 8px 10px; width: 100%; background: var(--papel); }
.form-coment textarea { min-height: 70px; resize: vertical; }
.form-coment .fila-form { display: flex; gap: 8px; }
.error { color: var(--rojo); font-size: 13px; }

@media (max-width: 760px) {
  .barra { gap: 10px; padding: 0 12px; flex-wrap: wrap; height: auto; padding-top: 8px; padding-bottom: 8px; }
  .pestanas { order: 3; width: 100%; margin: 0; }
  main { padding: 12px; }
  .ventana { grid-template-columns: 1fr; }
  .fila { grid-template-columns: 48px 1fr auto; } .fila .tipo, .fila .redes { display: none; }
}
