/**
 * Estilos principales
 * Tomodachi POS System
 */

@import url('variables.css');
@import url('utilities.css');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variables are now imported from variables.css */

body {
    font-family: 'Google Sans Flex', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-body);
    line-height: 1.6;
    width: 100%;
    overflow-x: hidden;
}

/* POS Layout */
.pos-content {
    display: flex;
    gap: 20px;
    padding: 10px;
}

.pos-left, .pos-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pos-block {
    background: #fff;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
}

.pos-block h2 {
    margin-top: 0;
    font-size: 1.1rem;
}

.results-list {
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 8px;
}

.result-item {
    padding: 6px 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.result-item:hover {
    background: #f5f5f5;
}

.result-item.empty, .result-item.error {
    color: #777;
    cursor: default;
}

.small {
    font-size: .8rem;
    color: #555;
}

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

.cart-table th, .cart-table td {
    padding: 6px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.qty-input {
    width: 60px;
}

.remove-btn {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 4px;
}

.remove-btn:hover {
    background: #c12835;
}

.empty-cart {
    text-align: center;
    color: #666;
    padding: 10px;
}

.totals-block .totals-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 6px 0;
}

.totals-block input, .totals-block select {
    width: 140px;
}

.primary-btn {
    width: 100%;
    padding: 10px;
    background: #28a745;
    border: none;
    color: #fff;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

.primary-btn:disabled {
    background: #999;
    cursor: not-allowed;
}

.scanner-container {
    position: relative;
    background: #000;
    border-radius: 6px;
    overflow: hidden;
}

.scanner-container video {
    width: 100%;
    height: auto;
    display: block;
}

.scanner-hint {
    color: #fff;
    font-size: .75rem;
    position: absolute;
    bottom: 4px;
    left: 8px;
    background: rgba(0, 0, 0, .4);
    padding: 2px 6px;
    border-radius: 3px;
}

.hidden {
    display: none !important;
}

.scanner-mode {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.scanner-mode input {
    flex: 1;
}

.notification {
    position: fixed;
    top: 20px;
    right: -300px;
    background: #333;
    color: #fff;
    padding: 10px 16px;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
    transition: right .3s ease, opacity .3s;
    opacity: 0;
    z-index: 9999;
}

.notification.show {
    right: 20px;
    opacity: 1;
}

.notification-success {
    background: #28a745;
}

.notification-error {
    background: #dc3545;
}

.notification-info {
    background: #007bff;
}

/* Gallery Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.gallery-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 6px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: box-shadow .2s;
}

.gallery-item:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}

.gallery-item .img-wrap {
    width: 100%;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    overflow: hidden;
    border-radius: 4px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item .no-img {
    font-size: .65rem;
    color: #777;
}

.g-name {
    font-size: .7rem;
    text-align: center;
}

.g-price {
    font-size: .65rem;
    color: #28a745;
    font-weight: bold;
}

/* Inventory layout adjustments */
.inventory-content {
    display: flex;
    gap: 20px;
    padding: 10px;
}

.inv-left, .inv-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Compact control bars */
.compact-controls .control-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 10px;
}

.compact-controls .control-bar input[type=text],
.compact-controls .control-bar input[type=number] {
    flex: 1 1 140px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: .85rem;
}

/* Estilos para el Drawer (Panel Lateral) - Global */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    justify-content: flex-end;
}

.drawer-overlay.show {
    opacity: 1;
    visibility: visible;
}

.drawer-content {
    width: 550px;
    max-width: 100%;
    height: 100%;
    background: var(--bg-card, #fff);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.drawer-overlay.show .drawer-content {
    transform: translateX(0);
}

.drawer-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light, #eee);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card, #fff);
    z-index: 10;
    flex-shrink: 0;
}

.drawer-header h2 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--text-color, #333);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.drawer-close {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: var(--text-muted, #666);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.drawer-close:hover {
    background: var(--bg-hover, #f5f5f5);
    color: var(--danger-color, #dc3545);
    transform: rotate(90deg);
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color, #ddd) transparent;
}

.drawer-body::-webkit-scrollbar {
    width: 6px;
}

.drawer-body::-webkit-scrollbar-track {
    background: transparent;
}

.drawer-body::-webkit-scrollbar-thumb {
    background-color: var(--border-color, #ddd);
    border-radius: 3px;
}

/* Responsive para el drawer */
@media (max-width: 768px) {
    .drawer-content {
        width: 100%;
        max-width: 100%;
    }
}

.btn-secondary {
    background: #ffffff;
    border: 1px solid #ccc;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: .85rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-secondary:hover {
    background: #f2f2f2;
}

.sidebar-toggle {
    background: #ffffff;
    border: 1px solid #ccc;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.sidebar-toggle:hover {
    background: #f2f2f2;
}

.file-label {
    background: #ffffff;
    border: 1px solid #ccc;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: .85rem;
    display: inline-flex;
}

.file-label:hover {
    background: #f2f2f2;
}

.upload-preview img {
    max-width: 120px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
    margin-top: 8px;
}

.gallery-block {
    margin-top: 10px;
}

/* Improve scanner container transitions */
#scannerContainer {
    transition: max-height .3s ease, opacity .3s ease;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
}

#scannerContainer:not(.hidden) {
    max-height: 320px;
    opacity: 1;
}

/* Hidden utility */
.hidden {
    display: none !important;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--dark-color);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1300;
    transition: left 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sidebar-close {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
}

/* Responsive Layout Adjustments */
@media (max-width: 1024px) {
    .pos-content {
        flex-direction: column;
    }

    .inventory-content {
        flex-direction: column;
    }
}

@media (max-width: 860px) {
    .sidebar {
        position: fixed;
        left: -250px;
        top: 0;
        bottom: 0;
        z-index: 1300;
        transition: left .3s ease;
        width: 240px;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
    }

    .sidebar.open {
        left: 0;
    }

    .sidebar-close {
        display: flex;
    }

    .main-content {
        padding: 15px 20px;
        margin-left: 0;
    }

    .main-header {
        flex-wrap: wrap;
        gap: 10px;
    }

    .sidebar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: var(--primary-color);
        color: #fff;
        border: none;
        padding: 8px 12px;
        border-radius: 4px;
        cursor: pointer;
        font-weight: 600;
        font-size: 1.1rem;
    }

    .sidebar-toggle:hover {
        background: #45a049;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1250;
    }

    .sidebar-overlay.show {
        display: block;
    }
}

