:root {
  color-scheme: light;
  --bg: #eef3f1;
  --panel: #ffffff;
  --text: #17231f;
  --muted: #6d7b76;
  --line: #dce6e2;
  --accent: #087f6a;
  --accent-dark: #075c4e;
  --accent-soft: #e5f3ef;
  --danger: #b43838;
  --danger-soft: #fff0ef;
  --shadow: 0 16px 36px rgba(24, 53, 45, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

.shell {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(220, 230, 226, 0.9);
  border-radius: 8px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.panel + .panel {
  margin-top: 14px;
}

.topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 28px;
  margin-bottom: 18px;
}

.badge,
.mode {
  font-size: 12px;
  line-height: 1;
}

.badge {
  color: var(--accent-dark);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.mode {
  color: var(--muted);
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 18ch;
  margin-bottom: 22px;
  font-size: 31px;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

h2 {
  margin-bottom: 14px;
  font-size: 18px;
  line-height: 1.2;
}

.form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
}

label span {
  color: #34433e;
  font-size: 13px;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  color: var(--text);
  background: #fbfdfc;
  outline: 0;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

select {
  appearance: none;
  padding-right: 42px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 22px, calc(100% - 12px) 22px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

textarea {
  min-height: 132px;
  line-height: 1.45;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #9aa8a3;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(8, 127, 106, 0.12);
}

button {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  padding: 14px 18px;
  background: var(--accent);
  color: #fff;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(8, 127, 106, 0.18);
  transition: background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

button:hover {
  background: var(--accent-dark);
}

button:active {
  transform: translateY(1px);
  box-shadow: 0 4px 10px rgba(8, 127, 106, 0.16);
}

.link-button {
  width: auto;
  min-height: 40px;
  padding: 8px 0 8px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent-dark);
  font-size: 13px;
  box-shadow: none;
}

.link-button:hover {
  background: transparent;
  color: var(--text);
}

button:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.error {
  min-height: 14px;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.25;
}

.account {
  display: grid;
  gap: 3px;
  margin: -4px 0 22px;
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
}

.account strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.account span {
  color: var(--muted);
  font-size: 13px;
}

.result {
  margin-top: 16px;
  border: 1px solid #cce8df;
  border-radius: 8px;
  padding: 13px 14px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 13px;
  line-height: 1.4;
}

.result.error-box {
  border-color: #f1caca;
  background: var(--danger-soft);
  color: var(--danger);
}

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

.report {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdfc;
}

.report strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.report p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.files-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* File attachments are deferred from the current prototype version. */
.form label:has(#attachments),
#filesList {
  display: none;
}

.file-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.file-remove {
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--danger);
  font-size: 12px;
  font-weight: 600;
  box-shadow: none;
}

@media (max-width: 520px) {
  .shell {
    padding: 12px 10px calc(28px + env(safe-area-inset-bottom));
  }

  .panel {
    padding: 18px 14px;
    border-radius: 8px;
  }

  .panel + .panel {
    margin-top: 10px;
  }

  h1 {
    max-width: none;
    font-size: 27px;
  }

  #reportForm > #submitButton {
    position: sticky;
    bottom: 12px;
    z-index: 3;
    box-shadow: 0 10px 24px rgba(8, 64, 53, 0.24);
  }
}
