@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap");

/* ==================== */
/* RESET & BASE STYLES  */
/* ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    list-style: none;
}

:root {
    --primary-dark: #240046;
    --primary: #5A108F;
    --primary-light: #6843b2;
    --accent: rgb(242, 0, 255);
    --dark: #000;
    --light: #fff;
    --gray-light: rgba(255, 255, 255, 0.7);
    --gray-dark: #666;
    --danger: #e74c3c;
    --success: #28a745;
    --warning: #ffc107;
    --error: #f40000;
}

body {
    font-family: "Poppins", sans-serif;
    background: var(--primary-dark);
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* ==================== */
/* HEADER & NAVIGATION  */
/* ==================== */
.header {
    background: var(--dark);
    color: var(--light);
    width: 100%;
    position: relative;
    top: 0;
    left: 0;
    z-index: 1000;
}

.menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 9.5vh;
    padding: 0 20px;
}

.menu .logo {
    max-height: clamp(48px, 7vh, 72px);
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
    cursor: pointer;
    margin-right: 20px;
    image-rendering: optimizeQuality;
}

.menu .logo:hover {
    transform: scale(1.05);
}

.nav-container {
    display: flex;
    align-items: center;
}

.navbar {
    display: flex;
    align-items: center;
}

.navbar ul {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0;
    padding: 0;
    list-style: none;
    flex-wrap: wrap;
}

.navbar ul li a {
    color: var(--light);
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-weight: 500;
    white-space: nowrap;
}

.navbar ul li a:hover {
    color: var(--accent);
    background-color: rgba(104, 67, 178, 0.1);
    transform: translateY(-2px);
}

.active-nav {
    color: var(--accent) !important;
    font-weight: 600;
    position: relative;
}

.active-nav::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--light);
    font-size: 24px;
    cursor: pointer;
    z-index: 1001;
}

/* ==================== */
/* CONTAINER & CONTENT  */
/* ==================== */
.container {
    display: flex;
    padding: 15px;
    flex-direction: column;
}

.content {
    flex: 1;
    width: 100%;
    margin: 0;
}

/* ==================== */
/* FOOTER               */
/* ==================== */
.pie {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #3C0663 100%);
    padding: 60px 20px 0;
    position: relative;
    margin-top: 50px;
    overflow: hidden;
    height: auto !important;
    min-height: 600px;
}

.pie::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(104, 67, 178, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 80% 70%, rgba(242, 0, 255, 0.1) 0%, transparent 20%);
    z-index: 0;
}

.footer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto 60px;
    text-align: center;
}

.footer-grid-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-grid-wrap h3 {
    color: var(--light);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
    position: relative;
    padding-bottom: 12px;
    text-align: center;
}

.footer-grid-wrap h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-light), var(--accent));
    border-radius: 3px;
}

