:root {
  color-scheme: light;
  font-family: "Segoe UI", Arial, sans-serif;
  color: #0c1e35;
  background: #f3f6f9;
  font-size: 14px;
  --line: #dce4ed;
  --muted: #586c84;
  --gold: #d4ad4d;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
header {
  min-height: 58px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; gap: 8px; background: white; border-top: 3px solid #0c1e35; border-bottom: 1px solid var(--line);
}
.brand { font-size: 16px; }
#session { display: flex; align-items: center; gap: 6px; font-size: 12px; overflow-wrap: anywhere; }
main, footer { width: calc(100% - 48px); max-width: 1032px; margin: auto; }
main { padding-top: 24px; }
main.auth, body:has(main.auth) footer { max-width: 490px; }
footer { font-size: 12px; color: var(--muted); padding: 72px 0 48px; }
h1 { font-size: 28px; line-height: 1.2; margin: 0 0 14px; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 16px; margin: 0; }
p { margin: 0; }
a, .link { color: #203954; text-underline-offset: 3px; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.link { background: transparent; border: 0; text-decoration: underline; font: inherit; min-height: 36px; }
.panel {
  margin-bottom: 16px; border: 1px solid var(--line); border-radius: 14px; padding: 20px;
  background: white; box-shadow: 0 0 0 1px #142e4910, 0 2px 3px #142e4908;
}
.panel p + .btn, .panel label + .btn { margin-top: 12px; }
.btn {
  border-radius: 7px; border: 1px solid #0c1e35; background: #0c1e35; color: white;
  padding: 0 12px; min-height: 36px; font: 600 13px "Segoe UI", Arial, sans-serif;
}
.btn.ghost { color: #0c1e35; background: #eef3f7; border-color: var(--line); }
.btn:disabled { opacity: .55; cursor: wait; }
.auth .btn { width: 100%; min-height: 44px; }
.auth .link { display: block; margin: 6px auto 0; }
.code-entry { display: block; position: relative; border-radius: 7px; }
.code-entry:focus-within { outline: 2px solid var(--gold); outline-offset: 3px; }
.code-entry input {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: text;
}
.code-digits { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.code-digits span { display: grid; place-items: center; height: 44px; border: 1px solid var(--line);
  border-radius: 7px; font: 600 20px monospace; background: #fdfefe; }
#security-check { margin: 12px 0; }
.helper { font-size: 13px; color: var(--muted); line-height: 1.55; }
.loans { max-width: 680px; }
.loan { display: block; border-inline-start: 3px solid var(--gold); text-decoration: none; color: inherit; }
.loan:hover { border-color: var(--gold); }
.loan p { margin: 4px 0 12px; }
.line { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 3px 10px; }
.progress { max-width: 420px; margin: 15px 0; }
.progress strong { font-size: 13px; }
progress { width: 100%; display: block; height: 7px; appearance: none; border: 0; border-radius: 10px; margin: 5px 0 10px; overflow: hidden; }
progress::-webkit-progress-bar { background: #eef3f7; }
progress::-webkit-progress-value { background: var(--gold); border-radius: 10px; }
progress::-moz-progress-bar { background: var(--gold); }
.back { margin-bottom: 8px; padding: 0; }
.split { display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.items, .files { list-style: none; padding: 0; margin: 0; }
.items > li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.items > li:last-child { padding-bottom: 0; border-bottom: 0; }
.item { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px 12px; align-items: center; }
.item strong, .files { overflow-wrap: anywhere; }
.files { font-size: 12px; }
.files li { margin-top: 5px; }
.receipt-number { white-space: nowrap; }
.recent-files li { margin-top: 0; padding: 12px 0; }
.recent-files li + li { border-top: 1px solid var(--line); }
.recent-files li:first-child { padding-top: 0; }
.recent-files li:last-child { padding-bottom: 0; }
.pill { display: inline-block; margin: 3px 0; border-radius: 999px; padding: 3px 8px; font-size: 12px; color: #52657b; background: #eef3f7; }
.pill.needed { color: #754c08; background: #f8f2e6; }
.pill.sent_back { color: #a51d17; background: #fceeee; }
.pill.accepted { color: #136335; background: #e9f6ef; }
.reason { font-size: 13px; color: #a51d17; }
.notice { margin-bottom: 16px; border-left: 3px solid #1a9752; background: #e3f0eb; padding: 12px; border-radius: 0 7px 7px 0; overflow-wrap: anywhere; }
.notice.error { border-color: #a51d17; background: #fceeee; }
.dropzone { text-align: center; border: 1px dashed #8c9eb2; border-radius: 8px; padding: 16px; background: #f7f9fb; }
.dropzone select { max-width: 100%; min-height: 36px; border: 1px solid var(--line); border-radius: 7px; width: 100%; margin-bottom: 12px; }
.dropzone .btn { margin-top: 10px; }
summary { cursor: pointer; }
details .items { margin-top: 8px; }
@media (max-width: 760px) {
  header { flex-wrap: wrap; padding: 10px 16px 0; }
  header:not(:has(#session:not([hidden]))) { padding-bottom: 10px; }
  #session { justify-content: flex-end; flex-basis: 100%; }
  main, footer { width: calc(100% - 32px); }
  h1 { font-size: 24px; }
  .panel { padding: 16px; }
  .split, .item { grid-template-columns: minmax(0, 1fr); }
  .item .btn { justify-self: start; }
  .split > aside { display: none; }
  .btn, .link { min-height: 44px; }
}
