:root {
  color-scheme: light;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --background: #f6f7f4;
  --surface: #ffffff;
  --text: #192018;
  --muted: #657065;
  --border: #d9ded6;
  --accent: #214f3b;
  --accent-strong: #153727;
  --danger: #a4262c;
  --success: #107c41;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  background: var(--background);
  color: var(--text);
}

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

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.sideload,
.app {
  box-sizing: border-box;
  min-height: 100vh;
  padding: 20px;
}

.app {
  flex-direction: column;
  gap: 14px;
}

.app-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0 8px;
}

.app-header img {
  border-radius: 8px;
}

.app-header h1 {
  font-size: 24px;
  line-height: 1.1;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.section-heading h2,
.recipient-title h2 {
  font-size: 17px;
  line-height: 1.25;
}

.section-heading p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.inline-form,
.actions,
.recipient-title {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.inline-form label {
  flex: 1;
}

.form-stack,
.recipients {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

input,
select,
textarea {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 9px 10px;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  outline: 2px solid rgba(33, 79, 59, 0.16);
  outline-offset: 0;
}

.button {
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  min-height: 38px;
  padding: 8px 12px;
}

.button:hover:not(:disabled) {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.button--secondary,
.button--ghost {
  background: #fff;
  color: var(--accent);
}

.button--secondary:hover:not(:disabled),
.button--ghost:hover:not(:disabled) {
  background: #eef4ef;
  color: var(--accent-strong);
}

.button--primary {
  width: 100%;
  margin-top: 16px;
}

.alert,
.progress {
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
  padding: 10px 12px;
}

.alert--success {
  background: #e7f5ec;
  border: 1px solid #b5dfc3;
  color: var(--success);
}

.alert--error {
  background: #fde7e9;
  border: 1px solid #f3b5ba;
  color: var(--danger);
}

.progress {
  background: #eef4ef;
  border: 1px solid #c8d9ce;
  color: var(--accent-strong);
}

.recipient-title {
  justify-content: space-between;
  margin: 18px 0 12px;
}

.recipient {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
}

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

.recipient__header h3 {
  font-size: 14px;
}

@media (max-width: 360px) {
  .inline-form,
  .actions,
  .recipient-title {
    align-items: stretch;
    flex-direction: column;
  }

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