
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

.login-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: #25D366;
}

.logo i {
    font-size: 2.5rem;
    margin-right: 10px;
}

.logo h1 {
    font-size: 1.8rem;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.login-form input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.login-form input:focus {
    outline: none;
    border-color: #25D366;
}

.btn-primary {
    background-color: #25D366;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #1da851;
}

.btn-primary i {
    margin-right: 8px;
}

.login-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
}

.admin-link a {
    color: #25D366;
    text-decoration: none;
    font-weight: 500;
}

/* Chat Container */
.chat-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 350px;
    background-color: white;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-profile {
    display: flex;
    align-items: center;
}

.avatar {
    width: 50px;
    height: 50px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    margin-right: 15px;
}

.user-info h3 {
    font-size: 1.1rem;
    margin-bottom: 3px;
}

.user-info p {
    font-size: 0.85rem;
    color: #666;
}

.sidebar-actions button {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
    margin-left: 10px;
}

.sidebar-actions button:hover {
    color: #25D366;
}

.search-container {
    padding: 15px;
    position: relative;
}

.search-container input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 0.9rem;
    background-color: #f0f2f5;
}

.search-container i {
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.contacts-list {
    flex: 1;
    overflow-y: auto;
}

.list-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
}

.list-header h3 {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
}

.badge {
    background-color: #25D366;
    color: white;
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 10px;
}

.contact {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.contact:hover {
    background-color: #f5f5f5;
}

.contact.active {
    background-color: #e8f5e9;
}

.contact-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: #666;
    font-size: 1.2rem;
}

.contact-info {
    flex: 1;
}

.contact-info h4 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.last-message {
    font-size: 0.85rem;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.contact-time {
    font-size: 0.75rem;
    color: #999;
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 15px 20px;
    background-color: white;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-partner {
    display: flex;
    align-items: center;
}

.partner-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    margin-right: 15px;
}

.partner-info h3 {
    font-size: 1.1rem;
    margin-bottom: 3px;
}

.partner-info p {
    font-size: 0.85rem;
    color: #666;
}

.chat-actions button {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
    margin-left: 15px;
}

.chat-actions button:hover {
    color: #25D366;
}

.messages-container {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #efeae2;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23000000' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
}

.message-input-container {
    padding: 15px 20px;
    background-color: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
}

.input-actions {
    display: flex;
}

.input-actions button {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
    margin-right: 15px;
}

.input-actions button:hover {
    color: #25D366;
}

.message-input-container input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 1rem;
    margin-right: 15px;
}

.message-input-container input:focus {
    outline: none;
    border-color: #25D366;
}

.send-btn {
    background-color: #25D366;
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
}

.send-btn:hover {
    background-color: #1da851;
}

/* Pesan */
.message {
    margin-bottom: 15px;
    max-width: 70%;
    display: flex;
    flex-direction: column;
}

.message.sent {
    align-self: flex-end;
}

.message.received {
    align-self: flex-start;
}

.message-content {
    padding: 10px 15px;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
}

.message.sent .message-content {
    background-color: #DCF8C6;
    border-bottom-right-radius: 5px;
}

.message.received .message-content {
    background-color: white;
    border-bottom-left-radius: 5px;
}

.message-sender {
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 3px;
    color: #555;
}

.message-text {
    font-size: 0.95rem;
}

.message-time {
    font-size: 0.7rem;
    color: #999;
    text-align: right;
    margin-top: 5px;
}

.welcome-message {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    max-width: 80%;
    margin: 0 auto 30px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.welcome-message h3 {
    color: #25D366;
    margin-bottom: 10px;
}

.welcome-message p {
    margin-bottom: 10px;
    color: #666;
}

.welcome-message .timestamp {
    font-size: 0.85rem;
    color: #999;
    font-style: italic;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-content.wide-modal {
    max-width: 800px;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.2rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-secondary {
    background-color: #f0f2f5;
    color: #333;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-secondary:hover {
    background-color: #e4e6e9;
}

/* Group Info */
.group-info-header {
    text-align: center;
    margin-bottom: 30px;
}

.group-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    margin: 0 auto 15px;
}

.group-members h5 {
    margin-bottom: 15px;
    color: #666;
}

.member-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-weight: bold;
    color: #666;
}

.member-name {
    flex: 1;
}

.member-role {
    font-size: 0.8rem;
    color: #999;
    background-color: #f0f0f0;
    padding: 3px 8px;
    border-radius: 10px;
}

/* Notifikasi */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 5px;
    color: white;
    font-weight: 500;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    display: none;
}

.notification.success {
    background-color: #25D366;
}

.notification.error {
    background-color: #ff4444;
}

.notification.info {
    background-color: #2196F3;
}

/* Online Members */
.online-member {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
}

.online-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #25D366;
    margin-right: 10px;
}

/* Responsif */
@media (max-width: 768px) {
    .chat-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: 30vh;
    }
    
    .chat-area {
        height: 70vh;
    }
    
    .login-container {
        margin: 20px;
        padding: 20px;
    }
}