/* Sidebar Styles */
#wrapper {
    display: flex;
}

#sidebar-wrapper {
    min-width: 200px;
    min-height: 100vh;
    width: 250px;
    margin-left: -250px;
    transition: margin 0.25s ease-out;
}

#wrapper.toggled #sidebar-wrapper {
    margin-left: 0;
}

#page-content-wrapper {
    min-width: 100vw;
}

@media (min-width: 768px) {
    #sidebar-wrapper {
        margin-left: 0;
    }

    #page-content-wrapper {
        min-width: 0;
        width: 100%;
    }

    #wrapper.toggled #sidebar-wrapper {
        margin-left: -250px;
    }
}

/* Sidebar Items */
.sidebar-heading {
    font-size: 1.2rem;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.list-group-item {
    border: none !important;
    padding: 1rem 1.5rem;
    transition: all 0.3s;
}

.list-group-item:hover {
    background-color: #495057 !important;
    padding-left: 2rem;
}

.list-group-item.active {
    background-color: #667eea !important;
    border-left: 4px solid #ffffff !important;
    padding-left: 1.8rem;
}

.list-group-item i {
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
}

/* Login Page - Ortada konumlandırma */
.login-page {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
}

.login-container {
    min-height: 100vh;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-card {
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 100%;
}

.login-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0;
    padding: 2rem;
    text-align: center;
}

.login-header i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px 10px 0 0 !important;
    font-weight: 600;
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653a8b 100%);
}

/* Table Styles */
.table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

.table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Form Styles */
.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Badge Styles */
.badge {
    padding: 0.5rem 0.8rem;
    font-weight: 500;
}

/* Alert Animations */
.alert {
    animation: slideInDown 0.5s ease-out;
}

.navbar-expand-lg .navbar-nav .dropdown-menu {
    position: absolute;
}

.list-image {
    width: 60px;
    height: 60px;
    padding: .4rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer
}

.list-no-image {
    width: 60px;
    height: 60px;
    padding: .4rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer
}

.modal-body {
    max-height: 80vh; /* modal yüksekliği */
}

.modal-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Sohbet Konteyner Tasarımı */
#message-container {
    background-color: #f0f2f5; /* WhatsApp benzeri hafif gri arka plan */
    background-image: radial-gradient(#d1d1d1 0.5px, transparent 0.5px);
    background-size: 20px 20px;
    padding: 20px !important;
}

/* Baloncuk Kuyrukları ve Oval Yapı */
.message-bubble {
    line-height: 1.4;
}

.message-bubble.own {
    border-bottom-right-radius: 2px !important;
}

.message-bubble.other {
    border-bottom-left-radius: 2px !important;
    border: 1px solid #dee2e6;
}

.list-group-messages .list-group-item.active {
    background-color: #0d6efd;
    border-left: none !important;
}

.list-group-item {
    transition: all 0.2s;
    border-left: 4px solid transparent;
}

.list-group-item:hover {
    background-color: #f8f9fa;
    border-left: 4px solid #0d6efd;
}

/* Scrollbar Tasarımı */
#message-container::-webkit-scrollbar {
    width: 6px;
}

#message-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

/* Index Chat */
.main-container {
    display: flex;
    height: 700px;
}

.users-sidebar {
    width: 350px;
    border-right: 1px solid #ddd;
    background-color: white;
    overflow-y: auto;
}

.users-sidebar .sidebar-title {
    padding: 19px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.users-sidebar .sidebar-title h5 {
    color: #fff;
}

.chat-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e5ddd5;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QTBENzI3RjYzOTM4MTFFNDg3NzhEMjIzMTBFMzRGMTgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QTBENzI3RjczOTM4MTFFNDg3NzhEMjIzMTBFMzRGMTgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBMEQ3MjdGNDM5MzgxMUU0ODc3OEQyMjMxMEUzNEYxOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBMEQ3MjdGNTM5MzgxMUU0ODc3OEQyMjMxMEUzNEYxOCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pjjxp3UAAAA1SURBVHjaYvz//z8DsQAggJiQOYyMjEwgGoQZQRQMDAwMTCAKhAECDABBgAEAIMAAQIABACQaAwc47VRXAAAAAElFTkSuQmCC');
}

.user-list-item {
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #e9ecef;
    padding: 15px;
}

.user-list-item:hover {
    background-color: #f8f9fa;
}

.user-list-item.active {
    background-color: #e9ecef;
}

.user-list-item:last-child {
    border-bottom: none;
}

.list-group-item-action:hover {
    background-color: #667eea !important;
    border-left: 0;
    padding-left: 1.8rem;
}

.list-group-item-action:hover h6, .list-group-item-action:hover .text-muted {
    color: #fff !important;
}

.list-group-item-action.active {
    border-left: 0 !important;
}

.list-group-item-action.active .text-muted {
    color: #fff !important;
}

