:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: #172433;
  background: #f3f6f9;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
.shell { width: min(100% - 32px, 980px); margin: 0 auto; padding: 28px 0 48px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.brand { color: #10283f; font-size: 19px; font-weight: 800; text-decoration: none; }
.brand span { color: #0788a5; font-size: 14px; font-weight: 600; margin-left: 8px; }
.account { display: flex; align-items: center; gap: 14px; color: #536273; font-size: 14px; }
.account form { margin: 0; }
.card { background: #fff; border: 1px solid #dfe6ec; border-radius: 14px; padding: 24px; margin: 0 0 18px; box-shadow: 0 8px 26px #16283a0a; }
.login-card { max-width: 540px; margin: 8vh auto 18px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(25px, 4vw, 34px); letter-spacing: -.03em; }
h2 { font-size: 20px; }
h3 { margin-bottom: 5px; font-size: 17px; }
.eyebrow { margin-bottom: 8px; color: #0788a5; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.muted, .hint { color: #647487; line-height: 1.55; }
.hint { margin: -4px 0 2px; font-size: 13px; }
.stack { display: grid; gap: 15px; }
.stack label, .grid-form label { display: grid; gap: 7px; color: #33475b; font-size: 14px; font-weight: 650; }
input, textarea { width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid #cbd6df; border-radius: 8px; background: #fff; color: #172433; font: inherit; }
input:focus, textarea:focus { outline: 3px solid #0788a522; border-color: #0788a5; }
input[type="file"] { padding: 8px; font-size: 13px; }
.button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; padding: 9px 15px; border: 0; border-radius: 8px; background: #087f9a; color: #fff; font: inherit; font-weight: 750; text-decoration: none; cursor: pointer; }
.button:hover { background: #066980; }
.button-muted { border: 1px solid #d1dce4; background: #f8fafc; color: #304357; }
.button-muted:hover { background: #edf2f6; }
.button-danger { background: #b83b42; }
.button-danger:hover { background: #962e35; }
.alert { padding: 13px 15px; margin: 0 0 16px; border-radius: 9px; line-height: 1.45; }
.alert-error { background: #fff1f0; border: 1px solid #f0c4c0; color: #922f2b; }
.alert-success { background: #edf9f2; border: 1px solid #b9e3c9; color: #1d6840; }
.case-result { margin: 18px 0; padding: 16px; border: 1px solid #b9e3c9; border-radius: 10px; background: #f3fbf6; overflow-wrap: anywhere; }
.case-result p { margin: 10px 0 0; }
code { overflow-wrap: anywhere; color: #18344d; }
.token { display: block; padding: 10px; border-radius: 6px; background: #e7eef4; }
.section-gap { margin-top: 18px; }
.grid-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; align-items: end; }
.grid-form .button { width: 100%; }
.count { display: inline-grid; min-width: 26px; height: 26px; place-items: center; border-radius: 20px; background: #e8f4f7; color: #087f9a; font-size: 13px; vertical-align: middle; }
.case-list { display: grid; gap: 14px; }
.case { padding: 18px; border: 1px solid #e0e7ed; border-radius: 11px; }
.case-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.case-heading p { margin-bottom: 0; overflow-wrap: anywhere; font-size: 13px; }
.status { flex: 0 0 auto; padding: 6px 10px; border-radius: 30px; background: #fff5dd; color: #805b0d; font-size: 12px; font-weight: 800; }
.status-approved { background: #e7f7ed; color: #23683f; }
.status-rejected { background: #fff0ef; color: #a23832; }
.documents, .decision-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.documents .button { width: 100%; font-size: 13px; }
.decision-grid { padding-top: 14px; border-top: 1px solid #e5ebf0; }
details summary { color: #304357; font-weight: 750; cursor: pointer; }
footer { padding: 12px 4px; color: #7a8794; font-size: 12px; text-align: center; }
@media (max-width: 640px) {
  .shell { width: min(100% - 20px, 980px); padding-top: 18px; }
  .card { padding: 18px; }
  .grid-form, .documents, .decision-grid { grid-template-columns: 1fr; }
  .account { align-items: flex-end; flex-direction: column; gap: 6px; }
  .brand span { display: block; margin: 3px 0 0; }
}
