:root {
  --ink: #17243a;
  --blue: #176bcb;
  --border: #d9e3ef;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: #f4f7fb;
  font-family: Arial, Helvetica, sans-serif;
}

button, input { font: inherit; }
[hidden] { display: none !important; }

.upload-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 42px 20px;
  background:
    radial-gradient(circle at 16% 14%, rgba(72, 156, 232, 0.13), transparent 30%),
    radial-gradient(circle at 86% 82%, rgba(38, 123, 200, 0.1), transparent 26%),
    linear-gradient(145deg, #f8fbff 0%, #edf3f9 100%);
}

.upload-card {
  width: min(100%, 620px);
  padding: 48px;
  border: 1px solid rgba(190, 207, 225, 0.82);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 70px rgba(31, 61, 94, 0.13);
}

.brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 26px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(145deg, #2380dc, #145dad);
  box-shadow: 0 12px 24px rgba(23, 107, 203, 0.23);
}

.brand-mark svg { width: 30px; height: 30px; }
.upload-header { margin-bottom: 30px; }

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue) !important;
  font-size: 0.74rem !important;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.upload-header h1 {
  margin: 0;
  color: #15253b;
  font-size: clamp(2rem, 7vw, 2.65rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.upload-header p {
  max-width: 490px;
  margin: 16px 0 0;
  color: #65758a;
  font-size: 1rem;
  line-height: 1.65;
}

.password-header { margin-bottom: 24px; }
.password-form { display: flex; flex-direction: column; gap: 10px; }
.password-form label { color: #40536b; font-size: 0.86rem; font-weight: 700; }

.password-input {
  width: 100%;
  height: 50px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: none;
  color: var(--ink);
  background: #f9fbfe;
  font-size: 1rem;
}

.password-input:focus {
  border-color: #65a9ec;
  box-shadow: 0 0 0 3px rgba(101, 169, 236, 0.28);
}

.password-error { margin: 0; color: #a73232; font-size: 0.84rem; }
.password-button { width: 100%; margin-top: 10px; }

.drop-zone {
  min-height: 178px;
  display: grid;
  place-items: center;
  padding: 26px;
  border: 2px dashed #b8cbe0;
  border-radius: 20px;
  background: #f9fbfe;
  transition: 160ms ease;
}

.drop-zone.is-dragging {
  border-color: #2379d0;
  background: #eef7ff;
  transform: translateY(-2px);
}

.drop-zone.has-file { min-height: auto; border-style: solid; }

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.drop-label {
  display: flex;
  align-items: center;
  flex-direction: column;
  cursor: pointer;
  text-align: center;
}

.drop-label svg { width: 38px; height: 38px; margin-bottom: 12px; color: #317cca; }
.drop-label strong { color: #1b5d9e; font-size: 1rem; }
.drop-label span { margin-top: 5px; color: #7a899b; font-size: 0.86rem; }

.file-row { width: 100%; display: flex; align-items: center; gap: 15px; }

.file-icon {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #1c6fc2;
  background: #e7f2fd;
}

.file-icon svg { width: 24px; }
.file-details { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 5px; }
.file-details strong { overflow: hidden; color: #25364c; text-overflow: ellipsis; white-space: nowrap; }
.file-details span { color: #76869a; font-size: 0.82rem; }

.remove-file {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  color: #6f7f92;
  background: transparent;
  cursor: pointer;
}

.remove-file:hover { color: #bf3535; background: #fff0f0; }
.remove-file svg { width: 19px; }

.progress-panel { margin-top: 22px; padding: 18px; border-radius: 16px; background: #f2f7fc; }
.progress-copy { display: flex; justify-content: space-between; margin-bottom: 12px; color: #2c4868; font-size: 0.9rem; }
.progress-track { height: 9px; overflow: hidden; border-radius: 999px; background: #d5e4f2; }
.progress-bar { width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #176bcb, #43a0ed); transition: width 120ms linear; }
.progress-panel p { margin: 11px 0 0; color: #78889a; font-size: 0.8rem; }

.error-message {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  padding: 13px 15px;
  border: 1px solid #f1c4c4;
  border-radius: 13px;
  color: #963030;
  background: #fff5f5;
  font-size: 0.88rem;
  line-height: 1.45;
}

.error-message svg { flex: 0 0 auto; width: 18px; margin-top: 1px; }
.button-row { display: flex; gap: 12px; margin-top: 22px; }

.button {
  min-height: 50px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: 150ms ease;
}

.button:focus-visible, .remove-file:focus-visible, .drop-label:focus-visible {
  outline: 3px solid rgba(35, 121, 208, 0.35);
  outline-offset: 3px;
}

.button:disabled { cursor: not-allowed; opacity: 0.48; }
.primary-button { flex: 1; color: #fff; background: var(--blue); box-shadow: 0 10px 20px rgba(23, 107, 203, 0.16); }
.primary-button:hover:not(:disabled) { background: #125bac; }
.cancel-button { color: #31506f; border-color: #cddae7; background: #fff; }
.cancel-button:hover { background: #f4f7fa; }

.result-panel {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 34px 24px;
  border: 1px solid #bfe3ce;
  border-radius: 22px;
  text-align: center;
  background: #f3fcf7;
}

.result-panel > svg { width: 56px; height: 56px; margin-bottom: 16px; color: #21925a; }
.result-panel h2 { margin: 0; color: #175f3c; font-size: 1.35rem; }
.result-panel p { max-width: 420px; margin: 9px 0 4px; overflow-wrap: anywhere; color: #2c4f3e; font-weight: 600; }
.result-panel span { color: #628071; font-size: 0.88rem; }
.result-panel .button { width: 100%; margin-top: 26px; }

.privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  color: #7a899a;
  font-size: 0.78rem;
  text-align: center;
}

.privacy-note svg { flex: 0 0 auto; width: 16px; height: 16px; color: #5f8dbb; }

@media (max-width: 620px) {
  .upload-shell { align-items: start; padding: 18px 12px; }
  .upload-card { padding: 30px 22px; border-radius: 22px; }
  .brand-mark { width: 50px; height: 50px; margin-bottom: 22px; }
  .upload-header { margin-bottom: 24px; }
  .drop-zone { min-height: 160px; padding: 20px; }
  .button-row { flex-direction: column; }
  .privacy-note { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
