:root {
    --primary: #1e3c72;
    --secondary: #2a5298;
    --accent: #e31e24;
    --success: #4cb050;
    --warning: #ff9800;
    --danger: #f44236;
    --info: #2f8de9;
    --dark-bg: #102030;
    --sidebar-bg: rgba(36, 44, 63, 0.9);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Enhancements */
body {
    background-color: #f4f7f6 !important;
    font-family: 'Public Sans', sans-serif !important;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.layout-wrapper,
.layout-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.layout-page {
    position: absolute !important;
    left: 280px !important;
    top: 0 !important;
    right: 0 !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #f4f7f6 !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 10;
    overflow-x: hidden;
}

.content-wrapper {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

@media (max-width: 1199.98px) {
    .layout-page {
        left: 0 !important;
        position: relative !important;
    }
}

/* Premium Sidebar (Glassmorphism) */
.menu.fixed-sidebar {
    background: var(--sidebar-bg) !important;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-right: 1px solid var(--glass-border);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
}

.logo-container {
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 15px;
    padding: 20px !important;
}

.nav-link {
    color: rgba(255, 255, 255, 0.7) !important;
    border-radius: 12px !important;
    margin: 4px 10px !important;
    padding: 12px 15px !important;
    transition: var(--transition) !important;
    border: 1px solid transparent !important;
}

.nav-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1) !important;
    transform: translateX(5px);
}

.nav-link.active {
    background: linear-gradient(45deg, var(--primary), var(--secondary)) !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(30, 60, 114, 0.4);
    border: 1px solid var(--glass-border) !important;
}

.nav-link i {
    font-size: 1.3rem !important;
    margin-right: 12px !important;
}

.ti {
    color: #fff !important;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.con_btn {
    position: relative;
    z-index: 100;
    width: 100%;
    margin: auto;
    justify-content: center;
    align-items: center;
    display: flex;
    flex-wrap: wrap;
}

.form-check {
    display: inline-block;
    cursor: pointer;
}



.checker {
    padding-left: 30px;
    padding-right: 30px;
}

#datepicker1 {
    margin-left: 0px;
    width: 50%;
    height: 80%;
}

#datepicker2 {
    margin-left: 5px;
    width: 50%;
    height: 80%;
}

/* Ultra Compact Metrics Grid */
.metrics-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
    justify-content: center !important;
    gap: 12px !important;
    padding: 15px !important;
    width: 100% !important;
    max-width: 1300px;
    margin: 0 auto !important;
}

@media (min-width: 1200px) {
    .metrics-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* Ensure bootstrap containers use more space but remain centered */
.container-xxl {
    max-width: 1500px !important;
    margin-right: auto !important;
    margin-left: auto !important;
    padding-left: 40px !important;
    padding-right: 40px !important;
}

.metric-card {
    position: relative;
    overflow: hidden;
    padding: 12px 8px !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    color: #333 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    width: 100% !important;
    min-height: 100px;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.metric-card .count {
    font-size: 2.2rem !important;
    font-weight: 800 !important;
    display: block;
    margin-bottom: 0;
    z-index: 2;
    color: #333 !important;
    /* Solid dark color */
    background: none !important;
    /* Remove gradient background */
    -webkit-text-fill-color: initial !important;
    /* Reset text fill */
}

.metric-card .label {
    font-size: 0.75rem !important;
    /* Slightly larger */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    color: #444 !important;
    /* Darker gray for better visibility */
    z-index: 2;
    margin-top: 5px;
}

#contador_abierto_card .count {
    color: #ff3e1d !important;
    /* Brighter Red */
}

#contador_proceso_card .count {
    color: #ffab00 !important;
    /* Orange/Yellow */
}

#contador_cerrado_card .count {
    color: #71dd37 !important;
    /* Green */
}

#contador_verificar_card .count {
    color: #03c3ec !important;
    /* Cyan/Blue */
}

/* Counter Reset Styles - Clean up old solid backgrounds */
#contador_abierto,
#contador_proceso,
#contador_cerrado,
#contador_verificar {
    background: none !important;
    color: inherit !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

.metric-bg-icon {
    position: absolute;
    right: -10px;
    bottom: -10px;
    font-size: 4rem;
    opacity: 0.05;
    transform: rotate(-15deg);
    z-index: 1;
}

.metric-card:hover .metric-bg-icon {
    transform: rotate(-5deg) scale(1.1);
    opacity: 0.2;
}

