/* =====================================================================
   cms-editor.css
   Estilos del panel de administración / editor visual de programas
   ===================================================================== */

:root,
[data-theme="dark"],
body.theme-dark {
  --bg-dark: #090d16;
  --bg-panel: #141c2e;
  --bg-subtle: #0d1322;
  --bg-hover: #1e293b;
  --border: #1e293b;
  --border-strong: #334155;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --brand: #0284c7;
  --brand-dark: #0369a1;
  --accent: #ec4899;
  --emerald: #10b981;
  --amber: #f59e0b;
  --danger: #ef4444;
}

[data-theme="light"],
body.theme-light {
  --bg-dark: #ffffff;
  --bg-panel: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-hover: #f1f5f9;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-muted: #64748b;
  --brand: #007f96;
  --brand-dark: #006072;
  --accent: #d4145a;
  --emerald: #059669;
  --amber: #d97706;
  --danger: #dc2626;
}

* { box-sizing: border-box; }
.hidden { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-subtle);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s, color 0.2s;
}
button, input, select, textarea { font-family: inherit; }

/* ----- Top Bar (Sin desbordes ni solapamientos) ----- */
.topbar {
  min-height: 58px;
  height: auto !important;
  background: var(--bg-dark);
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  gap: 8px 14px;
  border-bottom: 1px solid #1e293b;
  z-index: 50;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.tb-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 1 auto;
  min-width: 0;
}
.tb-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}
.tb-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.tb-edit-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.tb-sep {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 4px;
  flex-shrink: 0;
}
.tb-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.01em;
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border: 0 !important;
  min-width: max-content;
  margin-right: 6px;
}
.tb-logo-img {
  height: 38px;
  width: auto;
  max-width: 220px;
  flex-shrink: 0;
  background: transparent !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  object-fit: contain;
  box-shadow: none !important;
  display: block;
}
.tb-title-input {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.16);
  color: #fff;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  min-width: 140px;
  max-width: 260px;
  flex: 1;
  height: 38px;
}
.tb-title-input::placeholder {
  color: #94a3b8;
  font-weight: 500;
  opacity: 1;
}
.tb-title-input:focus {
  outline: none;
  border-color: #38bdf8;
  background: rgba(255,255,255,0.12);
}

/* Indicador de guardado: punto + icono (check o alerta), sin texto */
.tb-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.tb-status-badge .tb-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
  display: inline-block;
  flex-shrink: 0;
}
.tb-status-badge .tb-status-ic {
  width: 12px;
  height: 12px;
  stroke: #10b981;
  display: inline-block;
  flex-shrink: 0;
}
.tb-status-badge .ic-alert {
  display: none;
}
.tb-status-badge.saving .tb-status-dot {
  background: #f59e0b;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
  animation: pulseDot 1s infinite;
}
.tb-status-badge.saving .tb-status-ic {
  stroke: #f59e0b;
}
.tb-status-badge.error {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
}
.tb-status-badge.error .tb-status-dot {
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}
.tb-status-badge.error .ic-check {
  display: none;
}
.tb-status-badge.error .ic-alert {
  display: inline-block;
  stroke: #ef4444;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

@media (max-width: 1180px) {
  .tb-right {
    width: 100%;
    justify-content: flex-start;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
  [data-theme="light"] .tb-right,
  body.theme-light .tb-right {
    border-top-color: rgba(15, 23, 42, 0.08);
  }
}
@media (max-width: 860px) {
  .tb-title-input {
    max-width: 140px;
  }
}

.tb-btn {
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  color: #e2e8f0;
  padding: 8px 15px;
  height: 38px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.15s;
}
.tb-btn:hover:not(:disabled) {
  background: rgba(255,255,255,0.14);
  color: #fff;
}
.tb-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
.tb-btn.primary {
  background: linear-gradient(135deg, #0096b2, #007f96);
  border-color: #22d3ee;
  color: #fff;
  font-weight: 700;
}
.tb-btn.primary:hover { filter: brightness(1.08); }
.tb-btn.accent {
  background: linear-gradient(135deg, #e60073, #b80d4c);
  border-color: #f472b6;
  color: #fff;
  font-weight: 700;
}
.tb-btn.accent:hover { filter: brightness(1.08); }
.tb-btn.smart-btn {
  background: linear-gradient(135deg, #059669, #047857);
  border-color: #34d399;
  color: #fff;
  font-weight: 700;
}
.tb-btn.smart-btn:hover { filter: brightness(1.08); }
.tb-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* ----- Workspace Layout & Draggable Resizer (Preview reaches very top) ----- */
.workspace {
  display: grid;
  grid-template-columns: 78px var(--editor-w, minmax(440px, 1fr)) 8px var(--preview-w, 440px);
  grid-template-rows: min-content 1fr;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}
.workspace.preview-wide {
  grid-template-columns: 78px 600px 0 1fr;
}
.workspace.preview-wide .panel-resizer {
  display: none !important;
  pointer-events: none !important;
  cursor: default !important;
}
.topbar {
  grid-column: 1 / 3;
  grid-row: 1;
}
.navrail {
  grid-column: 1;
  grid-row: 2;
}
.editor-col {
  grid-column: 2;
  grid-row: 2;
}
.panel-resizer {
  grid-column: 3;
  grid-row: 1 / 3;
  height: 100% !important;
  background: #cbd5e1;
  cursor: col-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 45;
  user-select: none;
}
.panel-resizer:hover,
.panel-resizer.dragging {
  background: var(--brand);
}
.panel-resizer-grip {
  width: 2px;
  height: 36px;
  border-radius: 99px;
  background: rgba(15, 23, 42, 0.35);
  box-shadow: 0 -8px 0 rgba(15, 23, 42, 0.25), 0 8px 0 rgba(15, 23, 42, 0.25);
}
.panel-resizer:hover .panel-resizer-grip,
.panel-resizer.dragging .panel-resizer-grip {
  background: #ffffff;
  box-shadow: 0 -8px 0 rgba(255, 255, 255, 0.7), 0 8px 0 rgba(255, 255, 255, 0.7);
}
body.resizing-panels {
  cursor: col-resize !important;
  user-select: none !important;
}
body.resizing-panels iframe {
  pointer-events: none !important;
}

/* ----- Left Navigation Rail ----- */
.navrail {
  background: #0b1220;
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  padding: 8px 6px;
  gap: 8px;
  border-right: 1px solid #1e293b;
  overflow-y: auto;
}
.nav-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-bottom: 6px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.nav-group:last-child {
  border-bottom: 0;
  margin-bottom: 0;
}
.nav-group-bottom {
  margin-top: auto;
}
.nav-group-label {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  text-align: center;
  padding: 2px 0 3px;
}
.navbtn {
  border: 0;
  background: transparent;
  color: #94a3b8;
  border-radius: 10px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.navbtn svg { width: 20px; height: 20px; }
.navbtn:hover { background: rgba(255,255,255,0.06); color: #e2e8f0; }
.navbtn.active {
  background: var(--brand);
  color: #fff;
  box-shadow: none;
}
.navbtn .badge {
  font-size: 9px;
  background: rgba(255,255,255,0.16);
  padding: 1px 5px;
  border-radius: 99px;
}

/* ----- Editor Center Column ----- */
.editor-col {
  overflow-y: auto;
  padding: 20px 24px 60px;
  background: var(--bg-subtle);
}
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 0 12px 0 !important;
}
.panel-head h2 {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.panel-head p {
  margin: 3px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* ----- Cards & Form Controls ----- */
.ecard {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: 0 1px 2px rgba(15,23,42,0.03);
}
.ecard-title {
  font-weight: 800;
  font-size: 13.5px;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #1e293b;
}
.fgrid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
}
.fgrid > * {
  min-width: 0;
}
.venue-addr-row {
  grid-column: span 12;
  display: grid;
  grid-template-columns: 1.4fr 1.4fr 1fr 1fr 0.9fr;
  gap: 10px;
  width: 100%;
}
@media (max-width: 900px) {
  .venue-addr-row {
    grid-template-columns: 1fr 1fr;
  }
}
.col-12 { grid-column: span 12; }
.col-8 { grid-column: span 8; }
.col-7 { grid-column: span 7; }
.col-6 { grid-column: span 6; }
.col-5 { grid-column: span 5; }
.col-4 { grid-column: span 4; }
.col-3 { grid-column: span 3; }
.col-2 { grid-column: span 2; }

.field {
  min-width: 0;
}
.field label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 5px;
  white-space: normal;
  line-height: 1.35;
  overflow-wrap: break-word;
  word-break: normal;
}
.field label small {
  display: block;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.25;
}
.aligned-field-lbl {
  display: flex !important;
  flex-direction: column !important;
  min-height: 38px !important;
  justify-content: flex-start !important;
  margin-bottom: 6px !important;
}
.aligned-field-lbl span {
  font-weight: 700;
  line-height: 1.25;
}
.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  background: #fff;
  border-radius: 9px;
  padding: 8px 11px;
  font-size: 13px;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 127, 150, 0.14);
}
.textarea {
  min-height: 72px;
  resize: vertical;
  line-height: 1.45;
}
.color-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.color-row input[type="color"] {
  width: 36px;
  height: 34px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 2px;
  background: #fff;
  cursor: pointer;
}

/* ----- Buttons ----- */
.btn {
  border: 1px solid var(--border-strong);
  background: #fff;
  color: #1e293b;
  padding: 7px 12px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}
.btn:hover { background: var(--bg-hover); }
.btn.brand {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn.brand:hover { background: var(--brand-dark); }
.btn.accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn.danger {
  color: var(--danger);
  border-color: #fecaca;
  background: #fef2f2;
}
.btn.danger:hover { background: #fee2e2; }
.btn.danger-solid {
  background: #dc2626;
  border-color: #b91c1c;
  color: #ffffff;
  font-weight: 800;
  padding: 8px 15px;
}
.btn.danger-solid:hover {
  background: #b91c1c;
  color: #ffffff;
}
.btn.emerald-solid {
  background: #16a34a;
  border-color: #15803d;
  color: #ffffff;
  font-weight: 800;
  padding: 8px 16px;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.28);
}
.btn.emerald-solid:hover {
  background: #15803d;
  color: #ffffff;
}
.btn-ic-cross {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}
.btn-ic-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  border-radius: 5px;
  background: #ffffff;
  color: #15803d;
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1;
}
.multiline-inp {
  min-height: 38px;
  resize: vertical;
  line-height: 1.38;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}
.btn.sm { padding: 5px 9px; font-size: 11.5px; border-radius: 7px; }
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ----- Day Pills Bar (Drag & Drop: 4 por fila, mismo tamaño) ----- */
.days-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
  align-items: stretch;
}
.days-bar .day-pill,
.days-bar .btn {
  width: 100%;
  min-width: 0;
  margin: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 11px;
  box-sizing: border-box;
  text-align: center;
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s;
}
.day-pill {
  background: #fff;
  border: 2px solid var(--border);
  font-weight: 700;
}
.day-pill:hover { border-color: #94a3b8; }
.day-pill.active {
  background: var(--c, var(--brand));
  border-color: var(--c, var(--brand));
  color: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}
.day-pill .dot-c {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c, var(--brand));
}
.day-pill.active .dot-c { background: #fff; }
.day-pill .cnt {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 99px;
  background: rgba(15,23,42,0.08);
}
.day-pill.active .cnt { background: rgba(255,255,255,0.22); }
.day-pill.drag-over {
  outline: 2px dashed var(--accent);
  transform: scale(1.03);
}

/* ----- Session Rows (Drag & Drop) ----- */
.sess-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sess-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.1s;
  width: 100%;
  box-sizing: border-box;
}
.sess-item.is-break {
  background: #f8fafc;
  border-style: dashed;
}
.sess-item.expanded {
  border-color: var(--brand);
  box-shadow: 0 8px 24px -6px rgba(0, 127, 150, 0.18);
}
.sess-item.dragging {
  opacity: 0.45;
  border-color: var(--accent);
}
.sess-item.drop-before {
  box-shadow: 0 -3px 0 0 var(--accent);
}
.sess-item.drop-after {
  box-shadow: 0 3px 0 0 var(--accent);
}
.sess-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  width: 100%;
  box-sizing: border-box;
}
.drag-handle {
  cursor: grab;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 6px;
  flex-shrink: 0;
}
.drag-handle:hover { background: var(--bg-hover); color: #475569; }
.drag-handle:active { cursor: grabbing; }
.sess-time-inp {
  width: 64px;
  flex-shrink: 0;
  border: 1px solid transparent;
  background: #f1f5f9;
  border-radius: 7px;
  padding: 5px 6px;
  font-weight: 800;
  font-size: 12.5px;
  color: var(--brand);
  text-align: center;
}
.sess-time-inp:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
}
.sess-ic-btn {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--tc, var(--brand));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  padding: 0;
}
.sess-ic-btn svg { width: 17px; height: 17px; }
.sess-ic-btn img { width: 100%; height: 100%; object-fit: cover; }
.sess-main {
  flex: 1 1 0%;
  min-width: 0;
  cursor: pointer;
}
.sess-title {
  font-weight: 700;
  font-size: 13.5px;
  color: #0f172a;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.sess-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sess-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}

/* Grilla de configuración de día (inmune a aplastamiento) */
.day-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  width: 100%;
}
.day-config-row2 {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
  align-items: flex-end;
}
.day-config-row2 .field-date {
  flex: 1.2;
  min-width: 150px;
}
.day-config-row2 .field-color {
  flex: 0 0 auto;
  min-width: 70px;
}
.day-config-row2 .field-slider {
  flex: 1.8;
  min-width: 210px;
}
.icon-btn {
  border: 0;
  background: transparent;
  color: #64748b;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.icon-btn:hover { background: var(--bg-hover); color: #0f172a; }
.icon-btn.danger:hover { background: #fee2e2; color: var(--danger); }
.icon-btn svg { width: 15px; height: 15px; }

.sess-editor {
  border-top: 1px solid var(--border);
  padding: 14px 16px 16px;
  background: #fcfdfe;
  border-radius: 0 0 12px 12px;
}

.sess-break-opt-box {
  background: #f8fafc;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 12px 14px;
}

.check-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  background: #f8fafc;
  border: 1px solid var(--border-strong);
  padding: 7px 11px;
  border-radius: 9px;
  font-size: 12px;
  color: var(--text);
  transition: all 0.15s ease;
}

/* ----- Icon Picker Grid ----- */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 6px;
  max-height: 170px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-subtle);
}
.ig-btn {
  height: 36px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #334155;
  font-size: 15px;
}
.ig-btn svg { width: 17px; height: 17px; }
.ig-btn:hover { border-color: var(--brand); color: var(--brand); }
.ig-btn.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* ----- Speaker Assignment Rows ----- */
.sp-assign-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}
.sp-assign-row {
  display: grid;
  grid-template-columns: 1fr 140px 28px;
  gap: 6px;
  align-items: center;
  background: #fff;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 9px;
}

