#main-app {
    display: flex;
    height: 100vh;
    background: var(--bg-primary);
}

#sidebar {
    width: 320px;
    min-width: 320px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-profile img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    font-size: 15px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-status {
    font-size: 12px;
    color: var(--success);
}

.user-actions {
    display: flex;
    gap: 4px;
}

.user-actions button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.user-actions button:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar-tabs {
    display: flex;
    padding: 8px 16px;
    gap: 4px;
}

.sidebar-tabs .tab {
    flex: 1;
    padding: 8px 12px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.sidebar-tabs .tab:hover {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

.sidebar-tabs .tab.active {
    background: var(--accent-light);
    color: var(--accent);
}

.sidebar-tabs .tab span {
    display: none;
}

.sidebar-tabs .tab.active span {
    display: inline;
}

/* ── Bottom nav (mobile only) ── */
#bottom-nav {
    display: none;
}

/* ── Search box ── */
.search-box {
    position: relative;
    margin: 8px 16px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

.search-box input {
    width: 100%;
    padding: 10px 12px 10px 38px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.search-box input:focus {
    border-color: var(--accent);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.request-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 16px;
    padding: 10px 14px;
    background: var(--accent-light);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--accent);
    font-size: 13px;
    font-weight: 500;
}

.request-badge:hover {
    background: var(--accent);
    color: white;
}

.badge-count {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 700;
}

.contact-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 8px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.contact-item:hover {
    background: var(--bg-hover);
}

.contact-item.active {
    background: var(--accent-light);
}

.contact-item .avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.contact-item img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.contact-item .online-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--bg-secondary);
}

.contact-item .online-dot.online { background: var(--success); }
.contact-item .online-dot.offline { background: var(--text-muted); }

.contact-item .contact-info {
    flex: 1;
    min-width: 0;
}

.contact-item .contact-name {
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.contact-item .contact-name .group-icon {
    color: var(--accent);
    font-size: 12px;
}

.contact-item .contact-preview {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.contact-item .contact-time {
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
    align-self: flex-start;
}

.contact-item .badge-new {
    background: var(--danger);
    color: white;
    font-size: 11px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    font-weight: 700;
    flex-shrink: 0;
}

.chat-list-header {
    padding: 12px 16px 8px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    gap: 12px;
}

.empty-state i {
    font-size: 64px;
    opacity: 0.3;
}

.empty-state h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 14px;
}

#active-chat {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

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

.chat-header-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-header-info h3 {
    font-size: 16px;
    font-weight: 600;
}

.chat-header-info span {
    font-size: 12px;
    color: var(--text-muted);
}

.chat-header-actions button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.chat-header-actions button:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--bg-primary);
}

.messages-loading {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 13px;
}

.message-date-divider {
    text-align: center;
    padding: 16px 0;
    position: relative;
}

.message-date-divider span {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-primary);
    padding: 4px 12px;
    border-radius: 10px;
}

.message {
    display: flex;
    gap: 10px;
    max-width: 70%;
    animation: fadeIn 0.25s ease;
    margin-bottom: 2px;
}

.message.self {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message.other {
    align-self: flex-start;
}

.message .msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    align-self: flex-end;
    flex-shrink: 0;
}

.message .msg-bubble {
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
    position: relative;
}