.chat_content {

    width: 300px;
    height: 600px;
    background: #242c3f;
    margin: 5px;



    /* bottom: 0;
    right: 0px;
    z-index: 100;
    position: fixed;
    width: 25%;
    height: 60%;
    background: #242c3f; */
}

.chat_title {
    background: #102030;
    color: #fff;
    width: 300px;
    position: absolute;
    padding-bottom: 5px;
}

.chat1 {
    width: 70%;
    float: left;
}

.chat2 {
    margin: 5px;
    float: left;
}

.chat2cont {
    float: right;
    width: 30%;
}

.cont_chats {
    margin-top: 55px;
    height: 68%;
    overflow-x: auto;
    margin-bottom: 2%;
}

.chat_cliente {
    display: flow-root;
    margin-top: 5px;
    margin-bottom: 5px;
    margin-left: 5px;
    border-radius: 10px;
    width: 60%;
    background: #102030;
    padding: 8px;
    color: #fff;
}

.chat_admin {
    float: right;
    margin-top: 5px;
    margin-bottom: 5px;
    margin-right: 5px;
    border-radius: 10px;
    width: 60%;
    background: #005c4b;
    padding: 8px;
    color: #fff;
}

.chat_admin_hora {
    text-align: right;
}

.chat_cliente_hora {
    text-align: right;
}

.chat_box {
    color: #fff;
    width: 98%;
    margin: auto;
    border-radius: 8px;
    background: #242c3f;
    border-color: #ffff;
}

.chat_input3 {
    width: 40%;
    float: left;
}

.chat_input3 select {
    margin-left: 10px;
}

.chat_input2 {
    width: 60%;
    float: right;
}

.btn_n {
    float: right;
    margin-right: 15px;
    padding: 6px;
}

.chat_input {
    text-align: center;
}


.form_avisos {
    max-width: 800px;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    margin-top: 5%;

}

.filtros {
    width: 350px;
    display: none;
    position: fixed;
    z-index: 1300;
    right: 0;
    top: 0;
    border-radius: 0;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 25px;
    height: 100vh;
    overflow-y: auto;
    transition: var(--transition);
    border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.filtros h6 {
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--primary);
    margin-top: 25px;
    font-size: 0.9rem;
    text-transform: uppercase;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.columna_filtro_tipo {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 20px;
}

.tipo_reporte_group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

#radio_abierto {
    background-color: #f44236;
    border-color: #f44236;
}

#radio_pendiente {
    background-color: #ff9800;
    border-color: #ff9800;
}

#radio_cerrado {
    background-color: #4cb050;
    border-color: #4cb050;
}


#con_emergencia .form-check-input {
    background-color: #e31e24;
    border-color: #e31e24;
}

#con_ciudad .form-check-input {
    background-color: #48caec;
    border-color: #48caec;
}

#con_seguridad .form-check-input {
    background-color: #ee801c;
    border-color: #ee801c;
}

.filtro1 {
    display: flex;
    width: 100%;
    margin: auto;
}

.filtro1 div {
    float: left;
}

.filtro4 {
    display: flex;
    width: 70%;
    margin: auto;
    align-items: baseline;
}

.filtro3 {
    width: 100%;
    margin: auto;
    display: flex;
    text-align: center;
}

.filter_btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    z-index: 1150;
    width: 45px;
    height: 45px;
    top: 50%;
    right: 0;
    border-radius: 20px 0 0 20px;
    cursor: pointer;
    box-shadow: -5px 5px 20px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.filter_btn:hover {
    width: 55px;
    background: var(--accent);
}

/* Global Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.animate-fade-in {
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: var(--delay, 0s);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

/* Premium Login Page */
.authentication-wrapper {
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    background-size: cover;
    background-attachment: fixed;
    min-height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    position: relative;
    overflow-x: hidden;
}

.authentication-inner .card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.login-header {
    background: rgba(30, 60, 114, 0.05);
    padding: 30px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.form-control:focus {
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.2);
    border-color: var(--primary);
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary), var(--secondary)) !important;
    border: none !important;
    padding: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    border-radius: 12px !important;
    transition: var(--transition) !important;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(30, 60, 114, 0.4);
}

/* Fix for invisible text in filters - AGGRESSIVE */
#filtros,
#filtros * {
    color: #333333 !important;
}

#filtros:hover {
    color: #333333 !important;
}

#map {
    height: 600px !important;
    width: 100% !important;
    border-radius: 12px;
}