/* Editor Visual de Herrajes - Styles adicionales */
/* Los estilos base se cargan desde base.css */

/* Sections */
.tipos-herraje-section, .simulador-section, .articulos-resultado-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.section-header {
    padding: 20px 24px;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
}

.section-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-header h2 i {
    color: var(--primary-color);
}

/* Header Controls */
.header-controls {
    display: flex;
    align-items: center;
    gap: 24px;
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.contador-herrajes {
    font-size: 0.85rem;
    color: #718096;
    font-weight: 500;
    padding: 8px 12px;
    background: #f7fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

/* Search Container */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    padding: 10px 40px 10px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    font-size: 0.9rem;
    width: 280px;
    transition: all 0.3s ease;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-icon {
    position: absolute;
    right: 16px;
    color: #718096;
}

/* Tipos Cards Grid */
.tipos-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 24px;
    padding: 32px;
}

.tipo-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.tipo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.tipo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.tipo-card.active {
    border-color: #667eea;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.15);
}

.tipo-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.tipo-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 6px;
}

.tipo-codigo {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.85rem;
    color: #667eea;
    background: #edf2f7;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
}

.tipo-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #718096;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #48bb78;
}

.tipo-descripcion {
    color: #718096;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 20px;
    min-height: 40px;
}

.tipo-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #4a5568;
    background: #f7fafc;
    padding: 8px 12px;
    border-radius: 8px;
}

.meta-item i {
    color: #667eea;
    width: 16px;
}

.tipo-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Simulador Section */
.simulador-content {
    padding: 32px;
}

.config-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    background: linear-gradient(135deg, #f8fafc, #edf2f7);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 32px;
    border: 2px solid #e2e8f0;
}

.config-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.config-group label {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.9rem;
}

.measure-input, .mano-select, .hoja-select {
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: white;
}

.measure-input:focus, .mano-select:focus, .hoja-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-calculate {
    grid-column: 1 / -1;
    background: linear-gradient(90deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

/* Resultado Visual */
.resultado-visual {
    min-height: 200px;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
}

.resultado-visual.with-content {
    border-style: solid;
    border-color: #667eea;
    background: white;
    flex-direction: column;
    padding: 24px;
}

.empty-state {
    text-align: center;
    color: #718096;
}

.empty-state i {
    font-size: 2rem;
    margin-bottom: 12px;
    color: #cbd5e0;
}

/* Artículos Grid */
.articulos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    padding: 32px;
}

.articulo-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
}

.articulo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.articulo-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.articulo-referencia {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    color: #667eea;
    background: #edf2f7;
    padding: 4px 8px;
    border-radius: 6px;
}

.articulo-precio {
    font-size: 1.1rem;
    font-weight: 700;
    color: #38a169;
}

.articulo-descripcion {
    color: #4a5568;
    font-size: 0.9rem;
    margin-bottom: 16px;
    line-height: 1.4;
}

.articulo-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 0.8rem;
    color: #718096;
    margin-bottom: 16px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
}

.articulo-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.badge.obligatorio {
    background: #fed7d7;
    color: #c53030;
}

.badge.opcional {
    background: #e6fffa;
    color: #319795;
}

.badge.tipo-comun {
    background: #e6fffa;
    color: #319795;
}

.badge.tipo-ancho {
    background: #fef5e7;
    color: #d69e2e;
}

.badge.tipo-altura {
    background: #e6f3ff;
    color: #3182ce;
}

.articulo-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Badges and Stats */
.tipo-badge {
    background: linear-gradient(90deg, #667eea, #764ba2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
}

.resultado-stats {
    display: flex;
    gap: 12px;
}

.stat-badge {
    background: #f7fafc;
    color: #4a5568;
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid #e2e8f0;
}

.stat-badge.precio {
    background: #f0fff4;
    color: #38a169;
    border-color: #9ae6b4;
}

/* Botones adicionales específicos del editor */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #cbd5e0;
    transform: translateY(-2px);
}

/* Inline Editing */
.articulo-card.editing {
    border: 2px solid #667eea;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.15);
}

.cantidad-edit input,
.factor-edit input {
    width: 60px;
    padding: 4px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.85rem;
}

.cantidad-edit input:focus,
.factor-edit input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.config-info {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
    padding: 12px;
    background: #f7fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.range-select {
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: white;
}

.range-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.btn-icon.edit {
    background: #e6fffa;
    color: #319795;
}

.btn-icon.edit:hover {
    background: #319795;
    color: white;
}

.btn-icon.delete {
    background: #fed7d7;
    color: #e53e3e;
}

.btn-icon.delete:hover {
    background: #e53e3e;
    color: white;
}

