/* === VARIABLES === */
:root {
  --c-primary: #E31E24;
  --c-dark: #1a1a1a;
  --c-mid: #888;
  --c-bg: #f5f5f5;
  --c-card: #fff;
  --c-border: #e8e8e8;
  --c-success: #2e7d32;
  --c-warning: #e65100;
  --c-danger: #c62828;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', -apple-system, sans-serif; background: var(--c-bg); color: var(--c-dark); -webkit-font-smoothing: antialiased; }

/* === HEADER === */
.header { background: linear-gradient(135deg, #B71C1C 0%, #E31E24 60%, #ff5252 100%); box-shadow: 0 4px 24px rgba(227,30,36,0.25); padding: 14px 0; position: sticky; top: 0; z-index: 100; }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo { height: 38px; filter: brightness(10); }
.brand-sep { width: 1px; height: 28px; background: rgba(255,255,255,0.3); }
.brand-title { font-size: 1.05rem; font-weight: 700; color: #fff; letter-spacing: -0.3px; }
.header-nav { display: flex; gap: 6px; }
.nav-btn { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.25); padding: 8px 16px; border-radius: 8px; font-size: 0.82rem; font-weight: 500; color: rgba(255,255,255,0.9); cursor: pointer; transition: all 0.2s; backdrop-filter: blur(4px); }
.nav-btn:hover { background: rgba(255,255,255,0.25); color: #fff; border-color: rgba(255,255,255,0.5); }
.nav-btn.active { background: #fff; color: var(--c-primary); border-color: #fff; font-weight: 700; }
.btn-logout { border-color: rgba(255,255,255,0.4); color: rgba(255,255,255,0.85); }
.btn-logout:hover { background: rgba(255,255,255,0.95); color: var(--c-danger); border-color: #fff; }

/* === SURVEY SELECTOR === */
.survey-selector { background: #fff; border: 1px solid #e8e8e8; border-radius: 12px; padding: 16px 20px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.survey-selector-inner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.survey-selector-inner label { font-size: 0.85rem; font-weight: 600; color: var(--c-dark); white-space: nowrap; }
.survey-selector-inner label i { color: var(--c-primary); margin-right: 4px; }
.survey-selector-inner select { flex: 1; min-width: 200px; padding: 10px 14px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 0.88rem; font-weight: 500; color: var(--c-dark); background: #fafafa; transition: border-color 0.2s; cursor: pointer; }
.survey-selector-inner select:focus { border-color: var(--c-primary); outline: none; background: #fff; }
.survey-publish-info { margin-top: 10px; padding: 10px 14px; background: #e8f5e9; border: 1px solid #c8e6c9; border-radius: 8px; font-size: 0.78rem; color: #2e7d32; display: flex; align-items: center; gap: 8px; }
.survey-publish-info a { color: #1565c0; font-weight: 600; text-decoration: none; }
.survey-publish-info a:hover { text-decoration: underline; }

/* === PROGRESS === */
.progress-wrap { background: #fff; border-bottom: 1px solid var(--c-border); position: sticky; top: 66px; z-index: 90; padding: 10px 24px; }
.progress-bar-bg { background: #eee; border-radius: 20px; height: 8px; overflow: hidden; max-width: 980px; margin: 0 auto; }
.progress-bar-fill { background: linear-gradient(90deg, #E31E24, #ff5252); height: 100%; width: 20%; transition: width 0.3s; border-radius: 20px; }
.progress-txt { max-width: 980px; margin: 5px auto 0; font-size: 0.75rem; color: var(--c-mid); text-align: right; }

/* === LAYOUT === */
.container { max-width: 980px; margin: 0 auto; padding: 24px 18px 60px; }
.wide { max-width: 1280px; }
.card { background: var(--c-card); border-radius: var(--radius); box-shadow: 0 4px 20px rgba(0,0,0,0.05); padding: 28px; margin-bottom: 18px; border: 1px solid var(--c-border); transition: box-shadow 0.2s; }
.card:hover { box-shadow: 0 6px 28px rgba(0,0,0,0.08); }
.card h2 { color: var(--c-primary); font-size: 1.12rem; border-bottom: 2px solid #f0f0f0; padding-bottom: 12px; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.hint { color: var(--c-mid); font-size: 0.82rem; margin-bottom: 14px; }

/* === GRID === */
.grid3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
@media(max-width:760px) { .grid3 { grid-template-columns: 1fr; } }

/* === FORMS === */
.field { margin-bottom: 16px; }
label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 6px; color: var(--c-dark); }
.req::after { content: " *"; color: var(--c-primary); }
.sub-label { font-weight: 500; font-size: 0.8rem; color: var(--c-mid); margin-top: 10px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], textarea, select {
  width: 100%; padding: 10px 14px; border: 1px solid var(--c-border); border-radius: 8px;
  font-size: 0.9rem; font-family: inherit; background: #fff; color: var(--c-dark); transition: border-color 0.2s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(227,30,36,0.08); }
textarea { resize: vertical; min-height: 50px; }

/* === SCALE === */
.scale { display: flex; gap: 6px; flex-wrap: wrap; }
.scale button { flex: 1; min-width: 42px; padding: 12px 0; border: 1.5px solid var(--c-border); background: #fff; border-radius: 10px; font-weight: 700; color: var(--c-dark); cursor: pointer; transition: all 0.15s; font-size: 0.9rem; }
.scale button:hover { border-color: var(--c-primary); background: #fff7f8; transform: translateY(-1px); }
.scale button.sel { background: linear-gradient(135deg, #E31E24, #B71C1C); color: #fff; border-color: #E31E24; box-shadow: 0 3px 10px rgba(227,30,36,0.3); transform: translateY(-1px); }
.scale-labels { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--c-mid); margin-top: 5px; }

/* === CHECKBOX AREAS === */
.check-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.radio-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.radio-grid .check-item { flex: 0 0 auto; min-width: 80px; justify-content: center; text-align: center; }
@media(max-width:760px) { .check-grid { grid-template-columns: 1fr; } .radio-grid { flex-direction: column; } }
.check-item { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--c-border); border-radius: 8px; padding: 10px 12px; background: #fafafa; cursor: pointer; transition: 0.15s; }
.check-item:hover { border-color: var(--c-primary); background: #fff7f8; }

/* === FIELD VALIDATION ERROR === */
.field-error { background: #fff5f5 !important; border: 2px solid var(--c-danger) !important; border-radius: 8px; padding: 8px; animation: shake 0.4s; }
.field-error input, .field-error textarea { border-color: var(--c-danger) !important; }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-4px)} 75%{transform:translateX(4px)} }
.check-item.checked { border-color: var(--c-primary); background: #fce4ec; }
.check-item input { width: auto; margin-top: 3px; accent-color: var(--c-primary); }
.check-item .ci-txt strong { display: block; font-size: 0.88rem; }
.check-item .ci-txt span { font-size: 0.75rem; color: var(--c-mid); }
.area-block { border: 1px dashed var(--c-primary); border-radius: 10px; padding: 16px; margin-top: 14px; background: #fff7f8; }
.area-block h4 { color: var(--c-primary); margin-bottom: 10px; font-size: 0.9rem; }

/* === BUTTONS === */
.btn { padding: 10px 20px; border-radius: 8px; border: none; cursor: pointer; font-size: 0.88rem; font-weight: 600; transition: all 0.2s; font-family: inherit; letter-spacing: -0.2px; }
.btn-primary { background: linear-gradient(135deg, #E31E24, #B71C1C); color: #fff; box-shadow: 0 2px 8px rgba(227,30,36,0.25); }
.btn-primary:hover { background: linear-gradient(135deg, #B71C1C, #880E4F); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(227,30,36,0.3); }
.btn-success { background: linear-gradient(135deg, #2e7d32, #1b5e20); color: #fff; box-shadow: 0 2px 8px rgba(46,125,50,0.25); }
.btn-success:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(46,125,50,0.3); }
.btn-outline { background: #fff; border: 1px solid var(--c-border); color: #555; }
.btn-outline:hover { border-color: var(--c-primary); color: var(--c-primary); background: #fff7f8; }
.btn-danger { background: #fff; border: 1px solid var(--c-danger); color: var(--c-danger); }
.btn-danger:hover { background: var(--c-danger); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 0.78rem; }
.btn-row { display: flex; justify-content: space-between; margin-top: 20px; gap: 10px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.gap-8 { display: flex; gap: 8px; }

/* === THANKS === */
.thanks-card { text-align: center; padding: 70px 20px; background: #fff; border-radius: 16px; box-shadow: 0 8px 32px rgba(0,0,0,0.08); }
.thanks-icon { width: 90px; height: 90px; border-radius: 50%; background: linear-gradient(135deg, #2e7d32, #1b5e20); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; margin: 0 auto 24px; box-shadow: 0 4px 16px rgba(46,125,50,0.3); }
.thanks-card h1 { color: var(--c-dark); margin-bottom: 12px; font-size: 1.6rem; }
.thanks-card p { color: var(--c-mid); margin-bottom: 28px; font-size: 1rem; }

/* === ADMIN TABS === */
.admin-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 20px; border-bottom: 2px solid var(--c-border); padding-bottom: 0; }
.tab-btn { background: none; border: none; padding: 10px 18px; font-weight: 600; color: var(--c-mid); cursor: pointer; font-size: 0.85rem; border-bottom: 3px solid transparent; transition: 0.2s; }
.tab-btn:hover { color: var(--c-primary); }
.tab-btn.active { color: var(--c-primary); border-bottom-color: var(--c-primary); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* === KPIs === */
.kpi-row { display: grid; grid-template-columns: repeat(5,1fr); gap: 14px; margin-bottom: 20px; }
@media(max-width:900px) { .kpi-row { grid-template-columns: repeat(2,1fr); } }
.kpi { background: #fff; border-radius: var(--radius); box-shadow: 0 4px 16px rgba(0,0,0,0.06); padding: 20px 16px; border-top: 4px solid var(--c-primary); text-align: center; transition: transform 0.2s, box-shadow 0.2s; }
.kpi:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.kpi .val { font-size: 2rem; font-weight: 800; color: var(--c-dark); }
.kpi .lbl { font-size: 0.72rem; color: var(--c-mid); text-transform: uppercase; letter-spacing: 0.3px; margin-top: 4px; }

/* === CHARTS === */
.chart-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
@media(max-width:900px) { .chart-grid { grid-template-columns: 1fr; } }
.chart-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; border: 1px solid var(--c-border); }
.chart-card h3 { font-size: 0.9rem; color: var(--c-dark); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.chart-card h3 i { color: var(--c-primary); }
.chart-wrap { height: 260px; position: relative; }

/* === SEMÁFORO === */
.semaforo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 10px; }
.sem-card { border-radius: 10px; padding: 12px; color: #fff; }
.sem-card .n { font-weight: 800; font-size: 1.3rem; }
.sem-card .t { font-size: 0.75rem; opacity: 0.9; }
.sem-green { background: var(--c-success); }
.sem-yellow { background: var(--c-warning); }
.sem-red { background: var(--c-danger); }

/* === TABLE === */
.table-wrap { overflow-x: auto; max-height: 500px; border: 1px solid var(--c-border); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid #f0f0f0; }
th { background: linear-gradient(135deg, #1a1a1a, #333); color: #fff; position: sticky; top: 0; font-size: 0.73rem; text-transform: uppercase; letter-spacing: 0.4px; }
tr:hover td { background: #fafafa; }
/* Tabla de encuestas: reparte el ancho disponible sin scroll horizontal en escritorio */
#tabEncuestas .table-wrap table { table-layout: fixed; width: 100%; }
#tblBody td { vertical-align: middle; }
/* Celdas de una sola línea con elipsis (filas de altura uniforme) */
.cell-clip {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* La columna de acciones (última) ocupa solo lo necesario */
#tabEncuestas .table-wrap table th:last-child,
#tabEncuestas .table-wrap table td:last-child { width: 90px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; }
.filters .field { margin-bottom: 0; min-width: 140px; flex: 1; }

/* === MODAL === */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.55); backdrop-filter: blur(4px); z-index: 200; align-items: center; justify-content: center; }
.modal-overlay.show { display: flex; }
.modal-box { background: #fff; border-radius: 16px; box-shadow: 0 16px 48px rgba(0,0,0,0.25); padding: 32px; width: 100%; max-width: 420px; }
.modal-box h3 { color: var(--c-primary); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; font-size: 1.1rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.login-error { color: var(--c-danger); font-size: 0.8rem; min-height: 16px; margin-top: 6px; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 40px; }
.password-toggle { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--c-mid); font-size: 0.9rem; padding: 4px; }
.password-toggle:hover { color: var(--c-primary); }
/* Botón para generar contraseña aleatoria (al lado del ojito) */
.password-wrap-gen input { padding-right: 70px; }
.password-gen { position: absolute; right: 38px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--c-mid); font-size: 0.95rem; padding: 4px; }
.password-gen:hover { color: var(--c-primary); }

/* === ACTION OVERLAY === */
.action-overlay { display: none; position: fixed; inset: 0; z-index: 300; background: rgba(0,0,0,0.45); backdrop-filter: blur(2px); align-items: center; justify-content: center; }
.action-overlay.show { display: flex; }
.action-box { text-align: center; padding: 30px 40px; background: #fff; border-radius: var(--radius); box-shadow: 0 4px 24px rgba(0,0,0,0.2); }
.action-box p { margin-top: 14px; font-size: 0.9rem; font-weight: 600; color: #333; }
.spinner { width: 44px; height: 44px; border: 4px solid #e0e0e0; border-top: 4px solid var(--c-primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* === TOAST === */
.toast { position: fixed; bottom: 20px; right: 20px; background: var(--c-dark); color: #fff; padding: 12px 20px; border-radius: 8px; box-shadow: var(--shadow); z-index: 999; font-size: 0.85rem; opacity: 0; transform: translateY(10px); transition: 0.25s; }
.toast.show { opacity: 1; transform: translateY(0); }

/* === BADGE === */
.badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 0.7rem; font-weight: 600; }
.badge-green { background: #e8f5e9; color: var(--c-success); }
.badge-red { background: #fce4ec; color: var(--c-danger); }
.badge-gray { background: #f0f0f0; color: #888; }

/* === CONFIG ROWS === */
.cfg-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.cfg-row input { flex: 1; }
.cfg-row .btn-sm { flex-shrink: 0; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .header-inner { padding: 0 12px; flex-wrap: wrap; gap: 8px; }
  .brand-logo { height: 28px; }
  .brand-title { font-size: 0.9rem; }
  .header-nav { gap: 4px; }
  .nav-btn { padding: 6px 10px; font-size: 0.75rem; }
  .nav-btn i { display: none; }
  #navReload i, #notifWrap i { display: inline; }

  .container { padding: 14px 10px 40px; }
  .card { padding: 16px; }
  .grid3 { grid-template-columns: 1fr; }
  .chart-grid { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .kpi .val { font-size: 1.4rem; }

  .admin-tabs { gap: 0; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .tab-btn { padding: 8px 12px; font-size: 0.78rem; white-space: nowrap; }

  .table-wrap { max-height: none; }
  table { font-size: 0.75rem; }
  th, td { padding: 6px 8px; }

  .flex-between { flex-direction: column; align-items: flex-start; gap: 10px; }
  .gap-8 { flex-wrap: wrap; }

  .filters { flex-direction: column; }
  .filters .field { min-width: 100%; }

  .modal-box { margin: 12px; padding: 20px; max-width: calc(100vw - 24px); }
  .modal-actions { flex-direction: column; }
  .modal-actions .btn { width: 100%; }

  .btn-row { flex-direction: column; }
  .btn-row .btn { width: 100%; text-align: center; }

  .semaforo-grid { grid-template-columns: repeat(2, 1fr); }
  .check-grid { grid-template-columns: 1fr; }

  .progress-wrap { top: 56px; }
}

@media (max-width: 480px) {
  .kpi-row { grid-template-columns: 1fr; }
  .brand-sep { display: none; }
  .header-nav { width: 100%; justify-content: center; }
  .semaforo-grid { grid-template-columns: 1fr; }
}

/* === CONFIG SECTIONS === */
.cfg-section-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  margin-bottom: 8px;
  background: #fafafa;
  transition: all 0.15s;
}
.cfg-section-row:hover { background: #fff; border-color: var(--c-primary); }
.cfg-section-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--c-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8rem; flex-shrink: 0;
}
.cfg-section-info { flex: 1; }
.cfg-section-info strong { display: block; font-size: 0.88rem; }
.cfg-section-info span { font-size: 0.75rem; color: var(--c-mid); }

/* === FORM BUILDER === */
.fb-nav { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; margin-bottom: 16px; border-bottom: 1px solid var(--c-border); }
.fb-nav-info { font-size: 0.85rem; font-weight: 600; color: var(--c-dark); }
.fb-section { border: 2px solid var(--c-primary); border-radius: var(--radius); margin-bottom: 24px; overflow: hidden; background: #fff; box-shadow: 0 4px 16px rgba(227,30,36,0.08); }
.fb-section-header { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: linear-gradient(135deg, #fce4ec, #fff0f0); border-bottom: 2px solid var(--c-primary); }
.fb-section-drag { color: var(--c-primary); cursor: grab; font-size: 1.1rem; opacity: 0.6; }
.fb-section-title-wrap { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.fb-section-title { border: none; background: transparent; font-size: 1rem; font-weight: 700; color: var(--c-primary); padding: 4px 8px; border-radius: 4px; }
.fb-section-title:focus { background: #fff; outline: 2px solid var(--c-primary); }
.fb-section-desc { border: none; background: transparent; font-size: 0.78rem; color: var(--c-mid); padding: 2px 8px; border-radius: 4px; }
.fb-section-desc:focus { background: #fff; outline: 1px solid var(--c-border); }
.fb-section-actions { display: flex; gap: 4px; flex-shrink: 0; }
.fb-questions { padding: 16px 18px; background: #fefafa; }
.fb-question { border: 1px solid #f0e0e0; border-left: 4px solid #E31E24; border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; background: #fef9f9; transition: all 0.15s; box-shadow: 0 1px 4px rgba(0,0,0,0.03); }
.fb-question:hover { border-left-color: #B71C1C; box-shadow: 0 2px 8px rgba(227,30,36,0.08); background: #fff; }
.fb-q-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fb-q-label { flex: 1; min-width: 200px; border: 1px solid #eee; background: #fafafa; padding: 8px 10px; border-radius: 6px; font-size: 0.85rem; font-weight: 500; }
.fb-q-label:focus { border-color: var(--c-primary); background: #fff; box-shadow: 0 0 0 3px rgba(227,30,36,0.08); }
.fb-q-type { width: 150px; padding: 7px 10px; border: 1px solid var(--c-border); border-radius: 6px; font-size: 0.78rem; background: #fff; }
.fb-q-req { display: flex; align-items: center; gap: 4px; font-size: 0.75rem; color: var(--c-mid); white-space: nowrap; }
.fb-q-req input { accent-color: var(--c-primary); }
.fb-q-extra { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #ddd; }
.fb-q-extra label { font-size: 0.75rem; color: var(--c-mid); margin-right: 4px; font-weight: 600; }
.fb-q-extra input[type=number] { padding: 5px 8px; border: 1px solid var(--c-border); border-radius: 4px; font-size: 0.8rem; }
.fb-q-extra textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--c-border); border-radius: 6px; font-size: 0.8rem; margin-top: 4px; resize: vertical; }
.fb-add-q { margin: 4px 18px 16px; }
.fb-section + .fb-section { margin-top: 28px; }

@media (max-width: 768px) {
  .fb-section-header { flex-wrap: wrap; }
  .fb-section-actions { width: 100%; justify-content: flex-end; margin-top: 8px; }
  .fb-q-row { flex-direction: column; align-items: stretch; }
  .fb-q-label { min-width: 100%; }
  .fb-q-type { width: 100%; }
}

/* === Question move buttons === */
.fb-q-move { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }
.btn-icon { width: 22px; height: 18px; display: flex; align-items: center; justify-content: center; border: 1px solid #ddd; border-radius: 4px; background: #fff; cursor: pointer; color: var(--c-mid); font-size: 0.65rem; transition: all 0.15s; }
.btn-icon:hover { border-color: var(--c-primary); color: var(--c-primary); background: #fff7f8; }
.btn-icon-placeholder { width: 22px; height: 18px; display: block; }

/* === Form Builder Option Rows === */
.fb-opt-row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.fb-opt-row input { padding: 6px 8px; border: 1px solid var(--c-border); border-radius: 4px; font-size: 0.8rem; }

/* === SURVEY STEPS === */
.step { display: none; }
.step.active { display: block; }

/* === AUTH LOGIN PAGE === */
.auth-overlay { position: fixed; inset: 0; background: linear-gradient(135deg, #f8f8f8 0%, #ffffff 50%, #f5f0f0 100%); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 20px; overflow: hidden; }
.auth-overlay.hidden { display: none; }
.watermark-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='560' height='120'%3E%3Ctext x='25%25' y='50%25' font-family='Inter,sans-serif' font-size='14' font-weight='700' fill='rgba(227,30,36,0.12)' text-anchor='middle' dominant-baseline='middle' transform='rotate(-30,140,60)' letter-spacing='4'%3EPROYECTOS%3C/text%3E%3Ctext x='75%25' y='50%25' font-family='Inter,sans-serif' font-size='14' font-weight='700' fill='rgba(227,30,36,0.12)' text-anchor='middle' dominant-baseline='middle' transform='rotate(-30,420,60)' letter-spacing='4'%3EENCUESTA CX%3C/text%3E%3C/svg%3E"); background-repeat: repeat; }
.auth-card { background: #fff; border-radius: 24px; padding: 50px 45px; max-width: 420px; width: 100%; box-shadow: 0 25px 80px rgba(0,0,0,0.12), 0 10px 30px rgba(227,30,36,0.06), 0 0 0 1px rgba(0,0,0,0.05); text-align: center; position: relative; overflow: hidden; z-index: 1; }
.auth-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: linear-gradient(90deg, var(--c-primary), #B71C1C, var(--c-primary)); }
.auth-logo { margin-bottom: 20px; }
.auth-logo img { height: 55px; }
.auth-card h2 { font-size: 1.4rem; font-weight: 700; color: #1a1a1a; margin-bottom: 4px; }
.auth-subtitle { font-size: 0.85rem; color: #888; margin-bottom: 28px; }
.auth-input-group { position: relative; margin-bottom: 16px; }
.auth-input-group input { width: 100%; padding: 14px 18px 14px 45px; border: 2px solid #e8e8e8; border-radius: 12px; font-size: 0.92rem; font-family: inherit; transition: all 0.2s; background: #f8f8f8; }
.auth-input-group input:focus { outline: none; border-color: var(--c-primary); background: #fff; box-shadow: 0 0 0 4px rgba(227,30,36,0.08); }
.auth-input-group .input-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #bbb; font-size: 0.95rem; }
.auth-input-group input:focus ~ .input-icon { color: var(--c-primary); }
.toggle-pass { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); background: none; border: none; color: #bbb; cursor: pointer; font-size: 0.95rem; padding: 4px; transition: color 0.2s; }
.toggle-pass:hover { color: var(--c-primary); }
.auth-btn { width: 100%; padding: 14px; background: linear-gradient(135deg, #E31E24, #B71C1C); color: #fff; border: none; border-radius: 12px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 0.3s; box-shadow: 0 4px 15px rgba(227,30,36,0.3); font-family: inherit; margin-top: 6px; }
.auth-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(227,30,36,0.4); }
.auth-error { color: var(--c-primary); font-size: 0.82rem; margin-top: 12px; min-height: 18px; font-weight: 500; }
.auth-link { margin-top: 16px; font-size: 0.82rem; color: var(--c-primary); cursor: pointer; font-weight: 500; transition: opacity 0.2s; }
.auth-link:hover { opacity: 0.7; }
.auth-footer { margin-top: 28px; padding-top: 18px; border-top: 1px solid #f0f0f0; font-size: 0.73rem; color: #aaa; }
.nav-user { font-size: 0.78rem; color: rgba(255,255,255,0.85); padding: 5px 12px; background: rgba(255,255,255,0.12); border-radius: 20px; border: 1px solid rgba(255,255,255,0.2); }

@media (max-width: 768px) {
  .auth-card { padding: 35px 25px; border-radius: 18px; }
  .auth-card h2 { font-size: 1.2rem; }
  .nav-user { display: none; }
}

/* === BANNER DE IDENTIDAD — PROBAR ENCUESTA ===
   Misma apariencia que el sitio publico (V2): banner 2:1 a todo el ancho, recuadro "Encuesta activa + nombre" encima en la franja inferior. */
.preview-survey-identity { position: relative; width: 100%; height: auto; margin: 0 auto 22px; overflow: hidden; border: 1px solid rgba(227,30,36,0.16); border-radius: 18px; background: #fff; box-shadow: 0 14px 40px rgba(183,28,28,0.14), 0 3px 10px rgba(0,0,0,0.06); }
.preview-survey-identity-image { display: block; width: 100%; height: auto; aspect-ratio: 2.1 / 1; object-fit: cover; object-position: center 46%; background: #fff; filter: none; }
.preview-survey-identity-overlay { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px); display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 16px; padding: 9px 26px 9px 14px; text-align: left; background: rgba(255,255,255,0.95); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(227,30,36,0.22); border-radius: 999px; box-shadow: 0 10px 28px rgba(0,0,0,0.16); }
.preview-survey-identity-label { position: relative; flex: none; margin: 0; padding: 5px 14px 5px 26px; border: 0; border-radius: 999px; background: linear-gradient(135deg, #B71C1C, #E31E24); color: #fff; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; box-shadow: 0 2px 8px rgba(227,30,36,0.35); }
.preview-survey-identity-label::before { content: ""; position: absolute; left: 10px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: #fff; animation: pv-pulse 1.8s ease-out infinite; }
@keyframes pv-pulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.7); } 70% { box-shadow: 0 0 0 7px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }
.preview-survey-identity h1 { margin: 0; max-width: none; color: #222; font-size: clamp(1.1rem, 1.9vw, 1.45rem); font-weight: 800; line-height: 1.2; text-shadow: none; text-wrap: balance; }
@media (max-width: 600px) {
  .preview-survey-identity { height: 285px; min-height: 0; margin-bottom: 16px; border-radius: 12px; }
  .preview-survey-identity-image { height: 100%; aspect-ratio: auto; object-fit: cover; object-position: center top; }
  .preview-survey-identity-overlay { bottom: 10px; flex-direction: column; gap: 4px; padding: 7px 14px 8px; border-radius: 12px; background: rgba(255,255,255,0.84); box-shadow: 0 6px 20px rgba(0,0,0,0.12); text-align: center; }
  .preview-survey-identity-label { font-size: 0.58rem; padding: 2px 10px 2px 22px; }
  .preview-survey-identity h1 { font-size: 1rem; }
}

/* === RESPONSIVE ADMIN MOBILE — sin afectar desktop === */
@media (max-width: 768px) {
  /* Survey selector */
  .survey-selector { padding: 12px 14px; }
  .survey-selector-inner { flex-direction: column; align-items: stretch; gap: 8px; }
  .survey-selector-inner label { font-size: 0.8rem; }
  .survey-selector-inner select { min-width: 100%; font-size: 0.82rem; padding: 10px 12px; }
  .survey-selector-inner .btn { width: 100%; justify-content: center; }
  .survey-publish-info { flex-wrap: wrap; font-size: 0.72rem; gap: 6px; }
  .survey-publish-info a { word-break: break-all; }

  /* KPIs más compactos */
  .kpi { padding: 14px 10px; }
  .kpi .lbl { font-size: 0.65rem; }

  /* Tablas admin */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 600px; }

  /* Botones de exportar */
  .gap-8 { gap: 6px; }
  .gap-8 .btn { font-size: 0.7rem; padding: 5px 8px; }

  /* Chart cards */
  .chart-card { padding: 14px; }
  .chart-card h3 { font-size: 0.8rem; }
  .chart-wrap { height: 200px; }

  /* Config form builder */
  .fb-questions { padding: 12px; }
  .fb-question { padding: 10px; }
  .fb-q-label { font-size: 0.8rem; }

  /* Admin users table */
  #tabUsuarios .table-wrap table { min-width: 500px; }

  /* Seguridad */
  #tabSeguridad .card { padding: 14px; }
}

@media (max-width: 480px) {
  /* Header nav stacks */
  .nav-btn { padding: 5px 8px; font-size: 0.68rem; }

  /* Survey selector even more compact */
  .survey-selector { padding: 10px; margin-bottom: 12px; }
  .survey-selector-inner select { padding: 8px 10px; font-size: 0.78rem; }

  /* KPIs single column */
  .kpi .val { font-size: 1.2rem; }
  .kpi { padding: 12px 8px; }

  /* Filters compact */
  .filters .field label { font-size: 0.72rem; }
  .filters .field input,
  .filters .field select { font-size: 0.78rem; padding: 8px; }

  /* Modals full screen */
  .modal-box { margin: 8px; padding: 16px; max-height: 90vh; overflow-y: auto; }

  /* Chart wrap smaller */
  .chart-wrap { height: 170px; }

  /* Table text smaller */
  table { font-size: 0.68rem; }
  th, td { padding: 5px 6px; }

  /* Form builder more compact */
  .fb-section-header { padding: 12px; }
  .fb-section-title { font-size: 0.9rem; }
  .fb-add-q { margin: 4px 12px 12px; }
}

/* === TAB IA — color morado solo texto === */
.tab-btn-ai { color: #7c3aed !important; font-weight: 700; }
.tab-btn-ai:hover { color: #5b21b6 !important; }
.tab-btn-ai.active { color: #7c3aed !important; border-bottom-color: #7c3aed !important; }

/* === AI REPORT — prevent hover white on badges === */
#aiReportContent table tr:hover td { background: inherit !important; }
#aiReportContent table tr:hover { background: #f9f9f9 !important; }
#aiReportContent span { color: inherit !important; }
#aiReportContent table tr:hover span { color: inherit !important; }

/* === AI Reports table — lighter colors === */
#tabIA .card:nth-child(2) { border-left: 4px solid #7c3aed; }
#tabIA .card:nth-child(2) h3 { color: #7c3aed; margin-bottom: 16px; }
#tabIA .table-wrap table thead tr { background: #4a4a4a !important; }
#tabIA .table-wrap table thead th { background: transparent !important; color: #fff !important; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; }
#tabIA .table-wrap table tbody tr { border-bottom: 1px solid #eee; }
#tabIA .table-wrap table tbody tr:nth-child(even) td { background: #f9f9f9; }
#tabIA .table-wrap table tbody tr:hover td { background: #f3f3f3; }

/* === RESPONSIVE — Tab Seguridad === */
@media (max-width: 768px) {
  #tabSeguridad .card { padding: 14px; overflow-x: auto; }
  #tabSeguridad h3 { font-size: 0.9rem; }
  #tabSeguridad p, #tabSeguridad li { font-size: 0.78rem; }
  #tabSeguridad div[style*="display:flex"][style*="justify-content:space-between"] { flex-direction: column; gap: 10px; align-items: flex-start !important; }
  #tabSeguridad div[style*="display:flex"][style*="flex-wrap:wrap"] { gap: 6px !important; }
  #tabSeguridad span[style*="border-radius:20px"] { font-size: 0.68rem !important; padding: 4px 10px !important; }
  #tabSeguridad table { font-size: 0.72rem; min-width: 500px; }
  #tabSeguridad th, #tabSeguridad td { padding: 6px 8px; }
  #tabSeguridad .btn { font-size: 0.72rem; padding: 5px 10px; }
  #tabSeguridad .table-wrap,
  #tabSeguridad div[style*="overflow"] { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
@media (max-width: 480px) {
  #tabSeguridad div[style*="display:flex"][style*="justify-content:space-between"] { flex-direction: column; gap: 8px; }
  #tabSeguridad strong { font-size: 0.75rem; }
  #tabSeguridad span[style*="margin-left"] { display: block; margin-left: 0 !important; margin-top: 4px; }
}

/* Switch para toggle IA en el módulo Permisos */
.perm-switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.perm-switch input { opacity: 0; width: 0; height: 0; }
.perm-slider { position: absolute; cursor: pointer; inset: 0; background: #cfd4da; border-radius: 22px; transition: .25s; }
.perm-slider::before { content: ''; position: absolute; height: 16px; width: 16px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: .25s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.perm-switch input:checked + .perm-slider { background: #16a34a; }
.perm-switch input:checked + .perm-slider::before { transform: translateX(18px); }

/* Modal de restricción de encuestas */
.rest-modal { text-align: left; }
.rest-modal-sub { font-size: 0.88rem; color: #555; background: #fff5f5; border-left: 3px solid #E31E24; padding: 10px 12px; border-radius: 8px; margin-bottom: 14px; }
.rest-modal-sub i { color: #E31E24; margin-right: 4px; }
.rest-modal-empty { color: #888; text-align: center; padding: 20px; }
.rest-all { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.85rem; color: #333; padding: 8px 4px; margin-bottom: 8px; border-bottom: 1px dashed #e0e0e0; cursor: pointer; }
.rest-all input { width: 16px; height: 16px; accent-color: #E31E24; }
.rest-modal-list { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow: auto; padding-right: 4px; }
.rest-card { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1.5px solid #e6e8ec; border-radius: 12px; cursor: pointer; transition: all .18s ease; }
.rest-card:hover { border-color: #E31E24; background: #fffafa; }
.rest-card input { display: none; }
.rest-card-icon { width: 34px; height: 34px; border-radius: 9px; background: #eef2f6; color: #64748b; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all .18s; }
.rest-card-name { flex: 1; font-size: 0.9rem; font-weight: 500; color: #1a1a1a; }
.rest-card-state { color: #cbd5e1; font-size: 1rem; transition: all .18s; }
.rest-card.is-blocked { border-color: #E31E24; background: #fff1f1; }
.rest-card.is-blocked .rest-card-icon { background: #E31E24; color: #fff; }
.rest-card.is-blocked .rest-card-state { color: #E31E24; }

/* === OPCIONES LARGAS: sin desbordes y con texto que se ajusta (select / opción única / selección múltiple) === */
.field { min-width: 0; }
.field > label { overflow-wrap: anywhere; }
.check-item { min-width: 0; max-width: 100%; box-sizing: border-box; }
.check-item .ci-txt { min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; }
.check-item .ci-txt span { display: block; line-height: 1.4; }
.check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.check-grid.is-list { grid-template-columns: minmax(0, 1fr); }
.radio-grid.is-list { flex-direction: column; flex-wrap: nowrap; }
.radio-grid.is-list .check-item { flex: 1 1 auto; justify-content: flex-start; text-align: left; }
select { max-width: 100%; text-overflow: ellipsis; }
select option { white-space: normal; }
.check-item:focus-within { outline: 2px solid var(--c-primary); outline-offset: 2px; }
/* Desplegable con textos largos: se muestra como tarjetas; el <select> real queda oculto para conservar lectura, validación y envío */
.opt-native { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; margin: 0; padding: 0; border: 0; overflow: hidden; }
.opt-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.opt-card { align-items: flex-start; gap: 12px; padding: 12px 14px; margin: 0; font-weight: 400; line-height: 1.4; }
.opt-card input { flex: 0 0 auto; margin-top: 3px; }
.opt-card .ci-txt strong { margin-bottom: 3px; font-weight: 700; }
.opt-card .ci-txt span { font-size: 0.84rem; color: var(--c-text, #444); opacity: 0.9; }
.opt-card .ci-txt .opt-plain { font-size: 0.88rem; color: var(--c-text, var(--c-dark, #1a1a1a)); opacity: 1; }
@media (max-width: 760px) {
  .check-grid { grid-template-columns: minmax(0, 1fr); }
  .check-item { padding: 12px; min-height: 44px; }
  input[type=text], input[type=email], input[type=date], input[type=number], textarea, select { font-size: 16px; }
}

/* === CONSTRUCTOR GUIADO (Configuración): tipos claros, vista previa en vivo y avisos amigables === */
.fbq-muted { color: var(--c-mid); font-weight: 400; font-size: 0.74rem; }
.fbq-lbl { display: block; font-size: 0.74rem; font-weight: 700; color: var(--c-dark); margin: 10px 0 4px; letter-spacing: 0.1px; }
.fbq-help { background: #fff8e1; border: 1px solid #ffe082; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: 0.82rem; color: #5d4037; }
.fbq-help summary { cursor: pointer; font-weight: 700; color: #6d4c00; list-style: none; display: flex; align-items: center; gap: 8px; }
.fbq-help summary::-webkit-details-marker { display: none; }
.fbq-help summary small { font-weight: 400; color: #8d6e00; }
.fbq-help ol { margin: 10px 0 2px 20px; padding: 0; line-height: 1.55; }
.fbq-help li { margin-bottom: 4px; }
.fb-section-title-wrap .fbq-lbl { margin: 2px 8px 0; }
.fb-section-title-wrap .fbq-lbl:not(:first-child) { margin-top: 8px; }
.fb-section-title, .fb-section-desc { border: 1px solid transparent; background: rgba(255,255,255,0.7); }
.fb-section-title:hover, .fb-section-desc:hover { border-color: var(--c-border); }

.fbq { border: 1px solid #f0e0e0; border-left: 4px solid var(--c-primary); border-radius: 10px; padding: 12px 16px 14px; margin-bottom: 14px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.fbq:focus-within { border-color: #f3b3b6; box-shadow: 0 3px 14px rgba(227,30,36,0.10); }
.fbq-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fbq-num { display: inline-flex; align-items: center; gap: 6px; background: #fce4ec; color: var(--c-primary); font-weight: 800; font-size: 0.8rem; padding: 4px 10px; border-radius: 999px; }
.fbq-typename { font-size: 0.78rem; font-weight: 700; color: var(--c-dark); }
.fbq-move { display: flex; gap: 4px; }
.fbq-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fbq-iconbtn { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--c-border); border-radius: 8px; background: #fff; color: var(--c-mid); cursor: pointer; font-size: 0.8rem; transition: 0.15s; }
.fbq-iconbtn:hover:not(:disabled) { border-color: var(--c-primary); color: var(--c-primary); background: #fff7f8; }
.fbq-iconbtn:disabled { opacity: 0.35; cursor: default; }
.fbq-danger:hover:not(:disabled) { background: var(--c-danger); border-color: var(--c-danger); color: #fff; }
.fbq-switch { display: inline-flex; align-items: center; gap: 8px; font-size: 0.78rem; font-weight: 600; color: var(--c-dark); cursor: pointer; user-select: none; }
.fbq-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.fbq-slider { position: relative; width: 36px; height: 20px; border-radius: 999px; background: #cfd4da; transition: 0.2s; flex: 0 0 auto; }
.fbq-slider::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.25); transition: 0.2s; }
.fbq-switch input:checked + .fbq-slider { background: var(--c-primary); }
.fbq-switch input:checked + .fbq-slider::after { transform: translateX(16px); }
.fbq-switch input:focus-visible + .fbq-slider { outline: 2px solid var(--c-primary); outline-offset: 2px; }
.fbq-label { width: 100%; font-size: 0.92rem; font-weight: 600; }
.fbq-typerow { margin-top: 2px; }
.fbq-type { width: 100%; max-width: 460px; padding: 8px 10px; font-size: 0.82rem; }
.fbq-typehelp { margin: 6px 0 0; font-size: 0.76rem; color: var(--c-mid); line-height: 1.45; display: flex; gap: 8px; align-items: flex-start; }
.fbq-typehelp i { color: var(--c-primary); margin-top: 2px; }
.fbq-extra { margin-top: 12px; padding: 12px 14px; background: #fafafa; border: 1px solid #eee; border-radius: 10px; }
.fbq-extra-title { font-size: 0.8rem; font-weight: 700; color: var(--c-dark); margin-bottom: 8px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.fbq-extra-title span { font-weight: 400; font-size: 0.72rem; color: var(--c-mid); }
.fbq-opts { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.fbq-opt { display: flex; align-items: center; gap: 8px; }
.fbq-opt input[type=text] { flex: 1; min-width: 0; padding: 8px 10px; font-size: 0.84rem; }
.fbq-optta { flex: 1; min-width: 0; resize: none; overflow: hidden; min-height: 38px; padding: 8px 10px; font: inherit; font-size: 0.84rem; line-height: 1.4; field-sizing: content; }
.fbq-optmark { flex: 0 0 24px; text-align: center; color: var(--c-mid); font-size: 0.78rem; font-weight: 700; }
.fbq-areahead { display: flex; gap: 8px; font-size: 0.7rem; font-weight: 700; color: var(--c-mid); margin-bottom: 4px; padding-right: 38px; }
.fbq-areahead span:first-child { flex: 1; } .fbq-areahead span:last-child { flex: 2; }
.fbq-grid4 { display: grid; grid-template-columns: 90px 90px minmax(0,1fr) minmax(0,1fr); gap: 10px; }
.fbq-grid4 .fbq-lbl { margin-top: 0; }
.fbq-grid4 input { width: 100%; padding: 8px 10px; font-size: 0.84rem; }
.fbq-presets { display: flex; align-items: center; gap: 6px; font-size: 0.74rem; color: var(--c-mid); margin-bottom: 10px; }
.fbq-chip { border: 1px solid var(--c-border); background: #fff; border-radius: 999px; padding: 4px 12px; font-size: 0.74rem; font-weight: 700; cursor: pointer; color: var(--c-dark); }
.fbq-chip:hover, .fbq-chip.on { border-color: var(--c-primary); color: var(--c-primary); background: #fff7f8; }
.fbq-check { display: flex; gap: 8px; align-items: center; margin-top: 12px; font-size: 0.78rem; color: var(--c-dark); cursor: pointer; }
.fbq-check input { accent-color: var(--c-primary); }
.fbq-display { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px dashed #ddd; }
.fbq-display select { width: auto; min-width: 170px; padding: 6px 10px; font-size: 0.8rem; }

.fbq-previewbox { margin-top: 12px; border: 1px dashed #d9dde3; border-radius: 10px; background: #fbfcfd; padding: 10px 14px 12px; }
.fbq-prevtitle { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; color: var(--c-mid); margin-bottom: 8px; display: flex; gap: 6px; align-items: center; }
.fbq-prev { pointer-events: none; user-select: none; }
.fbp-label { font-size: 0.84rem; font-weight: 600; color: var(--c-dark); margin-bottom: 6px; overflow-wrap: anywhere; }
.fbp-req { color: var(--c-primary); }
.fbp-input { border: 1px solid #dcdfe4; border-radius: 8px; background: #fff; color: #9aa0a6; padding: 9px 12px; font-size: 0.82rem; }
.fbp-area { min-height: 54px; }
.fbp-select { display: flex; justify-content: space-between; align-items: center; }
.fbp-open { margin-top: 4px; border: 1px solid #dcdfe4; border-radius: 8px; background: #fff; overflow: hidden; }
.fbp-listitem { padding: 6px 12px; font-size: 0.8rem; color: var(--c-dark); border-bottom: 1px solid #f1f2f4; overflow-wrap: anywhere; }
.fbp-listitem:last-child { border-bottom: 0; }
.fbp-note { font-size: 0.7rem; color: var(--c-mid); padding: 4px 12px 2px; font-style: italic; }
.fbp-more { font-size: 0.74rem; color: var(--c-mid); font-style: italic; padding: 4px 2px; }
.fbp-opts, .fbp-areas { display: flex; flex-direction: column; gap: 6px; }
.fbp-areas { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
.fbp-opt { display: flex; gap: 10px; align-items: flex-start; font-size: 0.82rem; color: var(--c-dark); overflow-wrap: anywhere; }
.fbp-opt i { color: #9aa0a6; margin-top: 3px; }
.fbp-card { display: flex; gap: 10px; align-items: flex-start; border: 1px solid #dcdfe4; border-radius: 8px; background: #fff; padding: 8px 12px; font-size: 0.8rem; overflow-wrap: anywhere; }
.fbp-card i { color: #9aa0a6; margin-top: 3px; }
.fbp-card strong { display: block; font-size: 0.82rem; }
.fbp-card span { display: block; color: var(--c-mid); font-size: 0.74rem; line-height: 1.4; }
.fbp-scale { display: flex; flex-wrap: wrap; gap: 6px; }
.fbp-scale span { min-width: 34px; text-align: center; border: 1.5px solid #dcdfe4; border-radius: 8px; background: #fff; font-weight: 700; font-size: 0.8rem; padding: 7px 0; color: var(--c-dark); }
.fbp-scale .fbp-na { padding: 7px 10px; color: var(--c-mid); }
.fbp-scalelabels { display: flex; justify-content: space-between; gap: 10px; font-size: 0.7rem; color: var(--c-mid); margin-top: 5px; }
.fbp-heading { border-left: 3px solid var(--c-primary); padding-left: 12px; }
.fbp-heading strong { display: block; font-size: 0.92rem; color: var(--c-primary); }
.fbp-heading span { display: block; font-size: 0.78rem; color: var(--c-mid); margin-top: 3px; }
.fbq-warn { margin-top: 8px; padding: 7px 12px; border-radius: 8px; background: #fff3e0; border: 1px solid #ffe0b2; color: #b34700; font-size: 0.76rem; display: flex; gap: 8px; align-items: center; }

.fbq-empty { text-align: center; padding: 26px 16px; border: 2px dashed #e6c9cb; border-radius: 12px; background: #fffafa; color: var(--c-mid); display: flex; flex-direction: column; gap: 4px; align-items: center; }
.fbq-empty i { font-size: 1.6rem; color: var(--c-primary); opacity: 0.7; }
.fbq-empty strong { color: var(--c-dark); font-size: 0.9rem; }
.fbq-empty span { font-size: 0.78rem; }
.fbq-add { padding: 4px 18px 18px; }
.fbq-addbtn { width: 100%; justify-content: center; padding: 12px 16px; font-size: 0.88rem; }
.fbq-picker { margin-top: 12px; border: 1px solid #f0d4d6; background: #fffafa; border-radius: 12px; padding: 14px; }
.fbq-picker-title { font-size: 0.86rem; font-weight: 800; color: var(--c-dark); margin-bottom: 10px; }
.fbq-picker-title small { font-weight: 400; color: var(--c-mid); margin-left: 6px; }
.fbq-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.fbq-tile { text-align: left; display: grid; grid-template-columns: 34px 1fr; column-gap: 10px; align-items: center; border: 1px solid var(--c-border); background: #fff; border-radius: 10px; padding: 10px 12px; cursor: pointer; transition: 0.15s; font-family: inherit; }
.fbq-tile i { grid-row: 1 / span 2; width: 34px; height: 34px; border-radius: 9px; background: #fce4ec; color: var(--c-primary); display: flex; align-items: center; justify-content: center; font-size: 0.95rem; }
.fbq-tile strong { font-size: 0.82rem; color: var(--c-dark); }
.fbq-tile span { font-size: 0.72rem; color: var(--c-mid); line-height: 1.3; }
.fbq-tile:hover, .fbq-tile:focus-visible { border-color: var(--c-primary); background: #fff7f8; transform: translateY(-1px); box-shadow: 0 3px 10px rgba(227,30,36,0.10); outline: none; }
@media (max-width: 760px) {
  .fbq { padding: 10px 12px 12px; }
  .fbq-actions { width: 100%; margin-left: 0; justify-content: space-between; }
  .fbq-type { max-width: 100%; }
  .fbq-grid4 { grid-template-columns: 1fr 1fr; }
  .fbp-areas { grid-template-columns: minmax(0,1fr); }
  .fbq-add { padding: 4px 12px 14px; }
  .fbq-tiles { grid-template-columns: 1fr; }
}

/* === SELECTOR DE BANNER (Configuración) === */
.bn-status { font-size: 0.72rem; color: #666; background: #f3f3f3; border-radius: 999px; padding: 4px 12px; }
.bn-status.is-custom { color: #1b5e20; background: #e8f5e9; }
.bn-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; align-items: start; margin-top: 10px; }
.bn-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.bn-opt { position: relative; border: 2px solid #e4e4e4; border-radius: 12px; background: #fff; cursor: pointer; padding: 6px; text-align: center; transition: border-color .15s, box-shadow .15s; font-family: inherit; }
.bn-opt:hover { border-color: #f1a0a3; }
.bn-opt.is-selected { border-color: #E31E24; box-shadow: 0 0 0 3px rgba(227,30,36,0.12); }
.bn-opt.is-disabled { opacity: .55; cursor: not-allowed; }
.bn-opt-thumb { display: block; width: 100%; aspect-ratio: 2 / 1; border-radius: 8px; object-fit: cover; background: #f1f1f1; }
.bn-opt-empty { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 4px; width: 100%; aspect-ratio: 2 / 1; border-radius: 8px; border: 2px dashed #cfcfcf; color: #888; font-size: 1.3rem; background: #fafafa; }
.bn-opt-empty small { font-size: 0.66rem; }
.bn-opt-name { display: block; margin-top: 6px; font-size: 0.78rem; font-weight: 700; color: #333; }
.bn-opt-check { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%; background: #E31E24; color: #fff; font-size: 0.7rem; display: none; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,0.25); }
.bn-opt.is-selected .bn-opt-check { display: flex; }
.bn-opt-change { display: inline-block; margin-top: 4px; font-size: 0.68rem; color: #E31E24; font-weight: 600; }
.bn-live { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid rgba(227,30,36,0.18); box-shadow: 0 6px 18px rgba(0,0,0,0.1); background: #eee; }
.bn-live img { display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.bn-live-pill { position: absolute; left: 50%; bottom: 3.5%; transform: translateX(-50%); width: max-content; display: flex; align-items: center; gap: 8px; max-width: 94%; padding: 3px 12px 3px 4px; background: rgba(255,255,255,0.95); border: 1px solid rgba(227,30,36,0.22); border-radius: 999px; box-shadow: 0 4px 12px rgba(0,0,0,0.16); }
.bn-live-tag { flex: none; background: linear-gradient(135deg, #B71C1C, #E31E24); color: #fff; font-size: 0.5rem; font-weight: 700; letter-spacing: .08em; padding: 3px 8px; border-radius: 999px; }
.bn-live-name { font-size: 0.62rem; font-weight: 800; color: #222; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bn-live-cap { margin: 6px 2px 0; font-size: 0.7rem; color: #888; }
.bn-help { margin-top: 12px; font-size: 0.8rem; color: #555; background: #fafafa; border: 1px solid #eee; border-radius: 10px; padding: 8px 12px; }
.bn-help summary { cursor: pointer; font-weight: 600; color: #333; }
.bn-help ul { margin: 8px 0 2px 18px; padding: 0; line-height: 1.5; }
.bn-crop-wrap { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid #ddd; }
.bn-crop-wrap img { display: block; width: 100%; aspect-ratio: 2 / 1; }
.bn-crop-zone { position: absolute; left: 0; right: 0; bottom: 0; height: 25%; background: repeating-linear-gradient(135deg, rgba(227,30,36,0.18) 0 8px, rgba(227,30,36,0.08) 8px 16px); border-top: 2px dashed #E31E24; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700; color: #B71C1C; }
.bn-crop-zone span { background: rgba(255,255,255,0.94); padding: 3px 12px; border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.bn-crop-side { position: absolute; top: 0; bottom: 0; width: 17%; background: rgba(0,0,0,0.28); }
.bn-crop-side.l { left: 0; } .bn-crop-side.r { right: 0; }
.bn-crop-legend { text-align: left; font-size: 0.74rem; color: #555; margin: 8px 0 0; line-height: 1.5; }
@media (max-width: 860px) { .bn-layout { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .bn-options { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* === Tarjeta plegable del banner (cerrada por defecto) === */
.bn-card { padding: 0; }
.bn-summary { display: flex; align-items: center; gap: 12px; padding: 18px 28px; cursor: pointer; list-style: none; user-select: none; }
.bn-summary::-webkit-details-marker { display: none; }
.bn-summary::marker { content: ""; }
.bn-card .bn-summary h2 { flex: 1; margin: 0; padding: 0; border: 0; }
.bn-chev { color: var(--c-mid); font-size: 0.9rem; transition: transform .2s; }
.bn-card[open] .bn-chev { transform: rotate(180deg); color: var(--c-primary); }
.bn-card > :not(summary) { margin-left: 28px; margin-right: 28px; }
.bn-card[open] .bn-summary { border-bottom: 2px solid #f0f0f0; margin-bottom: 14px; }
.bn-card[open] { padding-bottom: 24px; }
.bn-summary:hover .bn-chev { color: var(--c-primary); }
@media (max-width: 600px) { .bn-summary { padding: 14px 16px; } .bn-card > :not(summary) { margin-left: 16px; margin-right: 16px; } }

/* === Nombre de la encuesta (Configuración) === */
.nm-row { display: flex; gap: 10px; align-items: stretch; }
.nm-row input[type=text] { flex: 1; min-width: 0; }
.nm-row .btn { flex: none; white-space: nowrap; }
.nm-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; font-size: 0.74rem; color: var(--c-mid); min-height: 1em; }
#surveyNameErr { color: var(--c-danger); font-weight: 600; }
#surveyNameInput.is-invalid { border-color: var(--c-danger); box-shadow: 0 0 0 3px rgba(198,40,40,0.1); }
@media (max-width: 600px) { .nm-row { flex-direction: column; } }
#surveyNameStatus { max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 600px) { #surveyNameStatus { display: none; } }

/* === MODO CUESTIONARIO (panel) === */
.qz-group { margin: 0 0 14px; }
.qz-title { font-size: 0.8rem; font-weight: 700; color: var(--c-dark); margin-bottom: 6px; }
.qz-radio { display: flex; align-items: center; gap: 8px; font-size: 0.84rem; color: #333; padding: 4px 0; cursor: pointer; }
.qz-info { font-size: 0.82rem; color: #1b5e20; background: #e8f5e9; border: 1px solid #c8e6c9; border-radius: 8px; padding: 9px 12px; margin: 6px 0 10px; }
.qz-info.warn { color: #8a5300; background: #fff8e1; border-color: #ffe0a3; }
.qz-note { font-size: 0.76rem; color: #666; background: #f5f5f5; border-radius: 8px; padding: 8px 12px; }
.fbq-opt.is-correct textarea { border-color: #66bb6a; background: #f1faf2; }
.fbq-correct { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 2px solid #cfd8dc; background: #fff; color: #b0bec5; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem; transition: all .15s; }
.fbq-correct:hover { border-color: #66bb6a; color: #66bb6a; }
.fbq-correct.on { background: #2e7d32; border-color: #2e7d32; color: #fff; box-shadow: 0 0 0 3px rgba(46,125,50,0.15); }
.fbq-quiz { margin-top: 12px; padding: 12px 14px; border: 1px dashed #a5d6a7; background: #fafffa; border-radius: 10px; }
.fbq-quizrow { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-top: 8px; }
.fbq-quizpts { width: 110px; }
.fbq-quizexp { flex: 1; min-width: 220px; }
.fbq-quizpts input, .fbq-quizexp input { width: 100%; box-sizing: border-box; }
.fbq-quizstate { margin-top: 8px; font-size: 0.78rem; font-weight: 600; }
.fbq-quizstate.ok { color: #2e7d32; } .fbq-quizstate.warn { color: #b26a00; }
/* resultado del cuestionario (panel: Probar encuesta y detalle) */
.qzr { margin: 14px auto 6px; max-width: 560px; text-align: center; }
.qzr-score { font-size: 1.1rem; } .qzr-score b { font-size: 2.2rem; } .qzr-score small { font-size: 0.9rem; color: #777; }
.qzr-badge { display: inline-block; margin: 6px 0 4px; padding: 4px 14px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; }
.qzr-badge.ok { background: #e8f5e9; color: #2e7d32; border: 1px solid #66bb6a; } .qzr-badge.no { background: #fdecea; color: #c62828; border: 1px solid #ef9a9a; }
.qzr-list { text-align: left; margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.qzr-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; border: 1px solid; font-size: 0.84rem; }
.qzr-item.ok { background: #f1faf2; border-color: #c8e6c9; } .qzr-item.ok > i { color: #2e7d32; }
.qzr-item.no { background: #fff5f5; border-color: #f3c0c2; } .qzr-item.no > i { color: #c62828; }
.qzr-item > div { flex: 1; min-width: 0; } .qzr-q { font-weight: 600; color: #222; overflow-wrap: anywhere; }
.qzr-c { color: #555; margin-top: 3px; } .qzr-e { color: #666; font-style: italic; margin-top: 3px; }
.qzr-p { font-weight: 700; white-space: nowrap; color: #444; }
.qzr-admin { max-width: none; text-align: left; margin: 0 0 16px; padding: 12px 14px; background: #fafafa; border: 1px solid #eee; border-radius: 10px; }
.qzr-admin .qzr-head { font-size: 0.95rem; } .qzr-admin .qzr-head b { font-size: 1.15rem; } .qzr-admin .qzr-head small { color: #777; }
.qzr-admin .qzr-badge { margin: 0 0 0 10px; }
/* estadísticas en el Resumen */
.qzs-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.qzs-kpis .kpi .val { font-size: 1.35rem; }
.qzs-title { font-size: 0.8rem; font-weight: 700; color: var(--c-dark); margin: 6px 0; }
.qzs-row { display: flex; align-items: center; gap: 10px; font-size: 0.82rem; padding: 4px 0; }
.qzs-q { flex: 0 0 38%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qzs-bar { flex: 1; height: 8px; background: #eee; border-radius: 4px; overflow: hidden; } .qzs-bar i { display: block; height: 100%; background: #e53935; }
.qzs-pf { flex: 0 0 80px; text-align: right; font-weight: 700; color: #c62828; }
@media (max-width: 860px) { .qzs-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .qzs-q { flex-basis: 45%; } }

/* === CUESTIONARIO: tarjeta de ajustes (rediseño) === */
.qz-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 4px 0 16px; }
.qz-step { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid #e8e8e8; border-radius: 12px; background: #fafafa; }
.qz-n { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--c-primary); color: #fff; font-weight: 800; font-size: 0.85rem; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(227,30,36,0.3); }
.qz-step b { display: block; font-size: 0.86rem; color: var(--c-dark); }
.qz-step small { display: block; margin-top: 2px; font-size: 0.76rem; color: #666; line-height: 1.4; }
.qz-step em, .qz-note em, .fbq-quizhead em, .fbq-quizbanner em, .qz-empty em { font-style: normal; font-weight: 700; color: #2e7d32; background: #e8f5e9; padding: 0 5px; border-radius: 5px; white-space: nowrap; }
.qz-switchcard { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 2px solid #e4e4e4; border-radius: 14px; background: #fff; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.qz-switchcard:hover { border-color: #f1a0a3; }
.qz-switchcard:has(input:checked) { border-color: var(--c-primary); background: #fff7f7; box-shadow: 0 0 0 3px rgba(227,30,36,0.08); }
.qz-switch-ico { flex: none; width: 46px; height: 46px; border-radius: 12px; background: #fdecec; color: var(--c-primary); display: inline-flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.qz-switch-txt { flex: 1; min-width: 0; } .qz-switch-txt b { display: block; font-size: 0.95rem; color: var(--c-dark); } .qz-switch-txt small { display: block; margin-top: 3px; font-size: 0.78rem; color: #666; line-height: 1.45; }
.qz-switch { flex: none; transform: scale(1.25); transform-origin: right center; }
.qz-block-title { margin: 20px 0 10px; font-size: 0.82rem; font-weight: 800; letter-spacing: .02em; color: var(--c-dark); text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.qz-block-title i { color: var(--c-primary); }
.qz-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.qz-choice { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 2px solid #e4e4e4; border-radius: 12px; cursor: pointer; background: #fff; transition: border-color .15s, background .15s; }
.qz-choice input { position: absolute; opacity: 0; pointer-events: none; }
.qz-choice:hover { border-color: #f1a0a3; }
.qz-choice:has(input:checked) { border-color: var(--c-primary); background: #fff7f7; box-shadow: 0 0 0 3px rgba(227,30,36,0.08); }
.qz-choice:has(input:disabled) { opacity: .6; cursor: not-allowed; }
.qz-choice-ico { flex: none; width: 34px; height: 34px; border-radius: 9px; background: #f1f1f1; color: #777; display: inline-flex; align-items: center; justify-content: center; }
.qz-choice:has(input:checked) .qz-choice-ico { background: var(--c-primary); color: #fff; }
.qz-choice-txt b { display: block; font-size: 0.86rem; color: var(--c-dark); } .qz-choice-txt small { display: block; margin-top: 2px; font-size: 0.74rem; color: #666; line-height: 1.35; }
.qz-rows { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.qz-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid #e8e8e8; border-radius: 12px; background: #fff; cursor: pointer; }
.qz-row > input[type=checkbox] { flex: none; width: 18px; height: 18px; accent-color: var(--c-primary); }
.qz-row > span:not(.qz-pct) { flex: 1; min-width: 0; } .qz-row b { display: block; font-size: 0.85rem; color: var(--c-dark); } .qz-row small { display: block; margin-top: 1px; font-size: 0.75rem; color: #777; }
.qz-pct { flex: none; display: inline-flex; align-items: center; gap: 6px; } .qz-pct input { width: 74px; text-align: center; font-weight: 700; } .qz-pct i { font-style: normal; font-weight: 800; color: #555; }
.qz-summary { border-radius: 12px; }
.qz-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.qz-tile { text-align: center; padding: 14px 10px; border-radius: 12px; background: #f1faf2; border: 1px solid #c8e6c9; }
.qz-tile b { display: block; font-size: 1.8rem; line-height: 1.1; color: #1b5e20; font-weight: 800; } .qz-tile span { display: block; margin-top: 4px; font-size: 0.76rem; color: #3c6e3f; font-weight: 600; }
.qz-tile.warn { background: #fff8e1; border-color: #ffe0a3; } .qz-tile.warn b { color: #b26a00; } .qz-tile.warn span { color: #8a5300; }
.qz-hint { margin-top: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 10px; background: #fff8e1; border: 1px solid #ffe0a3; color: #8a5300; font-size: 0.8rem; }
.qz-hint i { color: #e6a100; } .qz-hint span { flex: 1; min-width: 200px; }
.qz-empty { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 18px; border-radius: 12px; background: #fff8e1; border: 1px dashed #f0b429; }
.qz-empty > i { font-size: 1.5rem; color: #e6a100; } .qz-empty > div { flex: 1; min-width: 220px; } .qz-empty b { display: block; color: #7a4a00; font-size: 0.9rem; } .qz-empty span { display: block; margin-top: 2px; color: #8a5300; font-size: 0.8rem; line-height: 1.45; }
.qz-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 10px 14px; border-radius: 10px; background: #f5f5f5; color: #666; font-size: 0.76rem; line-height: 1.5; }
.qz-note i { margin-top: 2px; color: #888; }
/* === CUESTIONARIO: constructor === */
.fbq-quizbanner { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 14px; padding: 12px 16px; border-radius: 12px; background: #f1faf2; border: 1px solid #c8e6c9; }
.fbq-quizbanner.warn { background: #fff8e1; border-color: #ffe0a3; }
.fbq-quizbanner > i { flex: none; width: 34px; height: 34px; border-radius: 9px; background: #2e7d32; color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.fbq-quizbanner.warn > i { background: #e6a100; }
.fbq-quizbanner b { display: block; font-size: 0.88rem; color: #1b5e20; } .fbq-quizbanner.warn b { color: #7a4a00; } .fbq-quizbanner span { display: block; margin-top: 2px; font-size: 0.8rem; color: #3c6e3f; line-height: 1.5; } .fbq-quizbanner.warn span { color: #8a5300; }
.fbq-correct { width: auto; height: 34px; padding: 0 12px; border-radius: 999px; gap: 6px; font-size: 0.74rem; font-weight: 700; white-space: nowrap; color: #78909c; }
.fbq-correct i { font-size: 0.78rem; }
.fbq-correct.on { color: #fff; }
.fbq-quiz { border: 2px solid #a5d6a7; border-style: solid; background: #f7fcf7; }
.fbq-quizhead { display: flex; gap: 10px; align-items: flex-start; padding-bottom: 8px; border-bottom: 1px solid #dcefdc; }
.fbq-quizhead > i { flex: none; width: 30px; height: 30px; border-radius: 8px; background: #2e7d32; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 0.85rem; }
.fbq-quizhead b { display: block; font-size: 0.86rem; color: #1b5e20; } .fbq-quizhead span { display: block; margin-top: 1px; font-size: 0.78rem; color: #3c6e3f; line-height: 1.45; }
@media (max-width: 860px) { .qz-steps, .qz-choices, .qz-tiles { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .fbq-correct span { display: none; } .fbq-correct { padding: 0; width: 34px; justify-content: center; } .qz-switchcard { flex-wrap: wrap; } }
