/* static/css/main.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
    background-color: #2c3e50;
    height: 100vh;
    overflow: auto; /* Importante para scroll en móvil */
}

/* --- BARRA SUPERIOR --- */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
    min-height: 70px;
    flex-wrap: wrap;
    gap: 8px; /* Unified spacing */
}

.nav-buttons {
    display: flex;
    gap: 8px; /* Unified spacing */
    flex-wrap: wrap;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: transparent;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    color: #555;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-btn:hover {
    background-color: #e9e9e9;
}

.action-buttons {
    display: flex;
    gap: 8px; /* Unified spacing */
    align-items: center;
    flex-wrap: wrap;
}

.btn-action {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
    text-decoration: none;
}

.btn-action:hover {
    background-color: #3a7bc8;
}

.btn-action.logout {
    background-color: #e74c3c;
}

.btn-action.logout:hover {
    background-color: #c0392b;
}

/* --- ELEMENTOS FLOTANTES --- */
.chat-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 100;
}

.btn-chat {
    display: flex;
    align-items: center;
    gap: 8px;
    width: auto;
    height: 56px;
    border-radius: 28px;
    background-color: #2c3e50;
    color: white;
    border: none;
    padding: 0 18px;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-chat:hover {
    background-color: #1a252f;
    transform: scale(1.05);
}

/* Clases para visibilidad en móvil/escritorio */
.mobile-only {
    display: none !important;
}
.desktop-only {
    display: inline !important;
}
/* Media Query para dispositivos móviles (ancho de pantalla hasta 768px) */
@media (max-width: 768px) {
    .mobile-only {
        display: inline !important;
    }
    .desktop-only {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        gap: 12px;
        padding: 10px 15px;
        min-height: auto;
    }
    
    .nav-buttons, .action-buttons {
        width: 100%;
        justify-content: center;
    }
    .chat-button {
        bottom: 15px;
        left: 15px;
    }
}

@media (max-width: 480px) {
    .top-bar {
        padding: 8px 10px;
    }
    
    .nav-buttons, .action-buttons {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .btn-action, .nav-btn {
        flex: 1 1 calc(50% - 5px);
        min-width: 120px;
        font-size: 12px;
        padding: 7px 8px;
        justify-content: center;
    }
    .btn-chat {
        height: 46px;
        font-size: 13px;
        padding: 0 14px;
    }
}

@media (max-width: 360px) {
    .btn-action, .nav-btn {
        flex: 1 1 100%;
        min-width: 0;
    }
    .btn-chat {
        height: 42px;
        font-size: 12px;
        padding: 0 12px;
    }
}
