/* ====== EDITOR DE FÓRMULAS - ESTILOS PRINCIPALES ====== */

/* Reset y variables CSS */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #059669;
    --warning-color: #d97706;
    --error-color: #dc2626;
    --background-light: #f8fafc;
    --background-medium: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #cbd5e1;
    --border-radius: 8px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--background-light);
    overflow-x: hidden;
}

/* ====== HEADER PRINCIPAL ====== */
.main-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    padding: 1rem 2rem;
    box-shadow: var(--shadow-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

.status-indicator i {
    color: #10b981;
    font-size: 0.75rem;
}

/* ====== CONTAINER PRINCIPAL ====== */
.main-container {
    display: flex;
    height: calc(100vh - 80px);
    gap: 1px;
    background-color: var(--border-color);
}

/* ====== PANELES ====== */
.panel {
    background: white;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#panel-izquierdo {
    width: 300px;
    min-width: 250px;
    max-width: 400px;
    resize: horizontal;
}

#panel-central {
    flex: 1;
    min-width: 500px;
}

#panel-derecho {
    width: 350px;
    min-width: 300px;
    max-width: 500px;
    resize: horizontal;
}

.panel-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--background-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.panel-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.header-buttons {
    display: flex;
    gap: 0.5rem;
}

/* ====== BOTONES ====== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-save {
    background-color: var(--success-color);
    color: white;
}

.btn-save:hover:not(:disabled) {
    background-color: #047857;
}

.btn-validate {
    background-color: var(--primary-color);
    color: white;
}

.btn-validate:hover:not(:disabled) {
    background-color: var(--primary-hover);
}

.btn-reload {
    background-color: transparent;
    color: var(--text-secondary);
    padding: 0.5rem;
    border: 1px solid var(--border-color);
}

.btn-reload:hover {
    background-color: var(--background-medium);
}

.btn-add {
    background-color: var(--primary-color);
    color: white;
}

.btn-add:hover:not(:disabled) {
    background-color: var(--primary-hover);
}

.btn-format, .btn-validate-json, .btn-copy {
    background-color: var(--background-medium);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
}

.btn-format:hover, .btn-validate-json:hover, .btn-copy:hover {
    background-color: var(--border-color);
}

/* ====== SEARCH BOX ====== */
.search-box {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.search-box input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ====== LISTAS SCROLLABLES ====== */
.lista-scrollable {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem;
    color: var(--text-secondary);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--text-secondary);
    text-align: center;
    height: 100%;
}

.empty-state i {
    font-size: 2rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--error-color);
    text-align: center;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--border-radius);
    margin: 1rem;
}

.error-state i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--error-color);
}