.footer-link {
    color: var(--gray-light);
    font-size: 0.95rem;
    font-weight: 400;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-link:hover {
    color: var(--accent);
    transform: translateX(5px);
}

.footer-link::before {
    content: "→";
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.footer-link:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.footer-social-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 0;
    position: relative;
    z-index: 1;
    margin-top: 20px;
}

.example-1 {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.example-1 .icon-content {
    position: relative;
}

.example-1 .icon-content .link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: var(--light);
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
}

.example-1 .icon-content .link svg {
    width: 24px;
    height: 24px;
}

.example-1 .icon-content .link[data-social="instagram"]:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: white;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.example-1 .icon-content .link[data-social="facebook"]:hover {
    background-color: #1877f2;
    color: white;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.example-1 .icon-content .link[data-social="linkedin"]:hover {
    background-color: #0077b5;
    color: white;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.footer-links-wrapper {
    grid-column-gap: 1rem;
    grid-row-gap: 1rem;
    flex-flow: column;
    justify-content: flex-start;
    align-items: center;
    display: flex;
    background-color: #310055;
    font-size: 13px;
    padding: 15px 0;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.vertical-line {
    background-color: var(--accent);
    width: 2px;
    height: 15px;
    border-radius: 1px;
}

.credits-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    color: var(--gray-light);
    font-size: 0.9rem;
}

.copyright {
    color: var(--accent);
    font-weight: bold;
}

.text-color-white {
    color: var(--accent);
    font-weight: 600;
    transition: all 0.3s ease;
}

.text-color-white:hover {
    text-shadow: 0 0 10px rgba(242, 0, 255, 0.5);
}

/* ==================== */
/* TABLE STYLES         */
/* ==================== */
.table-container {
    margin: 20px 0;
    background: var(--light);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    overflow-x: auto;
}

.table-container h3 {
    margin-bottom: 15px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background: var(--primary);
    color: var(--light);
    position: relative;
}

.tabla {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: var(--light);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.tabla thead {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    color: var(--light);
}

.tabla th {
    padding: 15px 10px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
    transition: background-color 0.3s;
}

.tabla tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.tabla tbody tr:hover {
    background-color: #f9f4ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(90, 16, 143, 0.1);
}

.tabla td {
    padding: 12px 10px;
    color: #333;
    max-width: 200px;
}

.tabla .clickable-row {
    cursor: pointer;
}

/* Status styles */
.status-processed,
.status-active {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background-color: #e6f7e6;
    color: var(--success);
}

.status-not-loaded {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background-color: #fff3cd;
    color: var(--error);
}

.status-apoc {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background-color: #fff3cd;
    color: var(--accent);
}

.status-duplicate {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background-color: #fff3cd;
    color: var(--warning);
}

.detalle-apoc {
    color: var(--accent);
    font-weight: 500;
}

.detalle-error {
    color: var(--error);
    font-weight: 500;
}

.apocrifo {
    background-color: rgba(255, 236, 179, 0.2);
}

/* Filter header styles */
.filter-toggle {
    margin-left: 5px;
    font-size: 12px;
    opacity: 0.7;
    cursor: pointer;
    padding: 2px 5px;
    border-radius: 3px;
    transition: all 0.2s;
    font-size: 16px;
    color: var(--accent);
}

th[data-columna]:hover .filter-toggle {
    opacity: 1;
}

.filter-toggle:hover {
    background-color: rgba(90, 16, 143, 0.2);
    color: var(--light);
}

/* Special row styles */
.repetido-row {
    background-color: #fff3cd !important;
}

.repetido-row:hover {
    background-color: #ffe8b3 !important;
}

.no-cargada-row {
    background-color: #f8f9fa !important;
}

.no-cargada-row:hover {
    background-color: #e9ecef !important;
}

/* ==================== */
/* MODAL STYLES         */
/* ==================== */
.close-btn,
.close-btn-manual,
.close-filter {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: var(--gray-dark);
}

.close-filter {
    position: static !important;
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    transition: color 0.3s ease;
}

.close-btn:hover,
.close-filter:hover {
    color: #333;
}

.close-filter:hover,
.close-filter:focus {
    color: #f0f0f0;
    text-decoration: none;
}

/* Filter modal */
.filter-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
}

.filter-modal-content {
    background-color: #121212;
    margin: 8% auto;
    padding: 35px;
    border: 2px solid var(--primary-light);
    width: 90%;
    max-width: 620px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(104, 67, 178, 0.5);
    animation: modalFadeIn 0.3s ease;
    position: relative;
}

.filter-modal-content h2 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #f5f5f5;
    font-size: 1.6rem;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 12px;
    text-align: center;
}

.filter-modal-content input,
.filter-modal-content select {
    width: 100%;
    padding: 12px 15px;
    margin: 8px 0 15px;
    border-radius: 8px;
    border: 1px solid var(--primary-light);
    background-color: #2a2a2a;
    color: var(--light);
    font-size: 15px;
    transition: all 0.3s ease;
}

.filter-modal-content input:focus,
.filter-modal-content select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(242, 0, 255, 0.3);
    background-color: #3a3a3a;
}

.filter-modal-content button {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    background-color: var(--primary);
    color: var(--light);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 15px;
    font-size: 15px;
}

.filter-modal-content button:hover {
    background-color: #7b1bc0;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(104, 67, 178, 0.4);
}

.filter-modal-content button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(104, 67, 178, 0.3);
}

/* Filter field styles */
.filter-field {
    margin-bottom: 20px;
}

.filter-field label {
    display: block;
    margin-bottom: 8px;
    color: #e0aaff;
    font-weight: 500;
    font-size: 14px;
}

/* Sort field */
.sort-field select {
    background-color: #2a2a2a;
    color: var(--light);
}

/* Active filters chips */
.active-filters {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.active-filters-header {
    width: 100%;
    color: #e0aaff;
    font-weight: 600;
}
.filter-chip {
    background: rgba(104, 67, 178, 0.2);
    border: 1px solid var(--primary-light);
    color: #f5f5f5;
    padding: 6px 10px;
    border-radius: 16px;
    font-size: 13px;
}
.filter-chip .chip-remove {
    margin-left: 8px;
    background: transparent;
    border: none;
    color: #ccc;
    cursor: pointer;
}
.filter-chip .chip-remove:hover {
    color: #fff;
}
.clear-all-btn {
    margin-left: auto;
    background: #444;
    border: 1px solid #666;
    padding: 6px 10px;
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
}

.checkbox-wrapper label {
    color: #f5f5f5;
    font-size: 14px;
    margin: 0;
    cursor: pointer;
}

/* Profile modal */
.modal-perfil {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.contenido-perfil {
    background: #121212;
    color: var(--light);
    width: 90%;
    max-width: 500px;
    border-radius: 15px;
    padding: 30px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--primary-light);
    animation: modalFadeIn 0.3s ease-out;
}

.contenido-perfil h2 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--light);
    font-size: 28px;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 10px;
}

