body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f7f7f7;
}

.container {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 300px;
    background: #222;
    color: white;
    padding: 15px;
    overflow-y: auto;
}

.sidebar h2 {
    margin-top: 0;
}

.contact {
    padding: 12px;
    background: #333;
    margin-bottom: 10px;
    border-radius: 5px;
    cursor: pointer;
}

.contact:hover {
    background: #444;
}

.chat {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#contactName {
    background: #eee;
    padding: 15px;
    margin: 0;
}

.messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: white;
}

.message {
    padding: 8px 12px;
    margin-bottom: 10px;
    border-radius: 5px;
    max-width: 70%;
}

.message.sent {
    background: #d1ffd1;
    margin-left: auto;
}

.message.received {
    background: #f1f1f1;
}

.inputBox {
    display: flex;
    padding: 10px;
    background: #ddd;
}

#messageInput {
    flex: 1;
    padding: 10px;
}

#sendBtn {
    padding: 10px 20px;
    margin-left: 10px;
    cursor: pointer;
}

/* Bulk SMS Styles */
.bulk-sms-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #444;
}

.bulk-sms-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

.upload-area {
    margin-bottom: 15px;
}

.upload-btn {
    padding: 8px 15px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 5px;
}

.upload-btn:hover {
    background: #45a049;
}

.file-name {
    display: block;
    font-size: 12px;
    color: #aaa;
    margin-top: 5px;
}

#messageTemplate {
    width: 100%;
    min-height: 80px;
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #555;
    background: #333;
    color: white;
    font-family: Arial, sans-serif;
    resize: vertical;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.send-bulk-btn {
    width: 100%;
    padding: 10px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.send-bulk-btn:hover:not(:disabled) {
    background: #0b7dda;
}

.send-bulk-btn:disabled {
    background: #666;
    cursor: not-allowed;
}

.bulk-progress {
    margin-top: 15px;
    padding: 10px;
    background: #333;
    border-radius: 5px;
}

.progress-bar-container {
    width: 100%;
    height: 20px;
    background: #555;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 10px;
}

.bulk-results {
    max-height: 200px;
    overflow-y: auto;
    font-size: 11px;
}

.bulk-result-item {
    padding: 5px;
    margin-bottom: 5px;
    background: #444;
    border-radius: 3px;
    border-left: 3px solid #666;
}

.bulk-result-item.success {
    border-left-color: #4CAF50;
}

.bulk-result-item.failed {
    border-left-color: #f44336;
}

.status-success {
    color: #4CAF50;
}

.status-failed {
    color: #f44336;
}

.error-text {
    font-size: 10px;
    color: #ff6b6b;
    margin-top: 3px;
}