
/* ===== Style.css ===== */
:root {
    --primary: #25D366;
    --primary-dark: #128C7E;
    --primary-light: #DCF8C6;
    --secondary: #667781;
    --dark: #1F2C34;
    --darker: #111B21;
    --light: #FFFFFF;
    --gray-light: #F0F2F5;
    --gray: #A0A0A0;
    --danger: #EA4335;
    --warning: #FBBC05;
    --success: #34A853;
    --info: #4285F4;
    
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--darker);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

h1 {
    font-size: 1.75rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

small {
    font-size: 0.875rem;
    color: var(--gray);
}

/* ===== LAYOUT ===== */
.app-container {
    display: flex;
    min-height: 100vh;
}
.product-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    margin: 12px 0;
    border-left: 4px solid #007bff;
}

.product-name {
    font-weight: 500;
    margin-bottom: 4px;
}

.product-url {
    font-size: 0.9em;
}

.product-url a {
    color: #007bff;
    text-decoration: none;
    word-break: break-all;
}

.product-url a:hover {
    text-decoration: underline;
}
.product-input-group {
    margin-bottom: 12px;
}

#campaignProductsList {
    max-height: 300px;
    overflow-y: auto;
}

#campaignProductsList:empty::before {
    content: 'No products added yet';
    color: #888;
    font-style: italic;
    display: block;
    padding: 12px;
    text-align: center;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
}

.product-item {
    background: rgba(255,255,255,0.05);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.product-item:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(37, 211, 102, 0.3);
}

.product-item h4 {
    margin: 0 0 8px 0;
    color: #25d366;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-item a {
    color: #4fc3f7;
    text-decoration: none;
    word-break: break-all;
    font-size: 14px;
}

.product-item a:hover {
    text-decoration: underline;
}

.btn-icon {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: rgba(244, 67, 54, 0.4);
    transform: scale(1.05);
}

/* Campaign Products Display in Cards */
.campaign-products {
    background: rgba(255,255,255,0.03);
    padding: 12px;
    border-radius: 8px;
    margin-top: 12px;
    margin-bottom: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}

.campaign-products h4 {
    margin: 0 0 8px 0;
    color: #4fc3f7;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.campaign-products .product-preview {
    font-size: 13px;
    padding: 6px;
    background: rgba(255,255,255,0.02);
    border-radius: 4px;
    margin-bottom: 4px;
}

.campaign-products .product-preview:last-child {
    margin-bottom: 0;
}
/* ===== SIDEBAR ===== */
.sidebar {
    width: 250px;
    background-color: #1f1f1f;
    color: #fff;
    height: 100vh;
    padding: 16px;
    box-sizing: border-box;
}

.sidebar-header {
    display: flex;
    justify-content: center; /* center horizontally */
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo-container {
    display: flex;
    flex-direction: column; /* stack vertically */
    align-items: center; /* center items horizontally */
    gap: 8px; /* space between logo and text */
}

.logo-icon img {
    width: 100px; /* larger logo on top */
    height: 100px;
    object-fit: contain;
}

.csv-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.pagination-info {
    font-size: 0.9rem;
    color: #666;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pagination-page {
    font-weight: 600;
    padding: 0 1rem;
}

.pagination-rows {
    font-size: 0.9rem;
}

.pagination-rows select {
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 0.25rem;
    background: white;
}

.csv-preview table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: rgb(44, 44, 44);
}

.csv-preview th {
    background: #25d366;
    color: white;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.csv-preview td {
    padding: 0.75rem;
    border-bottom: 1px solid #3d3d3d;
}

.csv-preview tr:hover {
    background: #3f4041;
}
/* Queue Progress Styles */
.queue-controls {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
}

.control-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.stat-item {
    background: white;
    border-radius: 6px;
    padding: 10px 15px;
    margin: 5px;
    border: 1px solid #e9ecef;
    display: inline-block;
    min-width: 120px;
    text-align: center;
}

.stat-item.highlight {
    background: #e8f5e8;
    border-color: #28a745;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 4px;
}

.stat-value {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #212529;
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.activity-count {
    background: #6c757d;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.activity-list {
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 6px;
    background: white;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}

.activity-item.sent {
    border-left: 4px solid #17a2b8;
}

.activity-item.responded {
    border-left: 4px solid #28a745;
}

.activity-item.active {
    border-left: 4px solid #ffc107;
}

.activity-item.failed {
    border-left: 4px solid #dc3545;
}

.activity-item.completed {
    border-left: 4px solid #6f42c1;
}

.activity-icon {
    font-size: 20px;
    margin-right: 12px;
    width: 30px;
    text-align: center;
}

.activity-content {
    flex: 1;
}

.activity-name {
    font-weight: 500;
    color: #212529;
}

.activity-status {
    font-size: 12px;
    color: #6c757d;
}

.activity-time {
    font-size: 12px;
    color: #6c757d;
    white-space: nowrap;
}

.no-activity {
    text-align: center;
    padding: 30px;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px dashed #dee2e6;
}

.queue-stats-details table {
    margin-bottom: 0;
}

.queue-stats-details table tr td:first-child {
    width: 60%;
    font-weight: 500;
}

.queue-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    border: 1px solid #dee2e6;
}

.queue-info h6 {
    margin-bottom: 15px;
    color: #495057;
}

/* Progress bar */
#progressBar {
    transition: width 0.5s ease, background-color 0.5s ease;
    height: 20px;
    border-radius: 4px;
}

