:root {
  color-scheme: light;
  font-family: Inter, Arial, sans-serif;
  background: #f4f7fb;
  color: #14213d;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top right, #e7f0ff, #f7f9fc 45%); }
button, input, select { font: inherit; }
.shell { width: min(980px, calc(100% - 32px)); margin: 0 auto; padding: 56px 0; }
.card { background: #fff; border: 1px solid #e1e8f2; border-radius: 20px; box-shadow: 0 14px 40px rgba(20, 33, 61, .07); padding: 32px; margin-bottom: 24px; }
.login-card { width: min(420px, 100%); margin: 7vh auto 0; text-align: center; }
.brand-mark { width: 60px; height: 60px; margin: 0 auto 16px; border-radius: 17px; display: grid; place-items: center; background: #1b63da; color: #fff; font-weight: 800; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(26px, 4vw, 38px); }
.muted { color: #69778e; }
.eyebrow { margin-bottom: 6px; color: #1b63da; font-size: 12px; font-weight: 800; letter-spacing: .14em; }
label { display: block; text-align: left; font-weight: 700; font-size: 14px; margin: 18px 0 8px; }
input, select { width: 100%; border: 1px solid #cdd8e7; border-radius: 10px; padding: 12px 14px; background: #fff; }
input:focus, select:focus { outline: 3px solid #d8e7ff; border-color: #1b63da; }
button { width: 100%; margin-top: 22px; border: 0; border-radius: 11px; padding: 13px 18px; background: #1b63da; color: white; font-weight: 800; cursor: pointer; }
button:hover { background: #1554bb; }
button:disabled { opacity: .55; cursor: wait; }
button.secondary { background: #eef3fa; color: #24405f; }
button.secondary:hover { background: #dfe8f4; }
button.small { width: auto; margin: 0; padding: 9px 15px; }
header, .result-heading, .file-bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.drop-zone { border: 2px dashed #b8c9df; border-radius: 16px; padding: 44px 24px; text-align: center; cursor: pointer; transition: .2s ease; }
.drop-zone:hover, .drop-zone.dragging { border-color: #1b63da; background: #f4f8ff; }
.drop-zone h2 { margin-bottom: 8px; }
.drop-zone p { margin: 0; color: #69778e; }
.upload-icon { width: 48px; height: 48px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 50%; background: #e5efff; color: #1b63da; font-size: 28px; font-weight: 700; }
.file-bar { padding: 16px; border: 1px solid #dfe7f1; border-radius: 12px; }
.file-bar span { display: block; margin-top: 4px; font-size: 13px; }
.mapping { border-top: 1px solid #edf0f5; margin-top: 24px; padding-top: 20px; }
.mapping-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mapping-grid label { margin-top: 4px; }
.mapping-grid select { margin-top: 8px; }
.action { max-width: 260px; display: block; margin: 24px auto 0; }
.progress { text-align: center; padding-top: 24px; }
.progress span { width: 34px; height: 34px; display: inline-block; border: 4px solid #d9e4f2; border-top-color: #1b63da; border-radius: 50%; animation: spin .8s linear infinite; }
.progress p { margin-top: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 26px 0; }
.stats article { padding: 20px 10px; border-radius: 14px; text-align: center; background: #f6f8fb; }
.stats article.success { background: #eaf8f0; color: #167647; }
.stats span { display: block; font-size: 29px; font-weight: 800; }
.stats p { margin: 6px 0 0; color: #69778e; font-size: 13px; }
.notice { padding: 14px 16px; border-radius: 11px; background: #fff7df; color: #745815; text-align: center; }
.download { max-width: 390px; display: block; margin: 24px auto 0; background: #178454; }
.download:hover { background: #126b44; }
.mapping-label { color: #69778e; font-size: 13px; }
.center, .error { text-align: center; }
.error { color: #b42318; min-height: 20px; margin: 14px 0 0; }
.hidden { display: none !important; }

@media (max-width: 760px) {
  .shell { padding: 24px 0; }
  .card { padding: 22px; }
  header, .result-heading { align-items: flex-start; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .mapping-grid { grid-template-columns: 1fr; }
}