/* ----- Drag & Drop Upload Zone ----- */
.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: 12px;
  padding: 12px;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.15s;
  cursor: pointer;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--brand);
  background: #ecfeff;
}
.dz-thumb {
  width: 64px;
  height: 48px;
  border-radius: 8px;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.dz-thumb.align-left { justify-content: flex-start; padding-left: 6px; }
.dz-thumb.align-center { justify-content: center; }
.dz-thumb.align-right { justify-content: flex-end; padding-right: 6px; }
.align-seg {
  display: inline-flex;
  background: #f1f5f9;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}
.align-seg button {
  border: 0;
  background: transparent;
  color: #64748b;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}
.align-seg button:hover { color: #0f172a; }
.align-seg button.active {
  background: var(--brand);
  color: #fff;
}
.dz-thumb.light { background: #fff; }
.dz-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.dz-info {
  flex: 1;
  min-width: 0;
}
.dz-info b {
  display: block;
  font-size: 12.5px;
  color: #1e293b;
}
.dz-info span {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
}

/* ----- Unified Header Logos Grid ----- */
.hlogos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
  gap: 14px;
}
.hlogo-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--surface, #ffffff);
  color: var(--text, #0f172a);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s, border-color 0.15s, opacity 0.15s;
}
.hlogo-card:hover {
  border-color: var(--border-strong, #cbd5e1);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}
.hlogo-card.dragging {
  opacity: 0.45;
}
.hlogo-card.drag-over {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(0, 129, 144, 0.25);
}
.hlogo-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.hlogo-badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--text, #0f172a);
  background: var(--surface-2, #f1f5f9);
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid var(--border);
}
[data-theme="dark"] .hlogo-card,
body.theme-dark .hlogo-card {
  background: #111a2e !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
}
[data-theme="dark"] .hlogo-card:hover,
body.theme-dark .hlogo-card:hover {
  border-color: #334155 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
}
[data-theme="dark"] .hlogo-badge,
body.theme-dark .hlogo-badge {
  background: #1e293b !important;
  color: #94a3b8 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

/* ----- Right Preview Column (Centrado y botón exportar abajo) ----- */
.preview-col {
  grid-column: 4;
  grid-row: 1 / 3;
  height: 100% !important;
  background: #0f172a;
  border-left: 1px solid #334155;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  z-index: 20;
}
.pv-toolbar {
  min-height: 52px;
  background: #0f172a;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  gap: 10px;
  border-bottom: 1px solid #1e293b;
  font-size: 12px;
}
.pv-sep {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 4px;
  flex-shrink: 0;
}
.pv-seg {
  display: inline-flex;
  background: #1e293b;
  padding: 3px;
  border-radius: 8px;
  gap: 2px;
}
.pv-seg button {
  border: 0;
  background: transparent;
  color: #94a3b8;
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.pv-seg button.pv-icon-btn {
  width: 32px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pv-seg button.pv-icon-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.pv-seg button.active {
  background: var(--brand);
  color: #fff;
}
.pv-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: auto;
  background: radial-gradient(circle at center, #334155 0%, #0f172a 100%);
}
.workspace.preview-wide .pv-stage {
  padding: 10px;
}
.pv-bottom-bar {
  min-height: 60px;
  background: #0f172a;
  border-top: 1px solid #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  z-index: 25;
}
.pv-export-btn,
.fucsia-btn {
  width: 390px;
  max-width: 100%;
  height: 42px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  transition: width 0.25s ease, background 0.15s ease;
  background: #d4145a !important;
  border: 1px solid #be124e !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(212, 20, 90, 0.35) !important;
}
.pv-export-btn:hover,
.fucsia-btn:hover {
  background: #be124e !important;
  color: #ffffff !important;
}
.workspace.preview-wide .pv-export-btn {
  width: 100%;
}
/* =====================================================================
   MOCKUPS CELULAR (DEMOSTRACIÓN INICIAL vs EDICIÓN REAL)
   ===================================================================== */
.pv-demo-wrap {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: relative;
  padding: 10px;
}
.pv-stage.is-demo .pv-demo-wrap {
  display: flex;
}
.pv-stage.is-demo #pvFrameWrap {
  display: none !important;
}
.pv-demo-img {
  max-height: 94%;
  max-width: 95%;
  object-fit: contain;
  filter: drop-shadow(0 20px 45px rgba(0, 0, 0, 0.65));
  transition: transform 0.25s;
}

/* Contenedor del mockup interactivo */
.pv-frame-wrap {
  position: relative;
  height: 94%;
  aspect-ratio: 400 / 840;
  max-width: 95%;
  background: transparent !important;
  box-shadow: none !important;
  display: flex;
  flex-direction: column;
  margin: auto;
  transition: width 0.25s, height 0.25s;
  overflow: visible;
}

/* Mockup Android */
.pv-frame-wrap.os-android {
  aspect-ratio: 400 / 840;
  height: 94%;
  border-radius: 42px;
}

/* Mockup iOS */
.pv-frame-wrap.os-ios {
  aspect-ratio: 400 / 840;
  height: 94%;
  border-radius: 48px;
}

/* Modo Escritorio */
.pv-frame-wrap.desktop {
  aspect-ratio: auto;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  border-radius: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  background: #ffffff !important;
}

/* Capa de overlay con el marco vectorial real del teléfono */
.pv-frame-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  filter: drop-shadow(0 20px 45px rgba(0, 0, 0, 0.65));
}
.mockup-img-android,
.mockup-img-ios {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
  pointer-events: none;
}
.pv-frame-wrap.os-android .mockup-img-android {
  display: block;
}
.pv-frame-wrap.os-ios .mockup-img-ios {
  display: block;
}
.pv-frame-wrap.desktop .pv-frame-overlay {
  display: none !important;
}

.pv-frame-wrap .pv-iframe {
  position: absolute;
  top: 1.43%;
  left: 3%;
  width: 94%;
  height: 97.14%;
  border: 0;
  background: #ffffff;
  box-sizing: border-box;
}
.pv-frame-wrap.os-android .pv-iframe {
  padding-top: 36px;
  padding-bottom: 40px;
  border-radius: 34px;
}
.pv-frame-wrap.os-ios .pv-iframe {
  padding-top: 38px;
  padding-bottom: 30px;
  border-radius: 40px;
}
.pv-frame-wrap.desktop .pv-iframe {
  position: static;
  inset: auto;
  width: 100%;
  height: 100%;
  padding: 0 !important;
  border-radius: 0 !important;
}

.btn-close-raw {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #64748b !important;
  font-size: 18px;
  font-weight: 700;
  padding: 4px 8px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s, transform 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-close-raw:hover {
  color: #0f172a !important;
  transform: scale(1.15);
}

/* ----- People Cards ----- */
.person-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.person-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.person-av {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
}
.person-av img { width: 100%; height: 100%; object-fit: cover; }

/* ----- Toggle Switch ----- */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.switch-row:last-child { border-bottom: 0; }

/* ----- Editor Toast ----- */
.cms-toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translate(-50%, 10px);
  background: #0f172a;
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 15px 30px rgba(0,0,0,0.35);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s;
  z-index: 100;
}
.cms-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ----- Modal Crear Nuevo Programa ----- */
.cms-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 95;
  padding: 16px;
}
.cms-modal-backdrop.hidden {
  display: none;
}
.cms-modal {
  background: #fff;
  border-radius: 18px;
  max-width: 540px;
  width: 100%;
  padding: 22px 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border);
}
.cms-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.cms-modal-head h3 {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  font-weight: 800;
}
.cms-modal-sub {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}
.cms-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* ----- Icon-Only Topbar Buttons & Instant Tooltips ----- */
.tb-btn.icon-only {
  width: 38px;
  height: 38px;
  padding: 0;
  justify-content: center;
  position: relative;
}
.tb-btn.icon-only svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
[data-tooltip] {
  position: relative;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid #334155;
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  transition: opacity 0.14s ease, transform 0.14s ease;
  z-index: 99999 !important;
}
[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ----- PDF Icon Without Container ----- */
.pdf-dz-icon {
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pdf-dz-icon svg {
  width: 44px;
  height: 44px;
}

/* ----- QR Export Box ----- */
.qr-export-box {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}
.qr-preview-box {
  width: 132px;
  height: 132px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}
.qr-preview-box svg {
  width: 100%;
  height: 100%;
  display: block;
}
.qr-export-actions {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.qr-export-actions b {
  font-size: 13.5px;
  color: #0f172a;
}
.qr-export-actions span {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.4;
}

/* ----- Gradient Presets & Interactive Builder ----- */
.grad-split-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.25fr) minmax(280px, 1fr);
  gap: 16px;
  align-items: flex-start;
  margin-top: 6px;
}
@media (max-width: 960px) {
  .grad-split-grid {
    grid-template-columns: 1fr;
  }
}
.grad-presets-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}
.grad-presets-box label {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}
.grad-presets-wrap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
@media (max-width: 860px) {
  .grad-presets-wrap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .grad-presets-wrap {
    grid-template-columns: 1fr;
  }
}
.grad-preset-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 8px 12px;
  font-size: 12px;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.grad-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  border: 1.5px solid rgba(15, 23, 42, 0.18);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.35);
}
.grad-builder-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  margin-top: 0;
}
.grad-builder-row {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}
.grad-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.grad-field-dir {
  flex: 1;
  min-width: 190px;
}
.grad-lbl {
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
  min-height: 16px;
  white-space: nowrap;
}
.grad-lbl input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--brand);
  cursor: pointer;
}
.grad-color-inp {
  width: 66px;
  height: 38px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 3px;
  background: #fff;
  cursor: pointer;
  display: block;
}
.grad-color-inp:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.grad-dir-sel {
  height: 38px;
  width: 100%;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: #fff;
  font-size: 13px;
  color: #0f172a;
}
.grad-live-pill {
  width: 44px;
  height: 38px;
  border-radius: 9px;
  border: 1.5px solid rgba(15, 23, 42, 0.2);
  flex-shrink: 0;
  box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.3);
}

