        .stat-item {
            flex: 1;
            text-align: center;
            padding: 8px 4px;
            background: var(--bg-card2);
            border-radius: var(--radius-sm);
            font-size: 11px;
            color: var(--text-muted);
        }

        .stat-value {
            display: block;
            font-size: 18px;
            font-weight: 700;
            color: var(--accent);
            margin-bottom: 2px;
        }

        .stat-item.clickable {
            cursor: pointer;
            transition: all 0.2s;
        }

        .stat-item.clickable:hover {
            background: rgba(212, 168, 74, 0.1);
            border: 1px solid rgba(212, 168, 74, 0.3);
        }

        .stat-new {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 16px;
            height: 16px;
            padding: 0 4px;
            border-radius: 8px;
            background: var(--danger);
            color: #fff;
            font-size: 9px;
            font-weight: 700;
            margin-left: 4px;
        }

        .msg-open-link {
            display: block;
            padding: 12px;
            text-align: center;
            font-size: 13px;
            font-weight: 600;
            color: var(--accent);
            text-decoration: none;
            border: 1px solid var(--border);
            border-radius: var(--radius);
            transition: all .2s;
            margin-top: 8px;
        }

        .msg-open-link:hover {
            background: rgba(212, 168, 74, .08);
            border-color: var(--accent);
        }

        .unread-preview-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 14px;
            background: var(--card-bg);
            border: 1px solid var(--border);
            border-left: 3px solid var(--accent);
            border-radius: var(--radius);
            cursor: pointer;
            transition: all .2s;
            text-decoration: none;
            color: var(--text);
            margin-bottom: 6px;
        }

        .unread-preview-item:hover {
            background: rgba(255, 255, 255, .03);
            border-color: var(--accent);
        }

        .unread-preview-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: linear-gradient(135deg, #3a3a5c, #2a2a4a);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 15px;
            font-weight: 700;
            color: var(--accent);
            flex-shrink: 0;
        }

        .unread-preview-info {
            flex: 1;
            min-width: 0;
        }

        .unread-preview-name {
            font-size: 13px;
            font-weight: 700;
        }

        .unread-preview-body {
            font-size: 12px;
            color: var(--text-muted);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .unread-preview-time {
            font-size: 10px;
            color: var(--text-dim);
            flex-shrink: 0;
        }

        .unread-preview-empty {
            text-align: center;
            padding: 20px;
            font-size: 13px;
            color: var(--text-muted);
        }

        .messages-section-title {
            font-size: 18px;
            font-weight: 800;
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .unread-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 20px;
            height: 20px;
            padding: 0 6px;
            background: #e05555;
            color: #fff;
            border-radius: 10px;
            font-size: 11px;
            font-weight: 700;
        }

        /* Conversation list */
        .chat-conv-list {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .chat-conv-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 14px;
            background: var(--card-bg);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            cursor: pointer;
            transition: border-color 0.2s, background 0.2s;
        }

        .chat-conv-item:hover {
            background: rgba(255, 255, 255, 0.03);
        }

        .chat-conv-item.has-unread {
            border-color: var(--accent);
        }

        .chat-conv-item.active {
            background: rgba(218, 165, 32, 0.08);
            border-color: var(--accent);
        }

        .chat-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: linear-gradient(135deg, #3a3a5c, #2a2a4a);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 15px;
            font-weight: 700;
            color: var(--accent);
            flex-shrink: 0;
        }

        .chat-conv-info {
            flex: 1;
            min-width: 0;
        }

        .chat-conv-name {
            font-size: 13px;
            font-weight: 600;
        }

        .chat-conv-preview {
            font-size: 11px;
            color: var(--text-muted);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .chat-conv-meta {
            text-align: right;
            flex-shrink: 0;
        }

        .chat-conv-date {
            font-size: 10px;
            color: var(--text-muted);
        }

        .chat-conv-unread {
            display: inline-block;
            min-width: 16px;
            height: 16px;
            line-height: 16px;
            text-align: center;
            background: var(--accent);
            color: #000;
            border-radius: 8px;
            font-size: 10px;
            font-weight: 700;
            margin-top: 4px;
        }

        /* Chat thread */
        .chat-thread {
            display: none;
            flex-direction: column;
            background: var(--card-bg);
            border: 1px solid var(--border);
            border-radius: var(--radius);
            overflow: hidden;
            max-height: calc(100vh - 160px);
        }

        .chat-thread.open {
            display: flex;
        }

        .chat-bubbles {
            flex: 1;
            overflow-y: auto;
            min-height: 0;
        }

        .chat-thread-header {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px 16px;
            border-bottom: 1px solid var(--border);
            background: rgba(255, 255, 255, 0.02);
        }

        .chat-back-btn {
            background: none;
            border: none;
            color: var(--text-muted);
            font-size: 18px;
            cursor: pointer;
            padding: 0 4px;
        }

        .chat-thread-name {
            font-size: 14px;
            font-weight: 600;
        }

        .chat-thread-company {
            font-size: 11px;
            color: var(--text-muted);
        }

        .chat-bubbles {
            flex: 1;
            padding: 16px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            max-height: 400px;
            overflow-y: auto;
        }

        .chat-bubble {
            max-width: 80%;
            padding: 10px 14px;
            border-radius: 16px;
            font-size: 13px;
            line-height: 1.6;
            white-space: pre-wrap;
            word-break: break-word;
        }

        .chat-bubble.received {
            align-self: flex-start;
            background: #2a2a42;
            border-bottom-left-radius: 4px;
        }

        .chat-bubble.sent {
            align-self: flex-end;
            background: rgba(218, 165, 32, 0.18);
            border-bottom-right-radius: 4px;
        }

        .chat-bubble-time {
            font-size: 10px;
            color: var(--text-muted);
            margin-top: 4px;
        }

        .chat-bubble.received .chat-bubble-time {
            text-align: left;
        }

        .chat-bubble.sent .chat-bubble-time {
            text-align: right;
        }

        /* Chat input */
        .chat-input-bar {
            display: flex;
            gap: 8px;
            padding: 12px 16px;
            border-top: 1px solid var(--border);
            background: rgba(0, 0, 0, 0.15);
        }

        .chat-input {
            flex: 1;
            padding: 10px 14px;
            background: #1a1a2e;
            border: 1px solid var(--border);
            border-radius: 20px;
            color: #e0e0e0;
            font-size: 13px;
            outline: none;
            resize: none;
            min-height: 20px;
            max-height: 80px;
        }

        .chat-input:focus {
            border-color: var(--accent);
        }

        .chat-send-btn {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: var(--accent);
            border: none;
            color: #000;
            font-size: 18px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .chat-send-btn:disabled {
            opacity: 0.4;
            cursor: not-allowed;
        }
