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

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #ddd;
    flex-wrap: wrap;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    background: #f0f0f0;
    border: none;
    border-radius: 5px 5px 0 0;
    font-size: 16px;
}

.tab.active {
    background: var(--lp-primary);
    color: white;
}

.tab-content {
    display: none;
    min-height: 500px;
}

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

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.btn {
    padding: 10px 20px;
    background: var(--lp-primary);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.btn:hover {
    background: var(--lp-primary-hover);
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-small {
    padding: 5px 10px;
    font-size: 12px;
}

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

.btn-danger:hover {
    background: #c82333;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
}

.btn-warning {
    background: var(--lp-warning);
    color: #000;
}

.btn-warning:hover {
    background: #e0a800;
}

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

.btn-success:hover {
    background: #218838;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background: #f8f9fa;
    font-weight: bold;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-paused {
    background: #fff3cd;
    color: #856404;
}

.status-stopped {
    background: #f8d7da;
    color: #721c24;
}

.loading {
    display: inline-block;
    margin-left: 10px;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--lp-primary);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

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

.message {
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
}

.message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-content.large {
    max-width: 1200px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.logs-container {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    max-height: 400px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 12px;
}

.log-entry {
    padding: 5px 0;
    border-bottom: 1px solid #ddd;
}

.log-time {
    color: #6c757d;
}

.log-level-INFO {
    color: var(--lp-primary);
}

.log-level-WARNING {
    color: var(--lp-warning);
}

.log-level-ERROR {
    color: var(--lp-danger);
}

.example-prompts {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-top: 10px;
}

.example-prompts h4 {
    margin-top: 0;
}

.example-prompt {
    padding: 8px;
    margin: 5px 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
}

.example-prompt:hover {
    background: #e9ecef;
}

.analysis-result {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin-top: 20px;
    white-space: pre-wrap;
    line-height: 1.6;
}

.header-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    flex: 1;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: var(--lp-primary);
}

.stat-label {
    color: #6c757d;
    margin-top: 5px;
}

.chat-conversation {
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.chat-message {
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
    background: #f8f9fa;
}

.chat-message.user-message {
    background: #e3f2fd;
    border-left: 4px solid var(--lp-primary);
}

.chat-message.ai-message {
    background: #f8f9fa;
    border-left: 4px solid var(--lp-success);
}

.chat-message h4 {
    margin-top: 0;
    color: #495057;
    font-size: 14px;
    font-weight: bold;
}

.chat-message-content {
    margin-top: 10px;
    line-height: 1.6;
}

.chat-message-content h1,
.chat-message-content h2,
.chat-message-content h3 {
    margin-top: 15px;
    margin-bottom: 10px;
}

.chat-message-content ul,
.chat-message-content ol {
    margin-left: 20px;
}

.chat-message-content code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
}

.chat-message-content pre {
    background: #f4f4f4;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
}

.chat-input-area {
    margin-top: 20px;
    border-top: 1px solid #ddd;
    padding-top: 20px;
}

.analysis-meta {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

/* Responsive Design for Mobile */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }

    .header-stats {
        flex-direction: column;
        gap: 10px;
    }

    .stat-card {
        padding: 10px;
    }

    .stat-value {
        font-size: 24px;
    }

    .tabs {
        gap: 5px;
    }

    .tab {
        padding: 8px 12px;
        font-size: 14px;
        flex: 1;
        min-width: 80px;
    }

    table {
        font-size: 12px;
    }

    table th,
    table td {
        padding: 8px 4px;
    }

    /* Make tables scrollable on mobile */
    .tab-content {
        overflow-x: auto;
    }

    table {
        min-width: 600px;
    }

    .modal-content {
        width: 95%;
        padding: 15px;
        max-height: 90vh;
    }

    .modal-content.large {
        width: 95%;
    }

    .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    .btn-small {
        width: auto;
        display: inline-block;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 20px;
    }

    .stat-value {
        font-size: 20px;
    }

    .tab {
        padding: 6px 8px;
        font-size: 12px;
    }

    table {
        font-size: 11px;
    }

    table th,
    table td {
        padding: 6px 2px;
    }
}