/* ----- Speaker Photo Column & Vertical Dropzone (Foto 5) ----- */
.person-photo-col {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.person-photo-dz {
  width: 100%;
  flex: 1;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding: 22px 14px !important;
  min-height: 200px;
}
.person-photo-dz .person-drop-av {
  width: 84px !important;
  height: 84px !important;
  font-size: 24px !important;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.22);
}
.person-photo-dz .dz-info {
  flex: 0 0 auto;
  text-align: center;
}
.person-photo-dz .dz-info b {
  display: block;
  font-size: 12.5px;
  color: #0f172a;
  margin-bottom: 3px;
}
.person-photo-dz .dz-info span {
  font-size: 11px;
  color: var(--text-muted);
}

/* ----- Sponsor Groups / Categories (Foto 2) ----- */
.sgrp-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sgrp-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sgrp-head {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.sgrp-body {
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}
.sgrp-pick-lbl {
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
}
.sgrp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sgrp-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px 5px 7px;
  border-radius: 999px;
  border: 1.5px solid var(--border-strong);
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.sgrp-chip:hover {
  border-color: var(--brand);
}
.sgrp-chip.active {
  background: #f0fdfa;
  border-color: var(--brand);
  color: #0f766e;
  box-shadow: 0 1px 3px rgba(13, 148, 136, 0.14);
}
.sgrp-chip-thumb {
  width: 28px;
  height: 20px;
  border-radius: 5px;
  background: #fff;
  border: 1px solid #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 2px;
  flex-shrink: 0;
}
.sgrp-chip-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.sgrp-chip-chk {
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
}
.sgrp-chip.active .sgrp-chip-chk {
  color: var(--brand);
}
.sgrp-assigned-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sgrp-member-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 7px 10px;
}
.sgrp-member-name {
  font-size: 12.5px;
  color: #0f172a;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sgrp-move-sel {
  width: auto;
  min-width: 165px;
  padding: 4px 8px;
  font-size: 11.5px;
  height: 30px;
}

/* ----- Desktop Exclusive Mode Card ----- */
.desk-mode-card {
  border: 2px solid #0284c7;
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 65%);
  box-shadow: 0 8px 22px -8px rgba(2, 132, 199, 0.22);
}
.desk-badge {
  background: #0284c7;
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 999px;
}

/* ----- Speaker Photo Manual Framing & Icon Actions ----- */
.icon-btn.brand {
  background: var(--brand);
  color: #fff;
}
.icon-btn.brand:hover {
  background: var(--brand-dark);
  color: #fff;
}
.crop-controls-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.crop-row {
  display: grid;
  grid-template-columns: 72px 1fr 42px;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: #334155;
  font-weight: 600;
}
.crop-row input[type="range"] {
  width: 100%;
  accent-color: var(--brand);
  cursor: pointer;
}
.crop-row span:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--brand);
  font-weight: 700;
}
.person-av.no-photo {
  background: #e2e8f0;
  color: #64748b;
  font-size: 11px;
}

