*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
body{font-family:"Segoe UI",system-ui,sans-serif;background:linear-gradient(135deg,#667eea,#764ba2);min-height:100vh;color:#333;padding:20px}
.container{max-width:1100px;margin:0 auto}
header{text-align:center;padding:40px 20px 30px;color:white}
header h1{font-size:2rem;margin-bottom:10px}
header p{opacity:0.9}
.card{background:white;border-radius:12px;padding:28px;margin-bottom:24px;box-shadow:0 4px 20px rgba(0,0,0,0.12)}
.card h2{font-size:1.3rem;margin-bottom:18px;color:#444;border-bottom:2px solid #eee;padding-bottom:10px}
.card h3{font-size:1.1rem;margin-bottom:14px;color:#555}
.file-drop-zone{border:2px dashed #aaa;border-radius:10px;padding:40px;text-align:center;cursor:pointer;transition:0.2s;margin-bottom:16px}
.file-drop-zone.drag-over{border-color:#667eea;background:#f0f2ff}
.drop-icon{font-size:3rem;margin-bottom:12px}
.file-drop-zone p{color:#666;margin-bottom:10px}
.file-list{margin:12px 0}
.file-item{display:flex;align-items:center;gap:10px;padding:8px 12px;background:#f8f9fa;border-radius:6px;margin-bottom:6px;font-size:0.9rem}
.file-remove{margin-left:auto;cursor:pointer;color:#e74c3c;font-weight:bold;background:none;border:none;font-size:1rem}
.parameters{background:#f8f9fa;margin-top:20px}
.param-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:20px}
.param-group{display:flex;flex-direction:column;gap:6px}
.param-group label{font-weight:600;font-size:0.9rem;color:#555}
.param-group input{padding:8px 12px;border:1px solid #ddd;border-radius:6px;font-size:1rem}
.param-group input:focus{outline:none;border-color:#667eea}
.hint{font-size:0.78rem;color:#888}
.btn{display:inline-block;padding:10px 22px;border-radius:8px;border:none;cursor:pointer;font-size:0.95rem;font-weight:600;text-decoration:none;transition:0.2s}
.btn:disabled{opacity:0.6;cursor:not-allowed}
.btn-primary{background:#667eea;color:white}
.btn-primary:hover:not(:disabled){opacity:0.88}
.btn-secondary{background:#eee;color:#444}
.btn-secondary:hover{background:#ddd}
.btn-large{width:100%;padding:16px;font-size:1.1rem;margin-top:20px}
.progress-bar-wrap{background:#eee;border-radius:20px;height:14px;overflow:hidden;margin-bottom:12px}
.progress-bar{height:100%;background:linear-gradient(90deg,#667eea,#764ba2);border-radius:20px;transition:width 0.4s ease}
.progress-text{color:#555;font-size:0.95rem;margin-bottom:4px}
.progress-percent{font-weight:700;color:#667eea;font-size:1.1rem}
.alert{padding:14px 18px;border-radius:8px;margin-bottom:16px;background:#ffe0e0;color:#c0392b;border-left:4px solid #e74c3c}
.summary-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:16px;margin-bottom:10px}
.summary-item{text-align:center;padding:16px;background:#f0f2ff;border-radius:8px}
.summary-val{display:block;font-size:2rem;font-weight:700;color:#667eea}
.summary-label{font-size:0.85rem;color:#666}
.table-wrap{overflow-x:auto}
.results-table{width:100%;border-collapse:collapse;font-size:0.88rem}
.results-table th{background:#667eea;color:white;padding:10px 12px;text-align:left;white-space:nowrap}
.results-table td{padding:9px 12px;border-bottom:1px solid #eee;vertical-align:top}
.results-table tr:hover td{background:#f8f9ff}
.results-table code{font-family:"Courier New",monospace;font-size:0.78rem;word-break:break-all}
.score-badge{display:inline-block;padding:3px 10px;border-radius:12px;font-weight:700;font-size:0.85rem}
.score-high{background:#d4edda;color:#155724}
.score-mid{background:#fff3cd;color:#856404}
.score-low{background:#f8d7da;color:#721c24}
.download-section{margin-top:20px;text-align:center}
footer{text-align:center;color:rgba(255,255,255,0.7);padding:20px;font-size:0.85rem}
.species-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    margin-top: 8px;
}
.species-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.species-item:hover:not(.species-unavailable) {
    border-color: #667eea;
    background: #f8f9ff;
}
.species-item input[type=checkbox] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    accent-color: #667eea;
}
.species-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.species-label strong { font-size: 0.95rem; color: #333; }
.species-label em { font-size: 0.82rem; color: #666; }
.weight-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 4px;
    width: fit-content;
}
.weight-critical { background: #f8d7da; color: #721c24; }
.weight-high     { background: #fff3cd; color: #856404; }
.weight-mid      { background: #d1ecf1; color: #0c5460; }
.weight-low      { background: #d4edda; color: #155724; }
.unavailable-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
    background: #eee;
    color: #888;
    margin-top: 2px;
    width: fit-content;
}
.species-unavailable { opacity: 0.55; cursor: not-allowed; }
select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    width: 100%;
    max-width: 320px;
    background: white;
}
select:focus { outline: none; border-color: #667eea; }
.offtarget-breakdown {
    margin-top: 6px;
    font-size: 0.78rem;
    color: #666;
}
.offtarget-breakdown span {
    display: inline-block;
    margin-right: 8px;
    white-space: nowrap;
}

.risk-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}
.risk-PASS          { background: #d4edda; color: #155724; }
.risk-MODERATE      { background: #d1ecf1; color: #0c5460; }
.risk-HIGH          { background: #fff3cd; color: #856404; }
.risk-UNSAFE        { background: #f8d7da; color: #721c24; }
.risk-reason        { font-size: 0.75rem; color: #888; margin-top: 3px; }
tr.row-unsafe       { background: #fff5f5 !important; }
tr.row-high-risk    { background: #fffdf0 !important; }
.region-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 600;
    background: #e8f4fd;
    color: #1a6fa8;
}
