:root {
  --ink: #1c2542;
  --muted: #68738f;
  --paper: #ffffff;
  --canvas: #f3f6ff;
  --line: #dce3f4;
  --blue: #2563eb;
  --blue-dark: #1948bd;
  --teal: #0f9a88;
  --red: #c43b4d;
  --amber: #a96805;
  --shadow: 0 18px 55px rgba(29, 52, 104, .12);
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font: 16px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }

.login-shell {
  display: grid;
  min-height: 100vh;
  padding: 24px;
  place-items: center;
  background: radial-gradient(circle at 15% 15%, #d7e6ff 0, transparent 32%), radial-gradient(circle at 88% 85%, #d8fbf3 0, transparent 29%), var(--canvas);
}

.login-card, .upload-card, .results-section {
  border: 1px solid rgba(219, 227, 244, .9);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.login-card { width: min(100%, 440px); padding: 42px; }
.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 24px;
  border-radius: 14px;
  color: white;
  background: linear-gradient(145deg, #3b82f6, #1d4ed8);
  place-items: center;
  font-size: 24px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(37, 99, 235, .25);
}

.eyebrow { margin: 0 0 7px; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(28px, 5vw, 38px); letter-spacing: -.045em; line-height: 1.1; }
h2 { margin-bottom: 4px; font-size: 20px; letter-spacing: -.025em; }
.lead, .intro > p:not(.eyebrow), .results-heading p { color: var(--muted); }

.login-form { display: grid; gap: 10px; margin-top: 30px; }
label { font-size: 14px; font-weight: 700; }
input[type="password"], input[type="text"] {
  width: 100%;
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid #cbd5e9;
  border-radius: 10px;
  outline: none;
  background: #fff;
}
input[type="password"]:focus, input[type="text"]:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, .13); }
.form-hint { margin: 0; color: var(--muted); font-size: 12px; }