/* ----- Global Drag-and-Drop Overlay & Smart Importer Modal ----- */
.global-drop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  pointer-events: none;
}
.global-drop-overlay.hidden {
  display: none;
}
.gdo-box {
  border: 3px dashed #38bdf8;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 24px;
  padding: 42px 36px;
  max-width: 640px;
  text-align: center;
  color: #fff;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}
.gdo-icon {
  font-size: 52px;
  margin-bottom: 12px;
}
.gdo-box h3 {
  margin: 0 0 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 22px;
  font-weight: 800;
}
.gdo-box p {
  margin: 0;
  font-size: 14px;
  color: #cbd5e1;
  line-height: 1.5;
}

.si-modal {
  max-width: 1080px !important;
  width: 96vw !important;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  padding: 20px 24px !important;
}
.si-body {
  flex: 1;
  overflow-y: auto;
  padding-right: 6px;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.si-guide-box {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12px;
  color: #0c4a6e;
}
.si-guide-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.si-code-tag {
  background: #fff;
  border: 1px solid #7dd3fc;
  border-radius: 7px;
  padding: 3px 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: #0369a1;
}
.si-code-tag small {
  font-weight: 500;
  color: #475569;
}
.si-drop-banner {
  border: 2px dashed var(--brand);
  background: #f0fdfa;
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  transition: all 0.15s;
}
.si-drop-banner.dragover {
  background: #ccfbf1;
  border-color: #0d9488;
  transform: scale(1.005);
}
.si-section-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
}
.si-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.si-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 800;
  color: #0f172a;
}
.si-asset-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 7px 10px;
}
.si-asset-thumb {
  width: 58px;
  height: 38px;
  border-radius: 6px;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.si-asset-thumb.light {
  background: #fff;
}
.si-asset-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.si-day-card {
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.si-sess-row {
  display: grid;
  grid-template-columns: 74px 135px 1fr 220px 28px;
  gap: 6px;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px dashed #e2e8f0;
}
.si-sess-row:last-child {
  border-bottom: 0;
}

/* Modal de Bienvenida Esclavo del IAPG */
.welcome-badge-icon {
  width: 44px;
  height: 44px;
  border-radius: 0;
  background: transparent !important;
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: none !important;
  border: none !important;
}
.devil-badge {
  background: transparent !important;
  box-shadow: none !important;
}
.devil-emoji {
  font-size: 28px;
  line-height: 1;
}
.welcome-modal .cms-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.welcome-title {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(12px, 3.2vw, 19px);
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
}
.welcome-subtitle {
  margin: 3px 0 0;
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}
.welcome-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 760px) {
  .welcome-grid {
    grid-template-columns: 1fr;
  }
}
.welcome-card-sq {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 16px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  min-height: 200px;
  justify-content: flex-start;
  gap: 12px;
}
.welcome-card-sq:hover {
  border-color: #ef4444;
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.15);
  background: #fff8f8;
}
.welcome-card-sq .welcome-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.welcome-card-sq .welcome-card-icon svg {
  width: 26px;
  height: 26px;
}
.welcome-card-icon.brand-ic {
  background: #e0f2fe;
  color: #0284c7;
}
.welcome-card-icon.green-ic {
  background: #dcfce7;
  color: #059669;
}
.welcome-card-icon.purple-ic {
  background: #f3e8ff;
  color: #9333ea;
}
.welcome-card-sq .welcome-card-content h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}
.welcome-card-sq .welcome-card-content p {
  margin: 6px 0 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
}
.welcome-foot.center {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}

/* Responsive: cuando el panel es estrecho, botones de acciones solo muestran icono */
.sch-top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
@media (max-width: 1220px) {
  .sch-top-actions .btn .btn-lbl {
    display: none;
  }
  .sch-top-actions .btn {
    padding: 7px 9px;
  }
}
/* Responsive de los botones de día: cuando hay poco espacio muestran dot y n de día */
.day-num-short {
  display: none;
}
@media (max-width: 1120px) {
  .day-label-full {
    display: none;
  }
  .day-num-short {
    display: inline;
  }
  .day-pill {
    padding: 6px 10px;
    gap: 6px;
  }
}

/* Sección de Configuración de Código QR */
.qr-split-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  width: 100%;
}
.qr-controls-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.qr-preview-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
@media (max-width: 860px) {
  .qr-split-layout {
    grid-template-columns: 1fr;
  }
}
.qr-preview-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}
.qr-box-inner {
  width: 260px;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #f8fafc;
  border: 1.5px dashed var(--border-strong);
  overflow: hidden;
  padding: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}
.qr-box-inner svg {
  max-width: 100%;
  max-height: 100%;
  display: block;
}
.qr-style-btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.qr-style-btn {
  flex: 1;
  min-width: 85px;
  padding: 8px 10px;
  border: 1.5px solid var(--border-strong);
  background: #ffffff;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #334155;
  transition: all 0.15s ease;
}
.qr-style-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: #f0f9ff;
}
.qr-style-btn.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
}

/* Encabezados con icono de referencia a 1 solo color */
.panel-head h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.sec-head-ic {
  width: 22px;
  height: 22px;
  stroke: var(--brand);
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

/* Alineación de títulos de logos en Portada */
.logo-title-wrap {
  min-height: 42px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  margin-bottom: 6px;
}
.logo-title-main {
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
  line-height: 1.25;
}
.logo-title-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.2;
}

/* Visual Range Slider Rows */
.visual-slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  margin-top: 8px;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}
.visual-slider-row .slider-lbl {
  font-size: 11.5px;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
  flex-shrink: 0;
}
.visual-slider-row input[type="range"] {
  flex: 1;
  min-width: 50px;
  accent-color: var(--brand);
  height: 6px;
  cursor: pointer;
}
.visual-slider-row .slider-val {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--brand);
  min-width: 46px;
  text-align: right;
  flex-shrink: 0;
}

/* Previsualización del logo de Sponsor completa en el editor */
.dropzone[data-drop-sponsor] .dz-thumb {
  width: 110px !important;
  height: 64px !important;
  padding: 6px !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
}
.dropzone[data-drop-sponsor] .dz-thumb img {
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  display: block !important;
}

/* Alineación vertical de todos los paneles en Modo Escritorio */
.workspace.preview-desktop .pv-mobile-only {
  display: none !important;
}
.workspace.preview-desktop .editor-col {
  max-width: 100%;
}
.workspace.preview-desktop .days-bar .btn-lbl,
.workspace.preview-desktop .sch-top-actions .btn-lbl {
  display: none !important;
}
.workspace.preview-desktop .days-bar .day-label-full {
  display: none !important;
}
.workspace.preview-desktop .days-bar .day-num-short {
  display: inline !important;
}
.workspace.preview-desktop .sch-top-actions .btn {
  padding: 7px 10px !important;
}
.workspace.preview-desktop .venue-addr-row {
  grid-column: span 12;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
  gap: 10px;
  width: 100%;
}
.workspace.preview-desktop .bg-dual-row,
.workspace.preview-wide .bg-dual-row {
  grid-template-columns: 1fr !important;
}
.workspace.preview-desktop .floating-sliders-grid .col-6,
.workspace.preview-wide .floating-sliders-grid .col-6 {
  grid-column: span 12 !important;
}
.workspace.preview-desktop .qr-split-layout,
.workspace.preview-wide .qr-split-layout {
  grid-template-columns: 1fr !important;
}
.workspace.preview-desktop .qr-preview-card,
.workspace.preview-wide .qr-preview-card {
  height: auto !important;
}

.btn-plus {
  font-weight: 800;
  font-size: 14px;
  margin-right: 4px;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
}

.home-org-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 30px 0 16px;
  margin-top: auto;
  width: 100%;
}
.home-org-logo {
  max-height: 52px;
  max-width: 260px;
  object-fit: contain;
  opacity: 0.88;
  transition: opacity 0.2s, transform 0.2s;
}
.home-org-logo:hover {
  opacity: 1;
  transform: scale(1.02);
}

.favicon-sq-dz {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
}
.favicon-sq-thumb {
  width: 52px !important;
  height: 52px !important;
  border-radius: 12px !important;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border: 1px solid var(--border-strong);
}
.favicon-sq-thumb img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

/* =====================================================================
   PANTALLA DE INICIO (HOME VIEW) - DISEÑO ORIGINAL Y ESPACIOSO
   ===================================================================== */
