/* Global styles for dark theme with glassmorphism reminiscent of iOS aesthetics */

/* Base background color and image */
body.bg-dark-blue {
    /* Dark blue fallback */
    background-color: #0a1931;
    /* Improved liquid glass gradient background */
    background-image: url('../images/background2.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #e4eaf5;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* Progress bar at the top for transitions */
#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #00b4db, #0083b0);
    z-index: 9999;
    transition: width 0.4s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-glass {
        margin-top: 2rem;
    }
}

/* Center login card on page */
.login-container {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animations for fade-in */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.6s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Glass effect for navigation bar */
.glass-navbar {
    background: rgba(10, 25, 49, 0.6);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Card glass component */
.card-glass {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: #e4eaf5;
}

/* Input dark styles */
.form-control {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e4eaf5;
}

.form-control:focus {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: #6699cc;
    box-shadow: none;
    color: #fff;
}

/* Asegura que las etiquetas de formulario y los textos pequeños sean visibles en fondos oscuros */
.form-label {
    color: #ffffff;
}
small,
.text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Table styles */
.table-glass {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    color: #e4eaf5;
}

.table-glass th, .table-glass td {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.table-glass thead {
    background: rgba(255, 255, 255, 0.08);
}

/* --- Chips de selección de divisiones --- */
.chip-choice {
    position: relative;
}
.chip-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.chip-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    cursor: pointer;
    user-select: none;
    transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease;
    color: #e4eaf5;
}
.chip-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}
.chip-input:checked + .chip-pill {
    background: rgba(80, 140, 255, 0.20);
    border-color: rgba(80, 140, 255, 0.55);
    transform: translateY(-1px);
}

/* --- Badges para galería e indicación de división --- */
.badge-dept {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #e4eaf5;
}
.badge-dept img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}
.badge-TSU { background: rgba(245, 164, 46, 0.18); }
.badge-CHP { background: rgba(80, 140, 255, 0.18); }
.badge-CTD { background: rgba(190, 80, 40, 0.18); }
.badge-TSD { background: rgba(255, 215, 0, 0.18); }

/* ---------- Animaciones y efectos de hover ---------- */
/* Zoom suave para tarjetas de la interfaz */
.card-glass {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-glass:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}
/* Zoom para botones y enlaces interactivos */
.btn:hover, .card:hover, .chip-pill:hover {
    transform: scale(1.02);
    transition: transform 0.15s ease;
}
/* Estilo de enlace de navegación al pasar el cursor */
.navbar-nav .nav-link:hover {
    color: #a0c7ff !important;
    transform: translateY(-1px);
    transition: color 0.2s ease, transform 0.2s ease;
}
/* Tabla hover highlight */
.table-glass tbody tr:hover {
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

/* Watermark styling */
.watermark {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    padding: 10px;
    position: fixed;
    bottom: 0;
    width: 100%;
    pointer-events: none;
}

/* Buttons */
.btn-primary {
    background-color: #2d73ff;
    border-color: #2d73ff;
}

.btn-primary:hover {
    background-color: #1a57d2;
    border-color: #1a57d2;
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Mostrar botón de eliminación de certificación al pasar el cursor */
.position-relative:hover > button {
    display: block !important;
}

/* Etiquetas de acompañantes en formulario */
#companion-tags .badge {
    background-color: #2d73ff;
    border-radius: 12px;
    padding: 0.4rem 0.6rem;
    display: flex;
    align-items: center;
    font-size: 0.8rem;
}
#companion-tags .btn-close {
    margin-left: 0.3rem;
}