* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: #f6f7fb;
    color: #222;
}
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* ---- Navbar ---- */
.navbar { background: #c9c9c9; color: #282828; padding: 14px 0; position: relative; z-index: 8; }
.navbar-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.logo { color: #252424; font-weight: 700; font-size: 20px; text-decoration: none; }
.nav-toggle {
    display: none; background: none; border: none; color: #fff; font-size: 22px;
    cursor: pointer; padding: 4px 8px;
}
.navbar nav { display: flex; align-items: center; }
.navbar nav a { color: #fbfbfb; text-decoration: none; margin-left: 18px; font-size: 16px; padding: 6px 0; }
.navbar nav a:hover { color: #b9b9b9; }

.alert { background: #e7f7ec; border: 1px solid #b6e3c6; color: #1e6b3a; padding: 10px 14px; border-radius: 6px; margin: 16px 0; }
.alert-error { background: #fdecea; border: 1px solid #f5c2bd; color: #c0392b; padding: 10px 14px; border-radius: 6px; margin: 0 0 16px; }
.alert-error p { margin: 2px 0; }
.error { color: #c0392b; font-size: 14px; }
.field-error { color: #c0392b; font-size: 13px; margin: -8px 0 12px; }

main.container { padding: 30px 20px; }

/* ---- Layout / grid ---- */
.layout { display: flex; gap: 24px; align-items: flex-start; }
.sidebar { width: 200px; flex-shrink: 0; }
.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar li { margin-bottom: 6px; }
.sidebar a { text-decoration: none; color: #444; font-size: 14px; }
.sidebar a.active, .sidebar a:hover { color: #4b4bff; font-weight: 600; }

.post-grid { flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; min-width: 0; }
.post-card { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.post-card a { text-decoration: none; color: inherit; }
.post-thumb { width: 100%; height: 140px; object-fit: cover; }
.post-thumb-wrap { position: relative; }
.post-thumb-wrap.video-thumb { height: 140px; background: #1e1e2f; display: flex; align-items: center; justify-content: center; }
.play-badge {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,0.6); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 16px; pointer-events: none;
}
.post-card h4 { margin: 10px 14px 4px; font-size: 16px; word-break: break-word; }
.post-card .meta { margin: 0 14px 14px; font-size: 12px; color: #888; }

.tag { background: #eef0ff; color: #4b4bff; padding: 2px 8px; border-radius: 10px; font-size: 11px; }

.pagination { margin-top: 24px; display: flex; gap: 12px; align-items: center; font-size: 14px; flex-wrap: wrap; }
.pagination a { color: #4b4bff; text-decoration: none; }

/* ---- Forms ---- */
.form-card { background: #fff; max-width: 480px; margin: 0 auto; padding: 30px; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.form-card h2 { margin-top: 0; }
.form-card label { display: block; font-size: 13px; font-weight: 600; color: #555; margin-bottom: 4px; }
.form-input, form input[type=text], form input[type=email], form input[type=password], form input[type=file], form input[type=url], form select, form textarea {
    display: block; width: 100%; padding: 10px 12px; margin-bottom: 12px;
    border: 1px solid #ddd; border-radius: 6px; font-size: 16px; font-family: inherit;
}
.btn {
    background: #4b4bff; color: #fff; border: none; padding: 12px 18px;
    border-radius: 6px; font-size: 15px; cursor: pointer; width: 100%;
}
form .btn { width: auto; }
.btn:hover { background: #3939d6; }
.btn.small { padding: 6px 12px; font-size: 12px; display: inline-block; margin-top: 8px; text-decoration: none; width: auto; }
.btn.btn-outline { background: #fff; color: #4b4bff; border: 1px solid #4b4bff; }
.btn.btn-outline:hover { background: #eef0ff; }
.inline-form { display: inline-block; margin: 8px 0 0; }

.search-form { display: flex; gap: 8px; margin-bottom: 18px; max-width: 420px; }
.search-form .form-input { margin-bottom: 0; }
.search-form .btn.small { margin-top: 0; flex-shrink: 0; }

/* ---- Rich text editor (CKEditor 5) ---- */
/* CKEditor renders its own toolbar/editing UI; just give it breathing room. */
.ck.ck-editor { margin-bottom: 12px; }
.ck.ck-editor__editable_inline { min-height: 220px; border-radius: 0 0 6px 6px !important; }
.rich-content img, .rich-content figure { border-radius: 8px; margin: 10px 0; }
.rich-content figure.image { max-width: 100%; }
.rich-content blockquote { border-left: 3px solid #4b4bff; margin: 10px 0; padding-left: 14px; color: #555; }
.rich-content pre { background: #f0f1f5; padding: 12px; border-radius: 6px; overflow-x: auto; }

/* ---- Post detail ---- */
.post-detail { background: #fff; padding: 30px; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); overflow-wrap: break-word; }
.post-detail-img { width: 100%; max-height: 360px; object-fit: cover; border-radius: 8px; margin-bottom: 16px; }
.post-detail-video {
    display: block; width: 100%; aspect-ratio: 16 / 9; max-height: 480px;
    border-radius: 8px; margin-bottom: 16px; background: #000; object-fit: contain;
}
.youtube-embed { position: relative; width: 100%; padding-bottom: 56.25%; height: 0; margin-bottom: 16px; border-radius: 8px; overflow: hidden; }
.youtube-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.post-content { line-height: 1.6; margin: 20px 0; }
.meta { color: #888; font-size: 13px; }

#like-post-btn, .like-comment-btn {
    background: #fff; border: 1px solid #ddd; padding: 10px 18px; border-radius: 20px;
    cursor: pointer; font-size: 14px; touch-action: manipulation;
}
#like-post-btn:hover, .like-comment-btn:hover { border-color: #4b4bff; color: #4b4bff; }

.comment { border-bottom: 1px solid #eee; padding: 12px 0; }
.comment .muted { color: #aaa; font-size: 12px; }
.comment p { overflow-wrap: break-word; }

/* ---- Profile ---- */
.profile-header { display: flex; gap: 20px; align-items: center; background: #fff; padding: 24px; border-radius: 10px; margin-bottom: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); flex-wrap: wrap; }
.avatar-lg { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; }
.avatar-lg.placeholder { display: flex; align-items: center; justify-content: center; background: #4b4bff; color: #fff; font-size: 32px; font-weight: 700; }

/* ---- Messaging / member list ---- */
.badge { background: #4b4bff; color: #fff; border-radius: 12px; font-size: 12px; padding: 2px 8px; margin-left: 2px; }

.conversation-list { display: flex; flex-direction: column; gap: 8px; }
.conversation-item {
    display: flex; align-items: center; gap: 12px; background: #fff; padding: 12px 16px;
    border-radius: 10px; text-decoration: none; color: inherit; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    flex-wrap: wrap;
}
.conversation-item.unread { border-left: 3px solid #4b4bff; }
.conv-avatar {
    width: 44px; height: 44px; border-radius: 50%; overflow: hidden; background: #4b4bff; color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0;
}
.conv-avatar img { width: 100%; height: 100%; object-fit: cover; }
.conv-info { flex: 1; min-width: 0; }
.conv-info p { margin: 2px 0 0; font-size: 13px; color: #888; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card-actions { display: flex; gap: 8px; flex-shrink: 0; align-items: center; flex-wrap: wrap; }
.user-card-actions .btn.small { margin-top: 0; }
.user-card-actions .inline-form { margin: 0; }

.chat-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.chat-header .back-link { text-decoration: none; color: #4b4bff; font-size: 20px; }
.connection-dot { width: 9px; height: 9px; border-radius: 50%; background: #ccc; margin-left: auto; flex-shrink: 0; }
.connection-dot.online { background: #2ecc71; }
.connection-dot.connecting { background: #f1c40f; }
.connection-dot.offline { background: #c0392b; }

.message-list {
    background: #fff; border-radius: 10px; padding: 16px; height: 420px; overflow-y: auto;
    display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.msg-row { display: flex; gap: 8px; align-items: flex-end; max-width: 78%; }
.msg-row.mine { flex-direction: row-reverse; align-self: flex-end; }
.msg-row.theirs { align-self: flex-start; }
.msg-avatar {
    width: 26px; height: 26px; border-radius: 50%; overflow: hidden; background: #4b4bff; color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.msg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.msg-bubble-wrap { display: flex; flex-direction: column; min-width: 0; }
.msg-row.mine .msg-bubble-wrap { align-items: flex-end; }
.msg-row.theirs .msg-bubble-wrap { align-items: flex-start; }
.msg-username { font-size: 11px; color: #999; margin-bottom: 2px; padding: 0 4px; }
.msg-bubble { position: relative; padding: 8px 12px; border-radius: 14px; font-size: 14px; }
.msg-bubble p { margin: 0; overflow-wrap: break-word; }
.msg-bubble .msg-time { font-size: 10px; opacity: 0.6; display: block; margin-top: 3px; }
.msg-bubble.mine { background: #4b4bff; color: #fff; }
.msg-bubble.theirs { background: #f0f1f5; color: #222; }
.msg-delete-btn {
    position: absolute; top: -8px; right: -8px; width: 20px; height: 20px; border-radius: 50%;
    background: #fff; border: 1px solid #ddd; color: #888; font-size: 13px; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center; padding: 0; opacity: 0; transition: opacity 0.15s;
}
.msg-bubble:hover .msg-delete-btn { opacity: 1; }
.msg-delete-btn:hover { background: #fdecea; border-color: #c0392b; color: #c0392b; }
.msg-delete-btn:disabled { opacity: 0.5; cursor: default; }
.msg-attachment-img { max-width: 220px; max-height: 220px; border-radius: 8px; object-fit: cover; margin-bottom: 4px; }
.msg-attachment-video { max-width: 260px; max-height: 220px; border-radius: 8px; display: block; margin-bottom: 4px; background: #000; }
.msg-attachment-audio { max-width: 240px; margin-bottom: 4px; }
.msg-attachment-doc {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 8px;
    background: rgba(0,0,0,0.06); color: inherit; text-decoration: none; font-size: 13px; margin-bottom: 4px;
    max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.msg-bubble.mine .msg-attachment-doc { background: rgba(255,255,255,0.2); color: #fff; }

.chat-toolbar { display: flex; gap: 4px; margin-bottom: 8px; width: 100%; }
.icon-btn {
    background: #fff; border: 1px solid #ddd; border-radius: 8px; width: 38px; height: 38px;
    font-size: 17px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.icon-btn:hover { border-color: #4b4bff; }
.icon-btn.recording { background: #fdecea; border-color: #c0392b; animation: pulse 1s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.emoji-picker {
    display: flex; flex-wrap: wrap; gap: 4px; background: #fff; border: 1px solid #ddd; border-radius: 8px;
    padding: 8px; margin-bottom: 8px; width: 100%; box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.emoji-option { background: none; border: none; font-size: 20px; cursor: pointer; padding: 4px; border-radius: 6px; }
.emoji-option:hover { background: #f0f1f5; }

/* Message form — toolbar above, textarea+send in one box */
#message-form { display: flex; flex-direction: column; gap: 8px; }
#message-form textarea { margin-bottom: 0; }
#message-form .btn { width: auto; }

/* Input box with send arrow button embedded on the right */
.message-input-box {
    display: flex;
    align-items: flex-end;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}
.message-input-box textarea {
    flex: 1;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    resize: none;
    padding: 10px 12px;
    font-size: 14px;
    min-height: 42px;
    max-height: 140px;
    background: transparent;
    outline: none;
}
.send-inline-btn {
    background: #4f46e5;
    border: none;
    color: #fff;
    width: 42px;
    min-width: 42px;
    height: 42px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: flex-end;
    transition: background .15s;
    border-radius: 0 10px 10px 0;
}
.send-inline-btn:hover { background: #4338ca; }

/* =========================================================
   Responsive breakpoints
   ========================================================= */

/* Tablets and small laptops */
@media (max-width: 768px) {
    .container { padding: 0 16px; }
    main.container { padding: 20px 16px; }

    .layout { flex-direction: column; }
    .sidebar { width: 100%; }
    .sidebar ul { display: flex; flex-wrap: wrap; gap: 4px 14px; }

    .post-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }

    .post-detail, .form-card { padding: 20px; }

    .message-list { height: 380px; }
}

/* Phones */
@media (max-width: 480px) {
    .navbar-inner { flex-wrap: nowrap; }
    .nav-toggle { display: inline-block; }
    .navbar nav {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: #1e1e2f;
        padding: 10px 20px 16px;
        border-bottom-left-radius:7px ;
        border-bottom-right-radius: 7px;
    }
    .navbar nav.open { display: flex; }
    .navbar nav a { margin-left: 0; padding: 8px 0; font-size: 15px; }
    .nav-push-btn { margin-left: 0; margin-top: 4px; }

    .post-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .post-thumb, .post-thumb-wrap.video-thumb { height: 100px; }
    .post-card h4 { font-size: 14px; margin: 8px 10px 4px; }
    .post-card .meta { font-size: 11px; margin: 0 10px 10px; }

    .form-card { padding: 16px; }
    .post-detail { padding: 16px; }
    .post-detail-img { max-height: 220px; }
    /* Keep the 16:9 box (not a fixed max-height) on phones so the video
       element always has enough height for the native control bar to
       render and stay tappable, whatever the source clip's aspect ratio
       is (object-fit: contain letterboxes instead of squeezing/clipping
       the controls). */
    .post-detail-video { max-height: none; }

    .profile-header { flex-direction: column; align-items: flex-start; text-align: left; }

    .pagination { justify-content: space-between; }

    #like-post-btn, .like-comment-btn { width: 100%; text-align: center; }

    .search-form { flex-wrap: wrap; }

    .message-list { height: 320px; }
    .msg-row { max-width: 92%; }
    .msg-attachment-img, .msg-attachment-video { max-width: 100%; }
    .conv-info p { max-width: 160px; }
    .user-card-actions { width: 100%; }
    .user-card-actions .btn.small, .user-card-actions .inline-form .btn.small { flex: 1; text-align: center; }
}

/* ---- Typing indicator ---- */
.typing-indicator { font-size: 12px; color: #888; margin: -6px 0 8px 4px; font-style: italic; }

/* ---- Nav push-notification bell ---- */
.nav-push-btn { width: 30px; height: 30px; font-size: 14px; margin-left: 18px; background: transparent; border-color: #444; color: #ddd; }
.nav-push-btn:hover { border-color: #fff; color: #fff; }
.nav-push-btn.active { background: #4b4bff; border-color: #4b4bff; color: #fff; }

/* ---- YouTube fallback link ---- */
.youtube-fallback { font-size: 12px; color: #888; margin: -10px 0 16px; }


/* ---- Group chat ---- */
.inbox-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.inbox-section-title { margin: 20px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: #999; font-weight: 600; }
.group-avatar { background: #4f46e5; }
.group-avatar-lg { width: 48px; height: 48px; font-size: 22px; }
.group-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.chat-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 0 12px; border-bottom: 1px solid #eee; margin-bottom: 10px; flex-wrap: wrap; gap: 8px; }
.chat-header-info { display: flex; align-items: center; gap: 10px; }
.chat-header-actions { display: flex; gap: 8px; align-items: center; }
.chat-partner-name { font-size: 16px; }
.members-panel { background: #f9f9fb; border: 1px solid #e5e7ef; border-radius: 8px; padding: 14px 16px; margin-bottom: 12px; }
.members-panel h4 { margin: 0 0 10px; }
.member-list { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 6px; }
.member-list li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.member-thumb { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.member-initial { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: #4f46e5; color: #fff; font-size: 12px; font-weight: 700; }
.add-member-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.member-checkbox-list { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; padding: 8px; border: 1px solid #e5e7ef; border-radius: 6px; }
.member-checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.btn-xs { padding: 2px 8px; font-size: 12px; }
.btn-danger { background: #e53e3e; color: #fff; border-color: #e53e3e; }
.btn-danger:hover { background: #c53030; }
.btn-ghost { background: transparent; color: #4f46e5; border: 1px solid #4f46e5; }
.btn-ghost:hover { background: #ede9ff; }
.btn-sm { padding: 4px 12px; font-size: 13px; }

/* ---- Site logo in navbar ---- */
.logo-link { display: flex; align-items: center; gap: 8px; }
.site-logo-img { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; }

@media (max-width: 600px) {
    .emoji-btn-desktop { display: none !important; }
}


/* ================================================================
   Contact page
   ================================================================ */
.contact-page { max-width: 900px; margin: 0 auto; }
.contact-hero { text-align: center; padding: 32px 0 24px; }
.contact-hero h1 { margin: 0 0 8px; font-size: 28px; }
.contact-hero p { color: #666; font-size: 15px; margin: 0; }

.contact-layout { display: grid; grid-template-columns: 1fr 280px; gap: 28px; align-items: start; }




@media (max-width: 700px) { .contact-layout { grid-template-columns: 1fr; } }

.contact-form-card { max-width: 100%; }
.contact-submit-btn { width: 100%; margin-top: 4px; padding: 12px; font-size: 15px; }

.contact-info { display: flex; flex-direction: column; gap: 14px; }
.contact-info-card {
    display: flex; align-items: flex-start; gap: 12px;
    background: #f7f8fc; border: 1px solid #e8eaf0; border-radius: 10px;
    padding: 14px 16px;
}
.contact-info-icon { font-size: 22px; line-height: 1; flex-shrink: 0; }
.contact-info-card strong { display: block; font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.contact-info-card p { margin: 0; font-size: 13px; color: #666; }

/* ── Inbox ── */
.contact-inbox { max-width: 820px; margin: 0 auto; }
.inbox-page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.inbox-page-header h2 { margin: 0; }

.contact-filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.filter-tab {
    padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 600;
    border: 1px solid #dde1ef; background: #fff; color: #555; text-decoration: none;
    transition: background .12s, color .12s;
}
.filter-tab:hover { background: #eef0ff; color: #4f46e5; }
.filter-tab.active { background: #4f46e5; color: #fff; border-color: #4f46e5; }
.tab-count { font-size: 11px; background: rgba(0,0,0,.08); border-radius: 10px; padding: 1px 6px; margin-left: 4px; }
.filter-tab.active .tab-count { background: rgba(255,255,255,.25); }
.tab-count.new { background: #e53e3e; color: #fff; }

.contact-message-list { display: flex; flex-direction: column; gap: 0; border: 1px solid #e5e7ef; border-radius: 10px; overflow: hidden; }
.contact-message-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; background: #fff; text-decoration: none; color: inherit;
    border-bottom: 1px solid #f0f1f7; gap: 12px; transition: background .1s;
}
.contact-message-row:last-child { border-bottom: none; }
.contact-message-row:hover { background: #f7f8fc; }
.contact-message-row.unread { background: #f0f1ff; }
.contact-message-row.unread .cmr-name { font-weight: 800; }

.cmr-left { display: flex; align-items: flex-start; gap: 12px; flex: 1; min-width: 0; }
.cmr-status-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.status-new      { background: #e53e3e; }
.status-read     { background: #a0aec0; }
.status-replied  { background: #38a169; }
.status-archived { background: #cbd5e0; }

.cmr-body { min-width: 0; }
.cmr-name { font-size: 14px; font-weight: 700; }
.cmr-email { font-size: 12px; color: #888; margin-left: 6px; }
.cmr-subject { margin: 2px 0 0; font-size: 13px; font-weight: 600; }
.cmr-preview { margin: 2px 0 0; font-size: 12px; color: #888; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cmr-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.cmr-date { font-size: 12px; color: #999; white-space: nowrap; }

.status-badge {
    font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; text-transform: uppercase;
    letter-spacing: .04em;
}
.status-badge.status-new      { background: #fff5f5; color: #e53e3e; border: 1px solid #fed7d7; }
.status-badge.status-read     { background: #f7fafc; color: #718096; border: 1px solid #e2e8f0; }
.status-badge.status-replied  { background: #f0fff4; color: #276749; border: 1px solid #c6f6d5; }
.status-badge.status-archived { background: #f7fafc; color: #a0aec0; border: 1px solid #e2e8f0; }

.empty-state { padding: 48px; text-align: center; color: #aaa; font-size: 15px; }

/* ── Detail ── */
.contact-detail { max-width: 720px; margin: 0 auto; }
.contact-detail-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px; flex-wrap: wrap; gap: 10px;
}
.contact-detail-actions { display: flex; align-items: center; gap: 10px; }
.status-select { width: auto; padding: 6px 10px; font-size: 13px; margin-bottom: 0; }

.contact-detail-card {
    background: #fff; border: 1px solid #e5e7ef; border-radius: 12px; padding: 28px;
}
.contact-sender-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.contact-sender-avatar {
    width: 46px; height: 46px; border-radius: 50%; background: #4f46e5;
    color: #fff; font-size: 20px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.contact-sender-info { flex: 1; min-width: 0; }
.contact-sender-info strong { display: block; font-size: 15px; }
.contact-sender-email { font-size: 13px; color: #4f46e5; text-decoration: none; }
.contact-sender-email:hover { text-decoration: underline; }
.contact-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.contact-date { font-size: 12px; color: #999; }

.contact-divider { border: none; border-top: 1px solid #f0f1f7; margin: 18px 0; }
.contact-subject { margin: 0 0 16px; font-size: 20px; }
.contact-message-body { font-size: 15px; line-height: 1.7; color: #333; }
.contact-reply-bar { margin-top: 24px; padding-top: 18px; border-top: 1px solid #f0f1f7; }

/* Post detail meta row — author info + edit/delete actions */
.post-meta-row { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.post-meta-row .meta { margin: 0; }
.post-author-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ================================================================
   Real-time notification banner (group-added alert)
   ================================================================ */
.notif-banner {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: #4b4bff;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
    animation: slideDown .3s ease;
}
@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}
.notif-banner-btn {
    flex-shrink: 0;
    padding: 5px 14px;
    background: #fff;
    color: #4b4bff;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background .15s;
}
.notif-banner-btn:hover { background: #e8e8ff; }
.notif-banner-close {
    margin-left: auto;
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    opacity: .8;
}
.notif-banner-close:hover { opacity: 1; }