.message.self .msg-bubble {
    background: var(--message-self);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.other .msg-bubble {
    background: var(--message-other);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 4px;
}

.message .msg-time {
    font-size: 10px;
    color: var(--text-muted);
    text-align: right;
    margin-top: 4px;
}

.message.self .msg-time {
    color: rgba(255,255,255,0.7);
}

.message .msg-image {
    max-width: 280px;
    border-radius: 12px;
    cursor: pointer;
}

.message .msg-voice {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
}

.message .msg-voice .voice-play-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.message.other .msg-voice .voice-play-btn {
    background: var(--accent-light);
    color: var(--accent);
}

.message .msg-voice .voice-play-btn:hover {
    transform: scale(1.1);
}

.message .msg-voice .voice-progress {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.message.other .msg-voice .voice-progress {
    background: var(--border-color);
}

.message .msg-voice .voice-progress-fill {
    height: 100%;
    background: currentColor;
    border-radius: 2px;
    transition: width 0.1s linear;
    width: 0%;
}

.message .msg-voice .voice-duration {
    font-size: 12px;
    min-width: 32px;
    text-align: right;
}

.message .msg-system {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    padding: 8px 0;
}

.message .sender-name {
    font-size: 12px;
    color: var(--accent);
    margin-bottom: 2px;
    font-weight: 600;
}

.typing-indicator {
    padding: 8px 20px;
    display: flex;
    gap: 4px;
    align-items: center;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: pulse 1.4s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

.message-input {
    border-top: 1px solid var(--border-color);
    padding: 12px 16px;
    background: var(--bg-secondary);
    position: relative;
}

.input-toolbar {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.input-toolbar button {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.input-toolbar button:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-wrapper input {
    flex: 1;
    padding: 12px 16px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.input-wrapper input:focus {
    border-color: var(--accent);
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

#send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

#send-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

#send-btn:not(:disabled):hover {
    background: var(--accent-hover);
    transform: scale(1.05);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.emoji-panel {
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 340px;
    max-height: 260px;
    overflow-y: auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    z-index: 50;
}

.emoji-panel button {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border-radius: 6px;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 2px;
}

.emoji-panel button:hover {
    background: var(--bg-hover);
    transform: scale(1.3);
}

.voice-recorder {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.voice-recorder #voice-timer {
    font-size: 14px;
    font-weight: 600;
    color: var(--danger);
    min-width: 36px;
}

.voice-wave {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 30px;
    flex: 1;
}

.voice-wave span {
    width: 4px;
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    animation: wave 0.8s infinite ease-in-out;
}

.voice-wave span:nth-child(1) { animation-delay: 0s; height: 40%; }
.voice-wave span:nth-child(2) { animation-delay: 0.1s; height: 70%; }
.voice-wave span:nth-child(3) { animation-delay: 0.2s; height: 100%; }
.voice-wave span:nth-child(4) { animation-delay: 0.3s; height: 60%; }
.voice-wave span:nth-child(5) { animation-delay: 0.4s; height: 30%; }

.voice-cancel, .voice-send {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.voice-cancel {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

.voice-send {
    background: var(--accent);
    color: white;
    cursor: pointer;
}
.voice-send:hover { opacity: 0.85; }

#detail-panel {
    width: 320px;
    min-width: 320px;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.detail-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.detail-header button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.detail-header button:hover {
    background: var(--bg-hover);
}

.detail-content {
    padding: 20px;
}

.detail-profile {
    text-align: center;
    margin-bottom: 24px;
}

.detail-profile img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 12px;
    border: 3px solid var(--accent);
}

.detail-profile h2 {
    font-size: 18px;
    margin-bottom: 4px;
}

.detail-profile p {
    font-size: 13px;
    color: var(--text-secondary);
}

.detail-section {
    margin-bottom: 24px;
}

.detail-section h4 {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.detail-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-actions button {
    width: 100%;
    padding: 10px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-danger {
    background: rgba(225, 112, 85, 0.1);
    color: var(--danger);
}

.btn-danger:hover {
    background: rgba(225, 112, 85, 0.2);
}

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

.btn-primary:hover {
    background: var(--accent-hover);
}

/* Responsive */
@media (max-width: 900px) {
    #sidebar { width: 280px; min-width: 280px; }
    #detail-panel {
        position: fixed; right: 0; top: 0; bottom: 0;
        z-index: 50; box-shadow: var(--shadow);
        max-width: 320px;
    }
}

@media (max-width: 640px) {
    /* ── Main app: sidebar fills screen, bottom nav fixed ── */
    #main-app { position: relative; }

    /* ── Sidebar becomes the main content panel ── */
    #sidebar {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        z-index: 10;
        border-right: none;
        padding-bottom: 70px;
        transition: opacity 0.3s ease;
    }
    #sidebar-backdrop { display: none !important; }
    .sidebar-header { padding: 12px 14px; }
    .contact-list { padding-bottom: 80px; }
    .sidebar-header .user-profile img { width: 36px; height: 36px; }
    .sidebar-header .user-info .user-name { font-size: 14px; }

    /* ── Sidebar tabs hidden (moved to bottom nav) ── */
    .sidebar-tabs { display: none; }

    /* ── Bottom floating capsule nav ── */
    #bottom-nav {
        display: flex;
        position: fixed;
        left: 50%;
        bottom: 16px;
        transform: translateX(-50%);
        z-index: 200;
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
        border-radius: 32px;
        padding: 4px 6px;
        gap: 2px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.25);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
    #bottom-nav .tab {
        padding: 8px 14px;
        border-radius: 28px;
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 13px;
        font-weight: 600;
        color: var(--text-muted);
        transition: all 0.25s ease;
        white-space: nowrap;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    #bottom-nav .tab i { font-size: 15px; }
    #bottom-nav .tab span { display: inline; }
    #bottom-nav .tab.active {
        background: var(--accent);
        color: white;
        box-shadow: 0 2px 10px var(--accent-glow);
    }

    /* ── Chat area: hidden until a chat opens, toggled by JS ── */
    #chat-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        z-index: 20;
        display: none;
    }
    #empty-chat { display: none; }
    .sidebar-toggle-btn { display: flex !important; }
    .chat-header { padding: 10px 12px; }
    .chat-header-info { gap: 10px; }
    .chat-header-info img { width: 36px; height: 36px; }
    .chat-header-info h3 { font-size: 15px; }

    /* ── Messages ── */
    .message { max-width: 88%; }
    .message .msg-avatar { width: 28px; height: 28px; }
    .message .msg-bubble { padding: 8px 12px; font-size: 14px; }
    .message .msg-image { max-width: 200px; }

    /* ── Input area ── */
    .message-input { padding: 8px 10px; }
    .input-toolbar button { width: 32px; height: 32px; font-size: 15px; }
    .input-wrapper input { padding: 8px 12px; font-size: 14px; }
    .input-wrapper button { width: 36px; height: 36px; font-size: 14px; }

    /* ── Voice recorder ── */
    .voice-recorder { gap: 8px; padding: 6px 0; }
    .voice-recorder #voice-timer { font-size: 13px; min-width: 30px; }
    .voice-cancel, .voice-send { width: 32px; height: 32px; font-size: 13px; }

    /* ── Emoji panel ── */
    .emoji-panel {
        width: 100%;
        left: 0;
        max-height: 180px;
        grid-template-columns: repeat(8, 1fr);
        gap: 2px;
        padding: 8px;
        border-radius: var(--border-radius) var(--border-radius) 0 0;
    }
    .emoji-panel button { font-size: 20px; }

    /* ── Detail panel ── */
    #detail-panel {
        position: fixed;
        right: 0;
        top: 0;
        bottom: 0;
        width: 85%;
        max-width: 320px;
        min-width: 0;
        z-index: 60;
        border-left: none;
        box-shadow: var(--shadow);
    }

    /* ── Modals ── */
    .modal-content { max-width: 100% !important; margin: 0 12px; }
    .modal { max-width: 100% !important; margin: 0 12px; }

    /* ── Group profile ── */
    .group-profile { padding: 16px; }

    /* ── Date divider ── */
    .message-date-divider span { font-size: 11px; padding: 2px 12px; }
}

/* ── Extra small screens ── */
@media (max-width: 420px) {
    .message { max-width: 92%; }
    .message .msg-image { max-width: 160px; }
    .chat-header-info img { width: 32px; height: 32px; }
    .emoji-panel { grid-template-columns: repeat(7, 1fr); }
    .emoji-panel button { font-size: 18px; }
    .input-toolbar button { width: 28px; height: 28px; font-size: 13px; }
}

/* ── Sidebar toggle button (hidden on desktop) ── */
.sidebar-toggle-btn {
    display: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: all 0.2s;
}
.sidebar-toggle-btn:hover { background: var(--accent); color: white; }
.sidebar-toggle-btn i { font-size: 15px; }

/* Image preview modal */
.image-preview-modal {
    position: fixed;
    inset: 0;
    background: var(--overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    cursor: zoom-out;
    animation: fadeIn 0.2s ease;
}

.image-preview-modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

/* Create group modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 150;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 28px;
    width: 90%;
    max-width: 440px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.modal h2 {
    font-size: 20px;
    margin-bottom: 20px;
}

.modal .input-group {
    margin-bottom: 16px;
}

.modal .input-group label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}

.modal .input-group input,
.modal .input-group textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.modal .input-group input:focus,
.modal .input-group textarea:focus {
    border-color: var(--accent);
}

.modal .input-group textarea {
    resize: vertical;
    min-height: 80px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.modal-actions button {
    flex: 1;
    padding: 12px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.modal-actions .btn-cancel {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.modal-actions .btn-cancel:hover {
    background: var(--bg-hover);
}

/* Friend request item */
.request-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--border-radius-sm);
    background: var(--bg-tertiary);
    margin-bottom: 8px;
}

.request-item img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.request-item .req-info {
    flex: 1;
}

.request-item .req-info span {
    display: block;
    font-weight: 600;
    font-size: 14px;
}

.request-item .req-info small {
    color: var(--text-muted);
    font-size: 12px;
}

.request-item .req-actions {
    display: flex;
    gap: 6px;
}

.request-item .req-actions button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.request-item .req-actions .accept-btn {
    background: var(--success);
    color: white;
}

.request-item .req-actions .reject-btn {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

.empty-text {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 13px;
}

.profile-edit .avatar-upload {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    cursor: pointer;
}

.profile-edit .avatar-upload img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
}

.profile-edit .avatar-overlay {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: white;
    opacity: 0;
    transition: opacity 0.2s ease;
    cursor: pointer;
}

.profile-edit .avatar-overlay:hover {
    opacity: 1;
}

.profile-edit .avatar-overlay i {
    font-size: 22px;
}

.profile-edit .avatar-overlay span {
    font-size: 12px;
}

.profile-edit .form-group {
    margin-bottom: 16px;
}

.profile-edit .form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}

.profile-edit .form-group input {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.profile-edit .form-group input:focus {
    border-color: var(--accent);
}

.user-profile-clickable {
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
}

.user-profile-clickable:hover {
    background: var(--bg-hover);
}

.form-input {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.form-input:focus {
    border-color: var(--accent);
}

.btn-small {
    padding: 4px 10px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    background: var(--surface);
    color: var(--text);
    transition: opacity 0.15s;
}
.btn-small:hover { opacity: 0.8; }
.btn-small.btn-primary { background: var(--accent); color: #fff; }
.btn-small.btn-danger { background: var(--danger); color: #fff; }
.btn-small.btn-warning { background: var(--warning); color: #fff; }

.member-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 6px;
    transition: background 0.15s;
}
.member-item:hover { background: var(--bg-hover); }
.member-item .member-info { flex: 1; min-width: 0; }
.member-item .member-name { font-size: 13px; font-weight: 500; }
.member-item .member-role { font-size: 11px; margin-left: 6px; }
.member-item .member-role.role-owner { color: var(--warning); }
.member-item .member-role.role-admin { color: var(--accent); }
.member-item .member-role.role-member { color: var(--muted); }
.member-item .member-actions { display: flex; gap: 4px; flex-shrink: 0; }
