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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
.dashboard-header {
    background: white;
    padding: 20px 30px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-header h1 {
    font-size: 24px;
    color: #667eea;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fbbf24;
    animation: pulse 2s infinite;
}

.status-dot.connected {
    background: #10b981;
}

.status-dot.disconnected {
    background: #ef4444;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.status-text {
    font-size: 14px;
    color: #6b7280;
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

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

.stat-icon {
    font-size: 48px;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    font-size: 14px;
    color: #6b7280;
    margin-top: 5px;
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 20px;
}

/* Chat Section */
.chat-section {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    padding: 25px;
}

.chat-section h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 20px;
}

.chat-container {
    max-height: 600px;
    overflow-y: auto;
}

.chat-message {
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 10px;
    border-right: 4px solid;
}

.chat-message.customer {
    background: #f3f4f6;
    border-right-color: #6b7280;
}

.chat-message.bot {
    background: #ecfdf5;
    border-right-color: #10b981;
}

.chat-message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.chat-customer-info {
    font-weight: bold;
    color: #111827;
}

.chat-timestamp {
    font-size: 12px;
    color: #9ca3af;
}

.chat-message-text {
    color: #374151;
    line-height: 1.5;
}

.chat-intent {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 12px;
    background: #667eea;
    color: white;
    border-radius: 12px;
    font-size: 11px;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.customers-section,
.interventions-section {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.customers-section h3,
.interventions-section h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 16px;
}

.customers-list,
.interventions-list {
    max-height: 300px;
    overflow-y: auto;
}

.customer-item,
.intervention-item {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background 0.2s;
}

.customer-item:hover,
.intervention-item:hover {
    background: #f9fafb;
}

.customer-item:last-child,
.intervention-item:last-child {
    border-bottom: none;
}

.customer-name {
    font-weight: bold;
    color: #111827;
    margin-bottom: 4px;
}

.customer-phone {
    font-size: 12px;
    color: #6b7280;
}

.customer-type {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    background: #667eea;
    color: white;
    border-radius: 8px;
    font-size: 10px;
}

.customer-type.vip {
    background: #f59e0b;
}

.empty-state {
    text-align: center;
    color: #9ca3af;
    padding: 40px 20px;
    font-size: 14px;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5568d3;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .stats-section {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .stats-section {
        grid-template-columns: 1fr;
    }

    body {
        padding: 10px;
    }
}