:root {
    /* Colores principales */
    --primary-dark: #051926;
    --primary: #0B2D4F;
    --secondary: #00E5FF;
    --accent-yellow: #DDFF0D;
    --accent-cyan: #00FFFF;

    /* Colores base */
    --white: #FFFFFF;
    --light: #F5F7FA;
    --success: #0DFF76;
    --warning: #FF9900;
    --danger: #FF2B19;
    --blue: #4A90E2;
    --green: #2ECC71;
    --text-dark: #051926;
    --text-light: #8A94A6;

    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Login page */
.login-body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    overflow: hidden;
    background-color: #000000;
    justify-content: center;
    align-items: center;
    position: relative;
}

.login-container {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.95);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 420px;
    backdrop-filter: blur(10px);
    border-top: 4px solid var(--accent-cyan);
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header i {
    color: var(--secondary);
    font-size: 1.8rem;
}

.login-header h1 {
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    font-family: "Segoe UI", system-ui, sans-serif;
    font-size: 2rem;
    font-weight: 700;
}

.login-header p {
    color: var(--text-light);
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

.form-group {
    margin-bottom: 1.8rem;
    position: relative;
}

.form-group label {
    display: block;
    color: var(--text-dark);
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--light);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--white);
}

.form-group input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.2);
}

.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.remember-me input[type="checkbox"] {
    margin-right: 0.5rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.remember-me label {
    color: var(--text-light);
    cursor: pointer;
    font-size: .9em;
}

.btn-login {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.btn-login:hover {
    background: var(--secondary);
    color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 229, 255, 0.3);
}

.error-message {
    color: var(--danger);
    margin-top: 1rem;
    text-align: center;
    padding: 0.8rem;
    border-radius: 5px;
    background: rgba(255, 43, 25, 0.1);
    display: none;
}

/* Pages */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    background: var(--gradient-primary);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(5, 25, 38, 0.2);
}

.navbar-brand {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand i {
    color: var(--secondary);
    font-size: 1.8rem;
}

.navbar-brand:focus, .navbar-brand:hover {
    color: var(--white);
}

/* User Section */
.user-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    color: var(--white);
}

.user-name {
    font-size: 1rem;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-ip {
    font-size: 0.7rem;
    color: var(--secondary);
    opacity: 0.8;
}

/* Menu Trigger */
.menu-container {
    display: flex;
    align-items: center;
}

.menu-trigger {
    cursor: pointer;
    padding: 10px;
    z-index: 1000;
    background: transparent;
    border: none;
}

.menu-trigger .line {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background-color: var(--secondary);
    transition: transform 0.3s ease-in-out;
    border-radius: 3px;
}

.menu-trigger.active .line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-trigger.active .line:nth-child(2) {
    opacity: 0;
}

.menu-trigger.active .line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: -250px;
    height: 100vh;
    width: 250px;
    background: var(--primary-dark);
    transition: transform 0.3s ease-in-out;
    z-index: 999;
    padding-top: 70px;
    box-shadow: 2px 0 15px rgba(5, 25, 38, 0.2);
}

.sidebar.active {
    transform: translateX(250px);
}

.sidebar-content {
    padding-top: 20px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: var(--white);
    text-decoration: none;
    transition: 0.3s;
    gap: 12px;
}

.sidebar-link:hover {
    background: var(--primary);
    padding-left: 30px;
    border-right: 4px solid var(--secondary);
}

.sidebar-link i {
    color: var(--secondary);
    width: 20px;
    text-align: center;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 100px auto 2rem;
    padding: 0 1rem;
    transition: margin-left 0.3s ease;
}

.container.shifted {
    margin-left: 270px;
}

/* Alert Section */
.alert-section {
    background: rgba(0, 38, 255, 0.1);
    border-left: 4px solid var(--primary);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.alert-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(5, 25, 38, 0.1);
}

.alert-title {
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-content {
    color: var(--text-dark);
}

/* Dashboard */
.dashboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(5, 25, 38, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--warning);
    opacity: 0.8;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(5, 25, 38, 0.1);
}

.stat-title {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-dark);
    margin: 10px 0;
}

.stat-change {
    color: var(--success);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Search Section */
.search-section {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(5, 25, 38, 0.1);
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-section .select2-container {
    flex: 1;
}

.select2-container {
    width: 100% !important;
}

.select2-container--default .select2-selection--single {
    padding: 1rem;
    border: 2px solid var(--light);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    height: auto;
    background: var(--white);
}

.select2-container--default .select2-selection--single:focus,
.select2-container--default.select2-container--open .select2-selection--single {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.1);
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    padding: 0.5rem;
    border: 2px solid var(--light);
    border-radius: 4px;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    outline: none;
    border-color: var(--secondary);
}

.select2-dropdown {
    border: 2px solid var(--light);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(5, 25, 38, 0.1);
}

.select2-results__option {
    padding: 0.75rem 1rem;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--blue);
    color: var(--white);
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: var(--text-light);
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: normal;
    padding: 0;
    color: var(--text-dark);
}

.search-button {
    background: var(--secondary);
    border: none;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    color: var(--primary-dark);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-button:hover {
    background: var(--accent-cyan);
    transform: translateY(-2px);
}

.search-button i {
    font-size: 1.2rem;
}

/* Module Cards */
.main-modules {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.module-card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    box-shadow: 0 4px 6px rgba(5, 25, 38, 0.1);
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--secondary);
}

.module-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(5, 25, 38, 0.1);
}

