/* ===========================
   Messages Page
=========================== */

.messages-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 25px;
    margin-top: 30px;
}

.messages-sidebar {
    background: #1d2232;
    border: 1px solid #2d74ff;
    border-radius: 14px;
    padding: 20px;
    min-height: 700px;
}

.messages-content {
    background: #1d2232;
    border: 1px solid #2d74ff;
    border-radius: 14px;
    min-height: 700px;
    display: flex;
    flex-direction: column;
}

.message-folder {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-radius: 10px;
    margin-top: 10px;
    cursor: pointer;
    transition: .25s;
    color: white;
    font-weight: 600;
}

    .message-folder:hover {
        background: #26324f;
    }

    .message-folder.active {
        background: #2d74ff;
    }

    .message-folder span {
        background: #3ea6ff;
        padding: 2px 10px;
        border-radius: 20px;
        font-size: 12px;
        font-weight: bold;
    }

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #2b3a5a;
}

.message-search {
    width: 300px;
}

.conversation-list {
    overflow-y: auto;
    max-height: 650px;
}

.conversation {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px;
    border-bottom: 1px solid #2b3a5a;
    cursor: pointer;
    transition: .25s;
}

    .conversation:hover {
        background: #26324f;
    }

.avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #2d74ff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 20px;
    color: white;
}

.conversation-info {
    flex: 1;
}

    .conversation-info h3 {
        margin: 0;
        color: white;
    }

    .conversation-info p {
        margin-top: 4px;
        color: #9aa7c7;
        font-size: 14px;
    }

.online {
    width: 12px;
    height: 12px;
    background: #30d158;
    border-radius: 50%;
}

.message-card {
    background: #222a3d;
    border: 1px solid #2d74ff;
    border-radius: 10px;
    padding: 20px;
    margin: 15px;
}

.message-compose {
    padding: 25px;
}

    .message-compose textarea {
        min-height: 180px;
    }

.compose-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 20px;
}

.full-width {
    width: 100%;
}
.messages-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    margin-bottom: 20px;
}

.messages-app {
    display: grid;
    grid-template-columns: 340px 1fr;
    min-height: 720px;
    background: #111827;
    border: 1px solid #1e3a8a;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 0 22px rgba(14,165,233,.15);
}

.messages-left {
    background: #07111f;
    border-right: 1px solid #1e3a8a;
    padding: 18px;
}

.messages-right {
    background: #0b1220;
    padding: 24px;
    position: relative;
}

.message-folder {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #dbeafe;
    background: rgba(14,165,233,.08);
    border: 1px solid #1e3a8a;
    border-radius: 10px;
    padding: 12px;
    margin-top: 10px;
    font-weight: bold;
}

    .message-folder.active,
    .message-folder:hover {
        background: rgba(14,165,233,.2);
        color: #38bdf8;
    }

.conversation-list {
    margin-top: 18px;
    max-height: 560px;
    overflow-y: auto;
}

.conversation {
    display: flex;
    gap: 12px;
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 10px;
    background: rgba(2,6,13,.55);
    border: 1px solid #1e3a8a;
    color: inherit;
}

    .conversation:hover {
        background: rgba(14,165,233,.12);
    }

.conversation-unread {
    border-color: #22c55e;
    box-shadow: 0 0 12px rgba(34,197,94,.18);
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #0866ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.conversation-info h3 {
    margin: 0;
    color: #fff;
}

.conversation-info p {
    margin: 5px 0;
    color: #cbd5e1;
    font-weight: bold;
}

.conversation-info small {
    color: #94a3b8;
}

.unread-dot {
    color: #22c55e;
    font-size: 12px;
}

.compose-panel {
    background: linear-gradient(180deg, #06111f, #02060d);
    border: 1px solid #1e3a8a;
    border-radius: 12px;
    padding: 22px;
    margin-bottom: 20px;
}

.message-view-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: start;
    border-bottom: 1px solid #1e3a8a;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.message-bubble {
    background: rgba(14,165,233,.1);
    border: 1px solid #1e3a8a;
    border-radius: 14px;
    padding: 18px;
    max-width: 760px;
}

.message-own {
    margin-left: auto;
    background: rgba(8,102,255,.22);
}

.message-bubble small {
    display: block;
    margin-top: 12px;
    color: #94a3b8;
}

.reply-box {
    margin-top: 25px;
    background: rgba(2,6,13,.55);
    border: 1px solid #1e3a8a;
    border-radius: 12px;
    padding: 18px;
}

.message-empty-state {
    min-height: 600px;
    display: grid;
    place-content: center;
    text-align: center;
    color: #cbd5e1;
}

.empty-message-list {
    padding: 18px;
    color: #94a3b8;
    text-align: center;
}

@media(max-width: 900px) {
    .messages-app {
        grid-template-columns: 1fr;
    }

    .messages-left {
        border-right: none;
        border-bottom: 1px solid #1e3a8a;
    }

    .messages-top {
        display: block;
    }
}