/* --- HEADER CSS --- */
.dashboard-header {
    background-color: var(--header-bg, #fff) !important;
    display: flex;
    align-items: center;
    padding: 0 24px;
    height: 72px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    z-index: 100;
    position: relative;
}

/* Hamburger Menu Button */
.hamburger-menu-btn {
    height: 48px;
    width: 48px;
    background: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.5rem;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    transition: background-color 0.2s;
}

.hamburger-menu-btn:hover {
    background-color: var(--button-secondary-hover-bg);
}

/* Sidebar Styles */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
    display: block;
}

.sidebar-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background-color: var(--header-bg, #fff);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
    z-index: 1002;
    transition: left 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar-menu.show {
    left: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    min-height: 72px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
}

.sidebar-logo-img {
    height: 96px;
    margin-left: -7px;
}

.sidebar-logo-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-left: -20px;
}

.sidebar-close-btn {
    background: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.sidebar-close-btn:hover {
    background-color: var(--hover-bg, rgba(0,0,0,0.05));
}

.sidebar-content {
    flex: 1 1 auto;
    padding: 16px 0;
    overflow-y: auto;
    min-height: 0; /* Flexbox ile taşma için gerekli */
}

.sidebar-user-profile {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    gap: 12px;
}

.sidebar-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.channel-user-avatar-letter {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
}

.user-avatar-letter {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-username {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-channel-name {
    font-size: 0.9rem;
    color: var(--text-secondary, #666);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-divider {
    height: 1px;
    background: var(--border-color, #e5e7eb);
    margin: 8px 0;
}

.sidebar-nav {
    padding: 0 8px;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    margin: 2px 0;
    transition: background-color 0.2s;
    font-size: 0.95rem;
}

.sidebar-nav-item:hover {
    background-color: var(--hover-bg, rgba(0,0,0,0.05));
    color: var(--text-color);
    text-decoration: none;
}

.sidebar-nav-item i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.sidebar-section {
    padding: 0 8px;
    margin: 16px 0;
}

.sidebar-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary, #666);
    margin: 0 0 8px 0;
}

.sidebar-section-title i {
    font-size: 1rem;
}

.sidebar-following-list,
.sidebar-conversation-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    padding: 8px 0;
}

.sidebar-following-list{
    width: 100%;
}
/* Hover effect for clickable sidebar-following-link */
.sidebar-following-link:hover {
    color: var(--primary-color-dark, #059669);
    background: var(--hover-bg, rgba(0,0,0,0.05));
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(16,185,129,0.08);
}

.sidebar-following-item,
.sidebar-conversation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    margin: 2px 0;
    transition: background-color 0.2s;
    width: 100%;
}

.sidebar-following-item:hover,
.sidebar-conversation-item:hover {
    background-color: var(--hover-bg, rgba(0,0,0,0.05));
    color: var(--text-color);
    text-decoration: none;
}

.sidebar-following-avatar,
.sidebar-conversation-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-following-avatar img,
.sidebar-conversation-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-following-info,
.sidebar-conversation-info {
    flex: 1;
    min-width: 0;
}

.sidebar-following-name,
.sidebar-conversation-name {
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-following-channel,
.sidebar-conversation-time {
    font-size: 0.8rem;
    color: var(--text-secondary, #666);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-following-link{
    color: var(--text-color);
    text-decoration: none;
}

.sidebar-loading {
    padding: 16px;
    text-align: center;
    color: var(--text-secondary, #666);
    font-size: 0.9rem;
}

.sidebar-show-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    margin: 4px 8px;
    background: transparent;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 6px;
    color: var(--text-secondary, #666);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    width: calc(100% - 16px);
}

.sidebar-show-more-btn:hover {
    background-color: var(--hover-bg, rgba(0,0,0,0.05));
    border-color: var(--primary-color, #10b981);
    color: var(--primary-color, #10b981);
}

.sidebar-show-more-btn i {
    font-size: 0.8rem;
}

.sidebar-guest {
    padding: 20px;
    text-align: center;
}

.sidebar-guest-message {
    margin-bottom: 20px;
}

.sidebar-guest-message i {
    font-size: 3rem;
    color: var(--text-secondary, #666);
    margin-bottom: 16px;
}

.sidebar-guest-message p {
    color: var(--text-secondary, #666);
    font-size: 0.95rem;
    margin: 0;
}

.sidebar-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: var(--primary-color, #10b981);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.sidebar-login-btn:hover {
    background-color: var(--primary-color-dark, #059669);
    color: white;
    text-decoration: none;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .logo-container {
        display: none !important;
    }

    
    .sidebar-menu.show {
        left: 0;
    }
}

/* Dark theme adjustments */
html[data-theme="dark"] .sidebar-logo-img.logo-light { 
    display: none !important; 
}

html[data-theme="dark"] .sidebar-logo-img.logo-dark { 
    display: inline !important; 
}
.header-left .logo-container {
    display: flex;
    align-items: center;
    height: 100%;
    width: 150px;
    height: 72px;
    overflow: hidden;
}
.logo-png {
    height: 130px;
    margin-right: 25px;
    margin-top: 5px;
}
.logo-dark { display: none; }
html[data-theme="dark"] .logo-light { display: none !important; }
html[data-theme="dark"] .logo-dark { display: inline !important;}
.header-center {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1001 !important;
}
.search-box {
    display: flex;
    align-items: center;
    background: var(--header-bg, #fff);
    border-radius: 8px;
    padding: 4px 12px;
    min-width: 220px;
    max-width: 400px;
    width: 100%;
    transition: box-shadow 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}
.search-box input {
    border: none;
    background: transparent;
    outline: none;
    margin-left: 8px;
    width: 100%;
    font-size: 1rem;
    color: var(--text-color, #1f2328);
}
.search-toggle-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-color, #1f2328);
    font-size: 1.2rem;
    margin-left: 8px;
}
@media (max-width: 576px) {

    .search-box {
        min-width: 0;
        max-width: 100%;
        width: 100%;
        display: none !important;
        position: relative;
        z-index: 1000 !important;
        background: var(--header-bg, #fff) !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
    }
    .search-toggle-btn {
        display: inline-flex !important;
    }
    .dashboard-header {
        padding: 0;
        position: relative;
        z-index: 100;
    }
    .header-left{
        margin-left: 18px;
    }
    .header-center {
        transition: all 0.3s ease;
        z-index: 1001 !important;
    }
    .search-back-btn {
        color: var(--text-color, #1f2328);
        font-size: 1.2rem;
        margin-right: 8px;
        cursor: pointer;
        transition: color 0.2s;
        z-index: 1002;
        display: none;
    }
    .search-back-btn.active {
        display: inline-flex !important;
    }
    .dashboard-header.search-active .header-left,
    .dashboard-header.search-active .header-right,
    .dashboard-header.search-active .search-toggle-btn {
        display: none !important;
    }
    .dashboard-header.search-active .header-center {
        width: 100vw !important;
        max-width: 100vw !important;
        position: fixed !important;
        left: 0;
        top: 0;
        height: 72px;
        background: var(--header-bg, #fff) !important;
        z-index: 2000 !important;
        justify-content: flex-start !important;
        padding: 0 60px 0 20px !important;
    }
    .dashboard-header.search-active .search-box {
        display: flex !important;
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        width: 100vw !important;
        max-width: 100vw !important;
        border-radius: 0 !important;
        background: var(--header-bg, #fff) !important;
        box-shadow: 0 4px 24px rgba(0,0,0,0.12) !important;
        padding: 8px 12px !important;
        z-index: 3000 !important;
        gap: 0.75rem;
        height: 72px !important;
    }
    .dashboard-header.search-active .search-back-btn {
        display: inline-flex !important;
    }
    .dashboard-header .search-back-btn {
        display: none !important;
    }
    .search-box input {
        z-index: 1003;
        position: relative;
    }
    
    /* Mobile hamburger adjustments */
    .hamburger-menu-btn {
        margin-right: 8px;
        font-size: 1.3rem;
    }
    
    .sidebar-menu {
        width: 100vw;
        left: -100vw;
    }
    
    .sidebar-menu.show {
        left: 0;
    }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}
.add-chatbot-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 32px;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 0.9rem;
    font-weight: 600;
    background-color: transparent;
    border: 2px solid #26e462;
    color: #26e462;
    text-decoration: none;
    gap: 6px;
    transition: all 0.2s;
}
.add-chatbot-btn:hover {
    background-color: rgba(16, 185, 129, 0.1);
    color: #00ff4188;
    text-decoration: none;
}
.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 600;
    overflow: hidden;
}
.user-avatar-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* ----------------PROFİL DROPDOWN MENÜSÜ STİLLERİ ------------------------------- */
.profile-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 48px;
    min-width: 220px;
    background: var(--header-bg, #fff);
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    z-index: 200;
    padding: 0.5rem 0;
}
.profile-dropdown {
    position: relative;
    background-color: var(--card-bg);
    
    border-radius: 55px;
}
.profile-dropdown-trigger {
    cursor: pointer;
    display: flex;
    align-items: center;
}
.profile-dropdown-menu.show {
    display: block;
}
.dropdown-header {
    flex-direction: row !important;
    padding: 8px 16px 8px 16px !important;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    font-weight: 700;
    font-size: 1.2rem;
    gap:18px;
    justify-content: flex-start;
    align-self:center;
}
.dropdown-user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 600;
    overflow: hidden;
}
.header-user-avatar {
    align-self: center;

    border-radius: 50%;
    overflow: hidden;
}
.header-user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.dropdown-username {
    font-weight: 600;
    font-size: 1rem;
}
.dropdown-email {
    font-size: 0.9rem;
    color: #888;
}
.dropdown-divider {
    height: 1px;
    background: #eee;
    margin: 8px 0;
}
.dropdown-item {
    display: flex;
    text-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: var(--text-color, #1f2328);
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.15s;
}
.dropdown-item:hover {
    background: var(--button-secondary-hover-bg) !important;
    color: #10b981 !important;
}
@media (max-width: 576px) {
  .btn-text {
    display: none;
  }
}

/* notification styles  */

.notification-btn {
    background: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.3rem;
    position: relative;
    margin-right: 6px;
    display: flex;
    align-items: center;
}
.notification-badge {
    position: absolute;
    top: 2px;
    right: 0;
    background: #ff3b3b;
    color: #fff;
    border-radius: 50%;
    font-size: 0.7rem;
    padding: 2px 6px;
    min-width: 18px;
    text-align: center;
    font-weight: bold;
}
.notification-dropdown-menu {
    display: none;
    position: absolute;
    right: 50px;
    top: 48px;
    min-width: 300px;
    max-width: 400px;
    background: var(--header-bg, #fff);
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.55);
    z-index: 201;
    padding: 0.5rem 0;
}
.notification-dropdown-menu.show {
    display: block;
}
.notification-list {
    height: 500px;
    overflow-y: auto;
}

/* ------------ bildirim stilleri ------------- */

.bildirim-danger {
    position: absolute;
    top: -8px;
    left: -4px;
    color: #ff1a1a !important;
    font-size: 1.5rem !important;
    font-weight: bold;
    border-radius: 50%;
    padding: 6px;
    text-shadow: 0 2px 8px #ffb3b3;
    z-index: 2;

}

.bildirim-info {
    position: absolute;
    top: -8px;
    left: -4px;
    color: #00b894 !important;
    font-size: 1.5rem !important;
    font-weight: bold;
    border-radius: 50%;
    padding: 6px;
    text-shadow: 0 2px 8px #b3ffe0;
    z-index: 2;
}
.bildirim-text {
    color: var(--text-color, #1f2328);
    text-decoration: none;
    font-weight: 600;
    font-size: .9rem;
    text-wrap: wrap;
}

.action-required-label {
    color: #ff3b3b;
    font-size: 0.65rem;
    font-weight: 600;
    display: block;
    margin-bottom: -4px;
    letter-spacing: 0.01em;
}

.action-info-label {
    color: #00b894;
    font-size: 0.65rem;
    font-weight: 600;
    display: block;
    margin-bottom: -4px;
    letter-spacing: 0.01em;
}

.unseen-notification {
    background: #62e9be60;
    border-left: 4px solid #00b894;
}
.seen-notification {
    opacity: 0.7;
}

.seen-notification .bi-envelope-open {
    color: #bdbdbd !important;
}

.mark-as-read-btn {
    position: absolute;
    top: 4px;
    right: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f9fafb;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    cursor: pointer;
    z-index: 2;
    padding: 0;
}
.mark-as-read-btn i {
    color: #00b894;
    font-size: 1.3rem;
    transition: color 0.2s;
}
.mark-as-read-btn:hover {
    background: #00b894;
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(0,184,148,0.18);
}
.mark-as-read-btn:hover i {
    color: #fff;
}
.mark-as-read-btn:active {
    background: #009e7a;
}

.sidebar-conversations-link {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
}

.sidebar-conversations-link:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.sidebar-conversations-link i {
    font-size: 16px;
}


