* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Arial, sans-serif;
    transition: background-color var(--transition-speed),
                color var(--transition-speed),
                border-color var(--transition-speed),
                box-shadow var(--transition-speed);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-image {
    height: 40px;
    width: auto;
    object-fit: contain;
}

:root {
    --transition-speed: 0.3s;
    --bg-dark: #f0f2f5;
    --bg-darker: #ffffff;
    --text-light: #1a1b1e;
    --text-gray: #4b5563;
    --primary-blue: #3b82f6;
    --accent-dark: #2563eb;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --overlay-color: rgba(255, 255, 255, 0.35); /* Cambiado de 0.85 a 0.35 */
}


header, .circles-container, .bottom-section {
    position: relative;
    z-index: 1;
}

header {
    background-color: var(--bg-darker);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 10;
}

.logo {
    color: var(--text-light);
    font-weight: bold;
    font-size: 1.2rem;
}

.search-bar {
    display: flex;
    align-items: center;
}

.search-bar input {
    padding: 0.8rem;
    border: none;
    border-radius: 20px;
    width: 250px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}
.circle a.circle-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit; /* Mantiene el color original */
    transition: all 0.4s ease;
}

.circle a.circle-link:hover {
    transform: translateY(-5px);
    background: rgba(59, 130, 246, 0.2); /* Fondo del hover */
    border-color: var(--accent-dark);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.2); /* Sombra del hover */
}

.circle a.circle-link i {
    font-size: 2rem;
    color: var(--primary-blue); /* Color del icono */
}

.circle a.circle-link span {
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

.circles-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5rem; /* Aumentado el espaciado entre círculos */
    min-height: 30vh; /* Aumentado para centrar más en la página */
    padding: 5rem;
    margin: 2rem auto; /* Añadido margen automático */
    max-width: 1200px;
    flex-wrap: wrap;
}

.circle {
    width: 150px; /* Aumentado el tamaño */
    height: 150px;
    border: 2px solid var(--primary-blue);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    margin: 1rem; /* Añadido margen individual */
}

.circle:hover {
    transform: translateY(-5px);
    border-color: var(--accent-dark);
    background: rgba(59, 130, 246, 0.2);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.2);
}

.circle i {
    font-size: 2rem;
    margin-bottom: 0.4rem;
    color: var(--primary-blue);
}

.circle span {
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-light);
}

.bottom-section {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 3rem;
    background: var(--bg-darker);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.2);
}

.feature-cards {
    display: flex;
    justify-content: space-around;
    max-width: 1400px;
    margin: 0 auto;
    gap: 3rem;
}

.feature-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 280px;
}

.feature-title {
    color: var(--text-light);
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 0.8rem;
    text-align: center;
}

.feature-description {
    color: var(--text-gray);
    font-size: 0.95rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.feature-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--primary-blue);
    transition: all 0.3s ease;
}

.feature-icon:hover {
    transform: scale(1.15);
    border-color: var(--accent-dark);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
}

.feature-icon i {
    font-size: 2.5rem;
    color: var(--primary-blue);
}

/* Chatbot Styles */
.chat-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
}

.chat-button {
    background-color: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.chat-button:hover {
    background-color: var(--accent-dark);
    transform: translateY(-2px);
}

.chat-button i {
    font-size: 1.2rem;
}

.chat-window {
    position: fixed;
    bottom: 20px;
    left: 20px;
    min-width: 320px;
    min-height: 480px;
    width: 400px;
    height: 600px;
    background-color: var(--bg-darker);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    resize: both;
    overflow: hidden;
    transition: all 0.3s ease;
}

.chat-window.maximized {
    width: 80vw !important;
    height: 80vh !important;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    resize: none;
}

.resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 15px;
    height: 15px;
    cursor: se-resize;
    background: linear-gradient(135deg, transparent 50%, var(--primary-blue) 50%);
    opacity: 0.5;
    transition: opacity 0.3s;
}

.resize-handle:hover {
    opacity: 1;
}

.chat-header {
    background-color: var(--primary-blue);
    color: white;
    padding: 12px 16px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
}

.chat-controls {
    display: flex;
    gap: 8px;
}