.editor-col.is-home {
  padding: 0 !important;
  overflow: hidden !important;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.home-wrap {
  position: relative;
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 26px 24px 0;
  background-image: url('../recursos/bg-home.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;
}
.home-bg-overlay {
  position: absolute;
  inset: 0;
  background: rgba(248, 250, 252, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
  z-index: 0;
}
[data-theme="dark"] .home-bg-overlay,
body.theme-dark .home-bg-overlay {
  background: rgba(9, 13, 22, 0.90);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.home-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 1080px;
  margin: 0 auto;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  box-sizing: border-box;
}
.home-head {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 24px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}
.home-head > div:last-child {
  min-width: 0;
  flex: 1;
}
.home-title {
  margin: 0;
  font-size: 19px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.home-subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}
.home-actions-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}
@media (max-width: 900px) {
  .home-actions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  .home-actions-grid {
    grid-template-columns: 1fr;
  }
}
.home-act-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
  outline: none;
}
.home-act-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand);
  box-shadow: 0 8px 18px -4px rgba(0, 127, 150, 0.2);
}
.home-act-card:active {
  transform: translateY(0);
}
.home-act-ic {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.home-act-ic svg {
  width: 22px;
  height: 22px;
}
.home-act-ic.brand-ic { background: #e0f2fe; color: #0284c7; }
.home-act-ic.green-ic { background: #dcfce7; color: #16a34a; }
.home-act-ic.purple-ic { background: #f3e8ff; color: #9333ea; }
.home-act-ic.blue-ic { background: #e0f7fa; color: #007f96; }
.home-act-card h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}
.home-act-card p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--text-muted);
}
.home-recents-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
}
.home-recents-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.home-recents-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}
.home-recents-head p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}
.home-recents-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 14px;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 2px 4px 8px 2px;
  scrollbar-width: thin;
}
@media (max-width: 640px) {
  .home-recents-grid {
    grid-template-columns: 1fr;
  }
}
.home-proj-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
  transition: transform 0.15s, box-shadow 0.15s;
}
.home-proj-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -4px rgba(15, 23, 42, 0.12);
}
.home-proj-screen {
  height: 120px;
  position: relative;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.home-proj-logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90%;
  max-height: 80px;
  transition: transform 0.2s;
  z-index: 1;
}
.home-proj-card:hover .home-proj-logo-box {
  transform: scale(1.04);
}
.home-proj-event-logo {
  max-height: 64px;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.45));
}
.home-proj-logo-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  text-align: center;
  line-height: 1.25;
  padding: 4px 10px;
}
.home-proj-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
  gap: 8px;
}
.home-proj-body h4 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
}
.home-proj-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.home-proj-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 4px;
}
.home-proj-actions .btn {
  flex: 1;
  padding: 6px 10px;
  font-size: 11.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}
.home-proj-actions .icon-btn {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.home-org-footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 10px 4px 8px;
  width: 100%;
  flex-shrink: 0;
  gap: 16px;
}
.home-org-logo {
  max-height: 40px;
  max-width: 220px;
  object-fit: contain;
  opacity: 0.9;
  transition: opacity 0.2s;
}
.home-org-logo:hover {
  opacity: 1;
}
.home-copyright-text {
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
  line-height: 1.3;
  min-width: 0;
}

[data-theme="dark"] .home-head,
body.theme-dark .home-head,
[data-theme="dark"] .home-act-card,
body.theme-dark .home-act-card,
[data-theme="dark"] .home-proj-card,
body.theme-dark .home-proj-card {
  background: #111a2e !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
}
[data-theme="dark"] .home-title,
body.theme-dark .home-title,
[data-theme="dark"] .home-act-card h3,
body.theme-dark .home-act-card h3,
[data-theme="dark"] .home-recents-head h2,
body.theme-dark .home-recents-head h2,
[data-theme="dark"] .home-proj-body h4,
body.theme-dark .home-proj-body h4 {
  color: #f8fafc !important;
}

/* =====================================================================
   FONDO DUAL: DEGRADADO A LA IZQUIERDA, IMAGEN A LA DERECHA (EN LA MISMA LÍNEA)
   ===================================================================== */
.bg-dual-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
  margin-top: 8px;
}
@media (max-width: 900px) {
  .bg-dual-row {
    grid-template-columns: 1fr;
  }
}
.bg-dual-col {
  background: var(--surface, #ffffff);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.bg-dual-col.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand), 0 4px 16px rgba(0, 127, 150, 0.12);
  opacity: 1;
}
.bg-dual-col.inactive {
  opacity: 0.52;
  filter: grayscale(15%);
  border-color: var(--border);
}
.bg-dual-col.inactive:hover {
  opacity: 0.85;
}
.bg-dual-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface-2, #f8fafc);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}
.bg-dual-col.active .bg-dual-header {
  background: rgba(0, 127, 150, 0.12);
  border-bottom-color: rgba(0, 127, 150, 0.25);
}
.bg-dual-radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--text, #0f172a);
}
.bg-dual-radio input {
  cursor: pointer;
  accent-color: var(--brand);
  width: 16px;
  height: 16px;
}
.bg-status-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  color: var(--text-muted);
  background: var(--surface, #ffffff);
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.bg-dual-col.active .bg-status-badge {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}
.bg-dual-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
[data-theme="dark"] .bg-dual-col,
body.theme-dark .bg-dual-col {
  background: #111a2e;
  border-color: #1e293b;
}
[data-theme="dark"] .bg-dual-col.active,
body.theme-dark .bg-dual-col.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand), 0 4px 16px rgba(0, 127, 150, 0.25);
}
[data-theme="dark"] .bg-dual-header,
body.theme-dark .bg-dual-header {
  background: #0d1527;
  border-bottom-color: #1e293b;
}
[data-theme="dark"] .bg-dual-col.active .bg-dual-header,
body.theme-dark .bg-dual-col.active .bg-dual-header {
  background: rgba(0, 127, 150, 0.18);
  border-bottom-color: rgba(0, 127, 150, 0.35);
}
[data-theme="dark"] .bg-status-badge,
body.theme-dark .bg-status-badge {
  background: #1e293b;
  border-color: #27354f;
  color: #94a3b8;
}
.sgrp-style-toolbar {
  margin: 10px 0 12px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 9px;
}
.desk-editor-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(15,23,42,0.15);
  font-size: 12px;
}
.desk-badge {
  background: #007f96;
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 11px;
  white-space: nowrap;
}

/* =====================================================================
   SELECTOR DE MODO DE FONDO (DEGRADADO / IMAGEN)
   ===================================================================== */
.bg-mode-tabs {
  display: inline-flex;
  background: #f1f5f9;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 3px;
  gap: 4px;
  margin-bottom: 12px;
}
.bg-mode-tab {
  border: 0;
  background: transparent;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.bg-mode-tab:hover { color: #0f172a; }
.bg-mode-tab.active {
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 127, 150, 0.35);
}

/* =====================================================================
   BARRA DESLIZADORA DE ALINEACIÓN VISUAL (3 POSICIONES)
   ===================================================================== */
.align-3pos-track {
  background: #f1f5f9;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 3px;
  display: inline-flex;
  width: 100%;
  max-width: 310px;
  box-sizing: border-box;
  margin-top: 5px;
}
.align-3pos-track.sm {
  max-width: 210px;
  padding: 2px;
}
.align-3pos-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  gap: 2px;
}
.align-3pos-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 8px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.align-3pos-track.sm .align-3pos-dot {
  padding: 4px 6px;
  font-size: 11px;
}
.align-3pos-dot:hover {
  color: #0f172a;
}
.align-3pos-dot.active {
  background: var(--brand);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 127, 150, 0.35);
}
.align-3pos-ic {
  font-size: 12px;
  line-height: 1;
}

/* =====================================================================
   PANTALLA PDF CENTRADA Y ENGRANDECIDA
   ===================================================================== */
.pdf-center-card {
  min-height: 440px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 36px 20px;
}
.pdf-hero-dropzone {
  width: 100%;
  max-width: 600px;
  padding: 36px 24px;
  border: 2px dashed var(--brand);
  border-radius: 16px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.pdf-hero-dropzone:hover {
  background: #f0fdf4;
  border-color: #10b981;
  transform: scale(1.01);
}
.pdf-hero-icon {
  width: 54px;
  height: 54px;
  color: var(--brand);
  background: #e0f7fa;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pdf-hero-icon svg {
  width: 28px;
  height: 28px;
}
.pdf-hero-fields {
  width: 100%;
  max-width: 600px;
  margin-top: 18px;
  text-align: left;
}

/* Grilla vertical de colores y preajustes */
.grad-split-vertical {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}
.grad-presets-3col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}
@media (max-width: 720px) {
  .grad-presets-3col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  .grad-presets-3col {
    grid-template-columns: 1fr;
  }
}

/* =====================================================================
   BOTÓN Y ESTILOS DE TEMA CLARO Y MODO OSCURO
   ===================================================================== */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  cursor: pointer;
  transition: all 0.2s ease;
  color: #f8fafc;
}
.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.04);
}
.theme-icon.sun {
  color: #fbbf24;
}
.theme-icon.moon {
  color: #94a3b8;
}

