/* ===== Agenda board (tablero) ===== */
.agenda-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.agenda-card {
  display: block;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
  padding: 1rem 1.1rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, transform 0.15s;
}

.agenda-card:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  color: inherit;
  text-decoration: none;
}

.agenda-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.agenda-card-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--agenda-color, #0d6efd);
  flex-shrink: 0;
}

.agenda-card-title {
  flex: 1;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: #212529;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agenda-card-status {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 99px;
  background: #d1fae5;
  color: #065f46;
  white-space: nowrap;
}

.agenda-card-status.inactive {
  background: #f3f4f6;
  color: #6b7280;
}

.agenda-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.875rem;
  color: #4b5563;
}

.agenda-card-cliente,
.agenda-card-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.agenda-board-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: #6b7280;
}

.agenda-board-empty i {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  display: inline-block;
}

[data-theme="dark"] .agenda-card {
  background: #1f2937;
  border-color: rgba(255, 255, 255, 0.07);
}

[data-theme="dark"] .agenda-card-title {
  color: #f3f4f6;
}

[data-theme="dark"] .agenda-card-body {
  color: #d1d5db;
}

/* ===== Agenda detail header ===== */
.agenda-detail-menu {
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.agenda-detail-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.agenda-detail-title .agenda-card-dot {
  width: 16px;
  height: 16px;
}

.agenda-detail-title h2 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
}

.agenda-detail-title p {
  margin: 0;
  font-size: 0.85rem;
  color: #6b7280;
}

.agenda-detail-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.agenda-detail-actions .agenda-action-danger {
  border-color: #dc2626;
  background: #dc2626;
  color: #fff;
}

.agenda-detail-actions .agenda-action-danger:hover {
  border-color: #b91c1c;
  background: #b91c1c;
  color: #fff;
}

/* ===== Publicacion pills on the calendar ===== */
.calendar-date .publicacion-button {
  display: block;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  margin-top: 2px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.92;
  transition: opacity 0.15s;
}

.calendar-date .publicacion-button:hover {
  opacity: 1;
}

/* ===== Day drawer list ===== */
.day-publicaciones-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.day-publicacion-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  background: #f9fafb;
  cursor: pointer;
  transition: background 0.15s;
}

.day-publicacion-item:hover {
  background: #f0f2f5;
}

.day-publicacion-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pub-color, #0d6efd);
  flex-shrink: 0;
}

.day-publicacion-hora {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7280;
  min-width: 48px;
}

.day-publicacion-titulo {
  font-size: 0.9rem;
  color: #212529;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-theme="dark"] .day-publicacion-item {
  background: #283447;
}

[data-theme="dark"] .day-publicacion-item:hover {
  background: #313f56;
}

[data-theme="dark"] .day-publicacion-titulo {
  color: #f3f4f6;
}

/* ---------- Pestañas de la agenda ---------- */

.agenda-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex: 1 1 auto;
  justify-content: center;
}

.agenda-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  color: #4b5563;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.agenda-tab:hover {
  background: rgba(24, 84, 164, 0.08);
  color: #1854a4;
  text-decoration: none;
}

.agenda-tab.active {
  background: #1854a4;
  color: #fff;
}

.agenda-tab.active:hover {
  background: #14488f;
  color: #fff;
}

.agenda-tab-add {
  border: 1px dashed #c7ccd6;
  background: transparent;
  cursor: pointer;
  padding: 0.45rem 0.7rem;
}

/* Verde principal de la plataforma, para acciones de "crear/guardar". */
.btn-action.btn-verde,
.btn.btn-verde {
  background-color: #059669;
  border-color: #059669;
  color: #fff;
}

.btn-action.btn-verde:hover,
.btn.btn-verde:hover {
  background-color: #047857;
  border-color: #047857;
  color: #fff;
}

[data-theme="dark"] .agenda-tab {
  color: #c7d1dd;
}

[data-theme="dark"] .agenda-tab-add {
  border-color: rgba(255, 255, 255, 0.18);
}

[data-theme="dark"] .agenda-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* Modales sencillos de este menu (nuevo/config/eliminar calendario, eliminar
   agenda) usan Bootstrap tal cual, sin sus propias variables de color -- en
   modo oscuro quedaban blanco sobre blanco. */
.marketing-plain-modal .config-calendario-vista-general {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid #e5e7eb;
}

.marketing-plain-modal .config-calendario-vista-general .form-check-label {
  font-weight: 600;
}

.marketing-plain-modal .config-calendario-vista-general small.form-text {
  display: block;
  margin-top: 0.3rem;
  color: #6b7280;
}

[data-theme="dark"] .marketing-plain-modal .modal-content {
  background: #101820;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #edf3fb;
}

[data-theme="dark"] .marketing-plain-modal .modal-header,
[data-theme="dark"] .marketing-plain-modal .modal-footer {
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .marketing-plain-modal .modal-title,
[data-theme="dark"] .marketing-plain-modal .modal-body p,
[data-theme="dark"] .marketing-plain-modal label {
  color: #edf3fb;
}

[data-theme="dark"] .marketing-plain-modal .close {
  color: #edf3fb;
  text-shadow: none;
  opacity: 0.75;
}

[data-theme="dark"] .marketing-plain-modal .close:hover {
  opacity: 1;
}

[data-theme="dark"] .marketing-plain-modal .form-control {
  background: #0d131a;
  border-color: rgba(255, 255, 255, 0.16);
  color: #edf3fb;
  color-scheme: dark;
}

[data-theme="dark"] .marketing-plain-modal .config-calendario-vista-general {
  border-top-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .marketing-plain-modal .config-calendario-vista-general small.form-text {
  color: #aab5c4;
}

@media (max-width: 768px) {
  .agenda-detail-menu {
    width: 100%;
    max-width: 100%;
    padding: 1rem;
    gap: .75rem;
    overflow: hidden;
  }

  .list-page-header,
  .list-breadcrumb {
    min-width: 0;
    max-width: 100%;
  }

  .list-breadcrumb span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .agenda-detail-menu > *,
  .agenda-detail-title > div {
    min-width: 0;
  }

  .agenda-detail-title {
    width: 100%;
  }

  .agenda-detail-title h2,
  .agenda-detail-title p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .agenda-tabs {
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    padding: .1rem .05rem .4rem;
    scrollbar-width: thin;
    overscroll-behavior-x: contain;
  }

  .agenda-tab {
    flex-shrink: 0;
    padding: .42rem .7rem;
    font-size: .8rem;
  }

  .agenda-detail-actions {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    gap: .4rem;
    padding: .05rem .05rem .4rem;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    overscroll-behavior-x: contain;
  }

  .agenda-detail-actions .btn-action {
    min-width: max-content;
    min-height: 34px;
    flex: 0 0 auto;
    justify-content: center;
    padding: .34rem .62rem;
    font-size: .76rem;
    text-align: center;
    white-space: nowrap;
  }

  .agenda-detail-actions .btn-action i {
    font-size: .9rem;
  }
}

/* ---------- Tablero de agendas: apariencia portada de GE Creativa ---------- */

:root {
  --mk-card-bg: #fff;
  --mk-card-border: rgba(120, 130, 145, 0.22);
  --mk-card-shadow: 0 10px 26px rgba(18, 24, 33, 0.07);
  --mk-page-text: #1f2937;
  --mk-status: #33c543;
  --mk-inactive: #8792a2;
}

[data-theme="dark"] {
  --mk-card-bg: #151c25;
  --mk-card-border: rgba(255, 255, 255, 0.1);
  --mk-card-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
  --mk-page-text: #edf3fb;
}

.agenda-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.15rem;
}

.agenda-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--mk-card-border);
  border-radius: 8px;
  background: var(--mk-card-bg);
  color: var(--mk-page-text);
  box-shadow: var(--mk-card-shadow);
  text-decoration: none;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.agenda-card:hover {
  transform: translateY(-3px);
  border-color: rgba(120, 130, 145, 0.42);
  box-shadow: 0 22px 50px rgba(18, 24, 33, 0.14);
  text-decoration: none;
}

[data-theme="dark"] .agenda-card:hover {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.36);
}

.agenda-card:focus-visible {
  outline: 2px solid rgba(90, 100, 115, 0.7);
  outline-offset: 3px;
}

