:root {
  --bg-0: #f3f8fc;
  --bg-1: #e9f4fb;
  --ink: #0f2230;
  --muted: #426173;
  --card: #ffffff;
  --brand: #0099dd;
  --brand-2: #007db5;
  --brand-3: #d9f2fc;
  --warn: #b42318;
  --ok: #126f3d;
  --line: #cfe1ec;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  background: radial-gradient(circle at 12% 8%, #d8f2ff 0%, transparent 48%),
    radial-gradient(circle at 88% 92%, #d2ecfb 0%, transparent 45%),
    linear-gradient(165deg, var(--bg-0), var(--bg-1));
}

.page {
  max-width: 840px;
  margin: 0 auto;
  padding: 40px 16px;
}

.card {
  background: color-mix(in srgb, var(--card) 94%, #f0faff);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 14px 36px rgb(12 77 115 / 12%);
}

.brandBar {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.brandLogo {
  width: 120px;
  max-width: 45%;
  height: auto;
}

.card + .card {
  margin-top: 18px;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-2);
  font-weight: 800;
  font-size: 12px;
}

h1,
h2 {
  margin: 8px 0 8px;
  font-family: "Space Grotesk", sans-serif;
}

.subtitle {
  margin: 0 0 16px;
  color: var(--muted);
}

.reportForm {
  margin-top: 16px;
  display: grid;
  gap: 14px;
}

.stepHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  background: #f3fbff;
  border-radius: 10px;
  padding: 10px 12px;
}

.stepIndicator {
  margin: 0;
  font-weight: 700;
  color: var(--brand-2);
}

.formLayout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.stepColumn {
  display: grid;
  gap: 14px;
}

.formSection {
  border: 1px solid var(--line);
  background: #f9fcff;
  border-radius: 12px;
  padding: 14px;
}

.formSection h3 {
  margin: 0 0 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 18px;
  color: #0f364d;
}

.stepSection {
  display: none;
}

.stepSection.active {
  display: block;
}

.subSectionTitle {
  margin: 16px 0 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 15px;
  color: #0f364d;
  font-weight: 600;
  grid-column: 1 / -1;
}

.stack {
  display: grid;
  gap: 10px;
}

.fieldGrid {
  display: grid;
  gap: 12px;
}

.fieldGrid.twoCol {
  grid-template-columns: 1fr 1fr;
}

.field {
  display: grid;
  gap: 6px;
}

.field > span {
  font-weight: 700;
}

label {
  font-weight: 700;
}

input {
  height: 44px;
  border: 1px solid #b8d5e6;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 16px;
  background: #fff;
}

select,
textarea {
  border: 1px solid #b8d5e6;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  font-family: "Manrope", sans-serif;
  background: #fff;
  color: var(--ink);
}

input[type="file"] {
  padding: 10px;
  height: auto;
}

.attachmentList {
  display: grid;
  gap: 6px;
}

.attachmentItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #c6dcec;
  background: #f5fbff;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 13px;
}

.attachmentName {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.removeFileBtn {
  height: 28px;
  border: 1px solid #9ec9df;
  border-radius: 6px;
  background: #ffffff;
  color: #24516a;
  font-size: 12px;
  font-weight: 700;
  padding: 0 8px;
}

input:focus {
  outline: 2px solid color-mix(in srgb, var(--brand) 45%, white);
  border-color: var(--brand);
}

select:focus,
textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--brand) 45%, white);
  border-color: var(--brand);
}

button {
  border: 0;
  border-radius: 10px;
  height: 44px;
  font-weight: 800;
  font-family: "Manrope", sans-serif;
  font-size: 15px;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease, background-color 120ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

#loginBtn {
  background: var(--brand);
  color: white;
}

#loginBtn:hover {
  background: var(--brand-2);
}

.ghost {
  border: 1px solid var(--line);
  background: #f2faff;
  color: var(--brand-2);
  padding: 0 14px;
}

.small {
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
}

.submitBar {
  display: grid;
  gap: 8px;
}

.submitSuccessState {
  margin-top: 16px;
  border: 1px solid #b7e3c6;
  background: #ecfaf1;
  border-radius: 12px;
  padding: 22px;
}

.submitSuccessState h3 {
  margin: 8px 0;
  color: #0f5f35;
  font-family: "Space Grotesk", sans-serif;
}

.stepNav {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

#nextStepBtn {
  background: var(--brand);
  color: #fff;
}

#nextStepBtn:hover {
  background: var(--brand-2);
}

#submitBtn {
  background: var(--brand);
  color: #fff;
}

#submitBtn:hover {
  background: var(--brand-2);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.message {
  min-height: 1.2em;
  margin: 0;
  font-size: 14px;
}

.message.error {
  color: var(--warn);
}

.message.ok {
  color: var(--ok);
}

.apiBox {
  background: #f3fbff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}

.signatureCanvas {
  width: 100%;
  height: 160px;
  border: 1px solid #9dc6db;
  border-radius: 10px;
  background: #fff;
  touch-action: none;
}

.conditional {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #b5d2e2;
}

code {
  color: var(--brand-2);
}

.hidden {
  display: none;
}

.reveal {
  animation: rise 480ms ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .page {
    padding-top: 18px;
  }

  .card {
    padding: 18px;
  }

  .row {
    flex-direction: column;
    align-items: flex-start;
  }

  .fieldGrid.twoCol {
    grid-template-columns: 1fr;
  }

  .formLayout {
    grid-template-columns: 1fr;
  }
}