.module-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.module-title {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.module-description {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.4;
}

/* Utility Classes */
.badge {
    background: var(--secondary);
    color: var(--primary-dark);
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Whatsapp button */
.whatsapp_float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    background-color: var(--green);
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    z-index: 100;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s;
}

.whatsapp_float i {
    line-height: 60px;
}

.whatsapp_float:hover {
    background-color: #128C7E;
}

.tooltip {
    visibility: hidden;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 5px;
    padding: 5px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 70px;
    z-index: 101;
    white-space: nowrap;
    font-size: 12px;
}

.whatsapp_float:hover .tooltip {
    visibility: visible;
}

/* Estilos para las páginas */
.title-page{
    color: var(--text-dark);
    margin-bottom: 2.3rem;
    font-weight: bold;
    text-align: center;
}

/* Estilos para la sección del visor */
.analisis-container {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(5, 25, 38, 0.1);
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.analisis-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-cyan);
}

.analisis-container {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.analisis-container h1 {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text-dark);
}

.analisis-container h2 {
    font-size: 1.35em;
    font-weight: 600;
    margin: 1.5em 0 1em;
    color: #222;
}

.analisis-container h3 {
    font-size: 1em;
    font-weight: 600;
    margin: 1.2em 0 0.8em;
    color: #333;
}

.analisis-container .content-paragraph {
    font-size: 1em;
    margin: 0.8em 0;
    line-height: 1.6;
}

.analisis-container ul {
    margin: 0.8em 0;
    padding-left: 2em;
}

.analisis-container li {
    margin-bottom: 0.5em;
    line-height: 1.6;
    font-size: 1em;
}

.analisis-container strong {
    font-weight: 600;
    color: #222;
}

/* Estilos para la sección de licitaciones */
.licitaciones-container {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(5, 25, 38, 0.1);
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.licitaciones-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-cyan);
}

/* Estilos de la tabla */
#licitacionesTable {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1rem 0;
}

/* Encabezados */
#licitacionesTable thead th {
    background: var(--primary);
    color: var(--light);
    padding: 1rem;
    font-weight: 600;
    font-size: 14px;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 10;
}

#licitacionesTable thead th:first-child {
    border-top-left-radius: 8px;
}

#licitacionesTable thead th:last-child {
    border-top-right-radius: 8px;
}

/* Celdas */
#licitacionesTable td {
    padding: 1rem;
    border-bottom: 2px solid var(--light);
    color: var(--text-dark);
    font-size: 11px;
}

/* Hover en las filas */
#licitacionesTable tbody tr:hover {
    background-color: rgba(0, 229, 255, 0.05);
}

/* Celda de descripción */
.descripcion-cell {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Controles de DataTables */
.dataTables_wrapper {
    padding: 1rem 0;
}

/* Select de longitud */
.dataTables_length select {
    padding: 0.5rem 2rem 0.5rem 1rem;
    border: 2px solid var(--light);
    border-radius: 8px;
    background-color: var(--white);
    color: var(--text-dark);
    margin: 0 0.5rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%234a5568' viewBox='0 0 16 16'%3E%3Cpath d='M8 10l4-4H4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

/* Input de búsqueda */
.dataTables_filter input {
    padding: 0.5rem 1rem;
    border: 2px solid var(--light);
    border-radius: 8px;
    margin-left: 0.5rem;
    width: 200px;
    transition: all 0.3s ease;
}

.dataTables_filter input:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.1);
}

/* Paginación */
.dataTables_paginate {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.paginate_button {
    padding: 0.5rem 1rem;
    border: 2px solid var(--light);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-dark);
    background: var(--white);
    transition: all 0.3s ease;
}

.paginate_button:hover {
    background: var(--light);
    color: var(--primary);
}

.paginate_button.current {
    background: var(--secondary);
    color: var(--primary-dark);
    border-color: var(--secondary);
}

.paginate_button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Button link */
.btn-oferta {
    padding: 5px 10px;
    background-color: var(--success);
    border: none;
    color: var(--text-dark);
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(13, 255, 118, 0.3);
}

.btn-oferta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(13, 255, 118, 0.5);
    filter: brightness(1.1);
}

.btn-oferta:active {
    transform: translateY(0);
    filter: brightness(0.95);
}

/* Loading spinner */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--light);
    border-top: 4px solid var(--secondary);
    border-radius: 50%;
    animation: spin 0.5s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media screen and (max-width: 768px) {
    .dataTables_wrapper {
        overflow-x: auto;
    }

    .dataTables_filter input {
        width: 150px;
    }

    .descripcion-cell {
        max-width: 200px;
    }

    .dataTables_length,
    .dataTables_filter {
        text-align: left;
        margin-bottom: 1rem;
    }

    .dataTables_paginate {
        justify-content: center;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container.shifted {
        margin-left: 20px;
    }
}

@media (max-width: 768px) {

    .dashboard,
    .main-modules {
        grid-template-columns: 1fr;
    }

    .navbar {
        padding: 1rem;
    }

    .navbar-brand {
        font-size: 1.2rem;
    }

    .user-section {
        display: none;
    }

    .sidebar {
        width: 100%;
        left: -100%;
    }

    .sidebar.active {
        transform: translateX(100%);
    }

    .container {
        margin-top: 90px;
    }
}

@media (max-width: 480px) {
    .module-card {
        padding: 1.5rem 1rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .search-input {
        padding: 0.75rem;
    }
}