#progressBarContainer {
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}
.csv-preview {
    max-height: 600px;
    overflow-y: auto;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .csv-pagination {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pagination-controls {
        justify-content: center;
    }
    
    .pagination-info,
    .pagination-rows {
        text-align: center;
    }
    
    .csv-preview {
        overflow-x: auto;
    }
    
    .csv-preview table {
        min-width: 600px;
    }
}
.logo-text h1 {
    font-size: 1rem;
    margin: 0;
    color: #fff;
    text-align: center;
}


.logo-text p {
    font-size: 0.8rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--light);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    gap: 12px;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    background-color: rgba(37, 211, 102, 0.1);
    color: var(--primary);
    border-left: 3px solid var(--primary);
}

.nav-item i {
    width: 20px;
    text-align: center;
}

.badge {
    background-color: var(--primary);
    color: var(--light);
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.75rem;
    margin-left: auto;
}

.nav-divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 16px 20px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 0.875rem;
}

.connection-status i {
    color: var(--danger);
}

.connection-status.connected i {
    color: var(--success);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--darker);
}
#chatCampaignFilter {
    background-color: #fff;   /* White background */
    color: #000;              /* Black text */
    border: 1px solid #ccc;   /* Optional border */
    padding: 5px 10px;
    border-radius: 4px;
}
#bulkCampaignSelect {
    background-color: #fff;   /* White background */
    color: #000;              /* Black text */
    border: 1px solid #ccc;   /* Optional border */
    padding: 5px 10px;
    border-radius: 4px;
}

.content-view {
    display: none;
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.content-view.active {
    display: block;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.content-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: var(--radius);
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    outline: none;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 0.75rem;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--light);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--light);
}

.btn-secondary:hover {
    background-color: #5a6872;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-success {
    background-color: var(--success);
    color: var(--light);
}

.btn-success:hover {
    background-color: #2e8b47;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-danger {
    background-color: var(--danger);
    color: var(--light);
}

.btn-danger:hover {
    background-color: #d33426;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background-color: transparent;
    color: var(--light);
    border: 1px solid var(--secondary);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--light);
}

/* ===== MODALS ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background-color: var(--dark);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalFadeIn 0.3s ease;
}

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

.modal-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
}

.close-btn {
    background: none;
    border: none;
    color: var(--gray);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--light);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ===== QR MODAL ===== */
.qr-modal {
    max-width: 400px;
}

.qr-container {
    display: flex;
    justify-content: center;
    padding: 20px;
}

#qrcode {
    background-color: white;
    padding: 20px;
    border-radius: var(--radius);
}

