/* ==========================================================================
   Mejoras Visuales - Menú Lateral (Soporte) - Modo Claro Optimizado
   ========================================================================== */

/* 1. Contenedor y Layout Base */
.menu-item-support .nav-second-level li a {
    display: flex !important;
    align-items: center !important;
    padding: 12px 20px 12px 30px !important;
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid transparent;
    text-decoration: none !important;
    height: auto !important;
}

/* 2. Tipografía y Texto - COLORES OSCUROS PARA FONDO BLANCO */
.menu-item-support .nav-second-level li a .sub-menu-text {
    flex: 1;
    font-size: 0.9rem !important;
    font-weight: 500;
    color: #4b5563; /* Gris oscuro (Gray-600) para buen contraste */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
    margin-left: 0;
    display: flex;
    align-items: center;
}

/* 3. Manejo de Iconos */
.menu-item-support .nav-second-level li a > i.menu-icon,
.menu-item-support .nav-second-level li a .sub-menu-text i {
    width: 24px;
    text-align: center;
    margin-right: 10px;
    font-size: 1.1em;
    color: #6b7280; /* Gris medio (Gray-500) */
    flex-shrink: 0;
    display: inline-block;
}

/* 4. Estados e Interacción */

/* Hover */
.menu-item-support .nav-second-level li a:hover {
    background-color: #f3f4f6; /* Gris muy claro (Gray-100) */
    padding-left: 35px !important;
    border-left-color: #9ca3af; /* Borde gris visible */
}

.menu-item-support .nav-second-level li a:hover .sub-menu-text {
    color: #111827 !important; /* Casi negro (Gray-900) */
    font-weight: 600;
}

.menu-item-support .nav-second-level li a:hover > i.menu-icon,
.menu-item-support .nav-second-level li a:hover .sub-menu-text i {
    color: #374151 !important; /* Gris oscuro (Gray-700) */
    transform: scale(1.1);
    transition: transform 0.2s;
}

/* Active/Selected */
.menu-item-support .nav-second-level li.active > a {
    background-color: #e5e7eb; /* Gris (Gray-200) */
    border-left-color: #2563eb; /* Azul primario */
}

.menu-item-support .nav-second-level li.active > a .sub-menu-text {
    color: #1e3a8a !important; /* Azul oscuro */
    font-weight: 700;
}

.menu-item-support .nav-second-level li.active > a i {
    color: #2563eb !important; /* Azul primario */
}

/* Accesibilidad */
.menu-item-support .nav-second-level li a:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: -2px;
    background-color: rgba(37, 99, 235, 0.1);
}

/* 5. Badges (Indicadores) */
.menu-item-support .nav-second-level li a .badge {
    margin-left: 10px !important;
    padding: 4px 8px !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); /* Sombra más sutil */
    min-width: 24px;
    text-align: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    color: #fff;
}

.menu-item-support .nav-second-level li a:hover .badge {
    transform: scale(1.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

/* 6. Ajustes Móviles */
@media (max-width: 768px) {
    .menu-item-support .nav-second-level li a {
        padding: 15px 20px !important;
    }
}

/* ==========================================================================
   Mejoras Visuales - Formulario de Tickets (Marca, Serie, N, Diagnóstico)
   ========================================================================== */

/* Contenedor General de la Sección Personalizada */
.custom-ticket-section-wrapper {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-top: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Labels más modernos */
.custom-ticket-section-wrapper label.control-label,
#cf_brand_wrapper label, #cf_series_wrapper label, #cf_n_wrapper label,
#cf_edit_brand_wrapper label, #cf_edit_series_wrapper label, #cf_edit_n_wrapper label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151; /* Gray-700 */
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    display: block;
}

/* Inputs y Selects */
.custom-ticket-section-wrapper .form-control,
#cf_brand_wrapper .form-control, #cf_series_wrapper .form-control,
#cf_edit_brand_wrapper .form-control, #cf_edit_series_wrapper .form-control {
    border: 1px solid #d1d5db; /* Gray-300 */
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.95rem;
    color: #111827; /* Gray-900 */
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    height: auto;
    min-height: 42px;
}

.custom-ticket-section-wrapper .form-control:focus,
#cf_brand_wrapper .form-control:focus, #cf_series_wrapper .form-control:focus,
#cf_edit_brand_wrapper .form-control:focus, #cf_edit_series_wrapper .form-control:focus {
    border-color: #2563eb; /* Blue-600 */
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

/* Estilo específico para el campo N Desactivado */
#cf_n_wrapper input, #cf_edit_n_wrapper input,
.disabled-n-field {
    background-color: #f3f4f6 !important; /* Gray-100 */
    color: #9ca3af !important; /* Gray-400 */
    border-color: #e5e7eb !important; /* Gray-200 */
    cursor: not-allowed !important;
    pointer-events: none !important;
    user-select: none !important;
    box-shadow: none !important;
    font-style: italic;
    opacity: 0.7;
}

/* Checkboxes y Radios Personalizados */
.custom-ticket-section-wrapper .checkbox-primary input[type="checkbox"]:checked + label::before,
.custom-ticket-section-wrapper .radio-primary input[type="radio"]:checked + label::before {
    background-color: #2563eb;
    border-color: #2563eb;
}

.custom-ticket-section-wrapper .radio-inline {
    display: inline-flex;
    align-items: center;
    margin-right: 15px;
}

.custom-ticket-section-wrapper .radio-inline label {
    font-weight: 500;
    color: #4b5563;
    padding-left: 5px;
}

/* Botón 'Marca' (Bootstrap Select) */
.bootstrap-select .btn-default {
    background-color: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.95rem;
    color: #111827;
    height: auto;
    min-height: 42px;
}

.bootstrap-select .btn-default:hover,
.bootstrap-select .btn-default:focus {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

.bootstrap-select .dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    padding: 6px 0;
}

.bootstrap-select .dropdown-menu li a {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.bootstrap-select .dropdown-menu li.selected a {
    background-color: #eff6ff;
    color: #1e40af;
    font-weight: 600;
}
