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

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

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

header {
    background: #fff;
    border-bottom: 1px solid #e1e4e8;
    padding: 24px 0;
    margin-bottom: 32px;
}
header h1 { font-size: 1.5rem; }
header h1 a { color: #1a1a1a; text-decoration: none; }
header .tagline { color: #6a737d; font-size: 0.9rem; }

main { min-height: 60vh; }

.search-form, .info, .results, .empty, .results-header {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.9rem; }
.form-row input[type="text"], .form-row select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5da;
    border-radius: 6px;
    font-size: 1rem;
}
.form-row input[type="range"] { width: calc(100% - 60px); vertical-align: middle; }
.form-row #threshold-value { font-weight: 600; margin-left: 8px; }

button {
    background: #0366d6;
    color: white;
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 600;
}
button:hover { background: #0256b3; }

.info h3 { margin-bottom: 12px; }
.info ul { padding-left: 20px; color: #586069; }

.back-link { color: #0366d6; text-decoration: none; font-size: 0.9rem; }
.results-header h2 { margin: 12px 0 8px; }
.results-header .meta { color: #586069; font-size: 0.9rem; }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { text-align: left; padding: 12px 8px; background: #f6f8fa; font-weight: 600; border-bottom: 2px solid #e1e4e8; }
td { padding: 12px 8px; border-bottom: 1px solid #eaecef; }

.score-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    background: #eaecef;
}
.risk-high .score-badge { background: #ffebee; color: #c62828; }
.risk-medium .score-badge { background: #fff3e0; color: #e65100; }
.risk-low .score-badge { background: #e8f5e9; color: #2e7d32; }

.status {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    text-transform: capitalize;
}
.status-registered { background: #e3f2fd; color: #1565c0; }
.status-pending { background: #fff8e1; color: #f57c00; }
.status-refused { background: #ffebee; color: #c62828; }

.score-detail { color: #6a737d; font-size: 0.8rem; }

code {
    font-family: "SF Mono", Monaco, monospace;
    font-size: 0.85rem;
    background: #f6f8fa;
    padding: 2px 6px;
    border-radius: 3px;
}

.empty { text-align: center; color: #6a737d; }

footer {
    text-align: center;
    padding: 24px 0;
    color: #6a737d;
    margin-top: 48px;
}

.error-banner {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 0.95rem;
}
