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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f5f5;
    color: #1a1a1a;
    line-height: 1.6;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Flash messages */
.flash { background: #fff3cd; border: 1px solid #ffc107; padding: 0.75rem; margin-bottom: 1rem; border-radius: 4px; }

/* Login */
.login-box, .complete-box {
    max-width: 400px;
    margin: 4rem auto;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.login-box h1, .complete-box h1 { margin-bottom: 0.5rem; }
.login-box p, .complete-box p { margin-bottom: 1.5rem; color: #666; }
.login-box label { display: block; margin-bottom: 0.25rem; font-weight: 600; margin-top: 1rem; }
.login-box input, .login-box select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

/* Buttons */
.btn, button[type="submit"] {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    margin-top: 1rem;
}
.btn-primary, .login-box button { background: #2563eb; color: #fff; }
.btn-primary:hover, .login-box button:hover { background: #1d4ed8; }
.btn-secondary { background: #6b7280; color: #fff; margin-left: 0.5rem; }
.btn-secondary:hover { background: #4b5563; }
.btn { background: #2563eb; color: #fff; }

/* Progress bar */
.progress-bar {
    position: relative;
    background: #e5e7eb;
    height: 28px;
    border-radius: 14px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}
.progress-fill {
    background: #2563eb;
    height: 100%;
    border-radius: 14px;
    transition: width 0.3s;
}
.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a1a1a;
}

/* Prompt */
.prompt-box {
    background: #fff;
    padding: 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #2563eb;
}
.prompt-box h2 { font-size: 0.9rem; text-transform: uppercase; color: #6b7280; margin-bottom: 0.5rem; }

/* Output panels */
.outputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.output-panel {
    background: #fff;
    padding: 1.25rem;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.output-panel h3 { font-size: 0.85rem; text-transform: uppercase; color: #6b7280; margin-bottom: 0.75rem; }
.output-text { white-space: pre-wrap; font-size: 0.95rem; line-height: 1.7; }

/* Scoring section */
.scoring-section { background: #fff; padding: 1.25rem; border-radius: 8px; margin-bottom: 1.5rem; }
.scoring-section h2 { font-size: 1rem; margin-bottom: 1rem; }

fieldset.dimension {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}
fieldset.dimension legend { font-weight: 600; padding: 0 0.5rem; }

.score-row {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}
.score-row label { display: flex; align-items: center; gap: 0.5rem; }
.score-row select { padding: 0.3rem; border: 1px solid #ccc; border-radius: 4px; }

textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
}

.actions { display: flex; gap: 0.5rem; }

/* Dashboard */
.dashboard-header { margin-bottom: 2rem; }
.dashboard-header h1 { margin-bottom: 0.25rem; }
.dashboard-header .meta { color: #6b7280; font-size: 0.9rem; }

.batch-list { list-style: none; margin-top: 1rem; }
.batch-list li { margin-bottom: 0.5rem; }
.batch-list a { color: #2563eb; text-decoration: none; font-weight: 600; }
.batch-list a:hover { text-decoration: underline; }

.verdict-card, .metric-card {
    background: #fff;
    padding: 1.25rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.verdict-card h2, .metric-card h3 { margin-bottom: 0.5rem; }
.verdict-label {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}
.verdict-signal-detected .verdict-label { background: #dcfce7; color: #166534; }
.verdict-inconclusive .verdict-label { background: #fef9c3; color: #854d0e; }
.verdict-no-signal .verdict-label { background: #fee2e2; color: #991b1b; }
.verdict-no-data .verdict-label { background: #e5e7eb; color: #6b7280; }

.verdict-stats { display: flex; gap: 1.5rem; font-size: 0.9rem; color: #374151; margin-bottom: 0.75rem; }

.bar-container {
    background: #e5e7eb;
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 0.5rem;
}
.bar { height: 100%; border-radius: 10px; }
.bar-win { background: #22c55e; }
.bar-secondary { background: #60a5fa; }

.section {
    background: #fff;
    padding: 1.25rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.section h2 { margin-bottom: 0.75rem; }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.5rem 0.75rem; border-bottom: 1px solid #e5e7eb; }
th { font-weight: 600; color: #6b7280; font-size: 0.8rem; text-transform: uppercase; }
code { background: #f3f4f6; padding: 0.15rem 0.4rem; border-radius: 3px; font-size: 0.85rem; }

.pattern { padding: 0.15rem 0.5rem; border-radius: 3px; font-size: 0.8rem; font-weight: 600; }
.pattern-dominant { background: #dcfce7; color: #166534; }
.pattern-strong { background: #dbeafe; color: #1e40af; }
.pattern-moderate { background: #fef9c3; color: #854d0e; }
.pattern-weak { background: #f3f4f6; color: #6b7280; }
.pattern-negative { background: #fee2e2; color: #991b1b; }

.warning { color: #dc2626; font-weight: 600; }
