:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --orange: #f45b25;
  --orange-dark: #d94b19;
  --ink: #222222;
  --muted: #6b6b6b;
  --line: #ded8d2;
  --surface: #ffffff;
  --bg: #f3f1ee;
  --success: #18794e;
  --danger: #b42318;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #fff8f3 0, var(--bg) 48%, #e9e6e2 100%);
  color: var(--ink);
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.card {
  width: min(100%, 560px);
  background: var(--surface);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 24px;
  box-shadow: 0 20px 70px rgba(53, 43, 35, .14);
  padding: 30px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.mark {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: var(--orange);
  color: white;
  font-weight: 900;
  font-size: 24px;
}
.eyebrow {
  color: var(--orange);
  font-size: 12px;
  letter-spacing: .16em;
  font-weight: 800;
  margin: 0 0 4px;
}
h1 { font-size: 24px; margin: 0; }
.intro { color: var(--muted); margin: 0 0 22px; }
label { display: block; font-weight: 650; margin-bottom: 8px; }

input[type="password"], input[type="text"] {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  outline: none;
  background: white;
}
input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(244,91,37,.12); }

.password-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 16px;
}
button, .secondary {
  border: 0;
  border-radius: 12px;
  min-height: 48px;
  padding: 0 18px;
  font-weight: 750;
  cursor: pointer;
  text-decoration: none;
  display: inline-grid;
  place-items: center;
}
button:disabled { opacity: .55; cursor: not-allowed; }
.primary { width: 100%; background: var(--orange); color: white; }
.primary:hover:not(:disabled) { background: var(--orange-dark); }
.secondary { background: #fff4ee; color: var(--orange-dark); border: 1px solid #ffd2be; }
.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.small { min-height: 42px; padding: 0 14px; }

.top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.dropzone {
  border: 2px dashed #d7c9be;
  border-radius: 18px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  margin-bottom: 16px;
  transition: .2s ease;
  background: #fffdfa;
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--orange);
  background: #fff7f2;
}
.drop-title { display: block; font-size: 17px; font-weight: 800; }
.drop-help { display: block; color: var(--muted); font-size: 13px; margin: 8px 0 14px; }
#selectedFile { display: block; color: var(--orange-dark); overflow-wrap: anywhere; }

.progress-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin: 4px 0 16px;
}
.progress-track {
  height: 10px;
  background: #ece8e4;
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar {
  width: 0;
  height: 100%;
  background: var(--orange);
  transition: width .12s linear;
}
.result {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.success-title { color: var(--success); font-weight: 850; font-size: 18px; }
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}
.message { min-height: 24px; margin: 18px 0 0; color: var(--danger); font-weight: 650; }
.message.success { color: var(--success); }

@media (max-width: 560px) {
  .page { padding: 10px; align-items: stretch; }
  .card { min-height: calc(100vh - 20px); border-radius: 18px; padding: 22px; }
  .actions { grid-template-columns: 1fr; }
}
