/* ============================================
   PRODUCTIVITY STYLES - AI HỖ TRỢ CÔNG VIỆC
   MODERN UI DESIGN
============================================ */

/* Tab Navigation - Improved */
.tab-navigation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 18px 20px;
    z-index: 1000;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.tab-btn {
    padding: 13px 28px;
    border: 2px solid transparent;
    background: white;
    color: #667eea;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.tab-btn:hover::before {
    left: 100%;
}

.tab-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.3);
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 
        0 8px 25px rgba(102, 126, 234, 0.5),
        0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

/* Adjust body padding for fixed tab nav */
body {
    padding-top: 85px;
}

/* Section Cards - Enhanced Glass Morphism */
.section-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.5);
    animation: fadeIn 0.5s ease;
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
}

.section-card:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(102, 126, 234, 0.2);
}

.section-card h2 {
    margin: 0 0 25px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 26px;
    font-weight: 800;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, #667eea, #764ba2);
    border-image-slice: 1;
    padding-bottom: 12px;
    letter-spacing: -0.5px;
}

.hint {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Work State Card - Premium Design */
.work-state-card {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 25px 30px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-radius: 16px;
    border: 2px solid rgba(102, 126, 234, 0.15);
    transition: all 0.3s ease;
}

.work-state-card:hover {
    transform: translateX(5px);
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.state-icon {
    font-size: 64px;
    animation: bounce 2s infinite;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

.state-info {
    flex: 1;
}

.state-label {
    font-size: 13px;
    font-weight: 800;
    color: #667eea;
    letter-spacing: 1.5px;
    margin-bottom: 5px;
}

.state-message {
    font-size: 19px;
    color: #333;
    margin-top: 5px;
    font-weight: 600;
}

.focus-score {
    text-align: right;
    background: white;
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.score-label {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.score-value {
    font-size: 36px;
    font-weight: 900;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Pomodoro Timer */
.pomodoro-card {
    text-align: center;
    padding: 20px;
}

.pomodoro-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.pomodoro-status {
    font-weight: 700;
    font-size: 18px;
}

.pomodoro-count {
    background: #667eea;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
}

.pomodoro-time {
    font-size: 72px;
    font-weight: 700;
    color: #333;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
}

.pomodoro-progress {
    width: 100%;
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 5px;
    transition: width 1s linear;
}

.pomodoro-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.pomodoro-controls button {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.pomodoro-controls button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.pomodoro-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Work Notes */
.note-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.note-input-group input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.note-input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-primary {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.work-notes-container {
    max-height: 400px;
    overflow-y: auto;
}

.no-notes {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-style: italic;
}

.work-note-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.work-note-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

.note-emotion {
    font-size: 24px;
}

.note-time {
    flex: 1;
    font-size: 12px;
    color: #999;
}

.note-delete {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.note-delete:hover {
    opacity: 1;
    transform: scale(1.2);
}

.note-text {
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.5;
}

.note-footer {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
}

.note-focus {
    background: #667eea;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.6);
}

.stat-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.action-btn {
    flex: 1;
    min-width: 200px;
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.action-btn.danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.action-btn.danger:hover {
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

/* Export Button Disabled State */
.export-btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    transform: none !important;
    background: linear-gradient(135deg, #999 0%, #666 100%) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.export-btn:disabled:hover {
    transform: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

/* Emotion Chart */
.emotion-chart {
    padding: 10px 0;
}

.chart-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.chart-label {
    min-width: 150px;
    font-weight: 600;
    color: #333;
}

.chart-bar-bg {
    flex: 1;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
}

.chart-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    transition: width 0.5s ease;
}

.chart-value {
    min-width: 60px;
    text-align: right;
    font-weight: 700;
    color: #667eea;
}

/* Emotion Timeline */
.emotion-timeline {
    position: relative;
    padding-left: 30px;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
    padding-left: 20px;
}

.timeline-dot {
    position: absolute;
    left: -35px;
    top: 5px;
    width: 12px;
    height: 12px;
    background: #667eea;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #667eea;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -29px;
    top: 17px;
    width: 2px;
    height: calc(100% + 20px);
    background: #e0e0e0;
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-content {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.timeline-emoji {
    font-size: 28px;
}

.timeline-emotion {
    flex: 1;
    font-weight: 600;
    color: #333;
    text-transform: capitalize;
}

.timeline-score {
    font-size: 12px;
    background: #667eea;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
}

.timeline-time {
    font-size: 12px;
    color: #999;
}

/* Tips & Recommendations */
.recommendations {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tip-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.tip-card:hover {
    transform: translateX(10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tip-icon {
    font-size: 40px;
}

.tip-text {
    flex: 1;
    font-size: 16px;
    color: #333;
    line-height: 1.5;
}

/* Notifications */
.notification {
    position: fixed;
    top: 90px;
    right: 20px;
    min-width: 300px;
    max-width: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    padding: 20px;
    z-index: 10000;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.notification-header {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.notification-body {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.notification-success {
    border-left: 4px solid #4CAF50;
}

.notification-warning {
    border-left: 4px solid #FF9800;
}

.notification-info {
    border-left: 4px solid #2196F3;
}

.notification-error {
    border-left: 4px solid #F44336;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tab-navigation {
        flex-direction: column;
        gap: 5px;
        padding: 10px;
    }
    
    .tab-btn {
        width: 100%;
        padding: 10px 20px;
        font-size: 14px;
    }
    
    body {
        padding-top: 200px;
    }
    
    .work-state-card {
        flex-direction: column;
        text-align: center;
    }
    
    .focus-score {
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
    }
    
    .pomodoro-time {
        font-size: 48px;
    }
}

/* Scrollbar Styling */
.work-notes-container::-webkit-scrollbar {
    width: 8px;
}

.work-notes-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

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

.work-notes-container::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* Tab Content Animation */
.tab-content {
    animation: fadeIn 0.5s ease;
}

/* ============================================
   AI CHATBOT & ASSISTANT STYLES
============================================ */

/* Floating Chat Button */
.chat-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 28px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(102, 126, 234, 0.8);
}

/* Chat Panel */
.chat-panel {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 400px;
    height: 600px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    transform: translateY(800px);
    transition: transform 0.3s ease;
}

.chat-panel.show {
    transform: translateY(0);
}

.chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    margin: 0;
    font-size: 18px;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
}

.chat-message {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    animation: messageSlideIn 0.3s ease;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message-user {
    flex-direction: row-reverse;
}

.message-avatar {
    font-size: 32px;
    flex-shrink: 0;
}

.message-content {
    max-width: 70%;
}

.chat-message-user .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 18px 18px 0 18px;
    padding: 12px 18px;
}

.chat-message-bot .message-content {
    background: white;
    color: #333;
    border-radius: 18px 18px 18px 0;
    padding: 12px 18px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.message-text {
    font-size: 14px;
    line-height: 1.5;
}

.message-time {
    font-size: 10px;
    opacity: 0.7;
    margin-top: 5px;
}

.chat-input-area {
    padding: 15px;
    background: white;
    border-radius: 0 0 20px 20px;
    display: flex;
    gap: 10px;
    border-top: 1px solid #e0e0e0;
}

.chat-input-area input {
    flex: 1;
    padding: 12px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.chat-input-area input:focus {
    border-color: #667eea;
}

.btn-send, .btn-voice {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-send:hover, .btn-voice:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.6);
}

/* Alert Container */
.alert-container {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

/* AI Alerts */
.ai-alert {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideInRight 0.3s ease-out;
}

.ai-alert-high {
    border-left: 5px solid #F44336;
}

.ai-alert-medium {
    border-left: 5px solid #FF9800;
}

.ai-alert-low {
    border-left: 5px solid #2196F3;
}

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

.alert-icon {
    font-size: 28px;
}

.alert-title {
    flex: 1;
    font-weight: 700;
    font-size: 16px;
    color: #333;
}

.alert-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.alert-close:hover {
    background: #f0f0f0;
    color: #333;
}

.alert-message {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
}

.alert-actions {
    display: flex;
    gap: 10px;
}

.btn-dismiss, .btn-action {
    flex: 1;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-dismiss {
    background: #f0f0f0;
    color: #666;
}

.btn-dismiss:hover {
    background: #e0e0e0;
}

.btn-action {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.6);
}

/* AI Suggestions */
.ai-suggestion {
    background: linear-gradient(135deg, #FFF59D 0%, #FFE082 100%);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: slideInRight 0.3s ease-out;
    border-left: 5px solid #FFC107;
}

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

.suggestion-icon {
    font-size: 28px;
}

.suggestion-title {
    flex: 1;
    font-weight: 700;
    font-size: 16px;
    color: #333;
}

.suggestion-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.suggestion-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

.suggestion-message {
    font-size: 14px;
    color: #333;
    line-height: 1.6;
}

/* Break Screen */
.break-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.5s ease;
}

.break-content {
    text-align: center;
    color: white;
}

.break-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.break-content p {
    font-size: 24px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.break-timer {
    font-size: 96px;
    font-weight: 700;
    margin-bottom: 40px;
    font-family: 'Courier New', monospace;
}

.btn-end-break {
    padding: 15px 40px;
    border: 3px solid white;
    background: transparent;
    color: white;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-end-break:hover {
    background: white;
    color: #667eea;
}

/* Settings Grid */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
}

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

.setting-label strong {
    display: block;
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.setting-label p {
    font-size: 12px;
    color: #666;
    margin: 0;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Threshold Settings */
.threshold-settings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.threshold-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.threshold-item label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.threshold-item input {
    padding: 12px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.threshold-item input:focus {
    outline: none;
    border-color: #667eea;
}

/* Alert History */
.alert-history {
    max-height: 400px;
    overflow-y: auto;
}

.history-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 10px;
    border-left: 4px solid #2196F3;
}

.history-item.priority-high {
    border-left-color: #F44336;
}

.history-item.priority-medium {
    border-left-color: #FF9800;
}

.history-item.priority-low {
    border-left-color: #2196F3;
}

.history-time {
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

.history-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.history-message {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* Use Cases */
.use-cases {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.use-case-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 30px;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.use-case-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.use-case-icon {
    font-size: 64px;
    text-align: center;
    margin-bottom: 20px;
}

.use-case-card h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.use-case-card ul {
    list-style: none;
    padding: 0;
}

.use-case-card ul li {
    padding: 8px 0;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chat-panel {
        width: calc(100% - 20px);
        right: 10px;
        bottom: 80px;
        height: 500px;
    }
    
    .alert-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .use-cases {
        grid-template-columns: 1fr;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .threshold-settings {
        grid-template-columns: 1fr;
    }
}
