*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: #f5f6f8; color: #1a1a2e; line-height: 1.6; }
.container { max-width: 1400px; margin: 0 auto; padding: 24px; }
.panel { background: #fff; border-radius: 12px; padding: 24px; margin-bottom: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.panel h1 { font-size: 1.5rem; font-weight: 600; color: #1a1a2e; margin-bottom: 16px; }
.controls { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.file-picker { flex: 1; min-width: 320px; cursor: pointer; }
.input-file { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.file-label { display: flex; align-items: center; min-height: 44px; padding: 10px 14px; border: 1px dashed #b8c2d1; border-radius: 8px; font-size: 14px; background: #fafbfc; color: #4a5568; }
.file-picker:hover .file-label, .input-file:focus + .file-picker .file-label { border-color: #5b7fff; background: #f4f7ff; }
.btn { padding: 10px 20px; border: none; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; }
.btn:disabled { opacity: 0.65; cursor: wait; }
.btn-primary { background: #5b7fff; color: #fff; }
.btn-primary:hover { background: #4a6ee0; }
.btn-secondary { background: #e8ecf1; color: #4a5568; }
.btn-secondary:hover { background: #dde1e6; }
.hint { margin-bottom: 12px; font-size: 13px; color: #718096; }
.filters { display: flex; gap: 16px; margin-bottom: 12px; }
.filters label { font-size: 13px; color: #718096; }
.filters select { margin-left: 6px; padding: 6px 10px; border: 1px solid #dde1e6; border-radius: 6px; font-size: 13px; background: #fff; }
#status-message { font-size: 13px; margin-top: 8px; }
.status-success { color: #1a7a2e; }
.status-error { color: #c0392b; }
.stats-bar { background: #fff; border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; font-size: 14px; color: #4a5568; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.stats-bar span { margin-right: 20px; font-weight: 500; }
.loading { text-align: center; padding: 60px 0; color: #a0aec0; font-size: 1.1rem; }
.results-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.results-table th { background: #f8f9fb; padding: 12px 16px; text-align: left; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: #718096; border-bottom: 2px solid #e8ecf1; }
.results-table td { padding: 14px 16px; border-bottom: 1px solid #f0f2f5; font-size: 14px; vertical-align: top; }
.results-table tr:hover { background: #fafbfc; }
.row-toggle { cursor: pointer; user-select: none; }
.badge { display: inline-block; padding: 4px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; text-transform: uppercase; }
.badge-pass { background: #e8f5e9; color: #1a7a2e; }
.badge-fail { background: #fdecea; color: #c0392b; }
.badge-error { background: #edf2f7; color: #718096; }
.rules-detail-row td { padding: 0 16px 16px 16px; background: #fafbfc; }
.rules-container { padding: 16px; background: #fff; border-radius: 8px; border: 1px solid #e8ecf1; }
.rules-container .rules-header { font-weight: 600; margin-bottom: 12px; color: #4a5568; }
.rule-row { padding: 8px 0; display: flex; gap: 12px; align-items: baseline; }
.rule-row + .rule-row { border-top: 1px solid #f0f2f5; }
.rule-name { font-weight: 500; min-width: 200px; color: #2d3748; }
.rule-summary { color: #718096; font-size: 13px; }
.rule-row.status-pass .rule-name { color: #1a7a2e; }
.rule-row.status-fail .rule-name { color: #c0392b; }
.report-link { color: #5b7fff; text-decoration: none; font-weight: 500; }
.report-link:hover { text-decoration: underline; }

@media (max-width: 720px) {
    .controls { flex-direction: column; }
    .file-picker { min-width: auto; }
    .btn { width: 100%; }
}
