/* =========================================
   css/dispositivos.css (Módulo de Activos)
========================================= */

.disp-header {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 15px;
}

.disp-monitors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.disp-monitor-card {
    padding: 15px;
    background: rgba(22, 27, 34, 0.6);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.disp-monitor-card.border-green { border-left: 4px solid #20c997; }
.disp-monitor-card.border-blue { border-left: 4px solid #6ea8fe; }
.disp-monitor-card.border-orange { border-left: 4px solid #ffc107; }
.disp-monitor-card.border-red { border-left: 4px solid #ff6b6b; }

.disp-monitor-label { color: #a0aec0; margin: 0; font-size: 0.85rem; }
.disp-monitor-value { margin: 5px 0 0 0; font-size: 1.8rem; font-weight: bold; }

.disp-table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.glass-modal-large { max-width: 600px !important; }

.disp-tabs-container {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}

.disp-tab-btn {
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    font-size: 1rem;
    padding: 5px 10px;
    transition: all 0.3s ease;
}
.disp-tab-btn.active { color: #6ea8fe; font-weight: bold; border-bottom: 2px solid #6ea8fe; }

.disp-info-box {
    background: rgba(110, 168, 254, 0.1);
    border: 1px dashed #6ea8fe;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}
/* =========================================
   ESTILOS PREMIUM: SELECTORES Y PAGINACIÓN
========================================= */

/* Selectores de cristal (Ocultan la flecha fea nativa) */
.custom-glass-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: rgba(0, 0, 0, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 35px 10px 15px;
    outline: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236ea8fe' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    min-width: 180px;
}

.custom-glass-select:hover {
    background-color: rgba(110, 168, 254, 0.1);
    border-color: rgba(110, 168, 254, 0.3);
}

.custom-glass-select option {
    background-color: #1e293b;
    color: white;
}

/* Botones de Paginación */
.btn-paginacion {
    padding: 8px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(110, 168, 254, 0.1);
    color: #6ea8fe;
    cursor: pointer;
    transition: 0.3s;
    font-weight: bold;
}

.btn-paginacion:hover:not(:disabled) {
    background: #6ea8fe;
    color: #111;
}

.btn-paginacion:disabled {
    background: rgba(0,0,0,0.2);
    color: #6c757d;
    cursor: not-allowed;
    border-color: transparent;
}

/* =========================================
   ESTILOS PREMIUM: UPLOAD DE ARCHIVOS EXCEL
========================================= */
.custom-file-upload {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    margin-top: 15px;
}

.custom-file-label {
    background: rgba(110, 168, 254, 0.1);
    color: #6ea8fe;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    border: 1px solid rgba(110, 168, 254, 0.3);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.custom-file-label:hover {
    background: rgba(110, 168, 254, 0.2);
    color: white;
    border-color: #6ea8fe;
}

.file-name-text {
    color: #a0aec0;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

/* ========================================================= */
/* --- ARREGLO DE FILTROS DE FECHA Y BOTONES EN MÓVIL ---    */
/* ========================================================= */

@media (max-width: 768px) {
    /* 1. Desarmamos la "píldora" gigante de fechas */
    .disp-table-toolbar .date-range-group {
        display: flex !important;
        flex-wrap: wrap !important; /* Permite que los elementos bajen de línea */
        background: transparent !important; /* Quitamos el fondo agrupado */
        border: none !important; /* Quitamos el borde agrupado */
        padding: 0 !important;
        height: auto !important;
        gap: 10px !important;
        width: 100% !important;
    }

    /* 2. El selector de "Fecha Ingreso" ocupa toda su propia línea */
    .disp-table-toolbar .date-range-group .filter-select {
        width: 100% !important;
        flex: 0 0 100% !important;
        background: rgba(0,0,0,0.3) !important;
        border: 1px solid rgba(255,255,255,0.2) !important;
        border-radius: 8px !important;
        height: 42px !important;
    }

    /* 3. Las dos fechas (Desde - Hasta) comparten la línea de abajo mitad y mitad */
    .disp-table-toolbar .date-range-group input[type="date"] {
        width: 45% !important;
        flex-grow: 1 !important;
        background: rgba(0,0,0,0.3) !important;
        border: 1px solid rgba(255,255,255,0.2) !important;
        border-radius: 8px !important;
        height: 42px !important;
        padding: 0 10px !important;
        text-align: center;
    }

    /* El guión que separa las fechas */
    .disp-table-toolbar .date-range-group span {
        display: flex;
        align-items: center;
        color: #a0aec0;
    }

    /* 4. Arreglamos los botones inferiores (Borrador rojo + Exportar verde) */
    .disp-table-toolbar {
        flex-wrap: wrap !important; /* Asegura que los botones fluyan bien */
    }

    /* Agrupamos los botones si están sueltos */
    .disp-table-toolbar > button, 
    .disp-table-toolbar > .btn-action {
        height: 45px !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin-top: 5px !important;
    }

    /* Botón verde (Exportar) toma todo el espacio sobrante */
    .disp-table-toolbar button.btn-excel,
    .disp-table-toolbar button[style*="20c997"], /* Busca botones con color verde */
    .disp-table-toolbar button[onclick*="exportar"] {
        flex-grow: 1 !important; 
        font-size: 1rem !important;
    }

    /* Botón rojo (Borrador) se queda cuadradito a la izquierda */
    .disp-table-toolbar button[style*="rgba(255, 107, 107"],
    .disp-table-toolbar button[onclick*="limpiar"] {
        width: 55px !important;
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
    }
}

/* ==========================================================
   BOTÓN DE PLANTILLA EXCEL (CARGA MASIVA)
========================================================== */
.btn-descargar-plantilla {
    background: rgba(32, 201, 151, 0.1);
    border: 1px solid rgba(32, 201, 151, 0.3);
    color: #20c997;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 25px; /* <-- AQUÍ ESTÁ LA SEPARACIÓN QUE PEDISTE */
    margin-bottom: 20px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-descargar-plantilla:hover {
    background: rgba(32, 201, 151, 0.25);
    transform: translateY(-2px); /* Efecto de levantarse al pasar el mouse */
    box-shadow: 0 4px 12px rgba(32, 201, 151, 0.15); /* Brillo verde sutil */
}

.btn-descargar-plantilla:active {
    transform: translateY(0); /* Efecto de clic presionado */
}