/* ===================================
   BANDEJA DE ENTRADA
   =================================== */

/* Botón de inbox en header principal */
.btn-inbox-main {
    background: transparent !important;
    border: none !important;
    position: relative;
}

.btn-inbox-main:hover {
    transform: translateY(-2px);
}

.inbox-badge-main {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c !important;
    color: white !important;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.inbox-badge-main.show {
    display: flex !important;
}

.inbox-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Mensajes en la bandeja */
.inbox-message {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.3s ease;
}

.inbox-message:hover {
    background: #f8f9fa;
}

.inbox-message.unread {
    background: #fff8f0;
}

.inbox-message.important {
    border-left: 3px solid #e74c3c;
}

.message-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.message-content {
    flex: 1;
    min-width: 0;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 10px;
}

.message-header h4 {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0;
    flex: 1;
}

.message-time {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
}

.message-preview {
    font-size: 14px;
    color: #666;
    margin: 0 0 8px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.message-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.message-type {
    font-size: 11px;
    font-weight: 600;
    color: #FF8C42;
    text-transform: uppercase;
    background: #fff8f0;
    padding: 3px 8px;
    border-radius: 10px;
}

.unread-dot {
    width: 8px;
    height: 8px;
    background: #FF8C42;
    border-radius: 50%;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* ===================================
   MODAL DE BANDEJA DE ENTRADA
   =================================== */

.inbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
}

.inbox-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.inbox-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.inbox-modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.inbox-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #f0f0f0;
}

.inbox-modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.inbox-modal-header i {
    color: #FF8C42;
}

.btn-close-modal {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f0f0f0;
    color: #666;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-close-modal:hover {
    background: #e0e0e0;
    color: #333;
}

.inbox-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

/* Responsive */
@media (max-width: 480px) {
    .inbox-modal-content {
        width: 95%;
        max-height: 90vh;
        border-radius: 15px;
    }
    
    .inbox-modal-header {
        padding: 15px 20px;
    }
    
    .inbox-modal-header h3 {
        font-size: 18px;
    }
    
    .inbox-message {
        padding: 12px;
    }
    
    .message-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .message-header h4 {
        font-size: 14px;
    }
    
    .message-preview {
        font-size: 13px;
    }
}
