/* Security Testing Dashboard Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

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

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.header h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 5px;
}

.subtitle {
    color: #666;
    font-size: 14px;
}

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

/* Warning Banner */
.warning-banner {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 30px;
    color: #856404;
}

/* Configuration Section */
.config-section {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.config-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.config-item {
    display: flex;
    flex-direction: column;
}

.config-item label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.config-item input[type="url"],
.config-item input[type="number"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.config-item small {
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.config-item input[type="checkbox"] {
    margin-right: 8px;
}

/* Modules Section */
.modules-section {
    margin-top: 30px;
}

.modules-section h3 {
    margin-bottom: 15px;
    color: #333;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.module-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.module-card:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.module-card.selected {
    border-color: #667eea;
    background: #e8ebff;
}

.module-card input[type="checkbox"] {
    margin-right: 10px;
}

.module-card label {
    cursor: pointer;
    display: flex;
    align-items: center;
    font-weight: 600;
    margin-bottom: 5px;
}

.module-card p {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

/* Actions */
.actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

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

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #c82333;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Test Status */
.test-status {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.test-progress {
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s;
}

.progress-text {
    text-align: center;
    color: #666;
    font-size: 14px;
}

.live-output {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 15px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Results Section */
.results-section {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.results-summary {
    display: flex;
    gap: 20px;
}

.summary-item {
    text-align: center;
}

.summary-value {
    font-size: 24px;
    font-weight: 700;
}

.summary-label {
    font-size: 12px;
    color: #666;
}

/* Score Card */
.score-card {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
    margin-bottom: 30px;
}

.score-value {
    font-size: 72px;
    font-weight: 700;
    margin-bottom: 10px;
}

.score-label {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.score-description {
    font-size: 14px;
    opacity: 0.8;
}

/* Test Results Detail */
.test-results-detail {
    margin-top: 20px;
}

.result-item {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.result-item.passed {
    border-left: 4px solid #28a745;
}

.result-item.warning {
    border-left: 4px solid #ffc107;
}

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

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

.result-name {
    font-weight: 600;
    font-size: 16px;
}

.result-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

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

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

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

.result-message {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

/* Raw Output */
.raw-output-section {
    margin-top: 30px;
}

.raw-output {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 15px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    max-height: 500px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin-top: 15px;
}

/* Loading */
.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .config-grid {
        grid-template-columns: 1fr;
    }

    .modules-grid {
        grid-template-columns: 1fr;
    }

    .actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

