﻿/* =======================================
   ESTILOS PERSONALIZADOS PARA SISTEMAPOL
   ======================================= */

/* =======================================
   ESTILOS PRINCIPALES DEL LAYOUT
   ======================================= */

/* Footer sticky styles */
body, html {
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

body {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8fafc;
}

.main-wrapper {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

.footer-fixed {
    margin-top: auto !important;
    flex-shrink: 0 !important;
    background-color: #f8f9fa !important;
    border-top: 1px solid #dee2e6 !important;
    padding: 6px 0 !important;
    font-size: 0.75rem !important;
    color: #6c757d !important;
}

.container, .container-fluid {
    height: auto !important;
}

/* =======================================
   ESTILOS DEL NAVBAR
   ======================================= */

.navbar-dark.bg-dark {
    background-color: #1e3a8a !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.3rem;
}

    .navbar-brand:hover {
        transform: scale(1.05);
        transition: transform 0.2s ease;
    }

/* Estilos para el dropdown de usuario */
.user-dropdown {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 5px 10px;
    transition: all 0.3s ease;
}

    .user-dropdown:hover {
        background-color: rgba(255, 255, 255, 0.2);
        transform: translateY(-1px);
    }

.navbar-nav .dropdown-menu {
    position: absolute;
    right: 0;
    left: auto;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

/* =======================================
   ESTILOS PARA BADGES Y MÓDULOS
   ======================================= */

/* Badge de administrador */
.admin-badge {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    margin-left: 5px;
    animation: admin-pulse 2s ease-in-out infinite;
}

@keyframes admin-pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Enlaces de administración */
.nav-link.admin-link {
    background: linear-gradient(45deg, #dc3545, #fd7e14);
    border-radius: 5px;
    margin-left: 10px;
    transition: all 0.3s ease;
}

    .nav-link.admin-link:hover {
        background: linear-gradient(45deg, #c82333, #e66b00);
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }

/* =======================================
   ESTILOS PARA MÓDULO CALENDARIO
   ======================================= */

.nav-link.calendario-link {
    background: linear-gradient(45deg, #17a2b8, #20c997);
    border-radius: 5px;
    margin-left: 5px;
    color: white !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

    .nav-link.calendario-link:hover {
        background: linear-gradient(45deg, #138496, #1e9388);
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        color: white !important;
    }

.calendario-badge {
    background: linear-gradient(45deg, #17a2b8, #20c997);
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.65rem;
    margin-left: 3px;
    font-weight: bold;
}

.calendario-icon {
    color: #17a2b8;
    text-shadow: 0 0 3px rgba(23, 162, 184, 0.5);
}

/* =======================================
   ESTILOS PARA MÓDULO TASER
   ======================================= */

.nav-link.taser-link {
    background: linear-gradient(45deg, #ffc107, #ff8800);
    border-radius: 5px;
    margin-left: 5px;
    color: #000 !important;
    font-weight: 500;
    display: none; /* Oculto por defecto, se muestra via JavaScript */
    transition: all 0.3s ease;
}

    .nav-link.taser-link:hover {
        background: linear-gradient(45deg, #e0a800, #e67700);
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        color: #000 !important;
    }

.taser-badge {
    background: linear-gradient(45deg, #ffc107, #ff8800);
    color: #000;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.65rem;
    margin-left: 3px;
    font-weight: bold;
}

.taser-icon {
    color: #ffc107;
    text-shadow: 0 0 3px rgba(255, 193, 7, 0.5);
    animation: taser-glow 2s ease-in-out infinite alternate;
}

@keyframes taser-glow {
    from {
        text-shadow: 0 0 3px rgba(255, 193, 7, 0.5);
    }

    to {
        text-shadow: 0 0 6px rgba(255, 193, 7, 0.8), 0 0 9px rgba(255, 193, 7, 0.6);
    }
}

.user-taser-badge {
    display: none; /* Oculto por defecto */
}

.taser-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* =======================================
   ESTILOS PARA NOTIFICACIONES
   ======================================= */

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    padding: 2px 5px;
    font-size: 0.6rem;
    min-width: 18px;
    text-align: center;
    animation: notification-pulse 1.5s ease-in-out infinite;
}

@keyframes notification-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.nav-item {
    position: relative;
}

/* =======================================
   ESTILOS PARA ALERTAS Y MENSAJES
   ======================================= */

.alert {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.alert-dismissible .btn-close {
    padding: 0.5rem 0.75rem;
}

/* =======================================
   ESTILOS ADICIONALES
   ======================================= */

.navbar-nav .nav-link {
    transition: all 0.2s ease;
}

    .navbar-nav .nav-link:hover {
        transform: translateY(-1px);
    }

.dropdown-item {
    transition: all 0.2s ease;
}

    .dropdown-item:hover {
        background-color: #f8f9fa;
        transform: translateX(3px);
    }

/* Efectos de carga */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* =======================================
   ESTILOS RESPONSIVOS
   ======================================= */

@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.1rem;
    }

    .nav-link {
        padding: 0.5rem 0.75rem;
    }

    .calendario-badge,
    .taser-badge,
    .admin-badge {
        font-size: 0.6rem;
        padding: 1px 4px;
    }

    .user-dropdown span {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .footer-fixed {
        font-size: 0.7rem;
    }

    .notification-badge {
        top: -3px;
        right: -3px;
        font-size: 0.55rem;
        min-width: 16px;
        padding: 1px 3px;
    }
}

/* =======================================
   ESTILOS PARA FORMULARIOS
   ======================================= */

.form-control:focus {
    border-color: #1e3a8a;
    box-shadow: 0 0 0 0.2rem rgba(30, 58, 138, 0.25);
}

.btn-primary {
    background-color: #1e3a8a;
    border-color: #1e3a8a;
}

    .btn-primary:hover {
        background-color: #1e40af;
        border-color: #1e40af;
    }

/* =======================================
   ESTILOS PARA CARDS Y CONTENEDORES
   ======================================= */

.card {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

/* =======================================
   UTILIDADES ADICIONALES
   ======================================= */

.text-primary {
    color: #1e3a8a !important;
}

.bg-primary {
    background-color: #1e3a8a !important;
}

.required::after {
    content: " *";
    color: #dc3545;
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