.cerrar-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s;
}

.cerrar-modal:hover {
    color: var(--light);
}

.campos-perfil {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.campos-perfil div {
    display: flex;
    flex-direction: column;
}

.campos-perfil label {
    margin-bottom: 8px;
    font-weight: 500;
    color: #e0aaff;
}

.campos-perfil input {
    padding: 12px 15px;
    border: 1px solid var(--primary-light);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--light);
    font-size: 16px;
    transition: all 0.3s;
    cursor: pointer;
}

.campos-perfil input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(242, 0, 255, 0.5);
    background-color: rgba(255, 255, 255, 0.2);
}

.botones-perfil {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

#botonEliminarCuenta {
    background-color: var(--danger) !important;
    color: var(--light) !important;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

#botonEliminarCuenta:hover {
    background-color: #c0392b !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(192, 57, 43, 0.4);
}

/* Confirmation modal */
#modalConfirmacion {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1001;
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.contenido-confirmacion {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #3C0663 100%);
    color: var(--light);
    width: 90%;
    max-width: 400px;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--primary-light);
}

.contenido-confirmacion h3 {
    margin-bottom: 20px;
    color: var(--light);
}

.contenido-confirmacion p {
    margin-bottom: 25px;
    color: #e0aaff;
}

.botones-confirmacion {
    display: flex;
    justify-content: center;
    gap: 15px;
}

#botonCancelar {
    background-color: #7f8c8d !important;
    color: var(--light) !important;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

#botonConfirmar {
    background-color: var(--danger) !important;
    color: var(--light) !important;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

#botonCancelar:hover {
    background-color: #95a5a6;
}

#botonConfirmar:hover {
    background-color: #c0392b;
}

/* ==================== */
/* BUTTON STYLES        */
/* ==================== */
.delete-btn, .delete-concepto-btn {
    position: relative;
    padding: 0.5em;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1em;
    transition: transform 0.2s ease;
}

.trash-svg {
    width: 1.8em;
    height: 1.8em;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    overflow: visible;
}

#lid-group {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.delete-btn:hover #lid-group, .delete-concepto-btn:hover #lid-group {
    transform: rotate(-28deg) translateY(2px);
}

.delete-btn:active #lid-group, .delete-concepto-btn:active #lid-group {
    transform: rotate(-12deg) scale(0.98);
}

.delete-btn:hover .trash-svg, .delete-concepto-btn:hover .trash-svg {
    transform: scale(1.08) rotate(3deg);
}

.delete-btn:active .trash-svg, .delete-concepto-btn:active .trash-svg {
    transform: scale(0.96) rotate(-1deg);
}

/* ==================== */
/* PAGINATION STYLES    */
/* ==================== */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 15px 0;
    border-top: 1px solid rgba(90, 16, 143, 0.1);
}

.pagination-info {
    color: var(--gray-dark);
    font-size: 14px;
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn {
    background: var(--light);
    border: 1px solid #ddd;
    color: var(--primary);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pagination-btn:hover {
    background-color: rgba(90, 16, 143, 0.1);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.page-numbers {
    display: flex;
    gap: 8px;
}

.page-number {
    background: var(--light);
    border: 1px solid #ddd;
    color: #333;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-number:hover {
    background-color: rgba(90, 16, 143, 0.1);
    border-color: var(--primary);
}

.page-number.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--light);
    border-color: var(--primary);
    box-shadow: 0 4px 8px rgba(90, 16, 143, 0.3);
}

/* ==================== */
/* AUTH STYLES          */
/* ==================== */
#userSection {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

#userName {
    display: inline-block;
    color: var(--light);
    font-weight: 500;
    font-size: 15px;
    padding: 4px 8px;
    background: linear-gradient(135deg, #000000 0%, #2b2b2b 60%, #3b3b3b 100%);
    border-radius: 50px;
    cursor: pointer;
    max-width: 225px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    border: 2px solid #666;
}

#userName:hover {
    background: linear-gradient(135deg, #000000 0%, #111111 50%, #222222 100%);
    transform: translateY(-2px);
}

#authButtons {
    display: flex;
    align-items: center;
}