/* ----------------- MODO OSCURO (DARK MODE) ----------------- */
[data-theme="dark"] .topbar,
body.theme-dark .topbar {
  background: #090d16;
  border-bottom: 1px solid #1e293b;
  color: #f8fafc;
}
[data-theme="dark"] .tb-brand,
body.theme-dark .tb-brand {
  border-right-color: #1e293b;
}
[data-theme="dark"] .tb-title-input,
body.theme-dark .tb-title-input {
  background: #0f172a;
  color: #f8fafc;
  border-color: #334155;
}
[data-theme="dark"] .tb-title-input:focus,
body.theme-dark .tb-title-input:focus {
  border-color: #38bdf8;
  background: #131c2e;
}
[data-theme="dark"] .tb-btn,
body.theme-dark .tb-btn {
  background: rgba(255, 255, 255, 0.06);
  border-color: #1e293b;
  color: #cbd5e1;
}
[data-theme="dark"] .tb-btn:hover,
body.theme-dark .tb-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}
[data-theme="dark"] .navrail,
body.theme-dark .navrail {
  background: #070a12;
  border-right: 1px solid #1e293b;
}
[data-theme="dark"] .navbtn,
body.theme-dark .navbtn {
  color: #94a3b8;
}
[data-theme="dark"] .navbtn:hover,
body.theme-dark .navbtn:hover {
  background: #141c2e;
  color: #f8fafc;
}
[data-theme="dark"] .navbtn.active,
body.theme-dark .navbtn.active {
  background: rgba(2, 132, 199, 0.2);
  color: #38bdf8;
}
[data-theme="dark"] .editor-col,
body.theme-dark .editor-col {
  background: #0b111e;
  color: #f8fafc;
}
[data-theme="dark"] .ecard,
[data-theme="dark"] .home-head,
[data-theme="dark"] .home-act-card,
[data-theme="dark"] .home-proj-card,
[data-theme="dark"] .cms-modal,
body.theme-dark .ecard,
body.theme-dark .home-head,
body.theme-dark .home-act-card,
body.theme-dark .home-proj-card,
body.theme-dark .cms-modal {
  background: #131b2e;
  border-color: #1e293b;
  color: #f8fafc;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .panel-head,
body.theme-dark .panel-head {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 0 12px 0 !important;
}
[data-theme="dark"] .ecard-title,
[data-theme="dark"] .panel-head h2,
[data-theme="dark"] .home-title,
[data-theme="dark"] .home-act-card h3,
[data-theme="dark"] .home-recents-head h2,
[data-theme="dark"] .home-proj-body h4,
[data-theme="dark"] .cms-modal-head h3,
body.theme-dark .ecard-title,
body.theme-dark .panel-head h2,
body.theme-dark .home-title,
body.theme-dark .home-act-card h3,
body.theme-dark .home-recents-head h2,
body.theme-dark .home-proj-body h4,
body.theme-dark .cms-modal-head h3 {
  color: #f8fafc;
}
[data-theme="dark"] .field label,
body.theme-dark .field label {
  color: #cbd5e1;
}
[data-theme="dark"] .input,
[data-theme="dark"] .select,
[data-theme="dark"] .textarea,
body.theme-dark .input,
body.theme-dark .select,
body.theme-dark .textarea {
  background: #0a0f1b;
  border-color: #27354f;
  color: #f8fafc;
}
[data-theme="dark"] .input:focus,
[data-theme="dark"] .select:focus,
[data-theme="dark"] .textarea:focus,
body.theme-dark .input:focus,
body.theme-dark .select:focus,
body.theme-dark .textarea:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}
[data-theme="dark"] .dropzone,
body.theme-dark .dropzone {
  background: #0a0f1b;
  border-color: #27354f;
  color: #cbd5e1;
}
[data-theme="dark"] .dropzone:hover,
body.theme-dark .dropzone:hover {
  background: #141c2e;
  border-color: #38bdf8;
}
[data-theme="dark"] .sch-card,
[data-theme="dark"] .person-card,
[data-theme="dark"] .sponsor-group,
body.theme-dark .sch-card,
body.theme-dark .person-card,
body.theme-dark .sponsor-group {
  background: #0e1525;
  border-color: #1e293b;
  color: #f8fafc;
}
[data-theme="dark"] .panel-resizer,
body.theme-dark .panel-resizer {
  background: #1e293b;
}

/* Modificadores de Modo Oscuro para Campos, Preajustes y Sliders (Foto 1) */
[data-theme="dark"] .grad-presets-box,
[data-theme="dark"] .grad-builder-box,
body.theme-dark .grad-presets-box,
body.theme-dark .grad-builder-box {
  background: #0d1527 !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
}

[data-theme="dark"] .grad-presets-box label,
body.theme-dark .grad-presets-box label,
[data-theme="dark"] .grad-lbl,
body.theme-dark .grad-lbl {
  color: #cbd5e1 !important;
}

[data-theme="dark"] .grad-preset-btn,
body.theme-dark .grad-preset-btn {
  background: #141c2e !important;
  border: 1px solid #27354f !important;
  color: #e2e8f0 !important;
}