@media (max-width: 640px) {
    .sidebar {
        width: 200px;
        left: -200px;
    }

    .sidebar-header {
        padding: 16px;
    }

    .sidebar-header h2 {
        font-size: 1.2rem;
    }

    .nav-item {
        padding: 12px 16px;
        font-size: 0.95rem;
    }

    .nav-item span {
        font-size: 1rem;
        margin-right: 8px;
    }

    .pos-block, .inv-left, .inv-right {
        padding: 12px;
    }

    .cart-table th, .cart-table td {
        padding: 4px;
        font-size: .75rem;
    }

    .totals-block input, .totals-block select {
        width: 110px;
        font-size: .75rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
    }

    .gallery-item {
        padding: 4px;
    }

    .gallery-item .img-wrap {
        height: 60px;
    }

    .primary-btn {
        padding: 8px;
        font-size: .85rem;
    }

    .result-item {
        padding: 4px 6px;
        font-size: .75rem;
    }

    .scanner-mode {
        flex-direction: column;
    }

    .scanner-mode input, .scanner-mode button {
        width: 100%;
    }

    .pos-right .totals-block {
        order: 1;
    }

    .pos-right .cart-block {
        order: 2;
    }

    .pos-left {
        order: 3;
    }

    .gallery-grid {
        order: 4;
    }

    .inv-right {
        order: 1;
    }

    .inv-left {
        order: 2;
    }
}

@media (max-width: 480px) {
    .main-header h1 {
        font-size: 1.2rem;
    }

    .pos-block h2, .inv-right h2, .inv-left h2 {
        font-size: 1rem;
    }

    .qty-input {
        width: 48px;
    }

    .g-name {
        font-size: .6rem;
    }

    .g-price {
        font-size: .55rem;
    }

    .sidebar {
        width: 100%;
        left: -100%;
    }

    .main-header {
        padding: 12px 16px;
    }

    .user-info {
        gap: 6px;
    }
}

/* Utility classes for transitions and focus */
.focus-ring:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.smooth-scroll {
    scroll-behavior: smooth;
}

/* Improve scrollbar aesthetics on webkit */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f0f0f0;
}

::-webkit-scrollbar-thumb {
    background: #c2c2c2;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
}

.sidebar-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-item.active {
    background-color: var(--primary-color);
}

.nav-item span {
    font-size: 1.2rem;
    margin-right: 10px;
}

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 20px;
    width: 100%;
    overflow-x: hidden;
}

.main-header {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

/* Componentes */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #45a049;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-block {
    width: 100%;
    display: block;
}

.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    background-color: var(--primary-color);
    color: white;
}

/* Formularios */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input[type="color"] {
    padding: 2px;
    width: 30px;
    height: 30px; /* Ajuste para igualar altura de inputs de texto */
    cursor: pointer;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group input.error {
    border-color: var(--danger-color);
}
.nav-text{
    font-size: 1.2rem;
}
/* Notificaciones Modernas (Glassmorphism Black) */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    right: auto;
    transform: translateX(-50%) translateY(-150%);
    padding: 14px 24px;
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.95);
    z-index: 9999;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    
    /* Efecto Cristal Negro Elegante */
    background: rgba(18, 18, 18, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    pointer-events: auto;
    max-width: 380px;
    min-width: 300px;
    justify-content: center;
}

.notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Acentos de color sutiles (Borde izquierdo) */
.notification-success {
    border-left: 4px solid #2ecc71;
}

.notification-error {
    border-left: 4px solid #e74c3c;
}

.notification-info {
    border-left: 4px solid #3498db;
}

.notification-warning {
    border-left: 4px solid #f1c40f;
}

/* Iconos FontAwesome */
.notification-success::before { content: '\f00c'; font-family: "Font Awesome 6 Free"; font-weight: 900; color: #2ecc71; font-size: 1.1rem; }
.notification-error::before { content: '\f00d'; font-family: "Font Awesome 6 Free"; font-weight: 900; color: #e74c3c; font-size: 1.1rem; }
.notification-info::before { content: '\f129'; font-family: "Font Awesome 6 Free"; font-weight: 900; color: #3498db; font-size: 1.1rem; }
.notification-warning::before { content: '\f12a'; font-family: "Font Awesome 6 Free"; font-weight: 900; color: #f1c40f; font-size: 1.1rem; }

/* Responsive Notificaciones (Móvil) */
@media (max-width: 768px) {
    .notification {
        top: auto;
        bottom: 90px; /* Encima del navbar inferior */
        left: 50%;
        right: auto;
        /* Centrado perfecto */
        transform: translateX(-50%) translateY(20px);
        
        width: auto;
        min-width: 280px;
        max-width: 90%;
        justify-content: center;
        text-align: center;
        border-radius: 50px;
        padding: 12px 24px;
        
        /* Ajuste de bordes para móvil (simetría) */
        border-left: 1px solid rgba(255, 255, 255, 0.08);
        border-bottom: 3px solid;
    }

    .notification.show {
        transform: translateX(-50%) translateY(0);
    }
    
    /* Colores de borde inferior en móvil */
    .notification-success { border-bottom-color: #2ecc71; }
    .notification-error { border-bottom-color: #e74c3c; }
    .notification-info { border-bottom-color: #3498db; }
    .notification-warning { border-bottom-color: #f1c40f; }
}

/* Tabla */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

table th {
    background-color: var(--light-color);
    font-weight: 600;
}

table tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Responsive */
@media (max-width: 862px) {
    .sidebar {
        position: fixed;
        left: -200px;
        width: 200px;
        top: 0;
        bottom: 0;
        height: 100vh;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }
}

/* View Transitions */
@view-transition {
    navigation: auto;
}

.sidebar {
    view-transition-name: sidebar;
}

.main-content {
    view-transition-name: main-content;
}

::view-transition-old(main-content) {
    animation: fade-out 0.2s ease both;
}

::view-transition-new(main-content) {
    animation: fade-in 0.3s ease both;
}

@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes zoom-in {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

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


@keyframes fade-out {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes fade-in-scale {
    from {
        opacity: 0;
        transform: scale(0.98) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
/* Estilos para el menú de usuario (Dropdown) */
.user-menu-container {
    position: relative;
    cursor: pointer;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 4px;
    min-width: 180px;
    z-index: 1001;
    margin-top: 10px;
    border: 1px solid #eee;
}

.user-dropdown.show {
    display: block;
    animation: fade-in 0.2s ease;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.2s;
    font-size: 0.95rem;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
}

.dropdown-item i {
    color: var(--danger-color);
    width: 20px;
    text-align: center;
}

/* Media Query para Bottom Navigation en Móvil */
@media (max-width: 768px) {
    /* Sidebar se convierte en Bottom Nav */
    .sidebar {
        position: fixed;
        left: 0 !important;
        bottom: 0;
        top: auto;
        width: 100%;
        height: auto;
        z-index: 2000;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        display: block;
        padding: 0;
        background-color: var(--dark-color);
        border-top: 1px solid rgba(255,255,255,0.1);
        overflow: visible !important; /* Permitir que el tooltip salga del contenedor */
    }

    .sidebar-header {
        display: none;
    }

    .sidebar-nav {
        display: flex;
        justify-content: space-around;
        padding: 0;
        margin: 0;
        width: 100%;
    }

    .nav-item {
        flex-direction: column;
        padding: 6px 2px;
        font-size: 0.65rem;
        text-align: center;
        flex: 1;
        justify-content: center;
        border-radius: 0;
        color: rgba(255,255,255,0.6);
    }

    .nav-item.active {
        color: var(--primary-color);
        background-color: transparent;
        position: relative;
    }
    
    .nav-item.active::after {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 40%;
        height: 3px;
        background-color: var(--primary-color);
        border-radius: 0 0 4px 4px;
    }

    .nav-item:hover {
        background-color: rgba(255,255,255,0.05);
        color: white;
    }

    .nav-item span {
        margin-right: 0;
        margin-bottom: 3px;
        font-size: 1.15rem;
        display: block;
    }
    
    /* Ocultar botón de logout del menú inferior */
    .nav-item#logoutBtn {
        display: none;
    }

    /* Ajustar contenido principal */
    .main-content {
        margin-left: 0;
        padding-bottom: 80px; /* Espacio para el bottom nav */
    }
    
    /* Ocultar botón toggle del sidebar */
    .sidebar-toggle {
        display: none;
    }
    
    /* Ajustes del header */
    .main-header {
        position: sticky;
        top: 0;
        z-index: 1000;
        margin-bottom: 15px;
        padding: 15px;
    }
    
    .header-left h1 {
        font-size: 1.2rem;
    }
}

/* Estilos para el menú tooltip de usuario (Bottom Nav / Sidebar) */
.nav-group {
    position: relative;
    width: 100%;
}

.nav-item-btn {
    width: 100%;
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    font-size: 1rem;
}

.user-tooltip-menu {
    display: none;
    position: absolute;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    padding: 10px;
    min-width: 200px;
    z-index: 2002;
    flex-direction: column;
    gap: 5px;
}

.user-tooltip-menu.show {
    display: flex;
}

.tooltip-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s;
    opacity: 0;
    transform: translateY(10px);
    font-size: 0.95rem;
}

.tooltip-item:hover {
    background-color: #f0f2f5;
    color: var(--primary-color);
}

.tooltip-item i {
    width: 20px;
    text-align: center;
    color: var(--primary-color);
}

.tooltip-item:last-child i {
    color: var(--danger-color);
}

/* Animación de aparición escalonada */
.user-tooltip-menu.show .tooltip-item {
    animation: slideUpFade 0.3s forwards;
}

.user-tooltip-menu.show .tooltip-item:nth-child(1) { animation-delay: 0.05s; }
.user-tooltip-menu.show .tooltip-item:nth-child(2) { animation-delay: 0.1s; }
.user-tooltip-menu.show .tooltip-item:nth-child(3) { animation-delay: 0.15s; }

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

/* Estilos para imagen de perfil en sidebar */
.nav-profile-img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
    border: 2px solid rgba(255,255,255,0.2);
}

.profile-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Posicionamiento en Escritorio (Sidebar lateral) */
@media (min-width: 769px) {
    .user-tooltip-menu {
        display: none !important; /* Ocultar tooltip en escritorio */
    }
    
    .desktop-only-nav {
        display: flex;
    }
    
    .profile-nav-group {
        /* En escritorio se comporta como un item normal */
    }
}

/* Posicionamiento en Móvil (Bottom Nav) */
@media (max-width: 768px) {
    .desktop-only-nav {
        display: none !important; /* Ocultar Reportes en móvil */
    }

    .nav-group {
        flex: 1;
        display: flex;
        justify-content: center;
    }

    .nav-item-btn {
        text-align: center;
        padding: 8px 5px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
        color: rgba(255,255,255,0.6);
    }
    
    .nav-item-btn:hover, .nav-item-btn.active {
        color: white;
    }
    
    .nav-item-btn span {
        font-size: 1.4rem;
        margin-bottom: 4px;
        margin-right: 0;
    }
    
    /* Ajuste para imagen en móvil */
    .profile-nav-group .nav-item .nav-text {
        display: none !important;
    }

    .profile-nav-group .nav-item {
        padding: 2px;
        justify-content: center;
    }

    .nav-profile-img {
        width: 48px;
        height: 48px;
        margin: 0;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid rgba(255,255,255,0.2);
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        animation: logo-pulse 6s infinite ease-in-out;
    }

    @keyframes logo-pulse {
        0%, 85% {
            transform: scale(1);
            box-shadow: 0 0 0 rgba(255,255,255,0);
            border-color: rgba(255,255,255,0.2);
        }
        90% {
            transform: scale(1.05);
            border-color: rgba(255,255,255,0.6);
            box-shadow: 0 0 10px rgba(255,255,255,0.2);
        }
        95% {
            transform: scale(0.98);
        }
        100% {
            transform: scale(1);
        }
    }

    .user-tooltip-menu {
        bottom: 100%; /* Encima del bottom nav */
        left: 50%;
        transform: translateX(-50%);
        margin-bottom: 15px;
        width: 220px;
        z-index: 99999; /* Asegurar que esté por encima de todo */
    }
    
    /* Permitir mostrar tooltip en móvil */
    .user-tooltip-menu.show {
        display: flex !important;
    }

    /* Flechita apuntando hacia abajo */
    .user-tooltip-menu::after {
        content: '';
        position: absolute;
        bottom: -8px;
        left: 50%;
        transform: translateX(-50%);
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-top: 8px solid white;
    }
}
