:root {
  --azul: #00365F; --celeste: #008DD4; --fondo: #0b1220; --panel: #121a2b;
  --panel2: #1a2438; --texto: #e6edf6; --texto2: #93a4bd;
  --borde: #263450; --ok: #2ecc71; --error: #e74c3c; --warn: #f1c40f;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--fondo); color: var(--texto); font: 15px/1.5 system-ui, 'Segoe UI', sans-serif; }
#app { min-height: 100vh; }
a { color: var(--celeste); text-decoration: none; }
h1 { font-size: 1.3rem; } h2 { font-size: 1.1rem; margin-bottom: .6rem; }

.login-wrap { display: grid; place-items: center; min-height: 100vh; }
.login-caja { background: var(--panel); padding: 2rem; border-radius: 12px; border: 1px solid var(--borde); width: min(360px, 92vw); }
.login-caja h1 { color: var(--celeste); margin-bottom: 1rem; }

.layout { display: grid; grid-template-columns: 210px 1fr; min-height: 100vh; }
nav { background: var(--panel); border-right: 1px solid var(--borde); padding: 1rem .7rem; position: sticky; top: 0; height: 100vh; }
nav .logo { color: var(--celeste); font-weight: 700; font-size: 1.05rem; padding: .4rem .6rem 1rem; display: block; }
nav a.item { display: block; padding: .55rem .7rem; border-radius: 8px; color: var(--texto2); margin-bottom: .2rem; }
nav a.item.activo, nav a.item:hover { background: var(--panel2); color: var(--texto); }
main { padding: 1.4rem 1.8rem; max-width: 1100px; }
.cabecera { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.2rem; gap: 1rem; flex-wrap: wrap; }

.tarjetas { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin-bottom: 1.4rem; }
.tarjeta { background: var(--panel); border: 1px solid var(--borde); border-radius: 10px; padding: .9rem 1rem; }
.tarjeta .num { font-size: 1.6rem; font-weight: 700; color: var(--celeste); }
.tarjeta .lbl { color: var(--texto2); font-size: .82rem; }

.panel { background: var(--panel); border: 1px solid var(--borde); border-radius: 10px; padding: 1rem 1.2rem; margin-bottom: 1rem; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--borde); vertical-align: top; }
th { color: var(--texto2); font-weight: 600; font-size: .8rem; text-transform: uppercase; }

input, textarea, select { width: 100%; background: var(--panel2); color: var(--texto); border: 1px solid var(--borde); border-radius: 8px; padding: .55rem .7rem; font: inherit; }
textarea { resize: vertical; min-height: 70px; }
label { display: block; color: var(--texto2); font-size: .8rem; margin: .6rem 0 .2rem; }
.fila { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.fila3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .8rem; }

button, .btn { background: var(--celeste); color: #fff; border: 0; border-radius: 8px; padding: .55rem 1rem; font: inherit; font-weight: 600; cursor: pointer; }
button:hover { filter: brightness(1.1); }
button.sec { background: var(--panel2); border: 1px solid var(--borde); color: var(--texto); }
button.peligro { background: var(--error); }
button.ok { background: var(--ok); }
button.mini { padding: .3rem .6rem; font-size: .8rem; }
button:disabled { opacity: .5; cursor: wait; }

.chip { display: inline-block; padding: .1rem .55rem; border-radius: 20px; font-size: .75rem; font-weight: 600; }
.chip.borrador { background: #3b4a6b; } .chip.aprobado { background: #1e6e42; }
.chip.publicado { background: var(--azul); } .chip.rechazado { background: #6b3b3b; }
.chip.error { background: var(--error); } .chip.instagram { background: #a03a7c; } .chip.facebook { background: #3b5998; }

.post-card { display: grid; grid-template-columns: 130px 1fr auto; gap: 1rem; background: var(--panel); border: 1px solid var(--borde); border-radius: 10px; padding: 1rem; margin-bottom: .8rem; }
.post-card img { width: 130px; height: 130px; object-fit: cover; border-radius: 8px; background: var(--panel2); }
.post-card .sin-img { width: 130px; height: 130px; border-radius: 8px; background: var(--panel2); display: grid; place-items: center; color: var(--texto2); font-size: .75rem; text-align: center; }
.post-card .copy { white-space: pre-wrap; font-size: .88rem; margin: .4rem 0; }
.post-card .tags { color: var(--celeste); font-size: .8rem; }
.post-card .meta { color: var(--texto2); font-size: .78rem; }
.acciones { display: flex; flex-direction: column; gap: .4rem; min-width: 110px; }

.switch { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; }
.switch input { width: auto; }
.msg { padding: .6rem .9rem; border-radius: 8px; margin-bottom: .8rem; font-size: .88rem; }
.msg.ok { background: #14351f; color: var(--ok); } .msg.error { background: #3a1518; color: #ff8a80; }
.vacio { color: var(--texto2); padding: 1rem 0; }
pre.plan { white-space: pre-wrap; font-size: .85rem; background: var(--panel2); border-radius: 8px; padding: .9rem; }
.pilar-barra { height: 8px; border-radius: 4px; background: var(--celeste); }
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; } nav { position: static; height: auto; display: flex; overflow-x: auto; }
  .post-card { grid-template-columns: 1fr; } .fila, .fila3 { grid-template-columns: 1fr; }
}
