* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f0f2f5;
}

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

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #666;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.login-btn:hover {
    background: #5a67d8;
}

.admin-link {
    text-align: center;
    margin-top: 20px;
}

.admin-link a {
    color: #667eea;
    text-decoration: none;
}

/* Chat Layout */
.chat-container {
    display: flex;
    height: 100vh;
    background: white;
}

/* Sidebar */
.sidebar {
    width: 300px;
    background: #f8f9fa;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
}

.sidebar-header h3 {
    color: #075e54;
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.logout-btn {
    padding: 5px 10px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.user-list {
    flex: 1;
    overflow-y: auto;
}

.user-item, .admin-item {
    display: flex;
    align-items: center;
    padding: 15px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #e0e0e0;
}

.user-item:hover, .admin-item:hover {
    background: #f0f2f5;
}

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

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #075e54;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    margin-right: 15px;
}

.user-details {
    flex: 1;
}

.user-details h4 {
    margin-bottom: 5px;
    color: #333;
}

.user-details p {
    font-size: 12px;
    color: #666;
}

.message-preview {
    font-size: 12px;
    color: #888;
}

.unread-badge {
    background: #25d366;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    margin-left: 10px;
}

/* Chat Area */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 20px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
}

.chat-header h3 {
    color: #075e54;
}

.typing-indicator {
    font-size: 12px;
    color: #25d366;
    margin-top: 5px;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #e5ddd5;
    display: flex;
    flex-direction: column;
}

.message {
    max-width: 60%;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 10px;
    position: relative;
}

.message.sent {
    background: #dcf8c6;
    align-self: flex-end;
}

.message.received {
    background: white;
    align-self: flex-start;
}

.message-content {
    word-wrap: break-word;
}

.message img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 5px;
    margin-top: 5px;
}

.message-time {
    font-size: 10px;
    color: #888;
    margin-top: 5px;
    text-align: right;
}

.message-status {
    font-size: 10px;
    color: #25d366;
    margin-left: 5px;
}

/* Message Input Area */
.message-input-area {
    display: flex;
    padding: 20px;
    background: #f0f2f5;
    border-top: 1px solid #e0e0e0;
}

.message-input-area input[type="text"] {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    margin: 0 10px;
    font-size: 14px;
}

.image-btn, .send-btn {
    padding: 10px 20px;
    background: #075e54;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s;
}

.image-btn:hover, .send-btn:hover {
    background: #064e44;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}