.unread-badge {
    font-size: 0.75rem;
}

.notification-icon {
    position: relative;
    cursor: pointer;
    font-size: 1.3rem;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: 0;
    font-size: 0.65rem;
    padding: 2px 5px;
}

.notification-dropdown-menu {
    min-width: 300px;
    max-height: 600px;
    overflow-y: auto;
}

.notification-item {
    cursor: pointer;
    transition: background-color 0.2s;
}

.notification-item:hover {
    background-color: #f8f9fa;
}

.empty-chat {
    text-align: center;
    color: #667781;
}

.empty-chat i {
    font-size: 5rem;
    opacity: 0.3;
}

@media (max-width: 768px) {
    .notification-dropdown-menu {
        min-width: 200px;
    }

    .main-container {
        display: flex;
        height: 650px;
    }

    .users-sidebar {
        width: 100%;
        border-right: none;
    }

    .chat-area {
        display: none;
    }
}
/* Index Chat */

/* Chat */
.users-sidebar {
    width: 350px;
    border-right: 1px solid #ddd;
    background-color: white;
    overflow-y: auto;
}

.user-list-item {
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #e9ecef;
    padding: 15px;
}

.user-list-item:hover {
    background-color: #f8f9fa;
}

.user-list-item.active {
    background-color: #e9ecef;
}

.unread-badge {
    font-size: 0.75rem;
}

.notification-icon {
    position: relative;
    cursor: pointer;
    font-size: 1.3rem;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    font-size: 0.65rem;
    padding: 2px 5px;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: white;
}

.chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 15px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background-color: #e5ddd5;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QTBENzI3RjYzOTM4MTFFNDg3NzhEMjIzMTBFMzRGMTgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QTBENzI3RjczOTM4MTFFNDg3NzhEMjIzMTBFMzRGMTgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBMEQ3MjdGNDM5MzgxMUU0ODc3OEQyMjMxMEUzNEYxOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBMEQ3MjdGNTM5MzgxMUU0ODc3OEQyMjMxMEUzNEYxOCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pjjxp3UAAAA1SURBVHjaYvz//z8DsQAggJiQOYyMjEwgGoQZQRQMDAwMTCAKhAECDABBgAEAIMAAQIABACQaAwc47VRXAAAAAElFTkSuQmCC');
}

.date-divider {
    text-align: center;
    margin: 20px 0;
}

.date-badge {
    display: inline-block;
    background-color: rgba(225, 245, 254, 0.92);
    color: #667781;
    padding: 5px 12px;
    border-radius: 7.5px;
    font-size: 0.75rem;
    box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13);
}

.message-bubble {
    max-width: 65%;
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 7.5px;
    position: relative;
    word-wrap: break-word;
}

.message-sent {
    background-color: #dcf8c6;
    margin-left: auto;
    border-bottom-right-radius: 0;
}

.message-received {
    background-color: white;
    margin-right: auto;
    border-bottom-left-radius: 0;
}

.message-time {
    font-size: 0.7rem;
    color: #667781;
    margin-top: 2px;
    text-align: right;
}

.message-image {
    max-width: 250px;
    max-height: 250px;
    border-radius: 5px;
    cursor: pointer;
    display: block;
}

.chat-input {
    background-color: #f0f0f0;
    padding: 10px;
    border-top: 1px solid #ddd;
}

.loading-more {
    text-align: center;
    padding: 10px;
    color: #667781;
    font-size: 0.9rem;
}

#message-input {
    border-radius: 21px;
    border: none;
    padding: 10px 15px;
}

.btn-send {
    border-radius: 50%;
    width: 42px;
    height: 42px;
    padding: 0;
}

.btn-image {
    border-radius: 50%;
    width: 42px;
    height: 42px;
    padding: 0;
    background-color: transparent;
    border: none;
    color: #54656f;
}

.btn-image:hover {
    background-color: #f0f0f0;
}

.selected-image-name {
    font-size: 0.85rem;
    color: #667781;
    margin-top: 5px;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

@media (max-width: 768px) {
    .users-sidebar {
        border-right: none;
    }

    .users-sidebar.show-mobile {
        display: block;
    }

    .chat-container {
        width: 100%;
    }

    .chat-container.hide-mobile {
        display: none;
    }

    .mobile-back-btn {
        display: inline-block !important;
    }
}

.mobile-back-btn {
    display: none;
}
/* Chat */

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

@media (min-width: 768px) {
    h2 {
        font-size: 1.3rem;
    }

    h4 {
        font-size: 1.3rem;
    }
}

@media (max-width: 576px) {
    .login-card {
        margin: 0;
    }

    .login-header {
        padding: 1.5rem;
    }

    .login-header i {
        font-size: 2rem;
    }
}

@media (max-width: 440px) {
    .sales-report-badge {
        margin-bottom: .2rem;
    }
}