:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #202124;
  --muted: #65707a;
  --line: #d9dde3;
  --primary: #146c5d;
  --primary-dark: #0f574b;
  --accent: #2f6fed;
  --danger: #b42318;
  --success-bg: #edf8f3;
  --success-line: #b6dfcd;
  --success-text: #126245;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  align-items: center;
  background: var(--bg);
  color: var(--text);
  display: flex;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  justify-content: center;
  min-height: 100dvh;
  padding: 18px;
}

.app-shell {
  width: min(100%, 430px);
}

.topbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.eyebrow {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 3px;
  text-transform: uppercase;
}

h1 {
  font-size: 30px;
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1.1;
  margin: 0;
}

.panel,
.result-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 40px rgba(17, 24, 39, 0.08);
  padding: 18px;
}

.patient-line {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 14px;
}

#receipt-file {
  height: 1px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  width: 1px;
}

button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  min-height: 48px;
}

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

.primary-button,
.secondary-button {
  font-size: 17px;
  font-weight: 720;
  width: 100%;
}

.primary-button {
  background: var(--primary);
  color: #fff;
}

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

.secondary-button {
  background: #eef2f6;
  color: var(--text);
  margin-top: 14px;
}

.icon-button {
  align-items: center;
  background: #e9edf2;
  color: var(--muted);
  display: inline-flex;
  font-size: 28px;
  height: 42px;
  justify-content: center;
  line-height: 1;
  min-height: 42px;
  width: 42px;
}

.status {
  color: var(--muted);
  font-size: 14px;
  min-height: 20px;
  margin: 14px 0 0;
}

.status.error {
  color: var(--danger);
}

.progress-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.progress-step {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  font-size: 15px;
  min-height: 44px;
  padding: 0 12px;
}

.progress-step.active {
  border-color: var(--accent);
  color: var(--text);
}

.progress-step.done {
  border-color: var(--success-line);
  color: var(--success-text);
}

.review-form {
  display: grid;
  gap: 13px;
  margin-top: 16px;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 14px;
  font-weight: 650;
  gap: 6px;
}

input {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  min-height: 46px;
  padding: 0 12px;
  width: 100%;
}

.result-card {
  background: var(--success-bg);
  border-color: var(--success-line);
  margin-top: 16px;
}

.result-title {
  color: var(--success-text);
  font-size: 18px;
  font-weight: 760;
  margin: 0 0 12px;
}

dl {
  display: grid;
  gap: 9px;
  margin: 0;
}

dl div {
  display: grid;
  gap: 2px;
}

dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.hidden {
  display: none !important;
}