.auth-btn,
.auth-btn.register {
    background: linear-gradient(135deg, #0f0514 0%, #1a0933 50%, var(--primary-dark) 100%);
    box-shadow: 0 10px 20px rgba(90, 16, 143, 0.4);
    color: var(--light);
    border: 2px solid var(--primary);
    padding: 8px 16px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    margin-left: 10px;
    vertical-align: middle;
    width: auto;
}

.auth-btn:hover,
.auth-btn.register:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(123, 44, 191, 0.4);
    color: var(--light);
    background: linear-gradient(90deg, var(--primary-dark), var(--primary-color));
}

.auth-btn.logout {
    border: 2px solid #a40606;
    background: linear-gradient(135deg, #5c0000 0%, #990000 50%, #cc0000 100%);
    box-shadow: 0 10px 20px rgba(90, 0, 0, 0.5);
    margin-top: 0;
}

.auth-btn.logout:hover {
    background: linear-gradient(135deg, #4b0000 0%, #800000 50%, #b30000 100%);
}

.navbar ul li {
    display: flex;
    align-items: center;
}

/* New navigation menu style */
.menu.container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: 0 20px;
    gap: 12px;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-self: start;
}

.navbar {
    display: flex;
    justify-content: center;
    justify-self: center;
}

.navbar ul {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0;
    padding: 0;
    list-style: none;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(10px, 1.2vw, 18px);
    padding: 0;
    margin: 0;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.user-info {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    justify-self: end;
}

@media (max-width: 992px) {
    .logo-container { display: none; }
    .menu.container { grid-template-columns: auto 1fr auto; }
    .mobile-menu-btn { display: block; justify-self: start; }
    .navbar { 
        order: 2; 
        width: 100%; 
        justify-content: center; 
        justify-self: stretch; 
        position: absolute; 
        top: 100%; 
        left: 0; 
        right: 0; 
        background: #0f0f0f; 
        border-top: 1px solid #222; 
        padding: 12px 20px; 
        box-shadow: 0 8px 20px rgba(0,0,0,0.4);
        display: none;
    }
    .navbar.active { display: block; }
    .user-info { width: auto; justify-content: flex-end; margin-top: 0; justify-self: end; }
}

@media (max-width: 768px) {
    .menu.container { gap: 8px; }
    .navbar { padding: 10px 16px; }
    .nav-links { flex-direction: column; align-items: stretch; gap: 8px; }
    .navbar ul li a { display: block; padding: 12px 14px; }
}


/* ==================== */
/* TOAST NOTIFICATIONS  */
/* ==================== */
#toastContainer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background-color: var(--light);
    color: #333;
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    min-width: 250px;
    max-width: 350px;
    display: flex;
    align-items: center;
    animation: slideIn 0.3s ease-out;
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary);
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.warning {
    border-left-color: var(--warning);
}

.toast-icon {
    margin-right: 10px;
    font-size: 18px;
}

.toast-message {
    flex: 1;
    font-size: 14px;
}

/* ==================== */
/* ANIMATIONS           */
/* ==================== */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

/* ==================== */
/* RESPONSIVE STYLES    */
/* ==================== */
@media (max-width: 1024px) {
    .footer {
        gap: 100px;
    }

    .table-container {
        overflow-x: auto;
    }

    table {
        min-width: 800px;
    }

    #userName {
        max-width: 150px;
    }

    .container {
        padding: 25px;
    }

    .content {
        padding: 25px;
    }
}

