/* index-modern.css - Estilos modernos para formulario de producción */
/* Aplicación conservadora de estilos sin modificar estructura HTML */

/* ==================== INPUTS MODERNOS ==================== */
.form-control,
.form-select {
    height: 48px !important;
    padding: 0 16px !important;
    border-radius: 12px !important;
    border: 1px solid #dce5df !important;
    font-size: 14px !important;
    font-family: 'Inter', sans-serif !important;
    transition: all 0.2s ease !important;
    background-color: white !important;
}

.form-control:focus,
.form-select:focus {
    outline: none !important;
    border-color: #39E079 !important;
    box-shadow: 0 0 0 3px rgba(57, 224, 121, 0.1) !important;
}

.form-control::placeholder {
    color: #9ca3af !important;
}

.form-control[readonly],
.form-control:disabled {
    background-color: #f3f4f6 !important;
    cursor: not-allowed !important;
}

/* Inputs con cursor pointer para modales */
.form-control[style*="cursor: pointer"],
.form-control[onclick] {
    cursor: pointer !important;
    background-color: #f9fafb !important;
}

.form-control[style*="cursor: pointer"]:hover,
.form-control[onclick]:hover {
    background-color: #f3f4f6 !important;
    border-color: #39E079 !important;
}

/* ==================== LABELS MODERNOS ==================== */
.form-label {
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: #648771 !important;
    margin-bottom: 8px !important;
    font-family: 'Inter', sans-serif !important;
}