.status {
    padding: 16px;
    text-align: center;
    border-radius: var(--radius);
    margin: 0 24px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.status.authenticating {
    background-color: rgba(251, 188, 5, 0.1);
    color: var(--warning);
}

.status.connected {
    background-color: rgba(52, 168, 83, 0.1);
    color: var(--success);
}

.status.error {
    background-color: rgba(234, 67, 53, 0.1);
    color: var(--danger);
}

.loading {
    animation: spin 1.5s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== FORM STYLES ===== */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

input, textarea, select {
    width: 100%;
    padding: 12px 16px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    color: var(--light);
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    transition: var(--transition);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.2);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
    margin-bottom: 0;
}

.checkbox-label input {
    width: auto;
}

/* ===== DASHBOARD ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background-color: var(--dark);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-content h3 {
    font-size: 2rem;
    margin-bottom: 4px;
}

.stat-content p {
    color: var(--gray);
    margin-bottom: 0;
}

.upload-section {
    background-color: var(--dark);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 16px;
}

.upload-area:hover {
    border-color: var(--primary);
    background-color: rgba(37, 211, 102, 0.05);
}

.upload-area i {
    font-size: 3rem;
    color: var(--gray);
    margin-bottom: 16px;
}

.upload-area p {
    font-weight: 500;
    margin-bottom: 8px;
}

.csv-preview table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.csv-preview th, .csv-preview td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    word-wrap: break-word;
}

.csv-preview th {
    background-color: rgba(255, 255, 255, 0.1);
}

.csv-preview tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.02);
}

.pagination-btn {
    padding: 5px 10px;
    margin: 0 2px;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.pagination-btn.active {
    background-color: rgba(255, 255, 255, 0.3);
    font-weight: bold;
}
/* Chat Input Wrapper */
.chat-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-input-actions {
    display: flex;
    gap: 8px;
}

.chat-input-main {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.chat-input-main textarea {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    resize: none;
    max-height: 120px;
    overflow-y: auto;
}

.btn-send {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-send:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.btn-send:active {
    transform: scale(0.95);
}

.btn-send i {
    font-size: 18px;
}

.media-preview {
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.media-preview-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

/* ===== CAMPAIGNS ===== */
.campaigns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.campaign-card {
    background-color: var(--dark);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.campaign-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.campaign-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.campaign-title {
    font-size: 1.125rem;
    margin-bottom: 8px;
}

.campaign-description {
    color: var(--gray);
    font-size: 0.875rem;
    margin-bottom: 16px;
}

.campaign-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-item {
    flex: 1 1 120px;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 16px;
    border-radius: var(--radius, 8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: transform 0.2s, background-color 0.2s;
    cursor: default;
}

.stat-item:hover {
    transform: translateY(-3px);
    background-color: rgba(255, 255, 255, 0.1);
}

.stat-item i {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--primary, #4caf50);
}

.stat-value {
    font-weight: 600;
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--gray, #aaa);
}

.campaign-stat {
    display: flex;
    flex-direction: column;
}

.campaign-stat-value {
    font-weight: 600;
    font-size: 1.25rem;
}

.campaign-stat-label {
    font-size: 0.75rem;
    color: var(--gray);
}

.campaign-actions {
    display: flex;
    gap: 8px;
}

.poll-config-section {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 16px;
}

.poll-options-container {
    margin-bottom: 16px;
}

.poll-option-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.poll-option-item input {
    flex: 1;
}

.poll-responses-section {
    margin-top: 16px;
}
.poll-response-group {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background: #f9f9f9;
}

.poll-response-group h4 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.poll-response-group .form-group {
    margin-bottom: 10px;
}

.poll-response-group .form-group:last-child {
    margin-bottom: 0;
}

.poll-response-group label {
    font-weight: 500;
    color: #555;
    font-size: 13px;
    margin-bottom: 5px;
    display: block;
}
.campaign-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.campaign-badge.no-campaign {
    background: #6c757d;
}

.campaign-badge i {
    font-size: 10px;
}

.chat-item {
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.chat-item:hover {
    border-left-color: #25d366;
    background-color: #f8f9fa;
}

.chat-item.active {
    border-left-color: #25d366;
    background-color: #e8f5e8;
}

/* Update the empty state styling */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #dee2e6;
}

.empty-state h3 {
    margin-bottom: 8px;
    color: #495057;
}

.empty-state p {
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Header actions styling */
.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.header-actions select {
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

.header-actions .btn-outline {
    background: transparent;
    border: 1px solid #25d366;
    color: #25d366;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.header-actions .btn-outline:hover {
    background: #25d366;
    color: white;
}
.poll-response-group textarea {
    width: 100%;
    color: #555;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
    min-height: 60px;
}

.poll-response-group textarea:focus {
    border-color: #25d366;
    outline: none;
}
.info-text {
    background-color: rgba(66, 133, 244, 0.1);
    border-left: 3px solid var(--info);
    padding: 12px;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin-bottom: 16px;
    font-size: 0.875rem;
}

/* ===== CHATS ===== */
.chats-container {
    display: flex;
    height: calc(100vh - 180px);
    background-color: var(--dark);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.chats-list {
    width: 350px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
}

.chat-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: var(--transition);
}

.chat-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.chat-item.active {
    background-color: rgba(37, 211, 102, 0.1);
}

.chat-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-right: 12px;
}

.chat-info {
    flex: 1;
}

.chat-name {
    font-weight: 500;
    margin-bottom: 4px;
}

.chat-preview {
    font-size: 0.875rem;
    color: var(--gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-time {
    font-size: 0.75rem;
    color: var(--gray);
}

.chat-window {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
}

.chat-info .chat-status {
    font-size: 0.875rem;
    color: var(--gray);
}

.chat-actions {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: var(--radius);
    position: relative;
}

.message.received {
    background-color: rgba(255, 255, 255, 0.05);
    align-self: flex-start;
    border-top-left-radius: 0;
}

.message.sent {
    background-color: rgba(37, 211, 102, 0.2);
    align-self: flex-end;
    border-top-right-radius: 0;
}

.message-time {
    font-size: 0.75rem;
    color: var(--gray);
    text-align: right;
    margin-top: 4px;
}

.empty-chat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--gray);
}

.empty-chat i {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.chat-input {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 12px;
}

.input-container {
    flex: 1;
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 8px 16px;
}

#chatInput {
    background: none;
    border: none;
    resize: none;
    padding: 0;
}

.send-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--primary);
    border: none;
    color: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.send-btn:hover {
    background-color: var(--primary-dark);
    transform: scale(1.05);
}

/* ===== CONTACTS ===== */
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.contact-card {
    background-color: var(--dark);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 16px;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.contact-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.contact-info {
    flex: 1;
}

.contact-name {
    font-weight: 500;
    margin-bottom: 4px;
}

.contact-phone {
    color: var(--gray);
    font-size: 0.875rem;
}

/* ===== SEARCH BOX ===== */
.search-box {
    position: relative;
    width: 300px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

.search-box input {
    padding-left: 40px;
}

/* ===== PROGRESS BAR ===== */
.progress-container {
    margin-top: 20px;
}

.progress-bar {
    height: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--success));
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 0.875rem;
    margin-bottom: 4px;
}

.progress-stats {
    font-size: 0.75rem;
    color: var(--gray);
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background-color: var(--dark);
    color: var(--light);
    padding: 16px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 350px;
    animation: toastSlideIn 0.3s ease;
    border-left: 4px solid var(--primary);
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.warning {
    border-left-color: var(--warning);
}

.toast.info {
    border-left-color: var(--info);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== EMPTY STATES ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 12px;
    color: var(--light);
}

.empty-state p {
    margin-bottom: 24px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
    }
    
    .logo-text, .nav-item span, .badge {
        display: none;
    }
    
    .logo-container {
        justify-content: center;
    }
    
    .nav-item {
        justify-content: center;
        padding: 16px;
    }
    
    .sidebar-footer .btn-sm span {
        display: none;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
    }
    
    .sidebar-nav {
        display: flex;
        padding: 0;
        overflow-x: auto;
    }
    
    .nav-item {
        flex-direction: column;
        padding: 12px;
        min-width: 80px;
    }
    
    .nav-divider {
        display: none;
    }
    
    .sidebar-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .chats-container {
        flex-direction: column;
        height: auto;
    }
    
    .chats-list {
        width: 100%;
        height: 300px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .campaigns-grid, .contacts-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 10px;
        width: calc(100% - 20px);
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .content-view {
        padding: 16px;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .modal-body, .modal-header, .modal-footer {
        padding: 16px;
    }
    
    .message {
        max-width: 85%;
    }
}
/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #e5ddd5;
}

.chat-message {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
    max-width: 70%;
    animation: messageSlide 0.3s ease;
    position: relative;
    padding-top: 24px;
}

.chat-message.sent {
    align-self: flex-end;
    margin-left: auto;
}

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

.role-badge {
    position: absolute;
    top: 2px;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.role-badge i {
    font-size: 10px;
}

.role-bot {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    left: 8px;
}

.role-user {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    left: 8px;
}

.message-content {
    padding: 10px 14px;
    border-radius: 8px;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
}

.chat-message.sent .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 2px;
}

.chat-message.received .message-content {
    background: white;
    color: #333;
    border-bottom-left-radius: 2px;
}

.poll-vote-message {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%) !important;
    color: white !important;
    font-weight: 600;
    border-left: 4px solid #ff6b6b;
}

.audio-message {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%) !important;
    color: #333 !important;
    border-left: 4px solid #667eea;
}

.transcription-badge {
    display: inline-block;
    font-size: 10px;
    padding: 2px 6px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    margin-left: 6px;
}

.message-content i {
    margin-right: 6px;
}

.message-time {
    font-size: 11px;
    margin-top: 4px;
    opacity: 0.7;
    display: flex;
    align-items: center;
    gap: 4px;
}

.chat-message.sent .message-time {
    align-self: flex-end;
    color: #667eea;
}

.chat-message.received .message-time {
    align-self: flex-start;
    color: #666;
}