/* ISWGenesis - Estilos (convencion ISW: prefijo isw-, border-radius 0)
 * Paleta documental: OT #f39c12 · PRE #3498db · PRO #27ae60 · FAC #e74c3c
 */

/* ============ Hub ============ */
.isw-gen-hub { max-width: 1100px; margin: 0 auto; padding: 30px 20px; }
.isw-gen-hub-cabecera { text-align: center; margin-bottom: 30px; }
.isw-gen-hub-cabecera h1 { font-size: 28px; margin: 0; color: #2c3e50; }
.isw-gen-hub-sub { color: #7f8c8d; margin: 4px 0 0; }
.isw-gen-hub-grid { display: grid; gap: 14px; }
.isw-gen-hub-btn {
	display: flex; align-items: center; gap: 14px;
	background: #fff; border: 1px solid #d5dbdb; border-left: 6px solid #3498db;
	border-radius: 0; padding: 26px 20px; text-decoration: none; color: #2c3e50;
	box-shadow: 0 1px 3px rgba(0,0,0,.06);
	transition: transform .12s, box-shadow .12s;
}
.isw-gen-hub-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.14); }
.isw-gen-hub-icono { font-size: 32px; width: 40px; text-align: center; }
.isw-gen-hub-titulo { font-size: 16px; font-weight: 600; letter-spacing: .2px; }
.isw-gen-hub-vacio { text-align: center; color: #95a5a6; padding: 40px 0; }
.isw-gen-hub-pie { text-align: center; margin-top: 30px; }

/* ============ Botones ============ */
.isw-gen-btn {
	display: inline-block; padding: 7px 14px; border: 1px solid #bdc3c7;
	background: #fff; color: #2c3e50; border-radius: 0; cursor: pointer;
	text-decoration: none; font-size: 13px;
}
.isw-gen-btn:hover { background: #ecf0f1; }
.isw-gen-btn-primario { background: #3498db; border-color: #3498db; color: #fff; }
.isw-gen-btn-primario:hover { background: #2c81ba; }
.isw-gen-btn-diseno { background: #f39c12; border-color: #f39c12; color: #fff; }
.isw-gen-btn-diseno:hover { background: #d68910; }
.isw-gen-btn-mini { padding: 2px 8px; font-size: 12px; border: 1px solid #bdc3c7; background: #fff; border-radius: 0; cursor: pointer; }
.isw-gen-btn-peligro { color: #e74c3c; border-color: #e74c3c; }
.isw-gen-btn-peligro:hover { background: #fdecea; }

/* ============ Formularios ============ */
.isw-gen-input, .isw-gen-select, .isw-gen-textarea {
	width: 100%; padding: 6px 8px; border: 1px solid #bdc3c7;
	border-radius: 0; font-size: 13px; box-sizing: border-box;
}
.isw-gen-textarea { font-family: monospace; font-size: 12px; }
.isw-gen-fila-campo { margin-bottom: 12px; }
.isw-gen-fila-campo label { display: block; font-size: 12px; font-weight: 600; color: #34495e; margin-bottom: 3px; }
.isw-gen-fila-botones { margin: 14px 0; }
.isw-gen-hint { font-weight: 400; color: #95a5a6; }
.isw-gen-msg { min-height: 18px; font-size: 13px; padding: 4px 0; }
.isw-gen-msg-ok { color: #27ae60; }
.isw-gen-msg-error { color: #e74c3c; }

/* ============ Rejilla de lineas ============ */
.isw-gen-rejilla { width: 100%; border-collapse: collapse; font-size: 13px; }
.isw-gen-rejilla th, .isw-gen-rejilla td { border: 1px solid #dcdcdc; padding: 6px 8px; text-align: left; }
.isw-gen-rejilla th { background: #f4f6f7; font-weight: 600; }
.isw-gen-col-nucleo { background: #eaf2f8 !important; }
.isw-gen-col-dominio { background: #fef9e7 !important; }

/* ============ Modal normalizado ============ */
.isw-gen-overlay {
	position: fixed; inset: 0; background: rgba(0,0,0,.45);
	display: flex; align-items: center; justify-content: center; z-index: 9000;
}
.isw-gen-modal {
	background: #fff; border-radius: 0; display: flex; flex-direction: column;
	max-height: 92vh; box-shadow: 0 6px 24px rgba(0,0,0,.25);
}
.isw-gen-t-pequeno { width: 380px; }
.isw-gen-t-mediano { width: 620px; }
.isw-gen-t-grande { width: 900px; }
.isw-gen-t-pantalla_completa { width: 98vw; height: 96vh; }
.isw-gen-a-panel_lateral { position: fixed; right: 0; top: 0; height: 100vh; max-height: 100vh; }
.isw-gen-modal-head {
	display: flex; justify-content: space-between; align-items: center;
	padding: 10px 14px; background: #2c3e50; color: #fff; font-weight: 600;
}
.isw-gen-modal-close { background: none; border: none; color: #fff; font-size: 20px; cursor: pointer; }
.isw-gen-modal-body { padding: 16px; overflow-y: auto; flex: 1; }
.isw-gen-l-dos_columnas .isw-gen-modal-body,
.isw-gen-l-imagen_izq_campos_der .isw-gen-modal-body { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.isw-gen-modal-foot { padding: 10px 14px; border-top: 1px solid #dcdcdc; text-align: right; }
.isw-gen-modal-foot .isw-gen-btn { margin-left: 8px; }

/* ============ Editor 2 columnas ============ */
.isw-gen-ed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.isw-gen-color { width: 100%; height: 31px; padding: 2px; border: 1px solid #bdc3c7; border-radius: 0; box-sizing: border-box; cursor: pointer; }

/* ============ Modo diseno ============ */
.isw-gen-diseno { padding: 16px; }
.isw-gen-diseno-cab { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.isw-gen-diseno-cab h1 { margin: 0; font-size: 22px; }
.isw-gen-diseno-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.isw-gen-panel { background: #fff; border: 1px solid #dcdcdc; padding: 16px; }
.isw-gen-panel h2 { margin: 0 0 12px; font-size: 16px; color: #2c3e50; }
.isw-gen-tabla { width: 100%; border-collapse: collapse; font-size: 13px; }
.isw-gen-tabla th, .isw-gen-tabla td { border: 1px solid #dcdcdc; padding: 5px 8px; }
.isw-gen-tabla th { background: #f4f6f7; }
.isw-gen-vacio { text-align: center; color: #95a5a6; }
.isw-gen-badge { padding: 1px 6px; font-size: 11px; color: #fff; }
.isw-gen-badge-modulo { background: #3498db; }
.isw-gen-badge-modal { background: #27ae60; }
.isw-gen-badge-pantalla { background: #f39c12; }

/* ============ Ayuda ============ */
.isw-gen-ayuda { display: grid; grid-template-columns: 240px 1fr; gap: 0; min-height: 70vh; }
.isw-gen-ayuda-menu { background: #2c3e50; padding: 14px 0; }
.isw-gen-ayuda-menu a {
	display: block; color: #bdc3c7; text-decoration: none; padding: 9px 16px; font-size: 13px;
	border-left: 4px solid transparent;
}
.isw-gen-ayuda-menu a:hover { color: #fff; background: #34495e; }
.isw-gen-ayuda-menu a.isw-gen-activa { color: #fff; background: #34495e; border-left-color: #f39c12; }
.isw-gen-ayuda-contenido { background: #fff; padding: 24px 32px; border: 1px solid #dcdcdc; border-left: none; }
.isw-gen-ayuda-contenido h1 { font-size: 22px; color: #2c3e50; margin-top: 0; }
.isw-gen-ayuda-contenido h2 { font-size: 16px; color: #2c3e50; border-bottom: 1px solid #ecf0f1; padding-bottom: 4px; }
.isw-gen-ayuda-contenido code, .isw-gen-ayuda-contenido pre {
	background: #f4f6f7; border: 1px solid #e5e8e8; font-size: 12px; padding: 1px 5px;
}
.isw-gen-ayuda-contenido pre { padding: 10px; overflow-x: auto; }
.isw-gen-ayuda-contenido table { border-collapse: collapse; font-size: 13px; }
.isw-gen-ayuda-contenido table th, .isw-gen-ayuda-contenido table td { border: 1px solid #dcdcdc; padding: 5px 9px; }
.isw-gen-ayuda-contenido table th { background: #f4f6f7; }

@media (max-width: 900px) {
	.isw-gen-diseno-grid, .isw-gen-ayuda, .isw-gen-ed-grid { grid-template-columns: 1fr; }
	.isw-gen-hub-grid { grid-template-columns: 1fr 1fr !important; }
}

/* ============ Asistente por pasos ============ */
.isw-gen-pasos { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.isw-gen-paso-pill {
	padding: 6px 14px; font-size: 12px; font-weight: 600; color: #7f8c8d;
	background: #f4f6f7; border: 1px solid #dcdcdc;
}
.isw-gen-paso-activa { background: #2c3e50; color: #fff; border-color: #2c3e50; }
.isw-gen-paso-nav { display: flex; justify-content: space-between; margin-top: 18px; }
.isw-gen-cards { display: flex; gap: 10px; flex-wrap: wrap; }
.isw-gen-card {
	display: block; padding: 12px 16px; border: 1px solid #bdc3c7; background: #fff;
	cursor: pointer; font-size: 13px; user-select: none;
}
.isw-gen-card input { margin-right: 6px; }
.isw-gen-card-activa { border-color: #3498db; background: #eaf2f8; font-weight: 600; }
.isw-gen-campos-lista { max-height: 320px; overflow-y: auto; border: 1px solid #dcdcdc; padding: 8px; }
.isw-gen-campo-check { display: block; padding: 6px 8px; font-size: 13px; cursor: pointer; border-bottom: 1px solid #f4f6f7; }
.isw-gen-campo-check:hover { background: #f6f8fa; }
.isw-gen-tipo-mini { font-size: 11px; color: #95a5a6; background: #f4f6f7; padding: 1px 6px; margin-left: 6px; }
.isw-gen-resumen { background: #fef9e7; border: 1px solid #f5e0a3; padding: 10px 12px; font-size: 13px; margin: 12px 0; }
.isw-gen-acciones { white-space: nowrap; }
.isw-gen-acciones .isw-gen-btn-mini { margin-bottom: 3px; }

/* ============ Estados ============ */
.isw-gen-badge-borrador { background: #f39c12; }
.isw-gen-badge-publicado { background: #27ae60; }
.isw-gen-btn-ok { color: #27ae60; border-color: #27ae60; }
.isw-gen-btn-ok:hover { background: #eafaf1; }
.isw-gen-banner-borrador {
	background: #f39c12; color: #fff; text-align: center; font-size: 12px;
	font-weight: 700; padding: 5px; letter-spacing: .5px;
}

/* ============ Ayuda contextual ============ */
.isw-gen-ayudactx-icono {
	display: inline-block; width: 17px; height: 17px; line-height: 17px; text-align: center;
	background: #3498db; color: #fff; font-size: 11px; font-weight: 700;
	border-radius: 50%; cursor: pointer; vertical-align: middle; margin-left: 4px;
}
.isw-gen-ayudactx-icono:hover { background: #2c81ba; }
.isw-gen-ayudactx-panel {
	position: absolute; z-index: 9500; max-width: 340px;
	background: #2c3e50; color: #ecf0f1; font-size: 12px; font-weight: 400;
	padding: 10px 12px; margin-top: 6px; box-shadow: 0 4px 14px rgba(0,0,0,.3); line-height: 1.5;
}
.isw-gen-ayudactx-panel strong { color: #fff; }
.isw-gen-ayudactx-panel em { color: #f39c12; font-style: normal; }

/* ============ Campo imagen ============ */
.isw-gen-img {
	min-height: 140px; border: 1px dashed #bdc3c7; display: flex;
	align-items: center; justify-content: center; background: #fafbfc; overflow: hidden;
}
.isw-gen-img img { max-width: 100%; max-height: 240px; object-fit: contain; }
.isw-gen-img-vacia { color: #bdc3c7; font-size: 12px; }
