:root {
    --primary-color: #4a90e2;
    --secondary-color: #50c878;
    --dark-color: #34495e;
    --light-color: #f8f9fa;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
}

/* Login/Register styles */
.login-container, .register-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

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

.login-box h1, .register-box h1 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 0.5rem;
}

.login-box h2, .register-box h2 {
    color: var(--dark-color);
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

/* Dashboard styles */
.dashboard-container {
    display: flex;
}

.sidebar {
    width: 250px;
    background-color: var(--dark-color);
    color: white;
    padding: 1rem;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
}

.sidebar .logo {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.sidebar nav ul {
    list-style: none;
    padding: 0;
}

.sidebar nav ul li {
    margin-bottom: 0.5rem;
}

.sidebar nav ul li a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.sidebar nav ul li a:hover,
.sidebar nav ul li.active a {
    background-color: rgba(255, 255, 255, 0.1);
}

.main-content {
    flex: 1;
    padding: 2rem;
    margin-left: 250px; /* Match sidebar width */
}

.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.widget {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.widget h3 {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    margin: 0;
    font-size: 1.1rem;
}

.widget-content {
    padding: 1rem;
}

/* Conversation-specific styles */
.conversation-status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.conversation-status-draft {
    background: #e3f2fd;
    color: #1976d2;
}

.conversation-status-active {
    background: #e8f5e8;
    color: #2e7d32;
}

.conversation-status-paused {
    background: #fff3e0;
    color: #f57c00;
}

.conversation-status-completed {
    background: #f3e5f5;
    color: #7b1fa2;
}

.conversation-status-failed {
    background: #ffebee;
    color: #c62828;
}

.conversation-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.conversation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.conversation-progress {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.conversation-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    transition: width 0.5s ease;
}

.ai-indicator {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.message-timeline-item {
    display: flex;
    margin-bottom: 1rem;
    position: relative;
}

.message-timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 20px;
    top: 40px;
    bottom: -16px;
    width: 2px;
    background: #e0e0e0;
}

.message-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.message-icon.outbound {
    background: var(--primary-color);
    color: white;
}

.message-icon.inbound {
    background: var(--secondary-color);
    color: white;
}

.conversation-metric {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.conversation-metric-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    display: block;
}

.conversation-metric-label {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.25rem;
}

.form-wizard-step {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.form-wizard-step h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.btn-conversation-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-conversation-primary:hover {
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.conversation-filter-bar {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.response-rate-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.response-rate-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.response-rate-high {
    background: var(--secondary-color);
}

.response-rate-medium {
    background: #f57c00;
}

.response-rate-low {
    background: #c62828;
}

.conversation-table-responsive {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Animation classes */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-up {
    animation: slideInUp 0.3s ease-out;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(74, 144, 226, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(74, 144, 226, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(74, 144, 226, 0);
    }
}

.pulse-on-active {
    animation: pulse 2s infinite;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .conversation-card {
        padding: 1rem;
    }

    .conversation-metric {
        padding: 0.75rem;
    }

    .form-wizard-step {
        padding: 1.5rem;
    }

    .btn-conversation-primary {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}
