body {
    background: #f5f5f5;
    font-family: 'Arial', sans-serif;
}

.header {
    background: linear-gradient(45deg, #007bff, #00c4b4);
    color: white;
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.company-name {
    font-size: 1.5rem;
    font-weight: bold;
}

.logo {
    height: 40px;
}

.profile-photo {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.profile-photo:hover {
    transform: scale(1.1);
}

.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.gradient-card {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
    border-radius: 10px;
}

.gradient-green {
    background: linear-gradient(45deg, #28a745, #71c9ce);
}

.gradient-red {
    background: linear-gradient(45deg, #dc3545, #ff6b6b);
}

.gradient-yellow {
    background: linear-gradient(45deg, #ffc107, #f7d794);
}

.btn {
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

.table th {
    background: #f8f9fa;
    cursor: pointer;
    text-align: left;
}

.table-responsive {
    max-height: 400px;
    overflow-y: auto;
}

.table-responsive::-webkit-scrollbar {
    width: 8px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.chat-container {
    margin-top: 70px;
    height: calc(100vh - 70px);
}

.chat-system {
    height: 100%;
    background: #fff;
    border-radius: 0;
    box-shadow: none;
}

.chat-system .card-body {
    padding: 0;
    height: 100%;
}

.chat-header {
    background: #075e54;
    color: white;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.chat-box {
    border: none;
    border-radius: 0;
    padding: 10px;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    background: #ece5dd;
}

.chat-box.blue-gradient {
    background: linear-gradient(45deg, #007bff, #00c4b4);
}

.chat-box.green-gradient {
    background: linear-gradient(45deg, #28a745, #71c9ce);
}

.message {
    margin: 10px 0;
    padding: 8px 12px;
    border-radius: 7.5px;
    max-width: 70%;
    position: relative;
    animation: slideIn 0.3s ease;
}

.message.sent {
    background: linear-gradient(45deg, #dcf8c6, #b3e6a3);
    color: #000;
    margin-left: auto;
    margin-right: 10px;
}

.message.received {
    background: #fff;
    border: 1px solid #ddd;
    margin-right: auto;
    margin-left: 10px;
}

.message img {
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.message img:hover {
    transform: scale(1.1);
}

.message-info {
    font-size: 0.75rem;
    color: #666;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 5px;
}

.message-info .status {
    line-height: 1;
}

.typing-indicator {
    font-size: 0.9rem;
    color: #075e54;
    font-style: italic;
    padding: 5px 10px;
}

.chat-input {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 10px;
    z-index: 1000;
}

.chat-input .form-control {
    border-radius: 20px;
    border: none;
    background: #f0f0f0;
}

.chat-input .btn {
    border-radius: 20px;
}

.user-list {
    border-right: 1px solid #ddd;
    height: 100%;
}

.user-list-inner {
    max-height: calc(100vh - 150px);
    overflow-y: auto;
}

.user-list-inner::-webkit-scrollbar {
    width: 8px;
}

.user-list-inner::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.user-item {
    display: block;
    text-decoration: none;
    color: #333;
    transition: background 0.3s ease;
}

.user-item:hover {
    background: #f1f1f1;
}

.user-item.active {
    background: #e0e0e0;
}

.chat-area {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.back-button {
    color: white;
    text-decoration: none;
}

.back-button:hover {
    color: #ddd;
}

@media (max-width: 768px) {
    .company-name {
        display: none;
    }

    .navbar-nav {
        background: linear-gradient(45deg, #4dabf7, #74c0fc);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    .nav-link {
        padding: 10px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        color: white;
    }

    .nav-link:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    .container {
        padding: 10px;
    }

    .card {
        margin: 10px 0;
    }

    .form-control, .btn {
        font-size: 0.9rem;
    }

    .message {
        max-width: 90%;
    }

    .user-list {
        border-right: none;
        border-bottom: 1px solid #ddd;
        max-height: calc(100vh - 70px);
    }

    .chat-area {
        height: calc(100vh - 70px);
    }

    .chat-box {
        max-height: calc(100vh - 150px);
    }

    .chat-input {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        padding: 10px;
        z-index: 1000;
    }
}

@media (min-width: 769px) {
    .form-control, .btn {
        font-size: 1rem;
    }

    .navbar-nav {
        margin-left: auto;
    }

    .nav-item {
        margin-left: 10px;
    }

    .nav-link {
        color: white;
        padding: 5px 10px;
        border-radius: 5px;
        transition: background 0.3s ease;
    }

    .nav-link:hover {
        background: rgba(255, 255, 255, 0.2);
    }

    .dropdown-menu {
        background: #fff;
        border-radius: 5px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

    .dropdown-item {
        color: #333;
        transition: background 0.3s ease;
    }

    .dropdown-item:hover {
        background: #f1f1f1;
    }
}

.alert {
    border-radius: 5px;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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