[data-theme="dark"] .grad-preset-btn:hover,
body.theme-dark .grad-preset-btn:hover {
  background: #1e293b !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .visual-slider-row,
body.theme-dark .visual-slider-row {
  background: #0a0f1b !important;
  border: 1px solid #1e293b !important;
  color: #f8fafc !important;
}

[data-theme="dark"] .visual-slider-row .slider-lbl,
body.theme-dark .visual-slider-row .slider-lbl {
  color: #94a3b8 !important;
}

/* Modificadores de Modo Oscuro para Botones Generales y Días (Foto 2) */
[data-theme="dark"] .btn,
body.theme-dark .btn {
  background: #141c2e;
  border-color: #27354f;
  color: #f8fafc;
}

[data-theme="dark"] .btn:hover,
body.theme-dark .btn:hover {
  background: #1e293b;
  border-color: #38bdf8;
  color: #ffffff;
}

[data-theme="dark"] .btn.brand,
body.theme-dark .btn.brand {
  background: var(--brand) !important;
  border-color: var(--brand) !important;
  color: #ffffff !important;
}

[data-theme="dark"] .day-pill,
body.theme-dark .day-pill {
  background: #101726 !important;
  border-color: #27354f !important;
  color: #cbd5e1 !important;
}

[data-theme="dark"] .day-pill .cnt,
body.theme-dark .day-pill .cnt {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #cbd5e1 !important;
}

[data-theme="dark"] .day-pill:hover,
body.theme-dark .day-pill:hover {
  border-color: #38bdf8 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .day-pill.active,
body.theme-dark .day-pill.active {
  background: var(--c, var(--brand)) !important;
  border-color: var(--c, var(--brand)) !important;
  color: #ffffff !important;
}

[data-theme="dark"] .day-pill.active .cnt,
body.theme-dark .day-pill.active .cnt {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
}

[data-theme="dark"] .btn.danger,
body.theme-dark .btn.danger {
  background: rgba(239, 68, 68, 0.14) !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
  color: #f87171 !important;
}

[data-theme="dark"] .btn.danger:hover,
body.theme-dark .btn.danger:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .home-proj-card,
body.theme-dark .home-proj-card {
  background: #131b2e !important;
  border-color: #1e293b !important;
}

[data-theme="dark"] .home-proj-card .btn.home-proj-import,
body.theme-dark .home-proj-card .btn.home-proj-import {
  background: #141c2e !important;
  border-color: #27354f !important;
  color: #e2e8f0 !important;
}

[data-theme="dark"] .home-proj-card .btn.home-proj-import:hover,
body.theme-dark .home-proj-card .btn.home-proj-import:hover {
  background: #1e293b !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .home-proj-card .icon-btn.danger,
body.theme-dark .home-proj-card .icon-btn.danger {
  background: #141c2e !important;
  border: 1px solid #27354f !important;
  color: #f87171 !important;
}

[data-theme="dark"] .home-proj-card .icon-btn.danger:hover,
body.theme-dark .home-proj-card .icon-btn.danger:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: #ef4444 !important;
}

/* Modificadores Modo Oscuro: Controles de Alineación y Segmentados (Foto 1) */
[data-theme="dark"] .align-seg,
body.theme-dark .align-seg {
  background: #0a0f1b !important;
  border-color: #27354f !important;
}
[data-theme="dark"] .align-seg button,
body.theme-dark .align-seg button {
  color: #94a3b8 !important;
}
[data-theme="dark"] .align-seg button:hover,
body.theme-dark .align-seg button:hover {
  color: #f8fafc !important;
}
[data-theme="dark"] .align-seg button.active,
body.theme-dark .align-seg button.active {
  background: var(--brand) !important;
  color: #ffffff !important;
}
[data-theme="dark"] .align-3pos-track,
body.theme-dark .align-3pos-track {
  background: #0a0f1b !important;
  border-color: #27354f !important;
}
[data-theme="dark"] .align-3pos-dot,
body.theme-dark .align-3pos-dot {
  color: #94a3b8 !important;
}
[data-theme="dark"] .align-3pos-dot:hover,
body.theme-dark .align-3pos-dot:hover {
  color: #ffffff !important;
}
[data-theme="dark"] .align-3pos-dot.active,
body.theme-dark .align-3pos-dot.active {
  background: var(--brand) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

/* Modificadores Modo Oscuro: Cronograma y Charlas Expandidas (Foto 2) */
[data-theme="dark"] .sess-item,
body.theme-dark .sess-item {
  background: #111a2e !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
}
[data-theme="dark"] .sess-item.is-break,
body.theme-dark .sess-item.is-break {
  background: #0d1527 !important;
  border-color: #334155 !important;
}
[data-theme="dark"] .sess-item.expanded,
body.theme-dark .sess-item.expanded {
  background: #131d33 !important;
  border-color: var(--brand) !important;
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.45) !important;
}
[data-theme="dark"] .sess-editor,
body.theme-dark .sess-editor {
  background: #0c1322 !important;
  border-top-color: #1e293b !important;
  color: #f8fafc !important;
}
[data-theme="dark"] .sess-break-opt-box,
body.theme-dark .sess-break-opt-box {
  background: #0a0f1b !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
}
[data-theme="dark"] .check-pill,
body.theme-dark .check-pill {
  background: #0a0f1b !important;
  border-color: #27354f !important;
  color: #f8fafc !important;
}
[data-theme="dark"] .crop-controls-box,
body.theme-dark .crop-controls-box {
  background: #0a0f1b !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
}
[data-theme="dark"] .sess-time-inp,
body.theme-dark .sess-time-inp {
  background: #0a0f1b !important;
  border-color: #27354f !important;
  color: #f8fafc !important;
}
[data-theme="dark"] .sess-title,
body.theme-dark .sess-title {
  color: #f8fafc !important;
}
[data-theme="dark"] .sess-sub,
body.theme-dark .sess-sub {
  color: #94a3b8 !important;
}
[data-theme="dark"] .drag-handle,
body.theme-dark .drag-handle {
  color: #64748b !important;
}
[data-theme="dark"] .drag-handle:hover,
body.theme-dark .drag-handle:hover {
  color: #cbd5e1 !important;
}

/* Modificadores Modo Oscuro: Tarjetas de Sponsors y Grupos (Foto 3) */
[data-theme="dark"] .sgrp-card,
body.theme-dark .sgrp-card {
  background: #101726 !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
}
[data-theme="dark"] .sgrp-style-toolbar,
body.theme-dark .sgrp-style-toolbar {
  background: #0a0f1b !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
}
[data-theme="dark"] .sgrp-pick-lbl,
body.theme-dark .sgrp-pick-lbl {
  color: #94a3b8 !important;
}
[data-theme="dark"] .sgrp-chip,
body.theme-dark .sgrp-chip {
  background: #141c2e !important;
  border-color: #27354f !important;
  color: #e2e8f0 !important;
}
[data-theme="dark"] .sgrp-chip:hover,
body.theme-dark .sgrp-chip:hover {
  border-color: #38bdf8 !important;
}
[data-theme="dark"] .sgrp-chip.active,
body.theme-dark .sgrp-chip.active {
  background: rgba(2, 132, 199, 0.2) !important;
  border-color: #38bdf8 !important;
  color: #38bdf8 !important;
}
[data-theme="dark"] .sgrp-chip-thumb,
body.theme-dark .sgrp-chip-thumb {
  background: #0b111e !important;
  border-color: #27354f !important;
}
[data-theme="dark"] .sgrp-member-row,
body.theme-dark .sgrp-member-row {
  background: #0a0f1b !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
}
[data-theme="dark"] .sgrp-member-name,
body.theme-dark .sgrp-member-name {
  color: #f8fafc !important;
}

/* Modificadores Modo Oscuro: Carga de PDF y Tarjeta QR (Fotos 4 y 5) */
[data-theme="dark"] .pdf-hero-dropzone,
body.theme-dark .pdf-hero-dropzone {
  background: #0c1322 !important;
  border-color: var(--brand) !important;
  color: #f8fafc !important;
}
[data-theme="dark"] .pdf-hero-dropzone:hover,
body.theme-dark .pdf-hero-dropzone:hover {
  background: #111c30 !important;
  border-color: #38bdf8 !important;
}
[data-theme="dark"] .pdf-hero-dropzone b,
body.theme-dark .pdf-hero-dropzone b {
  color: #f8fafc !important;
}
[data-theme="dark"] .pdf-hero-icon,
body.theme-dark .pdf-hero-icon {
  background: rgba(0, 127, 150, 0.25) !important;
  color: #38bdf8 !important;
}
[data-theme="dark"] .qr-preview-card,
body.theme-dark .qr-preview-card {
  background: #131b2e !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
}
[data-theme="dark"] .qr-preview-card h3,
body.theme-dark .qr-preview-card h3 {
  color: #f8fafc !important;
}
[data-theme="dark"] .qr-preview-card p,
body.theme-dark .qr-preview-card p {
  color: #94a3b8 !important;
}
[data-theme="dark"] .qr-preview-box,
body.theme-dark .qr-preview-box {
  background: #ffffff !important;
}

/* Modificadores Modo Oscuro: Panel de Previsualización Derecho */
[data-theme="dark"] .preview-col,
body.theme-dark .preview-col {
  background: #070a12 !important;
  border-left-color: #1e293b !important;
}
[data-theme="dark"] .pv-toolbar,
body.theme-dark .pv-toolbar {
  background: #0b111e !important;
  color: #cbd5e1 !important;
  border-bottom-color: #1e293b !important;
}
[data-theme="dark"] .pv-bottom-bar,
body.theme-dark .pv-bottom-bar {
  background: #0b111e !important;
  border-top-color: #1e293b !important;
}

/* ----------------- MODO CLARO (LIGHT MODE) ----------------- */
[data-theme="light"] .topbar,
body.theme-light .topbar {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
[data-theme="light"] .tb-brand,
body.theme-light .tb-brand {
  border-right-color: #e2e8f0;
}
[data-theme="light"] .tb-title-input,
body.theme-light .tb-title-input {
  background: #f8fafc;
  color: #0f172a;
  border-color: #cbd5e1;
}
[data-theme="light"] .tb-title-input:focus,
body.theme-light .tb-title-input:focus {
  border-color: #007f96;
  background: #ffffff;
}
[data-theme="light"] .tb-btn,
body.theme-light .tb-btn {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #334155;
}
[data-theme="light"] .tb-btn:hover,
body.theme-light .tb-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}
[data-theme="light"] .theme-toggle-btn,
body.theme-light .theme-toggle-btn {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}
[data-theme="light"] .theme-toggle-btn:hover,
body.theme-light .theme-toggle-btn:hover {
  background: #e2e8f0;
}
[data-theme="light"] .theme-icon.moon,
body.theme-light .theme-icon.moon {
  color: #1e293b;
}
[data-theme="light"] .navrail,
body.theme-light .navrail {
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
}
[data-theme="light"] .navbtn,
body.theme-light .navbtn {
  color: #475569;
}
[data-theme="light"] .navbtn:hover,
body.theme-light .navbtn:hover {
  background: #f1f5f9;
  color: #0f172a;
}
[data-theme="light"] .navbtn.active,
body.theme-light .navbtn.active {
  background: #e0f2fe;
  color: #007f96;
}
[data-theme="light"] .nav-group-label,
body.theme-light .nav-group-label {
  color: #94a3b8;
}
[data-theme="light"] .editor-col,
body.theme-light .editor-col {
  background: #f8fafc;
  color: #0f172a;
}
[data-theme="light"] .ecard,
[data-theme="light"] .home-head,
[data-theme="light"] .home-act-card,
[data-theme="light"] .home-proj-card,
[data-theme="light"] .cms-modal,
body.theme-light .ecard,
body.theme-light .home-head,
body.theme-light .home-act-card,
body.theme-light .home-proj-card,
body.theme-light .cms-modal {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #0f172a;
}

[data-theme="light"] .panel-head,
body.theme-light .panel-head {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 0 12px 0 !important;
}
[data-theme="light"] .panel-resizer,
body.theme-light .panel-resizer {
  background: #e2e8f0;
}

[data-theme="light"] .tb-sep,
body.theme-light .tb-sep {
  background: rgba(15, 23, 42, 0.10);
}

[data-theme="light"] .nav-group,
body.theme-light .nav-group {
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

/* Botón de Instalación PWA en Topbar */
.tb-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 9px;
  background: rgba(0, 127, 150, 0.16);
  border: 1px solid rgba(0, 127, 150, 0.38);
  color: #38bdf8;
  cursor: pointer;
  transition: all 0.2s ease;
}
.tb-install-btn:hover {
  background: rgba(0, 127, 150, 0.28);
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-1px);
}
[data-theme="light"] .tb-install-btn,
body.theme-light .tb-install-btn {
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  color: #0284c7;
}
[data-theme="light"] .tb-install-btn:hover,
body.theme-light .tb-install-btn:hover {
  background: #bae6fd;
  border-color: #0284c7;
  color: #0369a1;
}

/* Previsualizador en Modo Claro (Clean Light Mockup Stage) */
[data-theme="light"] .preview-col,
body.theme-light .preview-col {
  background: #f8fafc !important;
  border-left: 1px solid #e2e8f0 !important;
}
[data-theme="light"] .pv-toolbar,
body.theme-light .pv-toolbar {
  background: #ffffff !important;
  color: #334155 !important;
  border-bottom: 1px solid #e2e8f0 !important;
}
[data-theme="light"] .pv-sep,
body.theme-light .pv-sep {
  background: rgba(15, 23, 42, 0.12) !important;
}
[data-theme="light"] .pv-seg,
body.theme-light .pv-seg {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
}
[data-theme="light"] .pv-seg button,
body.theme-light .pv-seg button {
  color: #64748b !important;
}
[data-theme="light"] .pv-seg button:hover,
body.theme-light .pv-seg button:hover {
  color: #0f172a !important;
}
[data-theme="light"] .pv-seg button.active,
body.theme-light .pv-seg button.active {
  background: var(--brand) !important;
  color: #ffffff !important;
}
[data-theme="light"] .pv-stage,
body.theme-light .pv-stage {
  background: radial-gradient(circle at center, #f8fafc 0%, #cbd5e1 100%) !important;
}
[data-theme="light"] .pv-bottom-bar,
body.theme-light .pv-bottom-bar {
  background: #ffffff !important;
  border-top: 1px solid #e2e8f0 !important;
}
[data-theme="light"] .navbtn.active,
body.theme-light .navbtn.active {
  box-shadow: none !important;
}






/* =====================================================================
   AUDITORÍA FINAL MODO OSCURO — campos, botones y paneles que quedaban
   en colores claros con el modo oscuro activo.
   ===================================================================== */
html[data-theme="dark"] .color-row input[type="color"],
body.theme-dark .color-row input[type="color"],
html[data-theme="dark"] .grad-color-inp,
body.theme-dark .grad-color-inp {
  background: #0d1322 !important;
  border-color: #334155 !important;
}
html[data-theme="dark"] .grad-dir-sel,
body.theme-dark .grad-dir-sel,
html[data-theme="dark"] .sess-time-inp:focus,
body.theme-dark .sess-time-inp:focus {
  background: #0d1322 !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}
html[data-theme="dark"] select option,
body.theme-dark select option {
  background: #141c2e;
  color: #f8fafc;
}
html[data-theme="dark"] .ig-btn,
body.theme-dark .ig-btn,
html[data-theme="dark"] .qr-style-btn,
body.theme-dark .qr-style-btn {
  background: #141c2e !important;
  color: #cbd5e1 !important;
  border-color: #334155 !important;
}
html[data-theme="dark"] .ig-btn:hover,
body.theme-dark .ig-btn:hover,
html[data-theme="dark"] .qr-style-btn:hover,
body.theme-dark .qr-style-btn:hover {
  background: #1e293b !important;
  color: #38bdf8 !important;
  border-color: #0284c7 !important;
}
html[data-theme="dark"] .ig-btn.active,
body.theme-dark .ig-btn.active,
html[data-theme="dark"] .qr-style-btn.active,
body.theme-dark .qr-style-btn.active {
  background: rgba(2, 132, 199, 0.18) !important;
  color: #38bdf8 !important;
  border-color: #0284c7 !important;
}
html[data-theme="dark"] .sp-assign-row,
body.theme-dark .sp-assign-row,
html[data-theme="dark"] .si-asset-row,
body.theme-dark .si-asset-row,
html[data-theme="dark"] .si-day-card,
body.theme-dark .si-day-card,
html[data-theme="dark"] .si-code-tag,
body.theme-dark .si-code-tag,
html[data-theme="dark"] .welcome-card-sq,
body.theme-dark .welcome-card-sq {
  background: #141c2e !important;
  border-color: #27354f !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .qr-export-box,
body.theme-dark .qr-export-box,
html[data-theme="dark"] .si-box,
body.theme-dark .si-box,
html[data-theme="dark"] .favicon-sq-thumb,
body.theme-dark .favicon-sq-thumb,
html[data-theme="dark"] .bg-mode-tabs,
body.theme-dark .bg-mode-tabs {
  background: #0d1322 !important;
  border-color: #27354f !important;
}
html[data-theme="dark"] .si-guide-box,
body.theme-dark .si-guide-box {
  background: rgba(2, 132, 199, 0.10) !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .qr-box-inner,
body.theme-dark .qr-box-inner {
  /* El QR se mantiene sobre blanco para que siempre se pueda escanear */
  background: #ffffff !important;
  border-color: #334155 !important;
}
html[data-theme="dark"] .welcome-card-icon.brand-ic,
body.theme-dark .welcome-card-icon.brand-ic,
html[data-theme="dark"] .home-act-ic.brand-ic,
body.theme-dark .home-act-ic.brand-ic { background: rgba(2, 132, 199, 0.18) !important; color: #38bdf8 !important; }
html[data-theme="dark"] .welcome-card-icon.green-ic,
body.theme-dark .welcome-card-icon.green-ic,
html[data-theme="dark"] .home-act-ic.green-ic,
body.theme-dark .home-act-ic.green-ic { background: rgba(22, 163, 74, 0.18) !important; color: #4ade80 !important; }
html[data-theme="dark"] .welcome-card-icon.purple-ic,
body.theme-dark .welcome-card-icon.purple-ic,
html[data-theme="dark"] .home-act-ic.purple-ic,
body.theme-dark .home-act-ic.purple-ic { background: rgba(147, 51, 234, 0.20) !important; color: #c084fc !important; }
html[data-theme="dark"] .home-act-ic.blue-ic,
body.theme-dark .home-act-ic.blue-ic { background: rgba(0, 168, 198, 0.18) !important; color: #22d3ee !important; }

/* Textos oscuros que quedaban invisibles sobre fondo oscuro */
html[data-theme="dark"] .icon-btn:hover,
body.theme-dark .icon-btn:hover,
html[data-theme="dark"] .btn-close-raw:hover,
body.theme-dark .btn-close-raw:hover,
html[data-theme="dark"] .bg-mode-tab:hover,
body.theme-dark .bg-mode-tab:hover { color: #ffffff !important; }
html[data-theme="dark"] .dz-info b,
body.theme-dark .dz-info b,
html[data-theme="dark"] .person-photo-dz .dz-info b,
body.theme-dark .person-photo-dz .dz-info b,
html[data-theme="dark"] .qr-export-actions b,
body.theme-dark .qr-export-actions b,
html[data-theme="dark"] .si-box-head,
body.theme-dark .si-box-head,
html[data-theme="dark"] .welcome-title,
body.theme-dark .welcome-title,
html[data-theme="dark"] .welcome-card-sq .welcome-card-content h4,
body.theme-dark .welcome-card-sq .welcome-card-content h4 { color: #f8fafc !important; }
html[data-theme="dark"] .crop-row,
body.theme-dark .crop-row,
html[data-theme="dark"] .logo-title-main,
body.theme-dark .logo-title-main,
html[data-theme="dark"] .dz-info span,
body.theme-dark .dz-info span { color: #cbd5e1 !important; }

/* Estilos en línea generados por JS (Revisión de cambios, Carga inteligente, etc.) */
html[data-theme="dark"] :is(.editor-col, .cms-modal, .cms-modal-backdrop) [style*="background:#fff;"]:not(.dz-thumb):not(.keep-light),
body.theme-dark :is(.editor-col, .cms-modal, .cms-modal-backdrop) [style*="background:#fff;"]:not(.dz-thumb):not(.keep-light),
html[data-theme="dark"] :is(.editor-col, .cms-modal, .cms-modal-backdrop) [style*="background:#ffffff;"]:not(.dz-thumb):not(.keep-light),
body.theme-dark :is(.editor-col, .cms-modal, .cms-modal-backdrop) [style*="background:#ffffff;"]:not(.dz-thumb):not(.keep-light) {
  background: #141c2e !important;
  color: #e2e8f0;
}
html[data-theme="dark"] :is(.editor-col, .cms-modal, .cms-modal-backdrop) :is([style*="background:#f8fafc"], [style*="background:#f1f5f9"], [style*="background:#e2e8f0"]):not(.dz-thumb):not(.keep-light),
body.theme-dark :is(.editor-col, .cms-modal, .cms-modal-backdrop) :is([style*="background:#f8fafc"], [style*="background:#f1f5f9"], [style*="background:#e2e8f0"]):not(.dz-thumb):not(.keep-light) {
  background: #0d1322 !important;
  border-color: #27354f !important;
}
html[data-theme="dark"] :is(.editor-col, .cms-modal, .cms-modal-backdrop) [style*="background:#fffbeb"],
body.theme-dark :is(.editor-col, .cms-modal, .cms-modal-backdrop) [style*="background:#fffbeb"] {
  background: rgba(245, 158, 11, 0.12) !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
}
html[data-theme="dark"] :is(.editor-col, .cms-modal, .cms-modal-backdrop) [style*="background:#f0fdf4"],
body.theme-dark :is(.editor-col, .cms-modal, .cms-modal-backdrop) [style*="background:#f0fdf4"] {
  background: rgba(16, 185, 129, 0.12) !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
  color: #6ee7b7 !important;
}
html[data-theme="dark"] :is(.editor-col, .cms-modal, .cms-modal-backdrop) [style*="background:#fef2f2"],
body.theme-dark :is(.editor-col, .cms-modal, .cms-modal-backdrop) [style*="background:#fef2f2"] {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
  color: #fca5a5 !important;
}
html[data-theme="dark"] :is(.editor-col, .cms-modal, .cms-modal-backdrop) :is([style*="color:#0f172a"], [style*="color:#1e293b"], [style*="color:#334155"]),
body.theme-dark :is(.editor-col, .cms-modal, .cms-modal-backdrop) :is([style*="color:#0f172a"], [style*="color:#1e293b"], [style*="color:#334155"]) {
  color: #f8fafc !important;
}
html[data-theme="dark"] :is(.editor-col, .cms-modal, .cms-modal-backdrop) [style*="color:#475569"],
body.theme-dark :is(.editor-col, .cms-modal, .cms-modal-backdrop) [style*="color:#475569"] {
  color: #94a3b8 !important;
}
html[data-theme="dark"] :is(.editor-col, .cms-modal, .cms-modal-backdrop) [style*="border:2px dashed #cbd5e1"],
body.theme-dark :is(.editor-col, .cms-modal, .cms-modal-backdrop) [style*="border:2px dashed #cbd5e1"] {
  border-color: #334155 !important;
}
html[data-theme="dark"] .cms-modal label[style*="color:#0f172a"],
body.theme-dark .cms-modal label[style*="color:#0f172a"] { color: #e2e8f0 !important; }

/* Pantalla de inicio: pie con logo a la izquierda y copyright a la derecha */
@media (max-width: 640px) {
  .home-org-footer { flex-direction: column; gap: 6px; }
  .home-copyright-text { text-align: center; }
}
