﻿
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none !important;
}

:root {
    --red: #c0392b;
    --red-dk: #962d22;
    --gold: #c8973a;
    --dark: #1c1c2e;
    --dark2: #2a2040;
    --cream: #f7f3ef;
    --surface: #ffffff;
    --muted: #7a7a8c;
    --border: #e8e2da;
    --online: #27ae60;
    --shadow: 0 2px 16px rgba(0,0,0,0.07);
    --r: 14px;
}

body {
    font-family: 'Jost', sans-serif;
    background: var(--cream);
    color: var(--dark);
}


/* ── DASHBOARD LAYOUT ── */
.dash-wrap {
    max-width: 860px;
    margin: 60px auto 0px;
    padding: 32px 20px 60px;
}

/* ── SIDEBAR NAV ── */
.db-sidebar {
    background: var(--surface);
    border-radius: var(--r);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
    height: fit-content;
}

.db-sidebar-pro {
    padding: 28px 20px 20px;
    text-align: center;
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark2) 100%);
}

    .db-sidebar-pro img {
        width: 80px;
        height: 80px;
        border-radius: 50%;
        object-fit: cover;
        border: 3px solid rgba(200,151,58,0.5);
        margin-bottom: 10px;
    }

    .db-sidebar-pro h5 {
        font-family: 'Cormorant Garamond', serif;
        color: #fff;
        font-size: 1.1rem;
        margin: 0;
    }

    .db-sidebar-pro small {
        color: rgba(255,255,255,0.55);
        font-size: 12px;
    }

.db-sidebar-nav {
    padding: 12px 0;
}

    .db-sidebar-nav ul {
        list-style: none;
    }

        .db-sidebar-nav ul li a {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 11px 20px;
            font-size: 14px;
            font-weight: 500;
            color: var(--muted) !important;
            transition: .2s;
            border-left: 3px solid transparent;
        }

            .db-sidebar-nav ul li a i {
                width: 18px;
                text-align: center;
                font-size: 15px;
            }

            .db-sidebar-nav ul li a:hover {
                color: var(--red) !important;
                background: rgba(192,57,43,0.05);
                border-left-color: var(--red);
            }

            .db-sidebar-nav ul li a.act {
                color: var(--red) !important;
                background: rgba(192,57,43,0.07);
                border-left-color: var(--red);
                font-weight: 600;
            }

/* ── CHAT LIST PAGE ── */
.chat-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

    .chat-section-head h2 {
        font-family: 'Cormorant Garamond', serif;
        font-size: 1.6rem;
        font-weight: 700;
        color: var(--dark);
        display: flex;
        align-items: center;
        gap: 10px;
    }

        .chat-section-head h2 span {
            font-size: 13px;
            background: var(--red);
            color: #fff;
            border-radius: 20px;
            padding: 2px 10px;
            font-family: 'Jost', sans-serif;
            font-weight: 600;
        }

.chat-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 50px;
    padding: 8px 16px;
    width: 240px;
}

    .chat-search i {
        color: var(--muted);
        font-size: 13px;
    }

    .chat-search input {
        border: none;
        outline: none;
        font-family: 'Jost', sans-serif;
        font-size: 13.5px;
        color: var(--dark);
        background: transparent;
        width: 100%;
    }

/* Chat list */
.chat-list {
    background: var(--surface);
    border-radius: var(--r);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.chat-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background .15s;
    position: relative;
    text-decoration: none !important;
    color: inherit !important;
}

    .chat-list-item:last-child {
        border-bottom: none;
    }

    .chat-list-item:hover {
        background: #fdf8f3;
    }

    .chat-list-item.unread {
        background: #fff9f5;
    }

        .chat-list-item.unread:hover {
            background: #fff3ea;
        }

/* Avatar */
.cl-avatar {
    position: relative;
    flex-shrink: 0;
}

    .cl-avatar img {
        width: 52px;
        height: 52px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid var(--border);
        display: block;
    }

.cl-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 2px solid #fff;
}

    .cl-dot.on {
        background: var(--online);
    }

    .cl-dot.off {
        background: #bbb;
    }

/* Info */
.cl-info {
    flex: 1;
    min-width: 0;
}

    .cl-info h5 {
        font-size: 14.5px;
        font-weight: 600;
        color: var(--dark);
        margin: 0 0 3px;
    }

    .cl-info span {
        font-size: 13px;
        color: var(--muted);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
        max-width: 220px;
    }

        .cl-info span.unread-msg {
            color: var(--dark);
            font-weight: 500;
        }

/* Meta */
.cl-meta {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.cl-time {
    font-size: 11.5px;
    color: var(--muted);
}

    .cl-time.new-time {
        color: var(--red);
        font-weight: 600;
    }

.cl-badge {
    background: var(--red);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Filter tabs */
.chat-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}

.chat-tab {
    padding: 7px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1.5px solid var(--border);
    color: var(--muted);
    background: var(--surface);
    transition: .2s;
}

    .chat-tab:hover {
        border-color: var(--red);
        color: var(--red);
    }

    .chat-tab.active {
        background: var(--red);
        border-color: var(--red);
        color: #fff;
    }

@media(max-width:768px) {
    .chat-search {
        width: 100%;
    }

    .chat-section-head {
        flex-direction: column;
        align-items: flex-start;
    }
}

