/* =====================================================================
   AUTOPUBLICADOR — Sistema de diseño SaaS profesional.
   Azul de marca (#1877F2) sobre navy elegante; tarjetas blancas con
   sombras suaves y radios generosos; tipografía del sistema; estados
   hover/active definidos; foco accesible en formularios.
   NOTA: la estructura de selectores se conserva intacta; solo se
   redefinen valores visuales.
   ===================================================================== */

:root {
  --navy: #0d2242;
  --navy-soft: #132c56;
  --navy-deep: #071430;
  --blue: #1877f2;
  --blue-dark: #0f62d6;
  --blue-ink: #0a4fb4;
  --blue-soft: #e8f1fd;
  --blue-softer: #f4f8fe;
  --fb: #1877f2;
  --fb-dark: #0f62d6;
  --card: #ffffff;
  --radius: 14px;
  --radius-sm: 10px;
  --input-border: #d8dee9;
  --text: #16213a;
  --muted: #64748f;
  --line: #e6eaf1;
  --ok: #15803d;
  --ok-bg: #e9f7ee;
  --ok-line: #bfe6cb;
  --warn: #925e00;
  --warn-bg: #fff4d9;
  --warn-line: #eed189;
  --bad: #d92d20;
  --bad-bg: #fdecea;
  --bad-line: #f3b3ad;
  --shadow-sm: 0 1px 2px rgba(10, 22, 48, .07);
  --shadow-md: 0 8px 24px rgba(10, 22, 48, .12);
  --shadow-lg: 0 20px 52px rgba(3, 10, 26, .42);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.navy {
  background:
    radial-gradient(1000px 480px at 50% -8%, rgba(24, 119, 242, .14), transparent 62%),
    var(--navy-deep);
  background-attachment: fixed;
  min-height: 100vh;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.muted { color: var(--muted); }
.tiny { font-size: 12.5px; }

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  gap: 20px;
}

.login-card {
  background: var(--card);
  border-radius: 18px;
  width: 100%;
  max-width: 440px;
  padding: 36px 32px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, .55);
  text-align: center;
}