.error-state p {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.error-state small {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* ====== ITEMS DE TIPOLOGÍA ====== */
.tipologia-item {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.tipologia-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.tipologia-item.active {
    border-color: var(--primary-color);
    background-color: #eff6ff;
    box-shadow: var(--shadow-sm);
}

.tipologia-item.error {
    border-color: var(--error-color);
    background-color: #fef2f2;
}

.tipologia-nombre {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.tipologia-codigo {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
    margin-bottom: 0.25rem;
}

.tipologia-info {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.tipologia-acciones {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

.btn-tipologia {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: white;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-tipologia:hover {
    background: var(--background-medium);
    border-color: var(--primary-color);
    color: var(--text-primary);
}

.btn-tipologia.btn-duplicate {
    border-color: #059669;
    color: #059669;
}

.btn-tipologia.btn-duplicate:hover {
    background: #ecfdf5;
    border-color: #047857;
}

.btn-tipologia.btn-delete {
    border-color: var(--error-color);
    color: var(--error-color);
}

.btn-tipologia.btn-delete:hover {
    background: #fef2f2;
    border-color: #dc2626;
}

.tipologia-serie {
    background-color: var(--background-medium);
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
}

/* ====== PESTAÑAS ====== */
.tabs {
    display: flex;
    background-color: var(--background-light);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.tab {
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.tab:hover {
    background-color: var(--background-medium);
    color: var(--text-primary);
}

.tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: white;
}

/* ====== CONTENIDO DE PESTAÑAS ====== */
.tab-content {
    display: none;
    flex: 1;
    flex-direction: column;
    overflow: hidden;
}

.tab-content.active {
    display: flex;
}

.content-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--background-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.info-panel {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.info-panel > span {
    align-self: flex-start;
}

.info-notice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--primary-color);
    margin-top: 0.25rem;
}

.info-notice i {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* ====== EDITOR DE VARIABLES ====== */
.editor-variable {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    background: white;
    overflow: hidden;
}

.variable-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background-color: var(--background-light);
    border-bottom: 1px solid var(--border-color);
}

.variable-nombre {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

.variable-formula {
    padding: 1rem;
}

.variable-formula label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.formula-input {
    width: 100%;
    min-height: 80px;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    resize: vertical;
    line-height: 1.4;
}

.formula-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.formula-preview {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background-color: var(--background-light);
    border-radius: var(--border-radius);
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    min-height: 1.5rem;
}

.variable-validacion {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
}

.variable-validacion.ok {
    background-color: #f0fdf4;
    color: var(--success-color);
}

.variable-validacion.error {
    background-color: #fef2f2;
    color: var(--error-color);
}

/* ====== COMPONENTES GRID ====== */
#lista-componentes {
    padding: 1rem;
}

.componentes-container {
    width: 100%;
}

.componentes-seccion {
    margin-bottom: 2rem;
}

.seccion-titulo {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.componentes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    max-width: 100%;
}

@media (max-width: 1400px) {
    .componentes-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1000px) {
    .componentes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .componentes-grid {
        grid-template-columns: 1fr;
    }
}

.componente-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    min-height: 350px;
    display: flex;
    flex-direction: column;
}

.componente-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header {
    background: var(--background-light);
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-shrink: 0;
}

.card-title {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.componente-nombre-input,
.componente-referencia-input {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    width: 100%;
    transition: border-color 0.2s ease;
}

.componente-nombre-input {
    font-weight: 600;
    color: var(--text-primary);
}

.componente-referencia-input {
    font-family: 'Courier New', monospace;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.componente-nombre-input:focus,
.componente-referencia-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.card-actions {
    display: flex;
    gap: 0.25rem;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.btn-card-delete {
    background: transparent;
    border: none;
    padding: 0.25rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
    width: 24px;
    height: 24px;
    color: var(--error-color);
}

.btn-card-delete:hover {
    background: var(--error-color);
    color: white;
}

.card-body {
    padding: 0.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tipo-selector {
    display: flex;
    align-items: center;
}

.tipo-select {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.tipo-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.cantidades-editor {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cantidad-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.cantidad-row label {
    min-width: 45px;
    font-weight: 500;
    color: var(--text-secondary);
}

.cantidad-input {
    flex: 1;
    max-width: 60px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    text-align: center;
    transition: border-color 0.2s ease;
}

.cantidad-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.cantidad-row span {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.formulas-editor {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.formula-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.formula-row label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.formula-input {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
    width: 100%;
    transition: border-color 0.2s ease;
}

.formula-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.formulas-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    padding: 0.5rem;
    border-radius: 4px;
    margin-top: auto;
}

.formulas-status.con-formulas {
    background: rgba(16, 185, 129, 0.1);
    color: rgb(16, 185, 129);
}

.formulas-status.sin-formulas {
    background: rgba(245, 158, 11, 0.1);
    color: rgb(245, 158, 11);
}

.btn-card-edit {
    color: var(--primary-color);
}

.btn-card-edit:hover {
    background: #eff6ff;
    color: var(--primary-hover);
}

.btn-card-delete {
    color: var(--error-color);
}

.btn-card-delete:hover {
    background: #fef2f2;
    color: #dc2626;
}

.card-body {
    padding: 0.75rem;
}

.componente-info {
    margin-bottom: 0.5rem;
}

.tipo-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.tipo-perfil {
    background: #dbeafe;
    color: #1e40af;
}

.tipo-accesorio {
    background: #d1fae5;
    color: #065f46;
}

.tipo-herraje {
    background: #fef3c7;
    color: #92400e;
}

.tipo-otro {
    background: var(--background-medium);
    color: var(--text-secondary);
}

.cantidades-resumen {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.cantidades-resumen i {
    color: var(--primary-color);
    font-size: 0.7rem;
}

.formulas-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.text-success {
    color: var(--success-color);
}

.text-warning {
    color: var(--warning-color);
}

/* ====== MODAL EDICIÓN ====== */
.modal-large .modal-content {
    max-width: 600px;
    width: 95%;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.cantidad-inputs {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.cantidad-inputs input {
    width: 60px;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-align: center;
}

/* ====== SECCIONES DE COMPONENTES ====== */
.componentes-container {
    max-width: 100%;
}

.componentes-seccion {
    margin-bottom: 2rem;
}

.seccion-titulo {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.seccion-titulo::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* ====== COMPONENTES LEGACY (mantener para compatibilidad) ====== */
.componente-item {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    background: white;
    overflow: hidden;
}

.componente-header {
    padding: 1rem;
    background-color: var(--background-light);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.componente-acciones {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-delete-component {
    background: transparent;
    border: 1px solid var(--error-color);
    color: var(--error-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.btn-delete-component:hover {
    background: var(--error-color);
    color: white;
}

.componente-nombre {
    font-weight: 600;
    color: var(--text-primary);
}

.componente-referencia {
    font-family: 'Courier New', monospace;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.componente-body {
    padding: 1rem;
}

.componente-formulas {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr 1fr;
}

.formula-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.formula-field label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.formula-field input {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

.componente-cantidades {
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--background-light);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.cantidades-editables {
    display: flex;
    gap: 1rem;
}

.cantidad-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cantidad-field label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 100px;
}

.cantidad-input {
    width: 80px;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.875rem;
    text-align: center;
}

.cantidad-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.cantidad-field span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ====== JSON EDITOR ====== */
.json-toolbar {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--background-light);
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

#json-editor {
    flex: 1;
    border: none;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.4;
    resize: none;
    outline: none;
    background: white;
}

.validation-result {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--background-light);
    font-size: 0.875rem;
    min-height: 60px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.validation-result.success {
    background-color: #f0fdf4;
    color: var(--success-color);
}

.validation-result.error {
    background-color: #fef2f2;
    color: var(--error-color);
}

/* ====== CATÁLOGO DE VARIABLES ====== */
.categoria-variables {
    margin-bottom: 1.5rem;
}

.categoria-variables h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.categoria-variables ul {
    list-style: none;
}

.variable-item {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.variable-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.variable-item.selected {
    border-color: var(--primary-color);
    background-color: #eff6ff;
}

.var-nombre {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.variable-item small {
    display: block;
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* ====== INFO VARIABLE ====== */
.info-variable {
    border-top: 1px solid var(--border-color);
    background-color: var(--background-light);
    flex-shrink: 0;
}

.info-variable h3 {
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#detalle-variable {
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.variable-detalle {
    font-size: 0.875rem;
}

.variable-detalle dt {
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
}

.variable-detalle dt:first-child {
    margin-top: 0;
}

.variable-detalle dd {
    color: var(--text-secondary);
    margin-left: 0;
}

.variable-detalle .alias-list {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
}

.hint {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    padding: 2rem;
}

/* ====== MODAL ====== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.btn-close {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
    max-height: calc(90vh - 150px);
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    flex-shrink: 0;
}

.btn-cancel {
    background-color: var(--background-medium);
    color: var(--text-primary);
}

.btn-cancel:hover {
    background-color: var(--border-color);
}

.btn-confirm {
    background-color: var(--primary-color);
    color: white;
}

.btn-confirm:hover {
    background-color: var(--primary-hover);
}

/* ====== FORMULARIOS ====== */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* ====== ESTILOS PARA ELIMINACIÓN ====== */
.tipologia-info-eliminar {
    background: var(--background-medium);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin: 1rem 0;
}

.tipologia-info-eliminar p {
    margin: 0.25rem 0;
}

.warning-box {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin: 1rem 0;
    color: #dc2626;
}

.warning-box strong {
    color: #991b1b;
}

.warning-box ul {
    margin: 0.5rem 0 0 1rem;
    padding: 0;
}

.warning-box li {
    margin: 0.25rem 0;
}

.warning-box code {
    background: #fee2e2;
    padding: 0.125rem 0.25rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.875em;
}

.btn-danger {
    background-color: var(--error-color);
    color: white;
    border: 1px solid var(--error-color);
}

.btn-danger:hover {
    background-color: #dc2626;
    border-color: #dc2626;
}

.btn-danger-disabled {
    background-color: #d1d5db;
    color: #9ca3af;
    border: 1px solid #d1d5db;
    cursor: not-allowed;
}

.btn-danger-disabled:hover {
    background-color: #d1d5db;
    border-color: #d1d5db;
}

/* ====== INPUTS DINÁMICOS ====== */
.input-dinamico-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.input-dinamico-item:hover {
    box-shadow: var(--shadow-sm);
}

.input-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.input-nombre {
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
}

.input-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 24px;
    background: #ccc;
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.toggle-switch.active {
    background: var(--primary-color);
}

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: left 0.3s ease;
}

.toggle-switch.active .toggle-slider {
    left: 28px;
}

.input-config {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.input-config-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.config-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.config-field label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.config-field input,
.config-field select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.875rem;
}

.config-field input:focus,
.config-field select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.input-tipo-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background: var(--background-medium);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.btn-reset {
    background: var(--background-medium);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-reset:hover {
    background: #f59e0b;
    color: white;
    border-color: #f59e0b;
}

.btn-calculate {
    background: #8b5cf6;
    color: white;
    border: 1px solid #8b5cf6;
}

.btn-calculate:hover {
    background: #7c3aed;
    border-color: #7c3aed;
}

/* ====== VISTA PREVIA DE CÁLCULOS ====== */
.formula-resultado {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.875rem;
}

.calculo-ejemplo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calculo-ejemplo i {
    color: var(--primary-color);
}

.calculo-ejemplo .resultado-valor {
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
}

.calculo-ejemplo .resultado-error {
    color: var(--error-color);
    font-weight: 500;
}

.calculo-ejemplo .resultado-ok {
    color: #059669;
    font-weight: 600;
}

.calculo-ejemplo .calculo-detalle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-left: auto;
}

/* ====== TOAST NOTIFICATIONS ====== */
#toast-container {
    position: fixed;
    top: 100px;
    right: 2rem;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 1rem 1.5rem;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease;
}

.toast.success {
    border-left: 4px solid var(--success-color);
}

.toast.error {
    border-left: 4px solid var(--error-color);
}

.toast.warning {
    border-left: 4px solid var(--warning-color);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ====== RESPONSIVE ====== */
@media (max-width: 1200px) {
    #panel-derecho {
        width: 250px;
        min-width: 200px;
    }
}

@media (max-width: 900px) {
    .main-container {
        flex-direction: column;
        height: auto;
    }

    .panel {
        width: 100% !important;
        min-width: auto !important;
        max-width: none !important;
        resize: none !important;
    }

    #panel-izquierdo {
        height: 300px;
    }

    #panel-central {
        height: 600px;
    }

    #panel-derecho {
        height: 400px;
    }
}

/* ====== UTILIDADES ====== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-secondary);
}

.font-mono {
    font-family: 'Courier New', monospace;
}

.highlight-syntax .variable {
    color: #0066cc;
    font-weight: 600;
}

.highlight-syntax .operator {
    color: #666;
}

.highlight-syntax .number {
    color: #cc6600;
}

.highlight-syntax .string {
    color: #009900;
}

.highlight-syntax .function {
    color: #9900cc;
}

/* ====== MÓDULOS ====== */
.modulos-container {
    display: flex;
    gap: 1rem;
    height: 100%;
    overflow: hidden;
}

.modulos-disponibles,
.modulos-configurados {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.modulos-disponibles h3,
.modulos-configurados h3 {
    padding: 1rem;
    margin: 0;
    background: var(--background-light);
    border-bottom: 1px solid var(--border-color);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modulo-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modulo-item:hover {
    background: var(--background-light);
    border-left: 3px solid var(--primary-color);
}

.modulo-item.configurado {
    background: #f0fdf4;
    border-left: 3px solid var(--success-color);
}

.modulo-info {
    flex: 1;
}

.modulo-nombre {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.modulo-descripcion {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.modulo-tipo {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background: var(--background-medium);
    border-radius: 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.modulo-acciones {
    display: flex;
    gap: 0.5rem;
}

.btn-modulo {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-modulo.btn-añadir {
    color: var(--success-color);
    border-color: var(--success-color);
}

.btn-modulo.btn-añadir:hover {
    background: #f0fdf4;
}

.btn-modulo.btn-quitar {
    color: var(--error-color);
    border-color: var(--error-color);
}

.btn-modulo.btn-quitar:hover {
    background: #fef2f2;
}

.btn-modulo.btn-configurar {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-modulo.btn-configurar:hover {
    background: #eff6ff;
}

.btn-sync {
    background: var(--warning-color);
    color: white;
    border: 1px solid var(--warning-color);
}

.btn-sync:hover:not(:disabled) {
    background: #b45309;
    border-color: #b45309;
}

.modulo-configuracion {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: var(--background-light);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.config-modulo-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.config-modulo-field label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 80px;
}

.config-modulo-field input,
.config-modulo-field select {
    flex: 1;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.875rem;
}

/* ====== AUTOCOMPLETADO DE REFERENCIAS ====== */
.autocomplete-container {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.dropdown-item {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.dropdown-item:hover,
.dropdown-item.selected {
    background: var(--background-light);
    border-left: 3px solid var(--primary-color);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.referencia-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.ref-codigo {
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

.ref-tipo {
    background: var(--background-medium);
    color: var(--text-secondary);
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.ref-descripcion {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

.dropdown-loading,
.dropdown-empty,
.dropdown-error {
    padding: 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
}

.dropdown-error {
    color: var(--error-color);
}

.dropdown-loading {
    color: var(--primary-color);
}

/* ====== HERRAJE SELECTOR ====== */
.herraje-selector {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.herraje-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    background: white;
    color: var(--text-primary);
    transition: all 0.3s ease;
    margin: 0.5rem 0;
}

.herraje-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.herraje-select:hover {
    border-color: var(--primary-hover);
}

.param-help {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 0.25rem;
}

/* ====== MÓDULOS MEJORADOS ====== */
.modulo-configurado {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.2s ease;
}

.modulo-configurado:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.modulo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: var(--background-light);
    border-bottom: 1px solid var(--border-color);
}

.modulo-info h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.modulo-meta {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.modulo-tipo {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background-color: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    border-radius: 12px;
    font-weight: 500;
}

.modulo-ruta {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background-color: var(--background-medium);
    color: var(--text-secondary);
    font-size: 0.7rem;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', monospace;
}

.modulo-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.btn-edit {
    background-color: var(--warning-color);
    color: white;
}

.btn-edit:hover {
    background-color: #b45309;
}

.btn-delete {
    background-color: var(--error-color);
    color: white;
}

.btn-delete:hover {
    background-color: #b91c1c;
}

.modulo-params {
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.param-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.param-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.param-value {
    padding: 0.375rem 0.5rem;
    background-color: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.875rem;
    color: var(--text-primary);
    font-family: 'Monaco', 'Menlo', monospace;
}

.param-value.active {
    background-color: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    color: var(--success-color);
    font-weight: 600;
}

/* Modal para edición de módulos */
.modal-large {
    max-width: 800px;
    width: 90vw;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.checkbox-group {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* ====== MODAL TIPO MÓDULO ====== */
.tipo-modulo-opciones {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.opcion-tipo {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.opcion-tipo:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    background-color: rgba(37, 99, 235, 0.02);
}

.opcion-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.opcion-header i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.opcion-header h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1rem;
}

.opcion-tipo p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.opcion-tipo small {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-style: italic;
}

/* ====== INFO FILTRADO ====== */
.info-filtrado {
    background-color: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 4px;
    padding: 0.75rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--success-color);
}

.info-filtrado i {
    opacity: 0.8;
}

/* ====== SELECTOR DE ACRISTALAMIENTO ====== */
.acristalamiento-selector {
    margin: 1rem 0;
    padding: 0.75rem;
    background-color: #f0f9ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
}

.acristalamiento-selector label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.acristalamiento-selector label i {
    color: var(--primary-color);
}

.btn-help-acrist {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.25rem;
    margin-left: auto;
    font-size: 1rem;
    transition: all 0.2s;
}

.btn-help-acrist:hover {
    color: var(--primary-hover);
    transform: scale(1.1);
}

.acristalamiento-select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.875rem;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.acristalamiento-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.acristalamiento-select option {
    padding: 0.5rem;
}

.acristalamiento-preview {
    margin-top: 0.75rem;
    display: none;
}

.acrist-preview-content {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 0.75rem;
}

.acrist-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.acrist-preview-header strong {
    color: var(--primary-color);
    font-size: 1rem;
}

.acrist-grosor {
    background-color: #dbeafe;
    color: #1e40af;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.acrist-preview-componentes {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.acrist-comp-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.acrist-comp-item i {
    color: var(--primary-color);
    width: 16px;
    text-align: center;
}

.acrist-comp-item code {
    background-color: #f3f4f6;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: #374151;
}

.error-preview {
    color: var(--error-color);
    font-size: 0.875rem;
    padding: 0.5rem;
    background-color: #fee2e2;
    border-radius: 4px;
}
/* ===== ESTILOS PARA EDICIÓN DE PARÁMETROS ===== */
.parametros-grid-dimensiones {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.parametro-dimension {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.parametro-dimension label {
    font-size: 0.875rem;
    color: #374151;
    font-weight: 500;
}

.parametro-item.editable {
    background: #f9fafb;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.param-input,
.param-input-small {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.875rem;
    width: 100%;
}

.param-input-small {
    max-width: 200px;
}

.param-input:focus,
.param-input-small:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.param-edit-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.param-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.param-row label {
    font-size: 0.875rem;
    color: #6b7280;
    min-width: 120px;
}

.param-info {
    font-size: 0.8rem;
    color: #6b7280;
}

.param-help {
    font-size: 0.75rem;
    color: #9ca3af;
    font-style: italic;
    margin-top: 0.25rem;
}
