/* ============================================================
   ScienceuP — postulacion.css
   Consola de postulación de 3 columnas colapsables
   ============================================================ */

/* ── Variables locales ─────────────────────────────────────── */
:root {
  --col-body-w:   280px;
  --col-eval-w:   300px;
  --topbar-h:      52px;
  --col-border:   1px solid #e2e8f0;
  --col-bg-side:  #f8fafc;
  --col-bg-main:  #ffffff;
  --adm-color:    #7c3aed;
  --adm-bg:       #f5f3ff;
  --reveal-w:     28px;
  --transition-col: 0.22s ease;
}

/* ── Reset para consola ────────────────────────────────────── */
body.console-page {
  margin: 0;
  padding: 0;
  background: var(--color-bg, #f1f5f9);
  font-family: var(--font-body, 'Inter', sans-serif);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ══════════════════════════════════════════════════════════
   TOP BAR
══════════════════════════════════════════════════════════ */
.console-topbar {
  height: var(--topbar-h);
  background: var(--color-primary, #002f6c);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-5, 1.25rem);
  flex-shrink: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.console-topbar-left,
.console-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.topbar-logo {
  font-family: var(--font-heading, 'Poppins', sans-serif);
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.5px;
}
.topbar-logo span { color: var(--color-secondary, #f27900); }

.topbar-sep   { color: rgba(255,255,255,0.35); font-size: 0.9rem; }
.topbar-context { font-size: 0.82rem; font-weight: 500; color: rgba(255,255,255,0.85); }
.topbar-muted   { color: rgba(255,255,255,0.5); }

.topbar-user {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.75);
}

.topbar-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  letter-spacing: 0.05em;
}
.adm-badge {
  background: var(--adm-color);
  color: #fff;
}

.topbar-btn {
  font-size: 0.78rem;
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.topbar-btn:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

/* ══════════════════════════════════════════════════════════
   LAYOUT 3 COLUMNAS
══════════════════════════════════════════════════════════ */
.console-layout {
  display: flex;
  flex: 1;
  height: calc(100vh - var(--topbar-h));
  overflow: hidden;
  position: relative;
}

/* ── Columnas base ─────────────────────────────────────── */
.console-col {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width var(--transition-col), opacity var(--transition-col);
}

.col-body {
  flex: 0 0 20%;
  min-width: 160px;
  max-width: 320px;
  background: var(--col-bg-side);
  border-right: var(--col-border);
}

.col-main {
  flex: 1;
  background: var(--col-bg-main);
  overflow-y: auto;
  min-width: 0;
}

.col-eval {
  flex: 0 0 30%;
  min-width: 200px;
  max-width: 420px;
  background: var(--col-bg-side);
  border-left: var(--col-border);
}

/* Estados colapsados */
.col-body.collapsed,
.col-eval.collapsed {
  flex: 0 0 0px !important;
  min-width: 0 !important;
  max-width: 0 !important;
  overflow: hidden;
  opacity: 0;
}

/* ── Layout states: distribución según paneles abiertos ─── */
/* All 3: 20/50/30 → col-main toma el resto vía flex:1     */
/* No eval (body+main): body=20%, main=80% → sin cambios   */
/* No body (main+eval): eval sube a 50%, main toma el resto */
.console-layout.layout-no-body .col-eval {
  flex: 0 0 50%;
  max-width: 50%;
}

/* ── Tabs de re-apertura ────────────────────────────────── */
.col-reveal {
  width: var(--reveal-w);
  flex-shrink: 0;
  background: var(--color-secondary, #f27900);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  writing-mode: vertical-lr;
}
.col-reveal:hover { background: #d96800; }
.col-reveal-left  { border-right: 2px solid #d96800; }
.col-reveal-right { border-left:  2px solid #d96800; }

/* ══════════════════════════════════════════════════════════
   CABECERA DE COLUMNA + TOGGLE
══════════════════════════════════════════════════════════ */
.col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: #fff;
  border-bottom: var(--col-border);
  flex-shrink: 0;
}

.col-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-primary, #002f6c);
  margin: 0;
}

.col-toggle {
  background: var(--color-secondary, #f27900);
  border: 1.5px solid var(--color-secondary, #f27900);
  border-radius: 4px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  color: #fff;
  line-height: 1;
  padding: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.col-toggle:hover { background: #d96800; border-color: #d96800; color: #fff; }

/* col-eval invierte el orden */
.col-eval .col-header { flex-direction: row-reverse; justify-content: flex-end; gap: 0.5rem; }
.col-eval .col-title  { text-align: left; }

/* ══════════════════════════════════════════════════════════
   FLOWCHART — diagrama de flujo en panel izquierdo
══════════════════════════════════════════════════════════ */
.flow-chart {
  flex: 1;
  overflow-y: auto;
  padding: .6rem .5rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.flow-row {
  display: flex;
  justify-content: center;
  gap: .3rem;
}
.flow-row-parallel { gap: .2rem; }

.flow-node {
  flex: 1;
  min-width: 0;
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: .45rem .55rem;
  cursor: pointer;
  transition: border-color .15s, background .15s, opacity .15s;
  position: relative;
  text-align: center;
  user-select: none;
}
.flow-node:hover        { border-color: var(--color-accent, #7a9abf); background: #f8fafc; }
.flow-node.active       { border-color: var(--color-primary, #002f6c); background: #eff6ff; }
.flow-node.done         { border-color: #22c55e; }
.flow-node.flow-node-branch { border-style: dashed; border-color: var(--color-secondary, #f27900); }
.flow-node.off-path     { opacity: .42; filter: grayscale(.4); }

.flow-node-branch-label {
  font-size: .6rem;
  font-weight: 700;
  color: var(--color-secondary, #f27900);
  background: #fff7ed;
  border-radius: 3px;
  padding: 1px 4px;
  margin-bottom: .25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.flow-node-name {
  font-size: .74rem;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.flow-node.active .flow-node-name { color: var(--color-primary, #002f6c); }

.flow-node-meta {
  display: flex;
  justify-content: center;
  gap: .3rem;
  margin-top: .2rem;
  font-size: .64rem;
}
.flow-check       { color: #22c55e; }
.flow-req         { color: var(--color-secondary, #f27900); }
.flow-branch-icon { color: var(--adm-color, #7c3aed); }

/* Bifurcation exits summary inside node */
.flow-node-exits {
  width: 100%;
  margin-top: .35rem;
  border-top: 1px dashed #ddd6fe;
  padding-top: .3rem;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.flow-exit-row {
  display: flex;
  align-items: center;
  gap: .25rem;
  font-size: .58rem;
  line-height: 1.2;
}
.flow-exit-val {
  background: #ede9fe;
  color: #6d28d9;
  border-radius: 3px;
  padding: 0 .3rem;
  font-weight: 600;
  max-width: 55px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.flow-exit-arrow { color: #94a3b8; }
.flow-exit-dest { color: #334155; font-weight: 500; max-width: 65px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-exit-fallback .flow-exit-val { background: #f1f5f9; color: #64748b; }

.flow-node-adm {
  position: absolute;
  top: 2px;
  right: 2px;
  display: none;
  gap: 2px;
}
.flow-node:hover .flow-node-adm { display: flex; }
.flow-adm-btn {
  background: rgba(255,255,255,.92);
  border: 1px solid #e2e8f0;
  border-radius: 3px;
  font-size: .58rem;
  padding: 1px 4px;
  cursor: pointer;
  color: #64748b;
  line-height: 1.5;
}
.flow-adm-btn:hover { background: var(--adm-color, #7c3aed); color: #fff; border-color: var(--adm-color); }

.flow-connector {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 18px;
  position: relative;
  flex-shrink: 0;
}
.flow-connector::before {
  content: '';
  display: block;
  width: 2px;
  height: 100%;
  background: #cbd5e1;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.flow-connector-split::before  { background: var(--color-secondary, #f27900); }
.flow-connector-merge::before  { background: #22c55e; }
.flow-connector::after {
  content: '▼';
  position: absolute;
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%);
  color: #94a3b8;
  font-size: .48rem;
  line-height: 1;
  z-index: 1;
}

.nav-empty {
  text-align: center;
  color: #94a3b8;
  font-size: .8rem;
  padding: 1.5rem 1rem;
  line-height: 1.6;
}

/* ══════════════════════════════════════════════════════════
   EDITOR DE FLUJO (modal)
══════════════════════════════════════════════════════════ */
/* Modo toggle */
.fe-mode-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
.fe-mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: .9rem .75rem;
  cursor: pointer;
  text-align: center;
  transition: border-color .15s, background .15s;
  position: relative;
}
.fe-mode-btn input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.fe-mode-btn.active {
  border-color: var(--color-primary, #002f6c);
  background: #eef3fb;
}
.fe-mode-btn:hover { border-color: var(--color-accent, #7a9abf); background: #f5f8fd; }
.fe-mode-icon { font-size: 1.5rem; line-height: 1; color: var(--color-primary, #002f6c); }
.fe-mode-btn span:not(.fe-mode-icon) { font-size: .82rem; font-weight: 600; color: #334155; }
.fe-mode-btn small { font-size: .7rem; color: #94a3b8; line-height: 1.3; }

/* Tabla de opciones de bifurcación */
.fe-bif-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .8rem;
}
.fe-bif-table th {
  background: #f1f5f9;
  color: #475569;
  font-weight: 600;
  padding: .35rem .65rem;
  border: 1px solid #e2e8f0;
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.fe-bif-table td { border: 1px solid #e2e8f0; padding: .3rem .55rem; }
.fe-bif-op-label {
  font-weight: 500;
  color: #334155;
  background: #f8fafc;
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fe-bif-warning {
  background: #fff7ed;
  border: 1.5px solid #fed7aa;
  border-radius: 8px;
  padding: .75rem 1rem;
  font-size: .82rem;
  color: #92400e;
  line-height: 1.5;
}

/* ══════════════════════════════════════════════════════════
   PANEL IZQUIERDO — CUERPO DE POSTULACIÓN
══════════════════════════════════════════════════════════ */
.body-progress {
  padding: 0.75rem 1rem 0.5rem;
  border-bottom: var(--col-border);
  flex-shrink: 0;
}
.progress-bar-wrap {
  height: 5px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 0.35rem;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-secondary, #f27900), var(--color-primary, #002f6c));
  border-radius: 99px;
  transition: width 0.4s ease;
}
.progress-label {
  font-size: 0.7rem;
  color: #94a3b8;
}

/* Navegación de secciones */
.sections-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
}

.section-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background 0.12s, border-color 0.12s;
  position: relative;
}
.section-item:hover   { background: #f1f5f9; }
.section-item.active  {
  background: #eff6ff;
  border-left-color: var(--color-primary, #002f6c);
}
.section-item.done .section-check { color: #22c55e; }

.section-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: transparent;
  flex-shrink: 0;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.section-item.done .section-check {
  border-color: #22c55e;
  background: #22c55e;
  color: #fff;
}
.section-item.active .section-check { border-color: var(--color-primary, #002f6c); }

.section-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: #334155;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.section-item.active .section-label { color: var(--color-primary, #002f6c); font-weight: 600; }

.section-required-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-secondary, #f27900);
  flex-shrink: 0;
}

/* Botones ADM inline en section-item */
.section-adm-btns {
  display: none;
  gap: 4px;
}
.section-item:hover .section-adm-btns { display: flex; }
.section-adm-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.7rem;
  color: #94a3b8;
  padding: 2px 4px;
  border-radius: 3px;
}
.section-adm-btn:hover { background: #e2e8f0; color: var(--adm-color); }

/* ══════════════════════════════════════════════════════════
   COLUMNA CENTRAL — POSTULACIÓN
══════════════════════════════════════════════════════════ */
.col-main {
  padding: 0;
}

/* Placeholder vacío */
.main-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: #94a3b8;
  padding: 2rem;
  gap: 0.75rem;
}
.placeholder-icon { font-size: 3rem; }
.main-placeholder h3 { margin: 0; font-size: 1.1rem; color: #64748b; }
.main-placeholder p  { margin: 0; font-size: 0.88rem; max-width: 320px; }

/* Contenido de sección */
.section-content {
  padding: 2rem 2.5rem;
  width: 100%;
  box-sizing: border-box;
}

.section-content-header {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: var(--col-border);
}
.section-content-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary, #002f6c);
  margin: 0 0 0.4rem;
}
.section-content-desc {
  color: #64748b;
  font-size: 0.9rem;
  margin: 0 0 0.75rem;
}
.section-content-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.meta-chip {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 99px;
  background: #fee2e2;
  color: #991b1b;
  font-weight: 600;
}
.meta-chip.optional { background: #f0fdf4; color: #166534; }

/* ── Preguntas / campos ─────────────────────────────────── */
.questions-container {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  margin-bottom: 1.75rem;
}

.question-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
}

.question-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1e293b;
}
.question-required { color: var(--color-secondary, #f27900); }

.question-hint {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: -0.25rem;
}

.question-textarea {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.75rem;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.88rem;
  color: #1e293b;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.question-textarea:focus {
  outline: none;
  border-color: var(--color-primary, #002f6c);
  box-shadow: 0 0 0 3px rgba(0,47,108,0.08);
}
.question-textarea.over-limit {
  border-color: #ef4444;
}

.question-input {
  width: 100%;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.88rem;
  color: #1e293b;
  background: #fff;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.question-input:focus {
  outline: none;
  border-color: var(--color-primary, #002f6c);
  box-shadow: 0 0 0 3px rgba(0,47,108,0.08);
}

.question-select {
  width: 100%;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.88rem;
  color: #1e293b;
  background: #fff;
  cursor: pointer;
  box-sizing: border-box;
}

/* Contador de palabras */
.word-counter {
  font-size: 0.72rem;
  color: #94a3b8;
  text-align: right;
  transition: color 0.2s;
}
.word-counter.warning { color: var(--color-secondary, #f27900); }
.word-counter.over    { color: #ef4444; font-weight: 600; }

/* Botón eliminar campo (ADM) */
.question-adm-btns {
  position: absolute;
  top: 0;
  right: 0;
  display: none;
  gap: 4px;
}
.question-block:hover .question-adm-btns { display: flex; }
.btn-question-del {
  background: #fee2e2;
  border: none;
  border-radius: 4px;
  color: #ef4444;
  font-size: 0.7rem;
  padding: 2px 6px;
  cursor: pointer;
}
.btn-question-edit {
  background: #fff7ed;
  border: none;
  border-radius: 4px;
  color: var(--color-secondary, #f27900);
  font-size: 0.7rem;
  padding: 2px 6px;
  cursor: pointer;
}
.btn-question-edit:hover { background: #ffedd5; }
.btn-question-del:hover  { background: #fecaca; }

/* ── Template picker (modal-question) ───────────────────── */
.field-type-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 1rem;
}
.field-type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem 1rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  text-align: center;
}
.field-type-card:hover {
  border-color: var(--color-primary, #002f6c);
  background: #eef3fb;
  transform: translateY(-2px);
}
.field-type-card .ftc-icon {
  font-size: 2rem;
  line-height: 1;
}
.field-type-card strong {
  font-size: 0.9rem;
  color: var(--color-primary, #002f6c);
  letter-spacing: 0.03em;
}
.field-type-card small {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.35;
}
.btn-text-link {
  background: none;
  border: none;
  color: var(--color-primary, #002f6c);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.btn-text-link:hover { color: var(--color-secondary, #f27900); }

/* ── Bloque tipo TEXTO ──────────────────────────────────── */
/* word-counter already exists; .over / .warning already defined */

/* ── Bloque tipo TABLA ──────────────────────────────────── */
.question-table-wrap { overflow-x: auto; }
.question-table {
  width: auto;
  min-width: 0;
  border-collapse: collapse;
  font-size: 0.82rem;
  table-layout: auto;
}
.question-table th,
.question-table td {
  border: 1.5px solid #cbd5e1;
  padding: 0;
}
.q-table-cell-fixed {
  background: #e8edf5;
  color: #334155;
  font-weight: 600;
  padding: 0.45rem 0.7rem;
  white-space: nowrap;
  text-align: left;
}
.q-table-cell-free { background: #fff; }
.q-table-input {
  field-sizing: content;
  min-width: 80px;
  max-width: 600px;
  box-sizing: border-box;
  border: none;
  outline: none;
  padding: 0.45rem 0.7rem;
  font-size: 0.82rem;
  font-family: var(--font-body, 'Inter', sans-serif);
  color: #1e293b;
  background: transparent;
  display: block;
  resize: none;
  overflow: hidden;
  line-height: 1.4;
  vertical-align: top;
}
.q-table-input:focus { background: #fafcff; }

.btn-add-row {
  margin-top: .5rem;
  background: none;
  border: 1.5px dashed #cbd5e1;
  border-radius: 6px;
  color: #64748b;
  font-size: .78rem;
  padding: .3rem .9rem;
  cursor: pointer;
  width: 100%;
  transition: border-color .15s, color .15s, background .15s;
}
.btn-add-row:hover {
  border-color: var(--color-primary, #002f6c);
  color: var(--color-primary, #002f6c);
  background: #f0f4fb;
}

/* ── Bloque tipo SELECCIÓN ─────────────────────────────── */
.q-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.q-option-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.85rem;
  color: #334155;
  cursor: pointer;
  padding: 0.4rem 0.7rem;
  border-radius: 7px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  transition: border-color 0.12s, background 0.12s;
}
.q-option-label:hover { border-color: var(--color-accent, #7a9abf); background: #eef3fb; }
.q-option-label input { accent-color: var(--color-primary, #002f6c); }

/* ── Bloque tipo CUSTOM ─────────────────────────────────── */
.question-custom-block {
  border-left: 3px solid var(--color-secondary, #f27900);
  padding: 0.75rem 1rem;
  background: #fffbf5;
  border-radius: 0 8px 8px 0;
  font-size: 0.85rem;
  color: #334155;
  line-height: 1.6;
}

/* ── Bloque tipo REFERENCIAS ────────────────────────────── */
.ref-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.ref-icon { font-size: 1.05rem; }
.ref-textarea { resize: vertical; }

/* ── Bloque tipo ARCHIVO ────────────────────────────────── */
.q-file-zone {
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  padding: 1.25rem 1rem;
  text-align: center;
  background: #f8fafc;
  transition: border-color .15s, background .15s;
  cursor: pointer;
  position: relative;
}
.q-file-zone:hover, .q-file-zone.drag-over {
  border-color: var(--color-primary, #002f6c);
  background: #eef3fb;
}
.q-file-zone input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.q-file-icon { font-size: 2rem; line-height: 1; display: block; margin-bottom: .4rem; }
.q-file-hint { font-size: .78rem; color: #64748b; }
.q-file-limit { font-size: .7rem; color: #94a3b8; margin-top: .25rem; }
.q-file-status {
  margin-top: .6rem;
  font-size: .8rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .75rem;
  border-radius: 7px;
  border: 1.5px solid #e2e8f0;
  background: #f1f5f9;
  color: #334155;
}
.q-file-status.uploading { border-color: #93c5fd; background: #eff6ff; color: #1e40af; }
.q-file-status.success   { border-color: #86efac; background: #f0fdf4; color: #166534; }
.q-file-status.error     { border-color: #fca5a5; background: #fef2f2; color: #991b1b; }
.q-file-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-file-clear {
  background: none; border: none; color: #94a3b8; cursor: pointer; font-size: .9rem; padding: 0 .2rem;
}
.q-file-clear:hover { color: #ef4444; }

/* ── Admin tabla config grid ────────────────────────────── */
.cfg-tabla-preview {
  border-collapse: collapse;
  font-size: 0.78rem;
  width: 100%;
}
.cfg-tabla-preview th,
.cfg-tabla-preview td {
  border: 1px solid #e2e8f0;
  padding: 0.35rem 0.5rem;
}
.cfg-tabla-preview thead th {
  background: #f1f5f9;
  font-weight: 600;
  color: #475569;
}
.cfg-row-label {
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
  background: #f8fafc;
}
.cfg-cell {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.cfg-fix-label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  color: #475569;
  cursor: pointer;
}
.cfg-cell-content {
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 0.25rem 0.4rem;
  font-size: 0.75rem;
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font-body, 'Inter', sans-serif);
}
.cfg-cell-content:focus { outline: none; border-color: var(--color-accent, #7a9abf); }
/* modal-lg for the field picker (wider) */
.modal-lg { max-width: 660px !important; }

/* ── Bloque tipo LOGIN ──────────────────────────────────── */
.login-check {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .85rem 1rem;
  border-radius: 8px;
  font-size: .88rem;
  line-height: 1.5;
  margin-top: .4rem;
}
.login-check-ok {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  color: #166534;
}
.login-check-ok span   { font-size: 1.1rem; flex-shrink: 0; }
.login-check-denied {
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  color: #991b1b;
}
.login-check-denied span { font-size: 1.1rem; flex-shrink: 0; }

/* ── Bloque tipo CHRONOS ────────────────────────────────── */
.chronos-block {
  border-radius: 8px;
  padding: .85rem 1rem;
  margin-top: .4rem;
}
.chronos-open {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  color: #166534;
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .88rem;
}
.chronos-open .ch-icon { font-size: 1.2rem; flex-shrink: 0; }
.chronos-closed {
  background: #fffbeb;
  border: 1.5px solid #fcd34d;
  color: #92400e;
  font-size: .88rem;
}
.chronos-closed .ch-title {
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: .3rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.chronos-closed .ch-desc {
  line-height: 1.55;
  color: #78350f;
}
.chronos-period {
  font-size: .7rem;
  color: #94a3b8;
  margin-top: .4rem;
}

/* ── Navegación secciones ───────────────────────────────── */
.section-nav-btns {
  display: flex;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: var(--col-border);
  margin-top: 0.5rem;
}
.btn-nav {
  padding: 0.5rem 1.25rem;
  border-radius: 7px;
  border: 1.5px solid var(--color-secondary, #f27900);
  background: var(--color-secondary, #f27900);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-nav:hover:not(:disabled) {
  background: #d96800;
  border-color: #d96800;
  color: #fff;
}
.btn-nav:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-nav-next { margin-left: auto; }

/* ══════════════════════════════════════════════════════════
   COLUMNA DERECHA — PREEVALUACIÓN
══════════════════════════════════════════════════════════ */
.eval-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.eval-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1rem;
  color: #94a3b8;
  gap: 0.75rem;
}
.eval-icon { font-size: 2rem; }
.eval-placeholder p { font-size: 0.8rem; max-width: 200px; margin: 0; }

/* Tarjetas de criterio */
.rubrica-card {
  background: #fff;
  border: var(--col-border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.6rem;
  font-size: 0.82rem;
}
.rubrica-card-name {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.25rem;
}
.rubrica-card-desc { color: #64748b; font-size: 0.77rem; }
.rubrica-card-score {
  margin-top: 0.4rem;
  font-size: 0.72rem;
  color: #94a3b8;
}
.rubrica-card-score span {
  font-weight: 600;
  color: var(--color-primary, #002f6c);
}

/* Estado preevaluación por criterio */
.eval-status-ok    { color: #22c55e; }
.eval-status-warn  { color: var(--color-secondary, #f27900); }
.eval-status-empty { color: #94a3b8; }

/* ══════════════════════════════════════════════════════════
   ZONA ADM
══════════════════════════════════════════════════════════ */
.adm-zone {
  padding: 0.75rem 1rem;
  border-top: var(--col-border);
  background: var(--adm-bg);
  flex-shrink: 0;
}
.adm-zone-header {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--adm-color);
  margin-bottom: 0.5rem;
}
.adm-zone-inline {
  border: 1.5px dashed #ddd6fe;
  border-radius: 8px;
  background: #f5f3ff;
  padding: 0.65rem 1rem;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
}

.btn-adm {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--adm-color);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  width: 100%;
  justify-content: center;
}
.btn-adm:hover { background: #6d28d9; }
.btn-adm-sm { padding: 0.35rem 0.75rem; font-size: 0.76rem; width: auto; }

/* ══════════════════════════════════════════════════════════
   MODALES
══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.modal-box {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal-md { max-width: 480px; }

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1rem;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  line-height: 1;
}
.modal-close:hover { background: #f1f5f9; color: #1e293b; }

.modal-box h2 {
  margin: 0 0 1.25rem;
  font-size: 1.1rem;
  color: var(--color-primary, #002f6c);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* form helpers in modal */
.form-check-group { display: flex; align-items: center; }
.check-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  cursor: pointer;
  color: #334155;
}

/* ══════════════════════════════════════════════════════════
   PANEL ADM (admin.html)
══════════════════════════════════════════════════════════ */
.admin-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}
.admin-section {
  background: #fff;
  border-radius: 12px;
  border: var(--col-border);
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.admin-section-header {
  padding: 1rem 1.5rem;
  border-bottom: var(--col-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary, #002f6c);
  margin: 0;
}
.user-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.user-table th {
  background: #f8fafc;
  text-align: left;
  padding: 0.65rem 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  font-weight: 600;
  border-bottom: var(--col-border);
}
.user-table td {
  padding: 0.75rem 1rem;
  border-bottom: var(--col-border);
  color: #334155;
  vertical-align: middle;
}
.user-table tr:last-child td { border-bottom: none; }
.user-table tr:hover td { background: #f8fafc; }

.badge-adm {
  display: inline-block;
  background: var(--adm-color);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  letter-spacing: 0.04em;
}
.badge-user {
  display: inline-block;
  background: #e2e8f0;
  color: #475569;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
}
.btn-toggle-role {
  font-size: 0.74rem;
  padding: 3px 10px;
  border-radius: 5px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  transition: background 0.13s, color 0.13s;
  white-space: nowrap;
}
.btn-toggle-role:hover { background: var(--adm-color); color: #fff; border-color: var(--adm-color); }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE (tablet/mobile: stack vertical)
══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  body.console-page { overflow: auto; }
  .console-layout    { flex-direction: column; height: auto; overflow: visible; }
  .console-col       { width: 100% !important; min-width: 100% !important; }
  .col-body, .col-eval { border: none; border-bottom: var(--col-border); }
  .col-body.collapsed, .col-eval.collapsed { display: none; }
  .col-reveal        { width: 100%; height: 32px; writing-mode: horizontal-tb; border: none; border-bottom: var(--col-border); }
  .section-content   { padding: 1.25rem 1rem; }
}