.login-art { margin-bottom: 10px; }
.login-title { margin: 8px 0 6px; font-size: 25px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.login-sub { margin: 0 0 22px; color: var(--muted); font-size: 14.5px; }
.login-note { margin: 16px 0 0; font-size: 13.5px; color: var(--muted); }

.login-footer { color: #93a7c9; font-size: 13px; }
.login-footer a { color: #ffffff; font-weight: 600; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 18px;
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: .01em;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  background: #e8ecf3;
  color: var(--text);
  text-decoration: none;
  transition: background .16s ease, box-shadow .16s ease, transform .08s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-blue { background: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(24, 119, 242, .35); }
.btn-blue:hover { background: var(--blue-dark); box-shadow: 0 8px 22px rgba(24, 119, 242, .45); }
.btn-fb { background: var(--fb); color: #fff; box-shadow: 0 6px 16px rgba(24, 119, 242, .35); font-size: 16.5px; padding: 14px 18px; }
.btn-fb:hover { background: var(--fb-dark); box-shadow: 0 8px 22px rgba(24, 119, 242, .45); }
.btn-secondary { background: #edf1f7; color: var(--text); border: 1px solid var(--line); }
.btn-secondary:hover { background: #e2e8f1; }
.btn-danger { background: var(--bad); color: #fff; box-shadow: 0 6px 16px rgba(217, 45, 32, .28); }
.btn-danger:hover { background: #b9251a; }
.btn-sm { width: auto; padding: 8px 15px; font-size: 13.5px; border-radius: 8px; }

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  flex: 0 0 auto;
}

/* ---------- Formularios ---------- */
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: .015em;
  color: #3d4b66;
  margin: 14px 0 6px;
  text-align: left;
}

.input, textarea.input, select.input {
  width: 100%;
  padding: 11px 13px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  border: 1.5px solid var(--input-border);
  border-radius: var(--radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input::placeholder { color: #9aa5b8; }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(24, 119, 242, .16); }
textarea.input { resize: vertical; }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }

/* ---------- Alertas ---------- */
.flash {
  border-radius: var(--radius-sm);
  padding: 11px 15px;
  margin: 12px 0;
  font-size: 14px;
  text-align: left;
  border: 1px solid transparent;
  box-shadow: var(--shadow-sm);
}
.flash-ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.flash-warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.flash-error { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }

/* ---------- Barra superior ---------- */
.topbar {
  background: rgba(13, 34, 66, .94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .09);
  box-shadow: 0 4px 18px rgba(3, 10, 26, .28);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand { color: #fff; font-weight: 750; font-size: 18px; letter-spacing: -.01em; flex: 0 0 auto; }
.brand:hover { text-decoration: none; }

.tabs { display: flex; gap: 6px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  color: #a9bedd;
  padding: 8px 13px;
  border-radius: 999px;
  font-weight: 650;
  font-size: 14px;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background .15s ease, color .15s ease;
}
.tab:hover { text-decoration: none; background: rgba(255, 255, 255, .09); color: #fff; }
.tab.active { background: #fff; color: var(--navy-soft); box-shadow: var(--shadow-sm); }

.topbar-actions { display: flex; gap: 10px; align-items: center; margin-left: auto; flex: 0 0 auto; }
.userchip {
  color: #dbe6f7;
  font-size: 13.5px;
  font-weight: 600;
  flex: 0 0 auto;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .13);
  padding: 7px 14px;
  border-radius: 999px;
}

/* ---------- Contenido ---------- */
.container { max-width: 1120px; margin: 24px auto; padding: 0 18px; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(13, 34, 66, .05);
}
.card h3 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -.01em;
  border-left: 4px solid var(--blue);
  border-radius: 2px;
  padding-left: 12px;
}
.page-title { margin: 2px 0 8px; font-size: 23px; font-weight: 750; color: #fff; letter-spacing: -.015em; }
.card .page-title { color: var(--text); }
.card-foot { margin: 12px 0 14px; font-size: 14px; color: var(--muted); }

/* ---------- Inicio ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.stat { text-align: center; margin: 0; padding: 20px 10px; }
.stat-num { display: block; font-size: 32px; font-weight: 800; color: var(--navy-soft); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.empty-state { text-align: center; padding: 52px 20px; }
.empty-arrow {
  font-size: 44px;
  color: var(--blue);
  animation: bounce 1.6s infinite;
}
@keyframes bounce { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(10px, -10px); } }

.list-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 11px 6px;
  border-bottom: 1px solid var(--line);
  border-radius: 8px;
}
.list-row:last-child { border-bottom: none; }
.row-actions { margin-left: auto; display: flex; gap: 8px; }

.badge {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  padding: 4px 11px;
  border-radius: 999px;
  white-space: nowrap;
}
.b-ok, .b-publicado { background: var(--ok-bg); color: var(--ok); }
.b-warn, .b-pendiente, .b-borrador { background: var(--warn-bg); color: var(--warn); }
.b-bad, .b-fallido { background: var(--bad-bg); color: var(--bad); }
.b-descartada { background: #fef3c7; color: #92400e; }

.link-box { display: flex; gap: 8px; margin-top: 12px; }
.link-box .input { font-size: 13px; }

/* ---------- Cuentas ---------- */
.account-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.account-actions { display: flex; gap: 8px; }

/* ---------- Lista de páginas (pages.php, modales, conectar) ---------- */
.page-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.page-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: #fff;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.page-row:hover { border-color: var(--blue); background: var(--blue-softer); box-shadow: var(--shadow-sm); }
.page-check, .m-check { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--blue); }
.fb-mini { flex: 0 0 auto; display: inline-flex; }
.page-pic { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; background: #edf1f7; }
.page-meta { display: flex; flex-direction: column; min-width: 0; }
.page-meta b { font-size: 15px; font-weight: 650; }
.page-meta small { color: var(--muted); font-size: 12.5px; }

/* ---------- Calendario ---------- */
.cal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cal-head h3 { margin: 0; flex: 1; }
.cal-vista a.on { font-weight: 700; color: var(--blue-ink); }
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.cal-dow { font-weight: 700; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); text-align: center; padding: 4px 0; }
.cal-day {
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 7px;
  background: #fff;
  overflow: hidden;
  transition: box-shadow .15s ease;
}
.cal-empty { background: transparent; border: none; }
.cal-today { border: 2px solid var(--blue); background: var(--blue-softer); }
.cal-num { font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.cal-item {
  font-size: 11.5px;
  font-weight: 600;
  margin-top: 4px;
  padding: 3px 7px;
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-item.s-pendiente { background: var(--warn-bg); color: var(--warn); }
.cal-item.s-borrador { background: var(--warn-bg); color: var(--warn); }
.cal-item.s-publicado { background: var(--ok-bg); color: var(--ok); }
.cal-item.s-fallido { background: var(--bad-bg); color: var(--bad); }
.cal-more { font-size: 11px; font-weight: 600; color: var(--muted); margin-top: 3px; }
.cal-legend { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 12px; }
.week-day { padding: 12px 4px; border-bottom: 1px solid var(--line); }

/* ---------- Lista de posts (tarjetas estilo Karma) ---------- */
.post-cards { display: flex; flex-direction: column; gap: 12px; }
.post-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .15s ease;
}
.post-card:hover { box-shadow: var(--shadow-md); }
.post-thumb { width: 96px; flex: 0 0 96px; }
.post-thumb img { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; display: block; background: #edf1f7; }
.post-thumb .media-video { height: 72px; font-size: 12px; }
.post-body { flex: 1; min-width: 0; }
.post-top { display: flex; gap: 8px; align-items: center; margin-bottom: 5px; flex-wrap: wrap; }
.post-detail { margin-top: 4px; }
.post-actions { margin-left: auto; flex: 0 0 auto; }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
.table th, .table td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); }
.table th { color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: #f7f9fc; }
.table tr:last-child td { border-bottom: none; }
.nowrap { white-space: nowrap; }
.err { color: var(--bad); font-weight: 600; }

/* ---------- Mediateca ---------- */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.media-item { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; padding: 9px; background: #fff; box-shadow: var(--shadow-sm); transition: box-shadow .15s ease, transform .1s ease; }
.media-item:hover { box-shadow: var(--shadow-md); }
.media-item img { width: 100%; height: 110px; object-fit: cover; border-radius: 7px; display: block; }
.media-video {
  height: 110px;
  border-radius: 7px;
  background: var(--navy-soft);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  text-align: center;
  padding: 6px;
  word-break: break-all;
}
.media-meta { margin: 7px 0; font-size: 13px; }

/* ---------- Composer ---------- */
.composer-top { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.composer-top .btn { width: 100%; }

.dropzone {
  border: 2px dashed #b9c9e2;
  border-radius: var(--radius);
  padding: 32px 16px;
  text-align: center;
  margin-top: 16px;
  cursor: pointer;
  background: var(--blue-softer);
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.dropzone.over { border-color: var(--blue); background: var(--blue-soft); box-shadow: 0 0 0 4px rgba(24, 119, 242, .14); }
.dropzone p { margin: 6px 0; color: var(--muted); }

.expand-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 4px;
  margin-top: 8px;
  border-top: 1px solid var(--line);
  cursor: pointer;
  font-weight: 650;
}
.expand-caret { transition: transform .18s ease; color: var(--muted); }
.expand-row.open .expand-caret { transform: rotate(90deg); }
.expand-body { padding: 4px 0 10px; }

.composer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }

/* ---------- Modales ---------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 13, 30, .62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}
.modal[hidden] { display: none; }
.modal-card {
  background: #fff;
  border-radius: 18px;
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: var(--shadow-lg);
}
.modal-card h3 { margin: 0 0 12px; font-size: 19px; font-weight: 750; letter-spacing: -.01em; }
.modal-list { max-height: 300px; overflow-y: auto; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.check-all { display: flex; gap: 8px; align-items: center; padding: 9px 0; cursor: pointer; font-weight: 600; }
.radio-row, .check-row { display: flex; gap: 9px; align-items: center; padding: 9px 0; cursor: pointer; }
.radio-row input, .check-row input { width: 18px; height: 18px; accent-color: var(--blue); }

/* Mini calendario del modal de fecha */
.mini-cal { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; background: #fbfcfe; }
.mc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-weight: 700; }
.mc-head button { border: 1px solid var(--input-border); background: #fff; border-radius: 8px; padding: 3px 11px; cursor: pointer; font-weight: 700; color: var(--text); transition: border-color .15s, background .15s; }
.mc-head button:hover { border-color: var(--blue); background: var(--blue-softer); }
.mc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.mc-dow { font-size: 11px; font-weight: 700; color: var(--muted); }
.mc-day { border: none; background: none; padding: 8px 0; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text); transition: background .12s; }
.mc-day:hover { background: var(--blue-soft); }
.mc-today { background: var(--blue); color: #fff; box-shadow: 0 4px 10px rgba(24, 119, 242, .4); }

/* ---------- Subida masiva ---------- */
.shortcuts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 16px;
  background: var(--blue-softer);
  border: 1px solid var(--blue-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.bulk-row { display: grid; grid-template-columns: 120px 1fr; gap: 14px; }
.bulk-thumb img { width: 120px; height: 90px; object-fit: cover; border-radius: 8px; }
.bulk-thumb .media-video { height: 90px; }
.bulk-fields .form-label { margin-top: 8px; }

/* ---------- Pie ---------- */
.app-footer {
  text-align: center;
  color: #8fa3c7;
  font-size: 13px;
  padding: 20px;
}
.app-footer a { color: #fff; font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .tabs { overflow-x: auto; }
  .tab { padding: 8px 12px; font-size: 13.5px; }
  .shortcuts, .composer-top, .composer-actions, .row2, .row3, .gb-cols { grid-template-columns: 1fr; }
  .bulk-row { grid-template-columns: 1fr; }
  .bulk-thumb img { width: 100%; height: 150px; }
  .topbar-inner { flex-wrap: wrap; }
}

/* ---------- Grupos de páginas ---------- */
.group-dot { display:inline-block; width:14px; height:14px; border-radius:50%; margin-right:5px; border:1px solid rgba(0,0,0,.15); flex:0 0 auto; }
.check-list { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:8px; margin-top:8px; }
.check-list label { display:flex; align-items:center; gap:9px; font-size:14px; font-weight:500; background:#f7f9fc; border:1.5px solid var(--input-border); border-radius:var(--radius-sm); padding:9px 11px; cursor:pointer; margin:0; transition: border-color .15s, background .15s; }
.check-list label:hover { border-color: var(--blue); background: var(--blue-softer); }
.check-list input[type=checkbox] { width:16px; height:16px; flex:0 0 auto; accent-color: var(--blue); }

/* ---------- Constructor visual de grupos ---------- */
.gb-cols { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:10px; }
.gb-col h4 { margin:0 0 8px; font-size:15px; font-weight:700; }
.gb-list { display:flex; flex-direction:column; gap:7px; max-height:380px; overflow-y:auto; padding:8px; border:1px solid var(--line); border-radius:var(--radius-sm); background:#f7f9fc; }
.gb-row { display:flex; align-items:center; gap:10px; padding:9px 11px; background:#fff; border:1.5px solid var(--line); border-radius:var(--radius-sm); cursor:pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.gb-row:hover { border-color:var(--blue); background:var(--blue-softer); box-shadow: var(--shadow-sm); }
.gb-row .page-pic { width:36px; height:36px; }
.gb-row .page-meta small { display:block; }
.gb-disabled { opacity:.55; cursor:not-allowed; background:#eef1f6; }
.gb-disabled:hover { border-color:var(--line); background:#eef1f6; box-shadow:none; }
.gb-add { margin-left:auto; font-size:20px; font-weight:700; color:var(--blue); flex:0 0 auto; }
.gb-num { flex:0 0 auto; width:26px; height:26px; border-radius:50%; background:var(--blue); color:#fff; font-size:13px; font-weight:700; display:inline-flex; align-items:center; justify-content:center; }
.gb-x { margin-left:auto; border:none; background:var(--bad-bg); color:var(--bad); font-size:18px; line-height:1; width:28px; height:28px; border-radius:50%; cursor:pointer; flex:0 0 auto; transition: background .15s, color .15s; }
.gb-x:hover { background:var(--bad); color:#fff; }

/* ---------- Vistas previas de archivos ---------- */
.dz-preview { margin-top:10px; display:flex; justify-content:center; }
.dz-preview img, .dz-preview video { max-width:240px; max-height:180px; border-radius:10px; box-shadow: var(--shadow-md); }
.dz-previews { margin-top:10px; display:flex; flex-wrap:wrap; gap:8px; justify-content:center; }
.dz-previews img, .dz-previews video { width:96px; height:72px; object-fit:cover; border-radius:8px; background:var(--navy-soft); }
.dz-previews p { width:100%; text-align:center; color: var(--muted); }

/* ---------- Marca con logo ---------- */
.brand { display:inline-flex; align-items:center; }
.brand-logo { width:30px; height:30px; vertical-align:-7px; margin-right:8px; border-radius:8px; box-shadow: var(--shadow-sm); }

/* ---------- Apartados del composer (estilo editor por secciones) ---------- */
.csec { padding:18px 0; border-bottom:1px solid var(--line); }
.csec:first-of-type { padding-top:6px; }
.csec:last-of-type { border-bottom:none; padding-bottom:4px; }
.csec > .form-label:first-child { margin-top:0; font-size:14.5px; font-weight:700; }
.csec .dropzone { margin-top:8px; }

/* ---------- Filas seleccionables de publicación ---------- */
.pub-rows { display:flex; flex-direction:column; gap:10px; margin-top:10px; }
.pub-row { display:flex; align-items:center; gap:12px; padding:15px; border:1.5px solid var(--input-border); border-radius: var(--radius); cursor:pointer; background:#fff; transition:border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.pub-row:hover { border-color:var(--blue); background:var(--blue-softer); box-shadow: var(--shadow-md); }
.pub-row:focus { outline:none; border-color:var(--blue); box-shadow:0 0 0 4px rgba(24,119,242,.16); }
.pub-row-main { display:flex; flex-direction:column; gap:2px; flex:1; }
.pub-row-main b { font-size:16px; font-weight:700; letter-spacing:-.01em; }
.pub-row-main small { color:var(--muted); font-size:13px; }
.prog-date { color:var(--blue-ink); font-weight:700; }
.pub-row-go { font-size:24px; color:#a5b1c7; line-height:1; }

/* ---------- Chips de páginas elegidas ---------- */
.page-chips { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.page-chip { display:inline-flex; align-items:center; gap:7px; background:var(--blue-soft); border:1px solid #c9dcf9; border-radius:999px; padding:3px 11px 3px 3px; font-size:13px; }
.page-chip img { width:24px; height:24px; border-radius:50%; object-fit:cover; }
.page-chip b { font-weight:600; }

/* ---------- Mini vista previa estilo post ---------- */
.mini-post { border:1px solid var(--line); border-radius: var(--radius); padding:14px 15px; background:#fff; max-width:440px; box-shadow: var(--shadow-sm); }
.mini-post-head { display:flex; align-items:center; gap:10px; margin-bottom:9px; }
.mini-post-head .page-pic { width:40px; height:40px; border-radius:50%; }
.mini-post-text { font-size:14px; margin:0 0 9px; white-space:pre-wrap; word-break:break-word; line-height:1.55; }
.mini-post-media img, .mini-post-media video { width:100%; max-height:260px; object-fit:cover; border-radius:10px; display:block; }
.mini-post-foot { margin-top:10px; padding-top:9px; border-top:1px solid var(--line); color:var(--muted); font-size:12.5px; font-weight:600; }

/* ---------- Modal de verificación ---------- */
.verify-media { display:flex; justify-content:center; margin:4px 0 8px; }
.verify-media img, .verify-media video { max-width:220px; max-height:160px; border-radius:10px; box-shadow: var(--shadow-sm); }
.v-val { margin:0 0 2px; font-size:14px; }
#modalVerify .form-label { margin:10px 0 2px; }

/* ---------- Botón × en miniaturas ---------- */
.dz-thumb { position:relative; display:inline-block; }
.dz-x { position:absolute; top:5px; right:5px; width:27px; height:27px; border-radius:50%; border:none; background:rgba(8,17,34,.78); color:#fff; font-size:16px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; padding:0; transition: background .15s, transform .1s; }
.dz-x:hover { background:var(--bad); transform: scale(1.06); }

/* ---------- Barra de progreso de subida masiva ---------- */
.bulk-progress { position:relative; height:28px; background:#e6ebf3; border-radius:8px; overflow:hidden; margin:12px 0; }
.bulk-progress[hidden] { display:none; }
.bulk-progress-fill { height:100%; width:0; background: linear-gradient(90deg, var(--blue), #4a9bff); transition:width .2s; }
.bulk-progress-text { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; color:#fff; text-shadow:0 1px 3px rgba(0,0,0,.45); }

/* ---------- Thumbnails reales de video ---------- */
.bulk-thumb video { width:120px; height:90px; object-fit:cover; border-radius:8px; display:block; background:#0b1e3a; }
.post-thumb video { width:96px; height:72px; object-fit:cover; border-radius:6px; display:block; background:#0b1e3a; }
.media-item video { width:100%; height:110px; object-fit:cover; border-radius:6px; display:block; background:#0b1e3a; }
@media (max-width:640px) { .bulk-thumb video { width:100%; height:150px; } }

/* ---------- Foto del comentario: arrastrar ---------- */
.comment-drop { border:2px dashed var(--input-border); border-radius:var(--radius-sm); padding:12px; margin-top:4px; background:#fbfcfe; transition:border-color .15s ease, background .15s ease; }
.comment-drop.dz-over { border-color:var(--blue); background:var(--blue-soft); }
.comment-drop .tiny { display:block; margin-top:4px; }
.dropzone-sm { padding:16px; }
.dropzone-sm .dz-previews { margin-top:8px; }
.dz-over { border-color:var(--blue) !important; background:var(--blue-soft) !important; }

/* ---------- Filtros estilo Karma (Lista) ---------- */
.filter-pills { display:flex; flex-wrap:wrap; gap:8px; margin:6px 0 16px; }
.pill { display:inline-block; padding:7px 15px; border-radius:999px; border:1.5px solid var(--input-border); color:var(--text); text-decoration:none; font-size:13px; font-weight:650; background:#fff; transition: all .15s ease; }
.pill:hover { border-color: var(--blue); color: var(--blue-ink); text-decoration: none; }
.pill.on { background:var(--blue); border-color:var(--blue); color:#fff; box-shadow: 0 4px 12px rgba(24,119,242,.35); }
.pill a { color:inherit; text-decoration:none; margin-left:5px; font-weight:700; }
.post-actions { display:flex; gap:6px; flex-wrap:wrap; align-items:flex-start; }

/* ---------- Mediateca: selección múltiple ---------- */
.media-toolbar { display:flex; align-items:center; gap:10px; margin-bottom:14px; flex-wrap:wrap; }
.media-check { display:flex; align-items:center; gap:7px; font-size:12.5px; font-weight:600; color:var(--muted); margin-bottom:6px; cursor:pointer; }
.media-check input { width:16px; height:16px; accent-color:var(--blue); }

/* ---------- Calendario usable ---------- */
a.cal-num { color:inherit; text-decoration:none; font-weight:700; font-size:13px; }
a.cal-num:hover { color:var(--blue); text-decoration:underline; }
a.cal-item { display:block; text-decoration:none; }
a.cal-item:hover { filter:brightness(.96); }
a.cal-more { display:block; text-decoration:none; }
a.cal-more:hover { color:var(--blue); }
a.list-row-link { text-decoration:none; color:inherit; display:flex; }
a.list-row-link:hover { background:#f4f7fb; }
.week-day > b a { color:inherit; text-decoration:none; }
.week-day > b a:hover { color:var(--blue); text-decoration:underline; }

/* ---------- Auto-IA ---------- */
.ia-block { display:flex; flex-direction:column; gap:9px; margin-top:10px; padding:12px 14px; border:1.5px dashed #9db8dd; border-radius: var(--radius-sm); background:var(--blue-softer); }
.ia-block .badge { margin:0; }
.ia-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; width:100%; }
.ia-wp-link { font-weight:650; }
.ia-manual { display:flex; flex-direction:column; gap:8px; width:100%; margin-top:4px; }
.ia-manual[hidden] { display:none; }
.ia-manual input[type=text], .ia-manual textarea { width:100%; box-sizing:border-box; }
.ia-m-fecha { max-width:220px; }
.ia-manual-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }

/* ---------- Toggle modo post / landing ---------- */
.modo-toggle input:checked + .modo-btn { background:#1877f2; color:#fff; border-color:#1877f2; box-shadow: 0 4px 12px rgba(24,119,242,.35); }
.modo-toggle .modo-btn { transition:background .15s, box-shadow .15s; border:1.5px solid var(--input-border); border-radius:8px; padding:8px 14px; font-weight:650; cursor:pointer; }

/* ---------- Barras de estadísticas ---------- */
.scrollbox { max-height: 430px; overflow-y: auto; padding-right: 6px; }
.bar-row { display: flex; align-items: center; gap: 12px; padding: 5px 0; }
.bar-label { flex: 0 0 118px; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { flex: 1 1 auto; min-width: 0; height: 10px; background: #e9eef5; border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue-dark), var(--blue)); border-radius: 999px; transition: width .45s ease; }
.bar-val { flex: 0 0 52px; text-align: right; font-size: 13.5px; font-weight: 700; color: var(--navy-soft); font-variant-numeric: tabular-nums; }