.agenda-card-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 58px;
  padding: 1rem 2.2rem 0.65rem 1rem;
  border-bottom: 1px solid var(--mk-card-border);
}

.agenda-card-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--agenda-color, #0d6efd);
  flex-shrink: 0;
}

.agenda-card-title {
  margin: 0;
  color: var(--mk-page-text);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0;
  text-align: left;
  text-transform: uppercase;
}

/* El estado pasa a ser un punto en la esquina, como en el tablero original */
.agenda-card-status {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 11px;
  height: 11px;
  padding: 0;
  border-radius: 50%;
  background: var(--mk-status);
  box-shadow: 0 0 0 3px rgba(51, 197, 67, 0.14);
  font-size: 0;
  overflow: hidden;
}

.agenda-card-status.inactive {
  background: var(--mk-inactive);
  box-shadow: 0 0 0 3px rgba(120, 130, 145, 0.12);
}

.agenda-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.9rem 1rem 1.1rem;
  color: #6b7280;
  font-size: 0.85rem;
}

[data-theme="dark"] .agenda-card-body {
  color: #aab5c4;
}

.agenda-card-cliente,
.agenda-card-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

/* ---------- Logo de la agenda ---------- */

.agenda-card-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 122px;
  margin: 0 1rem;
  border: 1px solid var(--mk-card-border);
  border-radius: 7px;
  background: #fafbfc;
  color: #c3cad4;
  font-size: 2.2rem;
  overflow: hidden;
}

[data-theme="dark"] .agenda-card-logo {
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.25);
}

.agenda-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.6rem;
}

/* Slot del encabezado: logo actual + overlay para reemplazarlo */
.agenda-logo-slot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin: 0;
  border: 1px solid var(--mk-card-border);
  border-radius: 8px;
  background: #fafbfc;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
}

[data-theme="dark"] .agenda-logo-slot {
  background: rgba(255, 255, 255, 0.04);
}

.agenda-logo-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
}

.agenda-logo-empty {
  color: #c3cad4;
  font-size: 1.1rem;
}

.agenda-logo-slot .agenda-card-dot {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 8px;
  height: 8px;
}

.agenda-logo-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.55);
  color: #fff;
  opacity: 0;
  transition: opacity 0.15s;
}

.agenda-logo-slot:hover .agenda-logo-overlay {
  opacity: 1;
}

/* ==========================================================================
   Marketing board — visual language shared with GE Creativa
   ========================================================================== */

