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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #fafafa;
    color: #1a1a1a;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 48px 24px;
}

header {
    margin-bottom: 40px;
}

header h1 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.subtitle {
    color: #666;
    font-size: 15px;
    margin-top: 4px;
}


.crew-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 32px;
}

.crew-card {
    background: #fff;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.crew-card:hover {
    border-color: #999;
}

.crew-card.active {
    border-color: #1a1a1a;
    box-shadow: 0 0 0 1px #1a1a1a;
}

.crew-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
}

.crew-card p {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}


.crew-panel {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 28px;
}

.panel-header {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.panel-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.panel-header p {
    font-size: 14px;
    color: #666;
    margin-top: 4px;
}

.agents-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.agent-tag {
    background: #f5f5f5;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    color: #444;
}

.agent-tag strong {
    font-weight: 600;
    color: #1a1a1a;
}


.crew-form {
    margin-bottom: 24px;
}

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}

.form-group textarea,
.form-group input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.15s;
    background: #fafafa;
}

.form-group textarea:focus,
.form-group input[type="text"]:focus {
    outline: none;
    border-color: #1a1a1a;
    background: #fff;
}

.form-group textarea {
    min-height: 160px;
}

button[type="submit"] {
    width: 100%;
    padding: 12px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

button[type="submit"]:hover {
    background: #333;
}

button[type="submit"]:disabled {
    background: #999;
    cursor: not-allowed;
}

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


.results {
    border-top: 1px solid #f0f0f0;
    padding-top: 20px;
}

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

.results-header h3 {
    font-size: 15px;
    font-weight: 600;
}

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

.status-badge.running {
    background: #fef3cd;
    color: #856404;
}

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

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

.results-content {
    max-height: 600px;
    overflow-y: auto;
}

.agent-output {
    background: #fafafa;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    margin-bottom: 12px;
}

.agent-output:last-child {
    margin-bottom: 0;
}

.agent-output-heading {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    background: #f5f5f5;
    border-radius: 8px 8px 0 0;
}

.agent-output-body {
    padding: 16px;
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #1a1a1a;
}

@media (max-width: 600px) {
    .crew-cards {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 24px 16px;
    }
}
