:root { color-scheme: light; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; color: #2c3e50; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { max-width: 1400px; margin: 0 auto; padding: 20px; background: linear-gradient(135deg, #1e3c72, #2a5298); }
.container { background: #fff; padding: 30px; border-radius: 10px; box-shadow: 0 4px 6px #0002; }
h1 { text-align: center; border-bottom: 3px solid #3498db; padding-bottom: 16px; }
h2, h3 { margin-top: 24px; }
p { line-height: 1.55; overflow-wrap: anywhere; }
.upload-section, .analysis-options { background: #f4f6f7; border: 1px solid #dce1e5; padding: 20px; border-radius: 8px; margin: 20px 0; }
button, select, input { font: inherit; }
button { cursor: pointer; margin: 4px; padding: 9px 12px; border-radius: 5px; border: 1px solid #60798c; background: #edf5fb; color: #163c57; }
button:hover:not(:disabled) { background: #d8ebfa; }
button:disabled { cursor: default; opacity: .5; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #e67e22; outline-offset: 2px; }
#generate { background: #2377af; color: white; }
.config-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(230px,1fr)); gap: 16px; }
.config-grid label { display: flex; flex-direction: column; gap: 6px; }
select, .range-row input { border: 1px solid #8299a8; border-radius: 4px; padding: 8px; background: white; color: #263c4b; }
.config-grid select { min-height: 38px; max-width: 100%; }
#status { min-height: 28px; white-space: pre-wrap; overflow-wrap: anywhere; }
#stale, .warning { padding: 12px; background: #fff3cd; border-radius: 4px; }
.table-scroll { overflow: auto; max-height: 70vh; margin: 16px 0; }
.data-profile-table { border-collapse: collapse; width: 100%; background: white; }
.data-profile-table th { background: #2377af; color: white; text-align: left; }
.data-profile-table td, .data-profile-table th { padding: 10px 12px; border-bottom: 1px solid #dce1e5; vertical-align: top; overflow-wrap: anywhere; max-width: 450px; }
.data-profile-table tr:nth-child(even) { background: #f4f6f7; }
.data-profile-table tbody tr:hover { background: #e8f4f8; }
.pager { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.range-row { display: flex; gap: 8px; margin: 8px 0; flex-wrap: wrap; }
.range-row input { width: 180px; max-width: 100%; }
details { margin: 16px 0; border: 1px solid #dce1e5; border-radius: 5px; padding: 8px; }
summary { cursor: pointer; padding: 12px; font-weight: bold; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }
dialog { border: 0; border-radius: 10px; width: min(1200px,90vw); max-height: 90vh; padding: 24px; color: #2c3e50; }
dialog::backdrop { background: #0008; }
.footer { padding: 20px; color: white; text-align: center; }
.footer a { color: white; }
@media (max-width:600px) {
  body { padding: 8px; }
  .container { padding: 14px; }
  .config-grid { grid-template-columns: minmax(0,1fr); }
  input[type=file] { max-width: 100%; }
}
@media print {
  body { background: white; padding: 0; max-width: none; }
  .container { padding: 0; box-shadow: none; }
  .container > :not(#results), .footer, button, .pager, #stale { display: none !important; }
  .table-scroll { overflow: visible; max-height: none; }
  th { print-color-adjust: exact; }
  tr { break-inside: avoid; }
}

.duplicate-field { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 8px 0; }
.duplicate-field label { min-width: 200px; overflow-wrap: anywhere; }
