/* ---- 1. VARIABLES & RESET (Unified) ---- */
:root {
    --primary-blue: #16A4A0;
    --primary-blue-hover: #128280;
    --light-blue-bg: #E0F8F7;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --bg-color: #f9fafb;
    --border-color: #e5e7eb;
    --white: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body { background-color: var(--bg-color); color: var(--text-main); }


.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 40px; background: white;
    border-bottom: 1px solid var(--border-color);
    position: sticky; top: 0; z-index: 1000;
}
.nav-container { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 1400px; margin: 0 auto; }

.logo { font-size: 26px; font-weight: 700; color: var(--primary-blue); }
.logo svg { width: 100px; height: auto; } /* Keeping SVG if you want it, or use text-logo */

.search-bar { display: flex; align-items: center; background-color: #f3f4f6; border-radius: 8px; padding: 8px 16px; width: 300px; }
.search-bar i { color: var(--text-muted); margin-right: 10px; }
.search-bar input { border: none; background: transparent; outline: none; width: 100%; font-size: 14px; }

.nav-links { display: flex; gap: 10px; }
.nav-item {
    display: flex; flex-direction: column; align-items: center; text-decoration: none;
    color: var(--text-muted); padding: 8px 16px; border-radius: 8px; font-size: 16px; gap: 4px; transition: 0.2s;
}
.nav-item.active { background-color: var(--light-blue-bg); color: var(--primary-blue); }
.nav-item:hover { color: var(--primary-blue); }

.burger-btn { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text-main); }

/* ---- 3. MESSAGES PAGE SPECIFIC ---- */
.messages-layout { max-width: 1400px; margin: 40px auto; padding: 0 24px; }
.messages-card { display: flex; height: 75vh; min-height: 600px; border: 1px solid var(--border-color); background: var(--white); }

.messages-sidebar { width: 320px; min-width: 320px; border-right: 1px solid var(--border-color); display: flex; flex-direction: column; background: var(--white); }
.sidebar-header { padding: 24px 20px 16px; }
.sidebar-header h2 { font-size: 20px; font-weight: 700; }

.sidebar-search { margin: 0 20px 16px; display: flex; align-items: center; background: #f1f5f9; border-radius: 6px; padding: 10px; }
.sidebar-search i { color: var(--text-muted); margin-right: 10px; font-size: 14px; }
.sidebar-search input { border: none; background: transparent; outline: none; width: 100%; font-size: 13px; }

.chat-list { overflow-y: auto; flex-grow: 1; }
.chat-item { display: flex; padding: 16px 20px; gap: 12px; cursor: pointer; border-bottom: 1px solid var(--border-color); transition: 0.2s; }
.chat-item.active { background-color: var(--light-blue-bg); }
.chat-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.chat-summary-top { display: flex; justify-content: space-between; margin-bottom: 6px; }
.chat-summary-top h4 { font-size: 15px; font-weight: 600; }

.messages-chat-area { flex-grow: 1; display: flex; flex-direction: column; background-color: #fafafa; }
.chat-area-header { padding: 16px 24px; background: white; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; }
.chat-history { flex-grow: 1; padding: 30px 40px; overflow-y: auto; display: flex; flex-direction: column; gap: 20px; }

.message { display: flex; flex-direction: column; max-width: 60%; }
.message-bubble { padding: 16px; border-radius: 8px; font-size: 15px; line-height: 1.5; }
.message.received .message-bubble { background-color: white; border: 1px solid var(--border-color); }
.message.sent { align-self: flex-end; }
.message.sent .message-bubble { background-color: var(--primary-blue); color: white; }
.message-time { font-size: 12px; color: var(--text-muted); margin-top: 8px; }

.chat-input-container { padding: 20px; background: white; border-top: 1px solid var(--border-color); display: flex; gap: 10px; }
.chat-input { flex-grow: 1; padding: 14px; border: 1px solid var(--border-color); border-radius: 6px; outline: none; }
 .send-btn{background-color:transparent;border:none; color: #128280;cursor: pointer;}
 .send-btn:hover{
    color: #16A4A0;
    transition: all 0.5s;
 }
/* ---- 4. FOOTER (Unified) ---- */
footer { text-align: center; padding: 60px 20px; background: var(--white); border-top: 1px solid var(--border-color); margin-top: 60px; }
.footer-links { display: flex; justify-content: center; gap: 40px; margin-bottom: 24px; }
.footer-links a:hover{
    color: #16A4A0;
    transition: all 0.5s;
 }
.footer-links a { text-decoration: none; color: var(--text-main); font-size: 14px; font-weight: 500; }
.social-links a{color: #16A4A0;padding: 6px;}
.copyright{padding-top: 6px;}
/* ---- 5. MOBILE RESPONSIVE ---- */
@media (max-width: 768px) {
    .nav-container { padding: 0 20px; }
    .search-bar { display: none; }
    .burger-btn { display: block; }
    .nav-links {
        display: none; flex-direction: column; position: absolute; top: 70px; left: 0;
        width: 100%; background: white; box-shadow: 0 4px 6px rgba(0,0,0,0.1); padding: 15px 0;
    }
    .nav-links.active { display: flex; }
    .nav-item { flex-direction: row; padding: 12px 30px; width: 100%; gap: 15px; }
    
    .messages-card { flex-direction: column; height: auto; }
    .messages-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border-color); max-height: 350px; }
    .messages-chat-area { height: 500px; }
}