/* 
 * ÇareVar Kurumsal İletişim Portalı - Premium UI Tasarım Sistemi (test.kurumsal.iletisimvar.com.tr)
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@500;600;700;800&display=swap');

:root {
    --primary: #00b050;
    --primary-hover: #009242;
    --primary-light: rgba(0, 176, 80, 0.1);
    
    --sidebar-bg: #0f172a;
    --sidebar-card: #1e293b;
    --sidebar-border: #334155;
    --sidebar-text: #f8fafc;
    --sidebar-muted: #94a3b8;
    
    --main-bg: #f8fafc;
    --card-bg: #ffffff;
    --border: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #64748b;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 14px rgba(0,0,0,0.06);
    --shadow-lg: 0 16px 36px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    background: var(--main-bg);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

.chat-container {
    display: grid;
    grid-template-columns: 340px 1fr;
    height: 100vh;
    background: var(--main-bg);
}

/* ══════════════════════════════════════════════════════════════════════════════ */
/* SOL SIDEBAR                                                                    */
/* ══════════════════════════════════════════════════════════════════════════════ */
.chat-sidebar {
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--sidebar-border);
    background: rgba(30, 41, 59, 0.7);
}

.brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.brand-text {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
}
.brand-text span { color: var(--primary); }

.env-badge {
    font-size: 10.5px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 6px;
    background: #f59e0b;
    color: #fff;
    text-transform: uppercase;
}

.user-profile-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 23, 42, 0.6);
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid var(--sidebar-border);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #00b050, #10b981);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
}

.user-details { flex: 1; overflow: hidden; }
.user-name-title {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-status-dot {
    font-size: 11px;
    color: #4ade80;
    display: flex;
    align-items: center;
    gap: 5px;
}
.user-status-dot::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 6px #4ade80;
}

/* Arama Kutusu */
.sidebar-search-box {
    padding: 12px 18px;
    border-bottom: 1px solid var(--sidebar-border);
    position: relative;
}

.sidebar-search-input {
    width: 100%;
    padding: 8px 12px 8px 34px;
    background: #1e293b;
    border: 1px solid var(--sidebar-border);
    border-radius: 10px;
    color: #fff;
    font-size: 12px;
    outline: none;
    transition: all 0.2s;
}

.sidebar-search-input:focus {
    border-color: var(--primary);
    background: #0f172a;
}

.sidebar-search-icon {
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--sidebar-muted);
    pointer-events: none;
}

/* Sidebar Scroll & Nav Items */
.sidebar-content-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-content-scroll::-webkit-scrollbar { width: 4px; }
.sidebar-content-scroll::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }

.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8px 6px 8px;
}

.section-header-title {
    font-size: 11.5px;
    font-weight: 800;
    color: var(--sidebar-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn-add-section-item {
    background: none;
    border: none;
    color: var(--sidebar-muted);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.15s;
}
.btn-add-section-item:hover {
    color: #fff;
    background: #334155;
}

.item-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    padding: 9px 12px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.15s ease;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 600;
}

.nav-item:hover {
    background: #1e293b;
    color: #fff;
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(0,176,80,0.2), rgba(0,176,80,0.1));
    color: #4ade80;
    border-left: 3px solid var(--primary);
}

