/* =================================
   USER PANEL VƏ YENİ SİSTEMLƏR ÜÇÜN STİLLƏR
   ================================= */

/* User Panel Styles */
.user-panel {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.panel-header {
    background: rgba(255,255,255,0.95);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.panel-title {
    font-size: 1.8rem;
    color: #1e3c72;
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.welcome-text {
    color: #666;
    font-size: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255,255,255,0.95);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #1e3c72;
    margin: 0.5rem 0;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

/* Panel Tabs */
.panel-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #e0e0e0;
}

.panel-tabs .tab-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    color: #666;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    transition: color 0.3s;
}

.panel-tabs .tab-btn.active {
    color: #1e3c72;
}

.panel-tabs .tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #1e3c72;
}

.tab-content {
    background: rgba(255,255,255,0.95);
    border-radius: 10px;
    padding: 2rem;
    min-height: 400px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* User Listings Table */
.user-listings table {
    width: 100%;
    border-collapse: collapse;
}

.user-listings th,
.user-listings td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.user-listings th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.25rem;
    transition: transform 0.2s;
}

.btn-icon:hover {
    transform: scale(1.2);
}

.btn-icon.btn-danger {
    color: #dc3545;
}

/* User Favorites Grid */
.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.favorite-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    position: relative;
}

.favorite-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.favorite-image {
    position: relative;
    height: 200px;
    background: #f5f5f5;
}

.favorite-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-favorite {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
}

.favorite-info {
    padding: 1rem;
}

.favorite-info h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
}

.favorite-info .brand {
    color: #666;
    font-size: 0.9rem;
}

.favorite-info .price {
    color: #1e3c72;
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0.5rem 0;
}

.favorite-info .seller {
    color: #999;
    font-size: 0.85rem;
}

/* Profile Settings */
.profile-settings {
    max-width: 600px;
}

.settings-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
}

.settings-section:last-child {
    border-bottom: none;
}

.settings-section h4 {
    margin-bottom: 1rem;
    color: #333;
}

.settings-form .form-group {
    margin-bottom: 1rem;
}

.settings-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #666;
    font-weight: 500;
}

.settings-form input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.settings-form input:focus {
    outline: none;
    border-color: #1e3c72;
    box-shadow: 0 0 0 2px rgba(30, 60, 114, 0.1);
}

/* Notification Dropdown */
.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 350px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    margin-top: 10px;
    z-index: 1000;
}

.notification-header {
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header h4 {
    margin: 0;
    font-size: 1rem;
}

.mark-all-read {
    background: none;
    border: none;
    color: #1e3c72;
    cursor: pointer;
    font-size: 0.85rem;
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    gap: 0.75rem;
}

.notification-item:hover {
    background: #f8f8f8;
}

.notification-item.unread {
    background: #f0f8ff;
}

.notification-icon {
    font-size: 1.5rem;
}

.notification-content {
    flex: 1;
}

.notification-content p {
    margin: 0 0 0.25rem 0;
    color: #333;
    font-size: 0.9rem;
}

.notification-time {
    color: #999;
    font-size: 0.75rem;
}

.notification-footer {
    padding: 0.75rem;
    text-align: center;
    border-top: 1px solid #e0e0e0;
}

.notification-footer a {
    color: #1e3c72;
    text-decoration: none;
    font-size: 0.9rem;
}

/* Messages System Additions */
.conversations-sidebar {
    width: 350px;
    background: #f8f9fa;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
}

.conversation-item {
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    gap: 1rem;
}

.conversation-item:hover {
    background: #f0f0f0;
}

.conversation-item.active {
    background: #e8f4fd;
    border-left: 3px solid #1e3c72;
}

.conversation-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #1e3c72;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.conversation-info {
    flex: 1;
}

.conversation-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.conversation-name {
    font-weight: 600;
    color: #333;
}

.conversation-time {
    color: #999;
    font-size: 0.75rem;
}

.listing-ref {
    display: inline-block;
    background: #f0f0f0;
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.conversation-preview {
    color: #666;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unread-badge {
    background: #dc3545;
    color: white;
    border-radius: 10px;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    font-weight: bold;
}

/* Chat Area */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1e3c72;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.chat-username {
    font-weight: 600;
    color: #333;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: #f8f9fa;
}

.message-date-separator {
    text-align: center;
    margin: 1rem 0;
    color: #999;
    font-size: 0.85rem;
}

.message {
    margin-bottom: 1rem;
    display: flex;
}

.message-sent {
    justify-content: flex-end;
}

.message-received {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: 10px;
}

.message-sent .message-bubble {
    background: #1e3c72;
    color: white;
    border-bottom-right-radius: 0;
}

.message-received .message-bubble {
    background: white;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 0;
}

.message-text {
    margin-bottom: 0.25rem;
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.7;
}

.chat-input-container {
    padding: 1rem;
    border-top: 1px solid #e0e0e0;
}

.chat-input-wrapper {
    display: flex;
    gap: 0.5rem;
}

.chat-input-wrapper input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

.send-btn {
    background: #1e3c72;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.send-btn:hover {
    background: #15304d;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #999;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: #666;
}

.empty-state p {
    color: #999;
}

/* Responsive */
@media (max-width: 768px) {
    .panel-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .panel-tabs {
        flex-direction: column;
    }
    
    .panel-tabs .tab-btn {
        width: 100%;
    }
    
    .conversations-sidebar {
        width: 100%;
    }
    
    .messages-layout {
        flex-direction: column;
    }
    
    .notification-dropdown {
        width: 100%;
        right: 0;
        left: 0;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .favorites-grid {
        grid-template-columns: 1fr;
    }
}