.chat-controls button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-controls button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-blue) transparent;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background-color: var(--primary-blue);
    border-radius: 3px;
}

.message {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}

.message.user {
    align-self: flex-end;
}

.message.bot {
    align-self: flex-start;
}

.message-content {
    padding: 8px 12px;
    border-radius: 12px;
    position: relative;
}

.message.user .message-content {
    background-color: var(--primary-blue);
    color: white;
    border-radius: 12px 12px 0 12px;
}

.message.bot .message-content {
    background-color: var(--bg-dark);
    color: var(--text-light);
    border-radius: 12px 12px 12px 0;
}

.timestamp {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 4px;
    display: block;
}

.chat-input {
    padding: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 8px;
}

.chat-input input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    background-color: var(--bg-dark);
    color: var(--text-light);
}

.chat-input input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.chat-input button {
    background-color: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.chat-input button:hover {
    background-color: var(--accent-dark);
}

.chat-input button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background-color: var(--text-gray);
    border-radius: 50%;
    animation: bounce 1s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    header {
        padding: 0.5rem 1rem;
        height: auto;
        flex-direction: column;
        gap: 0.5rem;
    }

    .logo-container {
        width: 100%;
        justify-content: center;
    }

    .logo-image {
        height: 30px;
    }

    .logo {
        font-size: 1rem;
    }

    .search-bar {
        width: 100%;
        margin: 0.5rem 0;
    }

    .search-bar input {
        width: 100%;
        padding: 0.6rem;
    }

    .circle i {
        font-size: 1.5rem;
        margin-bottom: 0.3rem;
    }

    .circle span {
        font-size: 0.8rem;
        padding: 0 0.5rem; /* Añade padding para texto largo */
        word-wrap: break-word; /* Maneja texto largo */
        max-width: 100px; /* Limita el ancho del texto */
    }

    .bottom-section {
        position: relative;
        padding: 1rem;
        margin-top: 2rem;
        padding-bottom: env(safe-area-inset-bottom, 2rem); /* Ajusta para notch */
        margin-bottom: 0; /* Elimina margen inferior */
    }

    .feature-cards {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
        padding-bottom: 1rem; /* Añade padding inferior */
    }

    .feature-card {
        width: 100%;
        max-width: 280px;
    }

    .feature-title {
        font-size: 1.1rem;
    }

    .feature-description {
        font-size: 0.9rem;
    }

    .feature-icon {
        width: 80px;
        height: 80px;
    }

    .feature-icon i {
        font-size: 2rem;
    }

    .chat-window {
        width: 100% !important;
        height: 100% !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: 0;
        resize: none;
    }

    /* Ajustes adicionales para el scroll */
    body {
        min-height: 100%;
        height: auto;
        padding-bottom: env(safe-area-inset-bottom, 0); /* Soporte para notch */
    }

    /* Ajustes para pantallas muy pequeñas */
    @media screen and (max-width: 360px) {
        .circles-container {
            gap: 1rem;
            padding: 1rem;
        }

        .circle {
            width: 100px; /* Ligeramente más pequeño para pantallas muy pequeñas */
            height: 100px;
        }

        .circle span {
            max-width: 80px;
            font-size: 0.75rem;
        }
    }

    /* Orientación landscape en móviles */
    @media screen and (max-height: 500px) and (orientation: landscape) {
        .circles-container {
            padding: 1rem;
            justify-content: center;
        }

        .circle {
            width: 100px;
            height: 100px;
        }

        .bottom-section {
            position: relative;
            margin-top: 1rem;
        }

        .feature-cards {
            flex-direction: row;
            flex-wrap: wrap;
            justify-content: center;
            padding-bottom: 2rem;
        }

        .feature-card {
            width: calc(33.33% - 1rem);
            min-width: 200px;
        }
    }
}

/* Fix para el scroll en iOS */
@supports (-webkit-touch-callout: none) {
    body {
        min-height: -webkit-fill-available;
    }
    
    .bottom-section {
        padding-bottom: max(2rem, env(safe-area-inset-bottom));
    }
}