/* ==================== BOTONES MODERNOS ==================== */
.btn {
    height: 42px !important;
    padding: 0 16px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    font-family: 'Inter', sans-serif !important;
    transition: all 0.2s ease !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.btn-primary {
    background: linear-gradient(135deg, #39E079 0%, #2bc464 100%) !important;
    color: white !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2bc464 0%, #22a855 100%) !important;
    box-shadow: 0 4px 12px rgba(57, 224, 121, 0.3) !important;
    transform: translateY(-1px) !important;
}

.btn-secondary {
    background: white !important;
    color: #111714 !important;
    border: 1px solid #dce5df !important;
}

.btn-secondary:hover {
    background: #f9fafb !important;
    border-color: #cbd5d0 !important;
}

.btn-outline-secondary {
    background: white !important;
    color: #111714 !important;
    border: 1px solid #dce5df !important;
}

.btn-outline-secondary:hover {
    background: #f9fafb !important;
}

.btn-danger {
    background: #ef4444 !important;
    color: white !important;
}

.btn-danger:hover {
    background: #dc2626 !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
}

.btn-info {
    background: #3b82f6 !important;
    color: white !important;
}

.btn-info:hover {
    background: #2563eb !important;
}

.btn-success {
    background: #39E079 !important;
    color: white !important;
}

.btn-success:hover {
    background: #2bc464 !important;
}

/* Botón Plus (+) */
.plus-btn {
    width: 42px !important;
    height: 42px !important;
    border-radius: 10px !important;
    background: #39E079 !important;
    color: white !important;
    border: none !important;
    font-size: 20px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.plus-btn:hover {
    background: #2bc464 !important;
    transform: scale(1.05) !important;
}

/* ==================== CARDS MODERNOS ==================== */
.card {
    border-radius: 16px !important;
    border: 1px solid #dce5df !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    margin-bottom: 24px !important;
    overflow: hidden !important;
}

.card-header {
    padding: 16px 24px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    font-family: 'Inter', sans-serif !important;
    border-bottom: 1px solid #dce5df !important;
}

.card-header.bg-primary {
    background: linear-gradient(135deg, #39E079 0%, #2bc464 100%) !important;
    color: white !important;
    border-bottom: none !important;
}

.card-header.bg-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: white !important;
    border-bottom: none !important;
}

.card-header.bg-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: white !important;
    border-bottom: none !important;
}

.card-header.bg-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
    border-bottom: none !important;
}

.card-body {
    padding: 24px !important;
}

/* Cards con borde de color */
.card.border-info {
    border-color: #3b82f6 !important;
    border-width: 2px !important;
}

.card.border-warning {
    border-color: #f59e0b !important;
    border-width: 2px !important;
}

.card.border-primary {
    border-color: #39E079 !important;
    border-width: 2px !important;
}

.card.border-success {
    border-color: #10b981 !important;
    border-width: 2px !important;
}

/* ==================== BADGES MODERNOS ==================== */
.badge {
    padding: 6px 12px !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    font-family: 'Inter', sans-serif !important;
}

.badge.bg-secondary {
    background: #6b7280 !important;
}

.badge.bg-primary {
    background: #39E079 !important;
}

/* ==================== CONTAINER ==================== */
.container {
    max-width: 1400px !important;
}

/* ==================== TÍTULOS ==================== */
h2.text-primary {
    font-size: 28px !important;
    font-weight: 900 !important;
    color: #111714 !important;
    font-family: 'Inter', sans-serif !important;
}

/* ==================== TABLAS ==================== */
.table {
    border-radius: 12px !important;
    overflow: hidden !important;
}

.table thead th {
    background: #f9fafb !important;
    color: #648771 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 12px 16px !important;
    border-bottom: 2px solid #dce5df !important;
}

.table tbody td {
    padding: 12px 16px !important;
    font-size: 14px !important;
    color: #111714 !important;
    border-bottom: 1px solid #f3f4f6 !important;
}

.table tbody tr:hover {
    background: #f9fafb !important;
}

/* ==================== INPUT GROUPS ==================== */
.input-group .form-control,
.input-group .form-select {
    border-radius: 12px 0 0 12px !important;
}

.input-group .plus-btn {
    border-radius: 0 12px 12px 0 !important;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {

    .form-control,
    .form-select {
        font-size: 16px !important;
        /* Evita zoom en móvil */
    }

    .btn {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* ==================== ANIMACIONES ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.3s ease !important;
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #dce5df;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #cbd5d0;
}

/* ==================== MODALES ==================== */
.modal-content {
    border-radius: 16px !important;
    border: none !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

.modal-header {
    border-bottom: 1px solid #dce5df !important;
    padding: 20px 24px !important;
}

.modal-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    font-family: 'Inter', sans-serif !important;
    color: #111714 !important;
}

.modal-body {
    padding: 24px !important;
}

.modal-footer {
    border-top: 1px solid #dce5df !important;
    padding: 16px 24px !important;
}

/* ==================== SELECTS CON ICONO ==================== */
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23648771' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px 12px !important;
    padding-right: 40px !important;
}

/* ==================== FOCUS VISIBLE ==================== */
*:focus-visible {
    outline: 2px solid #39E079 !important;
    outline-offset: 2px !important;
}

/* ==================== PRINT STYLES ==================== */
@media print {
    .no-print {
        display: none !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* ==================== CURVA DE TALLAS - FIX SPACING ==================== */
/* Contenedor principal de tallas */
#tallasContainer {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 12px !important;
    background: #f9fafb !important;
    border-radius: 12px !important;
    margin-top: 12px !important;
}

/* Grupo de cada talla (label + input) */
.size-input-group {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 8px !important;
    background: white !important;
    border-radius: 8px !important;
    border: 1px solid #e5e7eb !important;
    min-width: 60px !important;
}

.size-input-group:hover {
    border-color: #39E079 !important;
    box-shadow: 0 2px 4px rgba(57, 224, 121, 0.1) !important;
}

/* Label de número de talla */
.size-input-group label {
    font-size: 10px !important;
    font-weight: 700 !important;
    color: #648771 !important;
    margin-bottom: 4px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

/* Input de cantidad por talla */
.size-input-group input.form-control,
.size-input {
    height: 36px !important;
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    padding: 4px 6px !important;
    margin: 0 !important;
    text-align: center !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    border: 1px solid #dce5df !important;
}

.size-input-group input.form-control:focus {
    border-color: #39E079 !important;
    box-shadow: 0 0 0 3px rgba(57, 224, 121, 0.1) !important;
}

/* Inputs de tallas en general */
.talla-input,
input[id^="talla_"],
input[name^="talla_"] {
    height: 36px !important;
    width: 48px !important;
    min-width: 48px !important;
    padding: 4px 6px !important;
    margin: 2px !important;
    text-align: center !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
}

/* Grid de tallas alternativo */
.tallas-grid,
.size-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)) !important;
    gap: 8px !important;
    margin-top: 12px !important;
}

/* Labels de tallas */
.talla-label {
    font-size: 10px !important;
    font-weight: 700 !important;
    text-align: center !important;
    margin-bottom: 4px !important;
    color: #648771 !important;
    text-transform: uppercase !important;
}

/* Contenedor de cada talla */
.talla-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 8px !important;
    background: white !important;
    border-radius: 8px !important;
    border: 1px solid #e5e7eb !important;
}

/* Estilos para inputs dentro de tablas de tallas */
table input.form-control {
    height: 36px !important;
    width: 55px !important;
    min-width: 55px !important;
    max-width: 55px !important;
    padding: 4px 6px !important;
    margin: 0 auto !important;
    text-align: center !important;
    font-weight: 600 !important;
}

/* Asegurar que los inputs pequeños no se vean afectados por el estilo general */
input[type="number"][style*="width"] {
    width: auto !important;
    min-width: 48px !important;
}

/* Responsive para tallas en móvil */
@media (max-width: 768px) {
    #tallasContainer {
        gap: 6px !important;
        padding: 8px !important;
    }

    .size-input-group {
        min-width: 55px !important;
        padding: 6px !important;
    }

    .size-input-group input.form-control {
        width: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        font-size: 13px !important;
    }
}