.marketing-board {
  --mk-page-text: #16181d;
  --mk-panel-bg: linear-gradient(160deg, #fff 0%, #f4f6f9 100%);
  --mk-panel-border: rgba(18, 24, 33, 0.12);
  --mk-control-bg: #fff;
  --mk-control-strong: #171b21;
  --mk-control-border: rgba(18, 24, 33, 0.16);
  --mk-muted: #657080;
  --mk-card-bg: linear-gradient(180deg, #fff 0%, #f7f9fc 100%);
  --mk-card-border: rgba(18, 24, 33, 0.14);
  --mk-card-shadow: 0 16px 34px rgba(18, 24, 33, 0.1);
  --mk-logo-bg: linear-gradient(180deg, #f3f6fa 0%, #eaf0f7 100%);
  min-height: calc(100vh - var(--top-navbar-height, 60px) - 3rem);
  padding: 1rem;
  color: var(--mk-page-text);
}

[data-theme="dark"] .marketing-board {
  --mk-page-text: #f4f4f5;
  --mk-panel-bg: radial-gradient(circle at 18% 0%, rgba(255,255,255,.06), transparent 36rem), linear-gradient(160deg, #0f1216 0%, #050607 100%);
  --mk-panel-border: rgba(255, 255, 255, 0.12);
  --mk-control-bg: rgba(255, 255, 255, 0.045);
  --mk-control-strong: #f4f4f5;
  --mk-control-border: rgba(255, 255, 255, 0.16);
  --mk-muted: #a8b0bb;
  --mk-card-bg: radial-gradient(circle at 50% 0%, rgba(255,255,255,.07), transparent 14rem), linear-gradient(180deg, #171b21 0%, #0c0f13 100%);
  --mk-card-border: rgba(255, 255, 255, 0.14);
  --mk-card-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
  --mk-logo-bg: linear-gradient(180deg, #111820 0%, #090d12 100%);
}

.marketing-board-panel {
  width: min(100%, 1740px);
  min-width: 0;
  margin: 0 auto;
  padding: 1.1rem;
  border: 1px solid var(--mk-panel-border);
  border-radius: 8px;
  background: var(--mk-panel-bg);
  box-shadow: 0 18px 48px rgba(18, 24, 33, 0.08);
}

.marketing-board .board-header { margin-bottom: 1.1rem; padding: 0; border: 0; background: transparent; box-shadow: none; }
.marketing-board .board-actions { display: flex; align-items: center; flex-wrap: wrap; width: 100%; gap: .75rem; }
.marketing-board .action-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 44px; padding: .55rem 1rem; border: 1px solid var(--mk-control-strong);
  border-radius: 7px; background: #171b21; color: #fff; font-weight: 700; box-shadow: none;
  text-decoration: none;
}
.marketing-board .action-btn:hover { transform: translateY(-1px); background: #222831; color: #fff; text-decoration: none; }
.marketing-board .search-container { position: relative; flex: 1 1 24rem; min-width: min(100%, 22rem); max-width: 34rem; margin-left: .75rem; }
.marketing-board .search-input {
  width: 100%; height: 44px; padding: .65rem 2.75rem; border: 1px solid var(--mk-control-border);
  border-radius: 7px; background: var(--mk-control-bg); color: var(--mk-page-text); font-size: .93rem;
}
.marketing-board .search-icon { position: absolute; top: 50%; left: 1rem; z-index: 1; color: var(--mk-muted); transform: translateY(-50%); }
.marketing-search-clear { position: absolute; top: 6px; right: 6px; display: none; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--mk-muted); }
.marketing-search-clear.visible { display: block; }
.marketing-search-clear:hover { background: rgba(100, 116, 139, .1); color: var(--mk-page-text); }

.vista-general-shortcuts { display: flex; flex-wrap: wrap; gap: .5rem; }
.vista-general-shortcut {
  background: transparent; border-color: var(--mk-control-border); color: var(--mk-page-text);
  min-height: 40px; padding: .45rem .85rem; font-size: .86rem;
}
.vista-general-shortcut:hover { background: rgba(24, 84, 164, .08); border-color: #1854a4; color: #1854a4; }
[data-theme="dark"] .vista-general-shortcut:hover { background: rgba(125, 178, 255, .12); border-color: #7db2ff; color: #7db2ff; }

/* display:grid es explicito a proposito: tablero.css define su propio
   ".card-grid" (sin prefijo, para las tarjetas de tableros de seguimiento) y
   en movil lo cambia a flex+scroll horizontal. Esta regla es mas especifica
   (dos clases) asi que siempre le gana a esa, sin importar el orden de los
   <link> en la pagina -- si no se declara aqui, esta pagina hereda ese flex
   y las tarjetas quedan todas apretadas en una sola fila. */
.marketing-board .card-grid { display: grid; overflow-x: visible; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.15rem; margin: 0; }
.marketing-board .marketing-card {
  display: flex; flex-direction: column; height: 330px; padding: 0; overflow: hidden; border: 1px solid var(--mk-card-border);
  border-radius: 8px; background: var(--mk-card-bg); color: var(--mk-page-text); box-shadow: var(--mk-card-shadow); cursor: pointer; text-decoration: none;
}
.marketing-board .marketing-card:hover { transform: translateY(-3px); border-color: rgba(120,130,145,.42); color: var(--mk-page-text); box-shadow: 0 22px 50px rgba(18,24,33,.14); text-decoration: none; }
.marketing-board .marketing-card:active,
.marketing-board .marketing-card.is-selected {
  transform: translateY(-2px);
  border-color: var(--primary-color, #1854a4);
  box-shadow: 0 0 0 3px rgba(24,84,164,.18), 0 18px 42px rgba(18,24,33,.14);
}
[data-theme="dark"] .marketing-board .marketing-card.is-selected {
  border-color: #7db2ff;
  box-shadow: 0 0 0 3px rgba(125,178,255,.2), 0 20px 46px rgba(0,0,0,.38);
}
.marketing-board .board-card-header { position: relative; display: flex; align-items: center; min-height: 58px; max-height: 58px; padding: 1rem 2rem .65rem 1rem; justify-content: flex-start; background: transparent; color: inherit; }
.marketing-board .board-card-title { margin: 0; overflow: hidden; color: inherit; font-size: .95rem; font-weight: 800; text-align: left; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.marketing-board .board-card-status { position: absolute; top: 1rem; right: 1rem; width: 11px; height: 11px; border-radius: 50%; background: #33c543; box-shadow: 0 0 0 3px rgba(51,197,67,.14); }
.marketing-board .board-card-status.inactive { background: #8f98a3; box-shadow: 0 0 0 3px rgba(120,130,145,.12); }
.marketing-board .board-card-body { position: relative; display: flex; align-items: center; justify-content: center; height: 122px; min-height: 122px; margin: 0 1rem; overflow: hidden; border: 1px solid var(--mk-card-border); border-radius: 7px; background: var(--mk-logo-bg); }
.marketing-board .board-card-body img { width: 100%; height: 100%; padding: .65rem; object-fit: contain; }
.marketing-board .board-card-placeholder { display: flex; align-items: center; justify-content: center; color: var(--mk-muted); font-size: 2.35rem; }
.marketing-board .board-card-meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: repeat(2,auto); align-items: center; gap: .45rem .8rem; min-height: 96px; padding: .75rem 1rem; }
.marketing-board .board-card-person { display: grid; grid-template-columns: 28px minmax(0,1fr); align-items: center; gap: .62rem; color: inherit; font-size: .86rem; font-weight: 600; }
.marketing-board .board-card-person i, .marketing-board .board-card-assignee i, .marketing-board .board-card-count i { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid var(--mk-control-border); border-radius: 7px; }
.marketing-board .board-card-person span, .marketing-board .board-card-assignee span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.marketing-board .board-card-assignee { display: grid; grid-template-columns: 28px minmax(0,1fr); align-items: center; gap: .62rem; min-width: 0; color: var(--mk-page-text); font-size: .8rem; font-weight: 600; }
.marketing-board .board-card-assignee.unassigned { color: var(--mk-muted); font-weight: 500; }
.marketing-board .board-card-count { grid-column: 2; grid-row: 1 / 3; display: flex; align-items: center; gap: .4rem; color: var(--mk-muted); font-size: .8rem; font-weight: 700; }
.marketing-board .board-card-footer { min-height: 54px; margin-top: auto; border-top: 1px solid var(--mk-card-border); }
.marketing-board .card-action-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 0 0 8px 8px; background: rgba(18,24,33,.035); color: var(--mk-page-text); font-size: .9rem; font-weight: 700; cursor: pointer; }
.marketing-board .card-action-btn:hover { background: rgba(18,24,33,.075); color: var(--mk-page-text); }
[data-theme="dark"] .marketing-board .card-action-btn { background: rgba(255,255,255,.035); }
[data-theme="dark"] .marketing-board .card-action-btn:hover { background: rgba(255,255,255,.1); }
.marketing-board .no-results { padding: 3rem 1rem; margin: 1rem 0 0; border: 1px solid var(--mk-card-border); border-radius: 8px; background: var(--mk-card-bg); color: var(--mk-muted); text-align: center; }
.marketing-board [hidden] { display: none !important; }
.marketing-board .card-grid.is-loading { min-height: 330px; opacity: .48; pointer-events: none; transition: opacity .15s ease; }
.agenda-board-region { position: relative; min-height: 330px; }
.agenda-board-loading { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; gap: .7rem; color: var(--mk-page-text); font-weight: 800; pointer-events: none; }
.agenda-board-loading .spinner-border { width: 2rem; height: 2rem; border-width: .22rem; }
.marketing-pagination { display: flex; align-items: center; justify-content: center; gap: .4rem; margin-top: 1.35rem; }
.marketing-page-button { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 .65rem; border: 1px solid var(--mk-control-border); border-radius: 7px; background: var(--mk-control-bg); color: var(--mk-page-text); font-weight: 700; cursor: pointer; }
.marketing-page-button:hover:not(:disabled), .marketing-page-button.is-active { border-color: #171b21; background: #171b21; color: #fff; }
.marketing-page-button:focus-visible { outline: 2px solid var(--primary-color, #1854a4); outline-offset: 2px; }
.marketing-page-button:disabled { cursor: default; opacity: .35; }
.marketing-page-ellipsis { min-width: 24px; color: var(--mk-muted); text-align: center; }
.marketing-pagination-summary { margin: .55rem 0 0; color: var(--mk-muted); font-size: .8rem; text-align: center; }
[data-theme="dark"] .marketing-page-button:hover:not(:disabled), [data-theme="dark"] .marketing-page-button.is-active { border-color: #edf3fb; background: #edf3fb; color: #111827; }

.marketing-board-workspace.has-detail { grid-template-columns: minmax(0,1.7fr) minmax(320px,.72fr); }
.marketing-board-workspace.has-detail .card-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.marketing-agenda-detail { max-height: calc(100vh - var(--top-navbar-height,60px) - 2rem); overflow-y: auto; }
.marketing-board .detail-client-row { grid-template-columns: 1fr; }
.marketing-board .detail-avatar { color: #fff; }
.marketing-board .list-detail-form { display: grid; gap: .9rem; padding: 1rem; }
.marketing-board .form-row-field { display: grid; gap: .32rem; }
.marketing-board .form-row-field label { margin: 0; color: #4b5563; font-size: .82rem; font-weight: 700; }
.marketing-board .form-row-field input:not([type="color"]), .marketing-board .form-row-field select { width: 100%; min-height: 2.45rem; padding: .45rem .65rem; border: 1px solid #d7dde7; border-radius: 6px; background: #fff; color: #111827; }
.marketing-board .agenda-color-field { display: grid; grid-template-columns: 64px minmax(0,1fr); align-items: center; gap: .7rem; }
.marketing-board .agenda-color-field input { width: 64px; height: 42px; padding: 3px; border: 1px solid #d7dde7; border-radius: 6px; background: #fff; cursor: pointer; }
.marketing-board .agenda-color-field span { color: var(--mk-muted); font-family: monospace; font-size: .85rem; text-transform: uppercase; }
.marketing-board .agenda-form-help { color: var(--mk-muted); font-size: .75rem; }
.marketing-board .agenda-form-help.error { color: #dc2626; }
.marketing-board .agenda-check-field { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .5rem; }
.marketing-board .agenda-check-field input { width: 17px; height: 17px; margin: 0; }
.marketing-board .agenda-check-field span { margin: 0; color: #4b5563; font-size: .82rem; font-weight: 700; }
.marketing-board .agenda-logo-current { display: flex; align-items: center; gap: .55rem; margin-bottom: .4rem; }
.marketing-board .agenda-logo-current img { width: 40px; height: 40px; object-fit: contain; border: 1px solid #d7dde7; border-radius: 6px; background: #fafbfc; padding: 3px; }
[data-theme="dark"] .marketing-board .agenda-check-field span { color: #c7d1dd; }
[data-theme="dark"] .marketing-board .agenda-logo-current img { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.16); }
.marketing-board .list-detail-form-actions { display: flex; justify-content: flex-end; gap: .55rem; padding-top: .4rem; }
.marketing-board .list-detail-form-actions .btn-action { min-height: 40px; padding: .5rem .85rem; border: 1px solid #d7dde7; border-radius: 6px; background: #fff; color: #374151; }
.marketing-board .list-detail-form-actions .btn-action.highlight { border-color: #171b21; background: #171b21; color: #fff; }
.marketing-board .list-detail-form-actions .btn-action:disabled { cursor: not-allowed; opacity: .5; }
[data-theme="dark"] .marketing-board .form-row-field label { color: #c7d1dd; }
[data-theme="dark"] .marketing-board .form-row-field input:not([type="color"]), [data-theme="dark"] .marketing-board .form-row-field select, [data-theme="dark"] .marketing-board .agenda-color-field input { border-color: rgba(255,255,255,.16); background: #0d131a; color: #edf3fb; color-scheme: dark; }
[data-theme="dark"] .marketing-board .list-detail-form-actions .btn-action { border-color: rgba(255,255,255,.16); background: #151c25; color: #edf3fb; }
[data-theme="dark"] .marketing-board .list-detail-form-actions .btn-action.highlight { border-color: #edf3fb; background: #edf3fb; color: #111827; }

@media (max-width: 1600px) { .marketing-board .card-grid { grid-template-columns: repeat(5, minmax(0,1fr)); } }
@media (max-width: 1600px) { .marketing-board-workspace.has-detail .card-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 1320px) { .marketing-board .card-grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }
@media (max-width: 1320px) { .marketing-board-workspace.has-detail .card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 1100px) {
  .marketing-board-workspace.has-detail { grid-template-columns: minmax(0,1fr); }
  .marketing-agenda-detail { position: static; }
}
@media (max-width: 1040px) { .marketing-board .card-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 768px) {
  .marketing-board { padding: .75rem; }
  .marketing-board-panel { padding: .8rem; }
  .marketing-board .board-actions { align-items: stretch; }
  .marketing-board .action-btn, .marketing-board .search-container { flex: 1 1 100%; max-width: none; margin-left: 0; }
  .marketing-board .card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: .85rem; }
  /* Las tarjetas usaban una altura fija pensada para columnas angostas de
     escritorio; a este ancho de tarjeta (mitad de un telefono) esa altura
     deja el logo aplastado y la tarjeta con espacio muerto. Se deja crecer
     con el contenido y el logo pasa a proporcion en vez de pixeles fijos. */
  .marketing-board .marketing-card { height: auto; }
  .marketing-board .board-card-body { height: auto; min-height: 0; aspect-ratio: 16 / 9; }
  .marketing-board .board-card-meta { min-height: 0; }
}
@media (max-width: 520px) {
  /* Se mantienen 2 columnas incluso en telefonos angostos -- una sola
     columna a este ancho deja tarjetas enormes y obliga a mucho scroll para
     ver las 44 agendas de una lista larga. */
  .marketing-board .card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: .6rem; }
  /* La columna es mas angosta que en el corte de 768px -- una proporcion
     mas cuadrada deja mejor el logo que 16:9. */
  .marketing-board .board-card-body { aspect-ratio: 1 / 1; }
  .marketing-board .board-card-header { padding: .7rem 1.6rem .5rem .7rem; }
  .marketing-board .board-card-title { font-size: .82rem; }
  .marketing-board .board-card-meta { padding: .6rem .7rem; gap: .3rem .5rem; }
  .marketing-board .board-card-person, .marketing-board .board-card-assignee { font-size: .74rem; }
  .marketing-board .board-card-count { font-size: .74rem; }
}

/* ==========================================================================
   Marketing calendar
   ========================================================================== */

.marketing-calendar-page { background: transparent; }
.marketing-calendar-page .calendar-main { max-width: 1420px; }
#contenedor-calendario.marketing-calendar {
  --mc-bg: #fff; --mc-surface: #f8fafc; --mc-surface-2: #eef2f7; --mc-border: #e2e8f0;
  --mc-border-strong: #cbd5e1; --mc-text: #111827; --mc-muted: #64748b; --mc-accent: #18181b;
  --mc-accent-soft: rgba(24,24,27,.08);
  width: 100%; max-width: 1420px; min-height: 780px; margin: 0 auto 1.5rem; padding: 18px;
  border: 1px solid var(--mc-border); border-radius: 8px; background: var(--mc-bg);
  box-shadow: 0 18px 44px rgba(15,23,42,.09); color: var(--mc-text);
}
[data-theme="dark"] #contenedor-calendario.marketing-calendar {
  --mc-bg: #0f1115; --mc-surface: #151922; --mc-surface-2: #11151d; --mc-border: rgba(255,255,255,.1);
  --mc-border-strong: rgba(255,255,255,.18); --mc-text: #f8fafc; --mc-muted: #a8b0bb;
  --mc-accent: #fff; --mc-accent-soft: rgba(255,255,255,.08);
  background: radial-gradient(circle at 18% 0%, rgba(255,255,255,.055), transparent 28rem), linear-gradient(180deg,#12161e 0%,#090b0f 100%);
}
#contenedor-calendario.marketing-calendar .calendar-toolbar { display: grid; grid-template-columns: minmax(260px,1fr) auto minmax(260px,1fr); align-items: start; gap: 1rem; margin-bottom: 18px; }
.calendar-search-wrapper { position: relative; display: flex; align-items: center; max-width: 520px; }
.calendar-search-wrapper > i { position: absolute; left: 14px; z-index: 2; color: var(--mc-muted); }
.calendar-search-wrapper input { width: 100%; height: 44px; padding: .65rem 2.75rem; border: 1px solid var(--mc-border-strong); border-radius: 7px; background: var(--mc-surface); color: var(--mc-text); font-size: .92rem; }
.calendar-search-wrapper input:focus { border-color: var(--mc-accent); box-shadow: 0 0 0 3px var(--mc-accent-soft); outline: 0; }
.calendar-search-wrapper input::-webkit-search-cancel-button { display: none; }
.calendar-search-wrapper button { position: absolute; right: 7px; display: none; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--mc-muted); }
.calendar-search-wrapper button.visible { display: block; }
.search-results-count { min-height: 20px; margin-top: 8px; color: var(--mc-muted); font-size: .82rem; }
#contenedor-calendario.marketing-calendar .calendar-header { display: flex; align-items: center; justify-content: center; gap: .75rem; margin: 0; white-space: nowrap; }
#contenedor-calendario.marketing-calendar #calendar-month { min-width: 230px; padding: .45rem .75rem; border-radius: 7px; color: var(--mc-text); font-size: 1.2rem; font-weight: 800; text-align: center; }
#contenedor-calendario.marketing-calendar #calendar-month:hover { background: var(--mc-accent-soft); }
#contenedor-calendario.marketing-calendar .calendar-nav-button { width: 40px; height: 40px; padding: 0; border: 1px solid var(--mc-border-strong); border-radius: 7px; background: var(--mc-surface); color: var(--mc-text); }
#contenedor-calendario.marketing-calendar .calendar-nav-button:hover { border-color: var(--mc-accent); background: var(--mc-accent-soft); }
.calendar-view-actions { display: inline-flex; justify-content: flex-end; gap: .75rem; }
.calendar-view-toggle { overflow: hidden; border: 1px solid var(--mc-border-strong); border-radius: 8px; background: var(--mc-surface); }
.calendar-view-btn, .calendar-today-btn { min-height: 40px; padding: .45rem 1.05rem; border: 0; color: var(--mc-text); font-weight: 700; box-shadow: none; }
.calendar-view-btn + .calendar-view-btn { border-left: 1px solid var(--mc-border-strong); }
.calendar-view-btn.active, .calendar-view-btn:hover, .calendar-today-btn:hover { background: var(--mc-accent); color: var(--mc-bg); }
.calendar-today-btn { border: 1px solid var(--mc-border-strong); border-radius: 8px; background: var(--mc-surface); }
#contenedor-calendario.marketing-calendar .calendar-body { overflow: hidden; border: 1px solid var(--mc-border); border-radius: 8px; background: var(--mc-bg); }
#contenedor-calendario.marketing-calendar .calendar-days { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); margin: 0; border-bottom: 1px solid var(--mc-border); background: var(--mc-surface); }
#contenedor-calendario.marketing-calendar .calendar-day { width: auto; padding: .75rem .5rem; color: var(--mc-muted); font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
#contenedor-calendario.marketing-calendar .calendar-dates { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); }
#contenedor-calendario.citas-calendar .calendar-dates.schedule-mode { display: block; }
#contenedor-calendario.marketing-calendar .calendar-date { width: auto; min-height: 174px; max-height: 174px; padding: .48rem; border: 0; border-right: 1px solid var(--mc-border); border-bottom: 1px solid var(--mc-border); background: var(--mc-bg); color: var(--mc-text); overflow-y: auto; }
#contenedor-calendario.marketing-calendar .calendar-date[data-date] { cursor: pointer; }
#contenedor-calendario.marketing-calendar .calendar-date[data-date]:focus-visible,
#contenedor-calendario.marketing-calendar .calendar-date.is-selected {
  position: relative;
  z-index: 2;
  background: var(--mc-accent-soft);
  box-shadow: inset 0 0 0 3px var(--mc-accent);
  outline: 0;
}
#contenedor-calendario.marketing-calendar .calendar-date:nth-child(7n) { border-right: 0; }
#contenedor-calendario.marketing-calendar .calendar-date:empty { background: repeating-linear-gradient(135deg,transparent 0,transparent 8px,rgba(100,116,139,.045) 8px,rgba(100,116,139,.045) 16px),var(--mc-surface); }
#contenedor-calendario.marketing-calendar .calendar-date:not(:empty):hover { background: var(--mc-surface); box-shadow: inset 0 0 0 2px var(--mc-accent-soft); }
#contenedor-calendario.marketing-calendar .calendar-date.today { background: rgba(124,58,237,.12); border-color: var(--mc-border); box-shadow: inset 0 0 0 2px rgba(124,58,237,.62); }
#contenedor-calendario.marketing-calendar .date-number { position: sticky; top: 0; z-index: 3; display: inline-flex; width: 1.65rem; height: 1.65rem; margin-bottom: .35rem; background: transparent; color: var(--mc-text); font-size: .88rem; font-weight: 800; }
#contenedor-calendario.marketing-calendar .publicacion-button { display: flex; align-items: center; justify-content: flex-start; width: 100%; min-height: 28px; margin-top: 4px; padding: .3rem .45rem; border-radius: 6px; color: #fff; font-size: .72rem; font-weight: 800; line-height: 1.15; text-align: left; text-shadow: 0 1px 1px rgba(0,0,0,.28); box-shadow: 0 2px 8px rgba(15,23,42,.12); overflow: hidden; white-space: nowrap; text-overflow: clip; }
#contenedor-calendario.marketing-calendar .publicacion-button.search-hidden { opacity: .16; }
#contenedor-calendario.marketing-calendar .publicacion-button.search-match { outline: 3px solid rgba(250,204,21,.66); outline-offset: 1px; }
#contenedor-calendario.marketing-calendar .publicacion-button[draggable="true"] { cursor: grab; }
#contenedor-calendario.marketing-calendar .publicacion-button.is-dragging { opacity: .35; cursor: grabbing; }
#contenedor-calendario.marketing-calendar .calendar-dates.is-moving-publication { cursor: progress; }
#contenedor-calendario.marketing-calendar .calendar-dates.is-moving-publication .publicacion-button { pointer-events: none; }
#contenedor-calendario.marketing-calendar .calendar-date.is-drop-target {
  position: relative; z-index: 2; background: var(--mc-accent-soft);
  box-shadow: inset 0 0 0 2px var(--mc-accent);
}
/* Una publicacion con fecha de termino se dibuja una vez por cada dia que
   cubre -- estas formas hacen que se lea como una sola barra continua
   (redondeada donde empieza/termina, recta y pegada a los bordes de la
   celda en los dias de en medio) en vez de tarjetas sueltas repetidas. */
#contenedor-calendario.marketing-calendar .publicacion-button.pub-inicio {
  border-radius: 6px 2px 2px 6px; margin-right: -.48rem; padding-right: .7rem;
}
#contenedor-calendario.marketing-calendar .publicacion-button.pub-medio {
  border-radius: 2px; margin-right: -.48rem; margin-left: -.48rem; padding-right: .7rem; padding-left: .7rem;
}
#contenedor-calendario.marketing-calendar .publicacion-button.pub-fin {
  border-radius: 2px 6px 6px 2px; margin-left: -.48rem; padding-left: .7rem;
}
#contenedor-calendario.citas-calendar .cita-button.search-hidden,
#contenedor-calendario.citas-calendar .schedule-entry.search-hidden { opacity: .16; }
#contenedor-calendario.citas-calendar .cita-button.search-match,
#contenedor-calendario.citas-calendar .schedule-entry.search-match { outline: 3px solid rgba(250,204,21,.76); outline-offset: 1px; }
#contenedor-calendario.marketing-calendar .calendar-date.has-match { background: #fffbeb; }
#contenedor-calendario.marketing-calendar .calendar-dates.week-view .calendar-date { min-height: 620px; max-height: 620px; }
#contenedor-calendario.marketing-calendar .calendar-date.hidden-week { display: none; }
#contenedor-calendario.marketing-calendar .calendar-loading { grid-column: 1/-1; min-height: 620px; display: flex; align-items: center; justify-content: center; }

@media (max-width: 992px) {
  #contenedor-calendario.marketing-calendar .calendar-toolbar { grid-template-columns: 1fr; }
  .calendar-search-wrapper { max-width: none; }
  .calendar-view-actions { justify-content: center; }
  #contenedor-calendario.marketing-calendar .calendar-date { min-height: 148px; max-height: 148px; }
}
@media (max-width: 680px) {
  .demo-calendar-page > .container-fluid { padding-right: 8px !important; padding-left: 8px !important; }
  #contenedor-calendario.marketing-calendar { min-height: 0; margin-bottom: .75rem; padding: 8px; border-radius: 7px; }
  #contenedor-calendario.marketing-calendar .calendar-toolbar { gap: .65rem; margin-bottom: 10px; }
  #contenedor-calendario.marketing-calendar .calendar-header { display: grid; grid-template-columns: 40px minmax(0,1fr) 40px; width: 100%; }
  #contenedor-calendario.marketing-calendar #calendar-month { min-width: 0; padding: .4rem .2rem; font-size: 1rem; }
  #contenedor-calendario.marketing-calendar .calendar-view-actions { width: 100%; gap: .45rem; }
  #contenedor-calendario.marketing-calendar .calendar-view-toggle { display: flex; min-width: 0; flex: 1 1 auto; }
  #contenedor-calendario.marketing-calendar .calendar-view-btn { min-width: 0; flex: 1 1 0; padding: .4rem .45rem; font-size: .78rem; }
  #contenedor-calendario.marketing-calendar .calendar-today-btn { flex: 0 0 auto; padding: .4rem .65rem; font-size: .78rem; }
  #contenedor-calendario.marketing-calendar .calendar-day { min-width: 0; padding: .5rem .05rem; font-size: .62rem; letter-spacing: 0; }
  #contenedor-calendario.marketing-calendar .calendar-date { min-width: 0; min-height: 92px; max-height: 92px; padding: .25rem; scrollbar-width: none; }
  #contenedor-calendario.marketing-calendar .calendar-body:has(.calendar-dates.week-view) .calendar-days { display: none; }
  #contenedor-calendario.marketing-calendar .calendar-dates.week-view { grid-template-columns: 1fr; }
  #contenedor-calendario.marketing-calendar .calendar-dates.week-view .calendar-date {
    min-height: 132px;
    max-height: 132px;
    border-right: 0;
  }
  #contenedor-calendario.marketing-calendar .calendar-date::-webkit-scrollbar { display: none; }
  #contenedor-calendario.marketing-calendar .date-number { width: 1.35rem; height: 1.35rem; margin-bottom: .15rem; font-size: .72rem; }
  #contenedor-calendario.marketing-calendar .publicacion-button,
  #contenedor-calendario.citas-calendar .cita-button { min-height: 19px; height: auto; margin-top: 2px; padding: 2px 3px; border-radius: 4px; font-size: .58rem; line-height: 1.05; }
  #contenedor-calendario.marketing-calendar .publicacion-button.pub-inicio { border-radius: 4px 1px 1px 4px; margin-right: -.25rem; padding-right: .35rem; }
  #contenedor-calendario.marketing-calendar .publicacion-button.pub-medio { border-radius: 1px; margin-right: -.25rem; margin-left: -.25rem; padding-right: .35rem; padding-left: .35rem; }
  #contenedor-calendario.marketing-calendar .publicacion-button.pub-fin { border-radius: 1px 4px 4px 1px; margin-left: -.25rem; padding-left: .35rem; }
  #contenedor-calendario.citas-calendar .calendar-schedule { max-height: calc(100dvh - 190px); min-height: 450px; }
  .day-publicaciones-drawer { width: 100vw; max-width: 100vw; height: 100dvh; }
  .day-publicaciones-drawer-header { min-height: 56px; padding: .75rem 3rem .75rem .75rem; }
  .day-publicaciones-drawer-header h5 { font-size: .92rem; }
  .day-publicaciones-drawer .drawer-close-btn { right: .55rem; }
  .day-publicaciones-drawer-body { padding: .5rem; }
  .day-publicaciones-drawer .day-citas-grid { grid-template-columns: 62px minmax(0,1fr); }
  #publicacionDetailsModal .modal-dialog,
  #createPublicacionModal .modal-dialog,
  #citaDetailsModal .modal-dialog,
  #createCitaModal .modal-dialog { width: auto; max-width: none; margin: .5rem; }
}

@media (max-width: 420px) {
  .agenda-logo-slot { width: 40px; height: 40px; }
  .agenda-detail-title h2 { font-size: 1.05rem; }
  #contenedor-calendario.marketing-calendar .calendar-header { grid-template-columns: 36px minmax(0,1fr) 36px; gap: .35rem; }
  #contenedor-calendario.marketing-calendar .calendar-nav-button { width: 36px; height: 36px; }
  #contenedor-calendario.marketing-calendar #calendar-month { font-size: .88rem; }
  #contenedor-calendario.marketing-calendar .calendar-view-actions { gap: .3rem; }
  #contenedor-calendario.marketing-calendar .calendar-view-btn,
  #contenedor-calendario.marketing-calendar .calendar-today-btn { padding-right: .3rem; padding-left: .3rem; font-size: .7rem; }
  #contenedor-calendario.marketing-calendar .calendar-date { min-height: 78px; max-height: 78px; padding: .18rem; }
  #contenedor-calendario.marketing-calendar .calendar-day { font-size: .56rem; }
}

.marketing-calendar-page .day-citas-drawer { position: fixed; top: 0; left: 0; right: auto; z-index: 1065; display: flex; flex-direction: column; width: min(620px,94vw); max-width: none; height: 100vh; padding: 0; border: 0; border-radius: 0; background: #fff; color: #0f172a; box-shadow: 12px 0 32px rgba(15,23,42,.22); transform: translateX(-105%); transition: transform .25s ease; }
.marketing-calendar-page .day-citas-drawer.show { transform: translateX(0); }
.marketing-calendar-page .day-citas-drawer-header { position: relative; display: flex; align-items: center; justify-content: center; min-height: 64px; padding: 1rem 3.5rem; border-bottom: 1px solid #e5e7eb; background: linear-gradient(180deg,rgba(248,250,252,.98),rgba(255,255,255,.98)); }
.marketing-calendar-page .day-citas-drawer-header h5 { margin: 0; color: inherit; font-size: 1.05rem; font-weight: 800; text-align: center; }
.marketing-calendar-page .day-citas-drawer-header .close { position: absolute; right: 1rem; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #64748b; }
.marketing-calendar-page .day-citas-drawer-header .close:hover { background: #f1f5f9; color: #0f172a; }
.marketing-calendar-page .day-citas-drawer-body { flex: 1; overflow: auto; padding: 1rem; }
.day-publicaciones-backdrop { position: fixed; inset: 0; z-index: 1060; display: none; background: rgba(15,23,42,.35); }
.day-publicaciones-backdrop.show { display: block; }
body.marketing-day-publications-open { overflow: hidden; }
body.marketing-day-publications-open #createPublicacionModal,
body.marketing-day-publications-open #publicacionDetailsModal,
body.marketing-day-publications-open #deletePublicacionModal { z-index: 1075; }
body.marketing-day-publications-open .modal-backdrop { z-index: 1070; }
[data-theme="dark"] .marketing-calendar-page .day-citas-drawer { border-right: 1px solid rgba(255,255,255,.09); background: #111827; color: #e5e7eb; }
[data-theme="dark"] .marketing-calendar-page .day-citas-drawer-header { border-bottom-color: rgba(255,255,255,.09); background: #0f172a; }
[data-theme="dark"] .day-publicaciones-backdrop { background: rgba(0,0,0,.55); }

.marketing-publication-modal { overflow: hidden; border: 0; border-radius: 10px; box-shadow: 0 24px 60px rgba(15,23,42,.2); }
.marketing-publication-modal > .modal-header { align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid #e5e7eb; }
.marketing-publication-modal > .modal-header .modal-title { color: #212529; font-size: 1.05rem; font-weight: 700; }
.marketing-publication-actions { display: flex; align-items: center; gap: .45rem; }
.marketing-publication-actions .appointment-delete-button, .marketing-publication-actions .appointment-close-button { position: static; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border-radius: 8px; }
.marketing-publication-actions .appointment-delete-button { border: 1px solid #fecaca; background: #fff; color: #dc2626; }
[data-theme="dark"] .marketing-publication-modal { background: #111827; }
[data-theme="dark"] .marketing-publication-modal > .modal-header { border-bottom-color: rgba(255,255,255,.1); }
[data-theme="dark"] .marketing-publication-modal > .modal-header .modal-title { color: #f3f4f6; }

/* Publication details loaded inside the calendar modal. */
.publicacion-details-container { padding: .25rem; color: #212529; }
.publicacion-details-container .detail-header { display: flex; align-items: center; gap: .85rem; margin-bottom: 1rem; padding: 0 0 .85rem; border-bottom: 2px solid #007bff; }
.detail-title-mark { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: 0 0 44px; border-radius: 9px; background: var(--publication-color); color: #fff; box-shadow: 0 5px 14px color-mix(in srgb, var(--publication-color), transparent 68%); }
.detail-eyebrow { display: block; margin-bottom: .15rem; color: #6c757d; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.publicacion-details-container .detail-header h3 { margin: 0; color: #333; font-size: 1.15rem; font-weight: 700; }
.detail-date-section { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .8rem; margin-bottom: 1.25rem; padding: 1rem; border: 1px solid #dee2e6; border-radius: 8px; background: #f8f9fa; }
.detail-date-item { display: grid; grid-template-columns: 34px minmax(0,1fr); align-items: center; gap: .65rem; min-width: 0; }
.detail-date-item > i { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; background: #fff; color: #495057; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.detail-date-item label { display: block; margin: 0; color: #6c757d; font-size: .75rem; font-weight: 700; }
.detail-date-item strong { display: block; overflow: hidden; color: #343a40; font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }
.detail-color { display: inline-flex; align-items: center; gap: .4rem; color: #343a40; font-size: .82rem; font-weight: 700; }
.detail-color::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--publication-color); }
.detail-copy { margin-bottom: 1.25rem; }
.detail-section-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .55rem; color: #343a40; font-weight: 700; }
.detail-section-heading > div { display: flex; align-items: center; gap: .45rem; }
.btn-copy-publication { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .7rem; border: 1px solid #007bff; border-radius: 6px; background: transparent; color: #007bff; font-size: .78rem; font-weight: 700; }
.btn-copy-publication:hover { background: #007bff; color: #fff; }
.copy-display { min-height: 150px; padding: 15px; border: 2px dashed #dee2e6; border-radius: 8px; background: #f8f9fa; color: #495057; font-size: .95rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.observations-display { min-height: 64px; padding: 12px 14px; border: 1px solid #dee2e6; border-radius: 8px; background: #fff; color: #495057; font-size: .9rem; line-height: 1.5; white-space: pre-wrap; }
[data-theme="dark"] .publicacion-details-container { color: #e5e7eb; }
[data-theme="dark"] .publicacion-details-container .detail-header h3, [data-theme="dark"] .detail-section-heading { color: #f3f4f6; }
[data-theme="dark"] .detail-date-section, [data-theme="dark"] .copy-display { border-color: rgba(255,255,255,.12); background: #151922; color: #d1d5db; }
[data-theme="dark"] .detail-date-item > i, [data-theme="dark"] .observations-display { border-color: rgba(255,255,255,.12); background: #0f1115; color: #d1d5db; }
[data-theme="dark"] .detail-date-item strong, [data-theme="dark"] .detail-color { color: #f3f4f6; }
@media (max-width: 680px) { .detail-date-section { grid-template-columns: 1fr; } }

/* GE Creativas parity: marketing calendar drawer and publication forms. */
#contenedor-calendario.marketing-calendar .search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 520px;
}
#contenedor-calendario.marketing-calendar .search-icon {
  position: absolute;
  left: 14px;
  z-index: 2;
  color: var(--mc-muted);
  pointer-events: none;
}
#contenedor-calendario.marketing-calendar .search-input {
  height: 44px;
  padding: .65rem 2.75rem;
  border: 1px solid var(--mc-border-strong);
  border-radius: 7px;
  background: var(--mc-surface);
  color: var(--mc-text);
  font-size: .92rem;
}
#contenedor-calendario.marketing-calendar .search-input:focus {
  border-color: var(--mc-accent);
  box-shadow: 0 0 0 3px var(--mc-accent-soft);
}
#contenedor-calendario.marketing-calendar .clear-search-btn {
  position: absolute;
  right: 7px;
  z-index: 2;
  display: none;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--mc-muted);
}
#contenedor-calendario.marketing-calendar .clear-search-btn.visible { display: block; }
#contenedor-calendario.marketing-calendar .clear-search-btn:hover {
  background: var(--mc-accent-soft);
  color: var(--mc-text);
}
#contenedor-calendario.marketing-calendar .search-results-count.has-results { color: #17803d; font-weight: 700; }
#contenedor-calendario.marketing-calendar .search-results-count.no-results { color: #dc2626; font-weight: 700; }
#contenedor-calendario.marketing-calendar .calendar-loading-spinner { width: 4.5rem; height: 4.5rem; border-width: .42rem; }
#contenedor-calendario.marketing-calendar .calendar-date:nth-last-child(-n + 7) { border-bottom: 0; }
[data-theme="dark"] #contenedor-calendario.marketing-calendar .calendar-date.today {
  background: rgba(168,85,247,.16);
  box-shadow: inset 0 0 0 2px rgba(168,85,247,.76);
}

.day-publicaciones-drawer {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1065;
  display: flex;
  flex-direction: column;
  width: min(620px,94vw);
  height: 100vh;
  background: #fff;
  color: #0f172a;
  box-shadow: 12px 0 32px rgba(15,23,42,.22);
  transform: translateX(-105%);
  transition: transform .25s ease;
}
.day-publicaciones-drawer.show { transform: translateX(0); }
.day-publicaciones-drawer-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 1rem 3.5rem;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(180deg,rgba(248,250,252,.98),rgba(255,255,255,.98));
}
.day-publicaciones-drawer-header h5 {
  overflow: hidden;
  margin: 0;
  color: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.day-publicaciones-drawer .drawer-close-btn {
  position: absolute;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
}
.day-publicaciones-drawer .drawer-close-btn:hover { background: #f1f5f9; color: #0f172a; }
.day-publicaciones-drawer-body { flex: 1; overflow: auto; padding: 1rem; }
.day-publicaciones-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1060;
  display: none;
  background: rgba(15,23,42,.35);
}
.day-publicaciones-drawer-backdrop.show { display: block; }
.day-publicaciones-loading,
.publication-modal-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  min-height: 55vh;
  color: #64748b;
  font-weight: 700;
}
.day-publicaciones-drawer .day-citas-grid {
  grid-template-columns: 80px minmax(0,1fr);
  min-height: 1200px;
  border: 1px solid #e5e7eb;
  border-left: 0;
  border-radius: 8px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  background: #fff;
}
.day-publicaciones-drawer .day-schedule,
.day-publicaciones-drawer .day-citas-column { grid-template-rows: repeat(60,20px); }
.day-publicaciones-drawer .citas-day-grid .day-schedule,
.day-publicaciones-drawer .citas-day-grid .day-citas-column {
  grid-template-rows: repeat(var(--day-slot-count),20px);
}
.day-publicaciones-drawer .day-schedule [data-time] {
  pointer-events: none;
  transition: none;
}
.day-publicaciones-drawer .day-schedule .hour-label:hover,
.day-publicaciones-drawer .day-schedule .hour-placeholder:hover {
  background-color: #f8f9fa;
  cursor: default;
}
.day-publicaciones-drawer .hour-placeholder-right {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border-right: 0;
  border-left: 0;
  background: transparent;
  cursor: pointer;
}
.day-publicaciones-drawer .hour-placeholder-right.is-read-only {
  cursor: default;
  pointer-events: none;
}
.day-publicaciones-drawer .hour-placeholder-right:nth-child(4n + 1) { border-top: 1px solid #e5e7eb; }
.day-publicaciones-drawer .hour-placeholder-right:hover,
.day-publicaciones-drawer .hour-placeholder-right:focus-visible,
.day-publicaciones-drawer .hour-placeholder-right.is-selected {
  z-index: 1;
  background: rgba(24,84,164,.12);
  box-shadow: inset 3px 0 0 var(--primary-color, #1854a4);
  outline: 0;
}
.day-publicaciones-drawer .hour-placeholder-right:hover::after,
.day-publicaciones-drawer .hour-placeholder-right:focus-visible::after,
.day-publicaciones-drawer .hour-placeholder-right.is-selected::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: .65rem;
  line-height: 1;
  transform: translateY(-50%);
  color: var(--primary-color, #1854a4);
  font-weight: 800;
}
.day-publicaciones-drawer .day-schedule [data-time].is-selected {
  color: var(--primary-color, #1854a4);
  font-weight: 800;
}
.day-publicaciones-drawer .cita-entry {
  left: 2.5%;
  z-index: 2;
  display: grid;
  grid-template-columns: 52px minmax(0,1fr);
  align-items: center;
  width: 95%;
  min-height: 40px;
  padding: .35rem .55rem;
  border: 0;
  border-left: 4px solid color-mix(in srgb,var(--pub-color),#000 15%);
  border-radius: 6px;
  background-color: var(--pub-color, #0d6efd) !important;
  color: var(--pub-text-color, #fff) !important;
  text-align: left;
  box-shadow: 0 3px 9px rgba(15,23,42,.18);
}
.day-publicaciones-drawer .cita-entry:hover { filter: brightness(.94); transform: translateY(-1px); }
.day-publicaciones-drawer .cita-entry.is-shared-slot {
  grid-template-columns: minmax(0,1fr);
  align-content: center;
  gap: .05rem;
  padding: .2rem .35rem;
}
.day-publicaciones-drawer .cita-entry.is-shared-slot .cita-entry-time {
  font-size: .64rem;
  line-height: 1;
}
.day-publicaciones-drawer .cita-entry.is-shared-slot .cita-entry-title {
  font-size: .7rem;
  line-height: 1.1;
}
.cita-entry-time { font-size: .7rem; font-weight: 700; opacity: .82; }
.cita-entry-title { overflow: hidden; font-size: .78rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
body.day-publicaciones-open { overflow: hidden; }
body.day-publicaciones-open #createPublicacionModal,
body.day-publicaciones-open #publicacionDetailsModal,
body.day-publicaciones-open #deletePublicacionModal { z-index: 1075; }
body.day-publicaciones-open #citaDetailsModal,
body.day-publicaciones-open #deleteCitaModal { z-index: 1075; }
body.day-publicaciones-open #createCitaModal { z-index: 1080; }
body.day-publicaciones-open .modal-backdrop { z-index: 1070; }
[data-theme="dark"] .day-publicaciones-drawer {
  border-right: 1px solid rgba(255,255,255,.09);
  background: #111827;
  color: #e5e7eb;
  box-shadow: 12px 0 36px rgba(0,0,0,.55);
}
[data-theme="dark"] .day-publicaciones-drawer .day-schedule .hour-label:hover,
[data-theme="dark"] .day-publicaciones-drawer .day-schedule .hour-placeholder:hover {
  background-color: #111827;
}
[data-theme="dark"] .day-publicaciones-drawer-header {
  border-bottom-color: rgba(255,255,255,.09);
  background: #0f172a;
}
[data-theme="dark"] .day-publicaciones-drawer .drawer-close-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
[data-theme="dark"] .day-publicaciones-drawer-backdrop { background: rgba(0,0,0,.55); }
[data-theme="dark"] .day-publicaciones-drawer .day-citas-grid {
  border-color: rgba(255,255,255,.09);
  background: #0f172a;
}

.publication-form-modal > .modal-body { padding: 1.25rem; background: #f8fafc; }
.publication-form-header { justify-content: space-between; }
.publication-form-heading { display: flex; align-items: center; gap: .85rem; min-width: 0; }
.publication-form-heading h3,
.publication-form-heading .modal-title { margin: 0; color: #212529; font-size: 1.08rem; font-weight: 800; }
.publication-form-heading p { margin: .15rem 0 0; color: #6b7280; font-size: .82rem; }
.publication-form-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 9px;
  background: var(--publication-color,#18181b);
  color: #fff;
}
.publication-form-section {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}
.publication-section-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .9rem;
  color: #334155;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.publication-field-label { margin-bottom: .35rem; color: #475569; font-size: .8rem; font-weight: 700; }
.publication-form-section .form-control {
  border-color: #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: #111827;
}
.publication-form-section .form-control:focus { border-color: #18181b; box-shadow: 0 0 0 3px rgba(24,24,27,.08); }
.publication-fields-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .85rem; }
.publication-options-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  align-items: end;
  gap: .85rem;
  margin-top: .85rem;
}
.publication-color-field .form-control { height: 38px; padding: .2rem; cursor: pointer; }
.publication-color-tools { display: grid; grid-template-columns: minmax(0,1fr); gap: .8rem; width: 100%; margin-top: .75rem; padding: .7rem; border: 1px solid #e2e8f0; border-radius: 7px; background: #f8fafc; }
.publication-color-group { min-width: 0; }
.publication-color-group-label, .publication-color-tools-row { color: #64748b; font-size: .72rem; font-weight: 800; }
.publication-color-group-label { display: block; margin-bottom: .55rem; }
.publication-color-tools-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .5rem; }
.publication-save-color { display: inline-flex; align-items: center; gap: .3rem; padding: .28rem .5rem; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: #334155; font-size: .7rem; font-weight: 800; cursor: pointer; }
.publication-save-color:hover { border-color: #18181b; color: #18181b; }
.publication-color-swatches { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; min-height: 26px; }
.publication-color-swatch { width: 25px; height: 25px; padding: 0; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px #cbd5e1; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.publication-color-swatch:hover, .publication-color-swatch:focus-visible { transform: scale(1.12); box-shadow: 0 0 0 2px #18181b; outline: 0; }
.publication-color-empty { color: #94a3b8; font-size: .72rem; }
.publication-check {
  display: flex;
  align-items: center;
  min-height: 38px;
  margin: 0;
  padding: .5rem .7rem;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #f8fafc;
  color: #475569;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
}
.publication-check input { margin-right: .5rem; accent-color: #18181b; }
.publication-check i { margin-right: .25rem; }
.publication-copy-input { min-height: 170px; line-height: 1.5; resize: vertical; }
.publication-label-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .35rem; }
.publication-form-actions { display: flex; justify-content: flex-end; gap: .65rem; margin-top: 1.1rem; }
.publication-form-actions .btn { min-width: 132px; border-radius: 7px; font-weight: 700; }
.button-loading { display: none; }
.is-loading .button-label { display: none; }
.is-loading .button-loading { display: inline-flex; align-items: center; gap: .45rem; }
.publication-form-feedback { display: none; margin-bottom: 1rem; padding: .7rem .85rem; border: 1px solid transparent; border-radius: 7px; font-size: .85rem; font-weight: 700; }
.publication-form-feedback.show { display: block; }
.publication-form-feedback.error { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.publication-form-feedback.success { border-color: #bbf7d0; background: #f0fdf4; color: #15803d; }
.publicacion-details-container { padding: 0; }
.publicacion-details-container .publication-form-section { background: #f8fafc; }
.publication-section-title .publication-media-count { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 22px; margin-left: auto; padding: 0 .4rem; border-radius: 999px; background: #e2e8f0; color: #475569; font-size: .7rem; }
.publication-media-dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 132px; margin: 0; padding: 1rem; border: 2px dashed #cbd5e1; border-radius: 8px; background: #f8fafc; color: #64748b; text-align: center; cursor: pointer; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.publication-media-dropzone > i { margin-bottom: .35rem; color: #334155; font-size: 2rem; }
.publication-media-dropzone strong { color: #334155; font-size: .9rem; }
.publication-media-dropzone span { margin-top: .15rem; font-size: .78rem; }
.publication-media-dropzone small { margin-top: .35rem; color: #94a3b8; font-size: .68rem; }
.publication-media-dropzone:hover, .publication-media-dropzone.is-dragging { border-color: #18181b; background: #f1f5f9; transform: translateY(-1px); }
.publication-media-dropzone.is-uploading { opacity: .55; pointer-events: none; }
.publication-media-feedback { display: none; margin-top: .65rem; padding: .55rem .7rem; border-radius: 7px; font-size: .78rem; font-weight: 700; }
.publication-media-feedback.show { display: block; }
.publication-media-feedback.loading { background: #eff6ff; color: #1d4ed8; }
.publication-media-feedback.success { background: #f0fdf4; color: #15803d; }
.publication-media-feedback.error { background: #fef2f2; color: #b91c1c; }
.publication-media-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .75rem; margin-top: .85rem; }
.publication-media-card { position: relative; display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 140px; overflow: hidden; border: 1px solid #e2e8f0; border-radius: 8px; background: #0f172a; }
.publication-media-card[draggable="true"] { cursor: grab; }
.publication-media-card.is-dragging { opacity: .4; cursor: grabbing; }
.publication-media-card.is-drop-target { box-shadow: 0 0 0 2px var(--color-app-primario, #2563eb); }
.publication-media-card img, .publication-media-card video { width: 100%; height: 160px; object-fit: contain; }
.publication-media-card audio { width: calc(100% - 1rem); }
.publication-media-preview { display: block; width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.publication-media-delete { position: absolute; top: .45rem; right: .45rem; z-index: 2; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 7px; background: rgba(15,23,42,.78); color: #fff; cursor: pointer; }
.publication-media-delete:hover { background: #dc2626; }
.publication-media-file { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .45rem; min-height: 140px; width: 100%; padding: 1rem; color: #e2e8f0; text-align: center; text-decoration: none; }
.publication-media-file i { font-size: 2rem; }
.publication-media-empty { display: flex; align-items: center; justify-content: center; gap: .5rem; margin-top: .8rem; padding: .85rem; border-radius: 7px; background: #f8fafc; color: #94a3b8; font-size: .8rem; }
.publication-media-viewer { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 3.5rem 1rem 1rem; background: rgba(2,6,23,.88); }
.publication-media-viewer[hidden] { display: none !important; }
.publication-media-viewer img { max-width: min(1100px,94vw); max-height: 88vh; border-radius: 8px; object-fit: contain; box-shadow: 0 24px 70px rgba(0,0,0,.45); }
.publication-media-viewer button { position: absolute; top: 1rem; right: 1rem; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.3); border-radius: 8px; background: rgba(15,23,42,.7); color: #fff; }
[data-theme="dark"] .publication-form-modal > .modal-body { background: #0f1115; }
[data-theme="dark"] .publication-form-heading h3,
[data-theme="dark"] .publication-form-heading .modal-title { color: #f8fafc; }
[data-theme="dark"] .publication-form-section,
[data-theme="dark"] .publicacion-details-container .publication-form-section { border-color: rgba(255,255,255,.1); background: #151922; }
[data-theme="dark"] .publication-section-title,
[data-theme="dark"] .publication-field-label { color: #cbd5e1; }
[data-theme="dark"] .publication-form-section .form-control { border-color: rgba(255,255,255,.16); background: #0f1115; color: #f8fafc; }
[data-theme="dark"] .publication-check { border-color: rgba(255,255,255,.16); background: #0f1115; color: #cbd5e1; }
[data-theme="dark"] .publication-color-tools, [data-theme="dark"] .publication-media-dropzone, [data-theme="dark"] .publication-media-empty { border-color: rgba(255,255,255,.14); background: #0f1115; }
[data-theme="dark"] .publication-color-group-label, [data-theme="dark"] .publication-color-tools-row, [data-theme="dark"] .publication-media-dropzone strong, [data-theme="dark"] .publication-media-dropzone > i { color: #e2e8f0; }
[data-theme="dark"] .publication-save-color { border-color: rgba(255,255,255,.18); background: #151922; color: #e2e8f0; }
[data-theme="dark"] .publication-media-card { border-color: rgba(255,255,255,.12); }

@media (max-width: 680px) {
  #contenedor-calendario.marketing-calendar .search-input-wrapper { max-width: none; }
  .publication-fields-grid { grid-template-columns: 1fr; }
  .publication-options-grid { grid-template-columns: 1fr; }
  .publication-media-grid { grid-template-columns: 1fr; }
  .publication-form-actions { flex-direction: column-reverse; }
  .publication-form-actions .btn { width: 100%; }
  .day-publicaciones-drawer-body { padding: .65rem; }
}
/* Conversación compartida de la agenda, fuera de la grilla para que el
   calendario conserve todo el ancho disponible. */
.marketing-agenda-conversation {
  margin-top: 1rem;
}