@media (max-width: 992px) {
    .navbar ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    #userSection {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
        flex-direction: column;
    }

    .menu {
        justify-content: space-between;
        padding: 0 15px;
    }

    .navbar {
        margin-left: 0;
    }

    #userSection,
    #authButtons {
        margin-left: 0;
        margin-top: 15px;
    }

    .menu .logo {
        margin: 0;
        width: auto;
        max-height: 40px;
    }

    .navbar ul {
        display: none;
    }

    .navbar.active ul {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 8vh;
        left: 0;
        width: 100%;
        background-color: var(--dark);
        padding: 20px 0;
        z-index: 1000;
    }

    .navbar.active ul li {
        margin: 10px 0;
        text-align: center;
        width: 100%;
    }

    .navbar.active ul li a {
        display: block;
        width: 80%;
        margin: 0 auto;
    }

    .mobile-menu-btn {
        display: block;
    }

    .footer {
        flex-direction: column;
        gap: 30px;
        align-items: center;
    }

    .footer-social-wrapper {
        margin-right: 0;
        margin-top: 3rem;
        margin-bottom: 2rem;
    }

    .example-1 {
        gap: 30px;
    }

    .example-1 .icon-content {
        margin: 0 20px;
    }

    .content {
        margin: 0;
        padding: 20px;
    }

    /* Table responsive styles */
    .table-container {
        margin: 15px 0;
        padding: 10px;
    }

    /* Modal responsive styles */
    .modal-content {
        width: 90%;
        max-width: 400px;
        padding: 15px;
        margin: 10% auto;
    }

    /* Filter modal responsive styles */
    .filter-modal-content {
        width: 95%;
        margin: 15% auto;
    }

    /* Form responsive styles */
    .form-grid {
        grid-template-columns: 1fr;
    }

    /* User section responsive styles */
    #userSection {
        margin-left: 0;
        justify-content: center;
    }

    /* Profile modal responsive styles */
    .contenido-perfil {
        width: 95%;
        padding: 20px;
    }

    .campos-perfil {
        gap: 15px;
    }

    .pie {
        padding: 40px 20px 0;
    }

    .footer {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 30px;
    }

    .footer-social-wrapper {
        padding: 20px 0;
    }

    .example-1 {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .header img {
        height: 7vh;
    }

    #userName {
        max-width: 120px;
        font-size: 14px;
    }

    .auth-btn {
        padding: 6px 12px;
        font-size: 14px;
    }

    .menu .logo {
        width: auto;
        max-height: 35px;
    }

    .menu {
        padding: 0 10px;
    }

    .container {
        padding: 15px;
    }

    .content {
        padding: 15px;
    }

    .table-container {
        padding: 8px;
    }

    th,
    td {
        padding: 8px 5px;
        font-size: 14px;
    }

    /* Button responsive styles */
    .btn-primary,
    .upload-btn {
        padding: 10px 20px;
        font-size: 14px;
        width: 100%;
        text-align: center;
        margin: 10px 0;
    }

    /* Modal responsive styles */
    .modal-content {
        width: 95%;
        padding: 12px;
    }

    .close-btn,
    .close-btn-manual,
    .close-filter {
        top: 10px;
        right: 10px;
        font-size: 24px;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }

    .vertical-line {
        display: none;
    }

    .credits-wrapper {
        flex-direction: column;
        text-align: center;
    }

    .example-1 {
        gap: 15px;
    }

    .example-1 .icon-content {
        margin: 0 10px;
    }

    /* Pagination responsive styles */
    .pagination-container {
        flex-direction: column;
        gap: 10px;
    }

    .pagination-controls {
        width: 100%;
        justify-content: center;
    }

    .footer {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-grid-wrap {
        align-items: center;
    }

    .footer-grid-wrap h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-link::before {
        display: none;
    }

    .footer-link:hover {
        transform: translateY(-3px);
    }
}

@media (min-width: 769px) {
    .navbar ul {
        display: flex !important;
    }
}

.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dropdown-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #1a1a1a;
    border: 2px solid var(--gray-dark);
    border-radius: 8px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(104, 67, 178, 0.3);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media (max-width: 992px) {
    .dropdown { width: 100%; }
    .dropdown-menu { 
        position: static; 
        border: none; 
        box-shadow: none; 
        margin-top: 6px; 
        padding-left: 12px; 
        background: transparent;
        transform: none; 
        opacity: 1; 
        visibility: hidden;
    }
    .dropdown.open .dropdown-menu { visibility: visible; }
    .dropdown-arrow { transition: transform 0.2s ease; }
    .dropdown.open .dropdown-arrow { transform: rotate(180deg); }
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 6px;
    margin: 4px;
}

.dropdown-menu a:hover {
    background: rgba(104, 67, 178, 0.1);
    color: #fff;
    transform: translateX(5px);
}

.dropdown-menu a.active-dropdown {
    background: rgba(104, 67, 178, 0.1);
    color: var(--accent);
    font-weight: 600;
}
.filters-toolbar {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    flex-wrap: wrap;
}
.active-filters-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}
.filters-empty {
    color: var(--gray-light);
}
.toolbar-clear {
    padding: 8px 12px;
    background: #444;
    border: 1px solid #666;
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
}
@media (max-width: 640px) {
    .filters-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .toolbar-clear {
        align-self: flex-end;
    }
}
* {
    scrollbar-width: thin;
    scrollbar-color: #8f5eea rgba(104, 67, 178, 0.15);
}

*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
*::-webkit-scrollbar-track {
    background: rgba(104, 67, 178, 0.15);
    border-radius: 10px;
}
*::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #8f5eea 0%, #6843b2 100%);
    border-radius: 10px;
    border: 1px solid #5a108f;
}
*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #a77aff 0%, #7a57d6 100%);
}