/* Ajustes generales para dispositivos móviles */
@media screen and (max-width: 768px) {
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    body {
        overscroll-behavior-y: none; /* Previene el bounce en algunos navegadores */
    }

    /* Asegura que el contenido sea scrolleable */
    main {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}
a.feature-card {
    text-decoration: none;
    color: inherit;
}

/* Ajustar anchos de columnas */
#stockTable td:nth-child(4),
#stockTable td:nth-child(5),
#stockTable td:nth-child(6) {
    width: 100px;
    text-align: right;
}

/* Estilos responsivos */
@media (max-width: 768px) {
    #stockTable th,
    #stockTable td {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    #stockTable {
        font-size: 0.75rem;
    }
    
    #stockTable td:nth-child(4),
    #stockTable td:nth-child(5),
    #stockTable td:nth-child(6) {
        width: 80px;
    }
}

.admin-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.admin-section {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px); /* Esto añade un efecto de desenfoque detrás de las secciones */
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.section-title {
    color: var(--primary-blue);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-blue);
}

.menu-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.menu-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.menu-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.menu-header {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    background: white;
    color: var(--text-light);
    font-weight: 500;
    transition: all 0.3s ease;
}

.menu-header:hover {
    background: var(--primary-blue);
    color: white;
}

.menu-header i:last-child {
    margin-left: auto;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.menu-header.active i:last-child {
    transform: rotate(180deg);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--bg-dark);
}

.submenu a {
    display: block;
    padding: 0.8rem 1.5rem 0.8rem 3.5rem;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
}

.submenu a:hover {
    background: var(--primary-blue);
    color: white;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
}

.menu-link:hover {
    background: var(--primary-blue);
    color: white;
}

.menu-item.small {
    width: fit-content;
}

.menu-item.small .menu-link {
    font-size: 0.9rem;
    padding: 0.7rem 1rem;
}

.menu-item.special .menu-link {
    background: var(--primary-blue);
    color: white;
    font-weight: bold;
}

.menu-item.special:hover .menu-link {
    background: var(--accent-dark);
}

/* Responsive styles */
@media (max-width: 768px) {
    .admin-section {
        padding: 1rem;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .menu-header, .menu-link {
        padding: 0.8rem 1rem;
    }

    .submenu a {
        padding: 0.8rem 1rem 0.8rem 2.5rem;
    }
}

@media (max-width: 480px) {
    .admin-container {
        margin: 1rem auto;
    }

    .menu-item.small {
        width: 100%;
    }
}
/* Añadir al CSS existente */

.navigation-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    padding: 5px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-item {
    color: var(--text-gray);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

.nav-item:hover {
    color: var(--primary-blue);
}

.nav-item.active {
    color: var(--primary-blue);
}

.nav-item i {
    font-size: 1.5em;
}

/* Ajustar el contenedor principal para que no se solape con la barra de navegación */
.admin-container {
    padding-bottom: 70px; /* Altura de la barra de navegación + espacio extra */
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logout-button {
    background-color: transparent;
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.logout-button:hover {
    background-color: var(--primary-blue);
    color: white;
}

#userName {
    font-weight: 500;
    color: var(--text-light);
}

.content-container {
    padding: 20px;
    margin-bottom: 60px;
}

.filters-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.filter-group {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.filter-group input {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    flex: 1;
    min-width: 200px;
}

.filter-group input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.clear-button {
    background-color: #f3f4f6;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.clear-button:hover {
    background-color: #e5e7eb;
}

.table-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    background-color: #f8fafc;
    font-weight: 600;
    color: var(--text-gray);
    cursor: pointer;
    user-select: none;
}

th:hover {
    background-color: #f1f5f9;
}

th i {
    margin-left: 5px;
    font-size: 0.8em;
}

tbody tr:hover {
    background-color: #f8fafc;
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .filter-group {
        flex-direction: column;
    }

    .filter-group input {
        width: 100%;
    }

    th, td {
        padding: 8px;
    }

    .table-container {
        overflow-x: auto;
    }
}

/* Clases para ordenamiento */
.sort-asc i::before {
    content: "\f0de";  /* Flecha arriba */
}

.sort-desc i::before {
    content: "\f0dd";  /* Flecha abajo */
}

/* Navigation bar styles */
.navigation-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 5px 0;
}