.btn-icon.view {
    background: #e6f3ff;
    color: #3182ce;
}

.btn-icon.view:hover {
    background: #3182ce;
    color: white;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-header {
    padding: 24px 32px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #718096;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f7fafc;
    color: #2d3748;
}

.modal-body {
    padding: 24px 32px;
}

.modal-footer {
    padding: 20px 32px 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Article Info in Modal */
.articulo-info {
    background: linear-gradient(135deg, #f8fafc, #edf2f7);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.articulo-info .articulo-referencia {
    font-size: 1rem;
    margin-bottom: 6px;
}

.articulo-info .articulo-descripcion {
    color: #4a5568;
    font-size: 0.9rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-input, .form-select, .form-textarea {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background: white;
    width: 100%;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-label input:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-label input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: #718096;
    flex-direction: column;
    gap: 16px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }

    .header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .tipos-cards-grid {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .section-header {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }

    .header-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .filter-controls {
        justify-content: space-between;
    }

    .config-panel {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .articulos-grid {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .modal-content {
        margin: 16px;
        width: calc(100% - 32px);
    }

    .search-input {
        width: 100%;
    }

    .resultado-stats {
        flex-direction: column;
        gap: 8px;
    }
}

/* Edit Element Type Buttons */
.tipo-edit-buttons {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-edit-element {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    background: white;
    color: #4a5568;
    flex: 1;
    min-width: 120px;
}

.btn-edit-element:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-edit-element.comunes {
    border-color: #48bb78;
    color: #38a169;
}

.btn-edit-element.comunes:hover {
    background: #48bb78;
    color: white;
    border-color: #48bb78;
}

.btn-edit-element.altura {
    border-color: #3182ce;
    color: #2b6cb0;
}

.btn-edit-element.altura:hover {
    background: #3182ce;
    color: white;
    border-color: #3182ce;
}

.btn-edit-element.anchura {
    border-color: #d69e2e;
    color: #b7791f;
}

.btn-edit-element.anchura:hover {
    background: #d69e2e;
    color: white;
    border-color: #d69e2e;
}

.btn-edit-element i {
    font-size: 0.9rem;
}

/* Styles for the new elements editor modal */
.tabs-container {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 20px;
}

.tab-button {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: #4a5568;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-button:hover {
    background: #f7fafc;
    color: #2d3748;
}

.tab-button.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: #f7fafc;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.panel-header h3 {
    margin: 0;
    color: #2d3748;
    font-size: 1.2rem;
}

.rangos-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
}

.rangos-list {
    border-right: 1px solid #e2e8f0;
    padding-right: 20px;
}

.rango-item {
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.rango-item:hover {
    background: #f7fafc;
    border-color: #667eea;
    transform: translateX(4px);
}

.rango-item.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.rango-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rango-values {
    font-size: 0.9rem;
    opacity: 0.8;
}

.rango-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.rango-item.active .rango-count {
    background: rgba(255, 255, 255, 0.3);
}

.elementos-rango {
    padding-left: 20px;
}

.elementos-rango-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.elementos-rango-header h4 {
    margin: 0;
    color: #4a5568;
    font-size: 1rem;
}

.elementos-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.elemento-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.elemento-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.elemento-info {
    flex: 1;
}

.elemento-codigo {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.9rem;
}

.elemento-nombre {
    color: #4a5568;
    font-size: 0.85rem;
    margin-top: 2px;
}

.elemento-detalles {
    display: flex;
    gap: 12px;
    margin-top: 4px;
    font-size: 0.8rem;
    color: #718096;
}

.elemento-cantidad {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #2d3748;
}

.elemento-actions {
    display: flex;
    gap: 4px;
}

.btn-elemento {
    padding: 6px 8px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.btn-elemento.edit {
    background: #3182ce;
    color: white;
}

.btn-elemento.edit:hover {
    background: #2c5aa0;
}

.btn-elemento.delete {
    background: #e53e3e;
    color: white;
}

.btn-elemento.delete:hover {
    background: #c53030;
}

.cantidad-input {
    width: 50px;
    padding: 4px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    text-align: center;
    font-size: 0.9rem;
}

.cantidad-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h4 {
    margin: 0 0 8px 0;
    color: #4a5568;
}

.empty-state p {
    margin: 0;
    font-size: 0.9rem;
}

/* Responsive adjustments for elements modal */
@media (max-width: 768px) {
    .rangos-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .rangos-list {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        padding-right: 0;
        padding-bottom: 20px;
    }

    .elementos-rango {
        padding-left: 0;
    }

    .panel-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .elemento-item {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .elemento-actions {
        justify-content: flex-end;
    }

    .tabs-container {
        flex-direction: column;
    }

    .tab-button {
        border-bottom: 1px solid #e2e8f0;
        border-right: 3px solid transparent;
    }

    .tab-button.active {
        border-bottom-color: #e2e8f0;
        border-right-color: #667eea;
    }
}

/* Tabs Navigation for Article Management */
.tabs-navigation {
    background: white;
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 8px;
    border: 1px solid #e2e8f0;
}

.tab-nav {
    flex: 1;
    padding: 14px 24px;
    border: none;
    background: transparent;
    color: #4a5568;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1em;
}

.tab-nav:hover {
    background: #f7fafc;
    color: var(--primary-color);
}

.tab-nav.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 12px var(--primary-shadow);
}

.tab-nav i {
    font-size: 1.1em;
}

/* Vista Contenido */
.vista-contenido {
    display: none;
}

.vista-contenido.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Articulos Section */
.articulos-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

/* Toolbar Actions */
.toolbar-actions {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.toolbar-left {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    flex: 1;
}

.toolbar-right {
    display: flex;
    gap: 12px;
}

/* Filter Controls for Articles */
.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-weight: 500;
    color: #4a5568;
    font-size: 0.9rem;
    white-space: nowrap;
}

.filter-select {
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background: white;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Table Container */
.table-container {
    padding: 32px;
    overflow-x: auto;
}

.articulos-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.articulos-table thead {
    background: var(--primary-gradient);
}

.articulos-table thead th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: white;
    font-size: 0.95em;
    white-space: nowrap;
}

.articulos-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.articulos-table tbody tr:hover {
    background: #f8fafc;
}

.articulos-table tbody tr:last-child {
    border-bottom: none;
}

.articulos-table tbody td {
    padding: 14px 16px;
    color: #4a5568;
    font-size: 0.9rem;
}

.articulos-table tbody td.ref-cell {
    font-family: 'Monaco', 'Menlo', monospace;
    font-weight: 600;
    color: var(--primary-color);
}

.articulos-table tbody td.precio-cell {
    font-weight: 600;
    color: #38a169;
}

.articulos-table tbody td.actions-cell {
    text-align: right;
}

.badge-categoria {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: capitalize;
}

.badge-categoria.embellecedor {
    background: #fef5e7;
    color: #d69e2e;
}

.badge-categoria.bisagra {
    background: #e6fffa;
    color: #319795;
}

.badge-categoria.compas {
    background: #e6f3ff;
    color: #3182ce;
}

.badge-categoria.cremona {
    background: #f0fff4;
    color: #38a169;
}

.badge-categoria.cerradero {
    background: #fff5f5;
    color: #e53e3e;
}

.badge-categoria.manilla {
    background: #faf5ff;
    color: #805ad5;
}

.badge-categoria.otro {
    background: #f7fafc;
    color: #718096;
}

.estado-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.estado-badge.activo {
    background: #f0fff4;
    color: #38a169;
}

.estado-badge.inactivo {
    background: #fed7d7;
    color: #e53e3e;
}

/* Action Buttons in Table */
.action-buttons {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

/* Modal for Gestion Articulo */
.modal-content.large {
    max-width: 900px;
}

/* File Upload Area */
.file-upload-area {
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    background: #f8fafc;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: #667eea;
    background: #f7fafc;
}

.file-upload-area.dragover {
    border-color: #667eea;
    background: #edf2f7;
    border-style: solid;
}

.file-upload-area i {
    font-size: 2.5rem;
    color: #cbd5e0;
    margin-bottom: 12px;
}

.file-upload-area p {
    color: #718096;
    margin-bottom: 8px;
}

.file-upload-area .btn {
    margin-top: 12px;
}

input[type="file"].hidden {
    display: none;
}

/* Empty State for Articles */
.empty-articles {
    text-align: center;
    padding: 80px 20px;
    color: #718096;
}

.empty-articles i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
    color: #cbd5e0;
}

.empty-articles h3 {
    margin: 0 0 12px 0;
    color: #4a5568;
    font-size: 1.3rem;
}

.empty-articles p {
    margin: 0 0 24px 0;
    font-size: 1rem;
}

/* Responsive for Articles Section */
@media (max-width: 768px) {
    .tabs-navigation {
        flex-direction: column;
        padding: 8px;
    }

    .tab-nav {
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .toolbar-actions {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }

    .toolbar-left, .toolbar-right {
        flex-direction: column;
    }

    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-select {
        width: 100%;
    }

    .table-container {
        padding: 16px;
    }

    .articulos-table {
        font-size: 0.85rem;
    }

    .articulos-table thead th,
    .articulos-table tbody td {
        padding: 10px 8px;
    }

    .action-buttons {
        flex-direction: column;
        gap: 4px;
    }
}