.nav-item-left {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

.nav-item-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.staff-status-bubble {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    flex-shrink: 0;
    box-shadow: 0 0 6px #4ade80;
}

/* ══════════════════════════════════════════════════════════════════════════════ */
/* SAĞ ANA ALAN                                                                   */
/* ══════════════════════════════════════════════════════════════════════════════ */
.chat-main {
    display: flex;
    flex-direction: column;
    background: var(--main-bg);
    overflow: hidden;
    position: relative;
}

.chat-header {
    height: 64px;
    padding: 0 24px;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.target-title { font-size: 16px; font-weight: 800; color: #0f172a; }
.target-subtitle { font-size: 12px; color: var(--text-muted); }

.btn-header-action {
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-dashboard-home {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #334155;
}
.btn-dashboard-home:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.btn-room-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}
.btn-room-info:hover {
    background: #dbeafe;
}

/* ══════════════════════════════════════════════════════════════════════════════ */
/* ANA SAYFA / DASHBOARD EKRANI                                                   */
/* ══════════════════════════════════════════════════════════════════════════════ */
.dashboard-view {
    flex: 1;
    overflow-y: auto;
    padding: 32px 40px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.dashboard-welcome-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: 20px;
    padding: 28px 32px;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.dashboard-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.action-card {
    background: #ffffff;
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 22px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: var(--shadow-sm);
}

.action-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.action-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.action-card-title { font-size: 15px; font-weight: 800; color: #0f172a; }
.action-card-desc { font-size: 12.5px; color: var(--text-muted); line-height: 1.45; }

/* ══════════════════════════════════════════════════════════════════════════════ */
/* KANAL BLOG AKIŞI GÖRÜNÜMÜ                                                      */
/* ══════════════════════════════════════════════════════════════════════════════ */
.channel-posts-view {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.channel-post-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px 26px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.post-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.post-category-tag {
    font-size: 11px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(0, 176, 80, 0.1);
    color: var(--primary);
}

.post-title { font-size: 17px; font-weight: 800; color: #0f172a; margin-bottom: 8px; }
.post-content-body { font-size: 13.5px; color: #334155; line-height: 1.6; white-space: pre-wrap; }
.post-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    font-size: 12px;
    color: var(--text-muted);
}

.post-reactions-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-post-reaction {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-post-reaction:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.btn-post-reaction.active-like {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.btn-post-reaction.active-dislike {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #b91c1c;
}

.btn-post-reaction.active-heart {
    background: #fdf2f8;
    border-color: #fbcfe8;
    color: #db2777;
}

/* ══════════════════════════════════════════════════════════════════════════════ */
/* GRUP & BİREBİR MESAJLAŞMA ALANI                                                */
/* ══════════════════════════════════════════════════════════════════════════════ */
.chat-messages {
    flex: 1;
    padding: 24px 32px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message-bubble {
    display: flex;
    flex-direction: column;
    max-width: 70%;
    animation: fadeInMsg 0.2s ease;
}

@keyframes fadeInMsg {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.msg-sender { font-size: 11.5px; font-weight: 700; color: var(--text-muted); margin-bottom: 3px; }
.msg-text { padding: 12px 18px; border-radius: 16px; font-size: 13.5px; line-height: 1.5; }

.message-bubble.mine .msg-text {
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 3px;
    box-shadow: 0 2px 8px rgba(0, 176, 80, 0.2);
}

.message-bubble.other .msg-text {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid var(--border);
    border-bottom-left-radius: 3px;
}

.msg-time { font-size: 10.5px; color: var(--text-muted); margin-top: 3px; }
.message-bubble.mine .msg-time { text-align: right; }

.chat-footer {
    padding: 16px 24px;
    background: #ffffff;
    border-top: 1px solid var(--border);
}

.input-wrapper { display: flex; gap: 10px; }
.input-wrapper input {
    flex: 1;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    font-size: 13.5px;
    outline: none;
}
.input-wrapper input:focus { border-color: var(--primary); }

.btn-send {
    padding: 0 22px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.permission-locked-bar {
    padding: 14px 20px;
    background: #fef2f2;
    border: 1.5px solid #fecaca;
    border-radius: 12px;
    color: #991b1b;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ══════════════════════════════════════════════════════════════════════════════ */
/* PERSONEL SEÇİMİ VE ÜYE LİSTESİ WIDGET'I                                       */
/* ══════════════════════════════════════════════════════════════════════════════ */
.members-select-container {
    max-height: 180px;
    overflow-y: auto;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #f8fafc;
}

.member-pick-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.member-pick-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: #1e293b;
}

.member-role-select {
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    font-size: 11.5px;
    font-weight: 700;
    outline: none;
}

/* ══════════════════════════════════════════════════════════════════════════════ */
/* MODALLAR                                                                       */
/* ══════════════════════════════════════════════════════════════════════════════ */
.modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: #ffffff;
    border-radius: 20px;
    max-width: 540px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    overflow: hidden;
}

.modal-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 22px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.modal-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--border);
    background: #f8fafc;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-close-modal {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.btn-close-modal:hover {
    background: #e2e8f0;
    color: #0f172a;
}