.button {
  min-height: 46px;
  padding: 10px 17px;
  border: 0;
  border-radius: 10px;
  font-weight: 750;
  transition: transform .15s ease, background .15s ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button-primary { margin-top: 9px; color: #fff; background: var(--blue); box-shadow: 0 9px 16px rgba(37, 99, 235, .19); }
.button-primary:hover:not(:disabled) { background: var(--blue-dark); }
.button-quiet { min-height: 38px; color: var(--ink); background: #eaf0fe; }

.notice { margin: 18px 0 0; padding: 12px 14px; border: 1px solid; border-radius: 10px; font-size: 14px; font-weight: 600; }
.notice-error { border-color: #f2c3cb; color: #982e3c; background: #fff3f5; }
.notice-success { border-color: #a7e5d8; color: #087666; background: #effcf9; }

.site-header { display: flex; min-height: 72px; padding: 0 max(24px, calc((100vw - 1040px) / 2)); align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .88); }
.wordmark { color: var(--ink); font-size: 20px; font-weight: 850; letter-spacing: -.04em; text-decoration: none; }
.wordmark span { color: var(--blue); }
.upload-shell { width: min(100% - 48px, 1040px); margin: 0 auto; padding: 72px 0; }
.intro { margin-bottom: 30px; }
.intro code, .check-row code { padding: 2px 5px; border-radius: 5px; color: #3d4e75; background: #eaf0fe; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; }

.upload-card { padding: clamp(22px, 4vw, 42px); }
.drop-zone { display: flex; min-height: 205px; padding: 30px; border: 1.5px dashed #aebee3; border-radius: 15px; color: var(--muted); background: #f9fbff; align-items: center; justify-content: center; flex-direction: column; text-align: center; cursor: pointer; transition: .15s ease; }
.drop-zone:hover, .drop-zone.is-dragging { border-color: var(--blue); color: var(--ink); background: #eff5ff; box-shadow: inset 0 0 0 3px rgba(37, 99, 235, .06); }
.drop-zone input { width: 1px; height: 1px; margin: -1px; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; position: absolute; white-space: nowrap; }
.drop-icon { display: grid; width: 40px; height: 40px; margin-bottom: 12px; border-radius: 12px; color: #fff; background: var(--blue); place-items: center; font-size: 24px; line-height: 1; }
.drop-title { color: var(--ink); font-size: 17px; font-weight: 800; }
.drop-description { margin-top: 4px; font-size: 13px; }

.selection { margin-top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcff; }
.selection-title { margin-bottom: 9px; font-size: 14px; font-weight: 800; }
.file-list { display: grid; gap: 7px; max-height: 185px; padding: 0; margin: 0; overflow: auto; list-style: none; }
.file-list li { display: flex; gap: 16px; justify-content: space-between; color: #455170; font-size: 14px; }
.file-list li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list li span:last-child { color: var(--muted); white-space: nowrap; }

.check-row { display: flex; gap: 12px; margin-top: 23px; align-items: flex-start; cursor: pointer; }
.check-row input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--blue); }
.check-row strong, .check-row small { display: block; }
.check-row small { margin-top: 2px; color: var(--muted); font-size: 13px; font-weight: 500; }
.progress-wrap { margin-top: 23px; }
.progress-label { display: flex; margin-bottom: 8px; color: var(--muted); font-size: 13px; font-weight: 700; justify-content: space-between; }
progress { width: 100%; height: 11px; overflow: hidden; border: 0; border-radius: 20px; background: #e5eaf5; appearance: none; }
progress::-webkit-progress-bar { background: #e5eaf5; }
progress::-webkit-progress-value { background: linear-gradient(90deg, var(--blue), #4f94ff); }
progress::-moz-progress-bar { background: linear-gradient(90deg, var(--blue), #4f94ff); }
.button-upload { width: 100%; margin-top: 24px; }

.results-section { margin-top: 26px; padding: clamp(22px, 4vw, 34px); }
.results-heading { display: flex; gap: 12px; margin-bottom: 19px; align-items: baseline; justify-content: space-between; }
.results-heading p { margin-bottom: 0; font-size: 13px; }
.results { display: grid; gap: 11px; }
.empty-results { margin: 0; padding: 20px; border: 1px dashed var(--line); border-radius: 11px; color: var(--muted); text-align: center; font-size: 14px; }
.result { padding: 16px; border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: 11px; background: #fff; }
.result-uploaded { border-left-color: var(--teal); }
.result-skipped { border-left-color: var(--amber); }
.result-heading { display: flex; margin: 0 0 5px; gap: 16px; align-items: center; justify-content: space-between; }
.result-heading h3 { margin: 0; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.result-badge { padding: 3px 7px; border-radius: 20px; color: #7f2a36; background: #fff1f3; font-size: 11px; font-weight: 800; white-space: nowrap; }
.result-uploaded .result-badge { color: #087666; background: #e8faf5; }
.result-skipped .result-badge { color: #8a5707; background: #fff7e8; }
.result > p { margin: 0; color: var(--muted); font-size: 13px; }
.link-row { display: flex; gap: 10px; margin-top: 12px; align-items: center; }
.link-row a { min-width: 0; overflow: hidden; color: var(--blue); font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.copy-link { flex: 0 0 auto; padding: 7px 9px; border: 1px solid #bbcae8; border-radius: 7px; color: #315287; background: #f7f9fe; font-size: 12px; font-weight: 800; }

@media (max-width: 580px) {
  .login-card { padding: 30px 24px; }
  .site-header { padding: 0 18px; }
  .upload-shell { width: min(100% - 32px, 1040px); padding: 43px 0; }
  .drop-zone { min-height: 180px; padding: 22px 14px; }
  .results-heading { display: block; }
  .results-heading p { margin-top: 4px; }
  .link-row { align-items: stretch; flex-direction: column; }
  .copy-link { align-self: flex-start; }
}
