:root {
  color-scheme: light;
  --ink: #18181b;
  --muted: #52525b;
  --line: #d4d4d8;
  --surface: #ffffff;
  --soft: #f4f4f5;
  --accent: #14532d;
  --danger: #991b1b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f8fafc;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

.shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.narrow {
  width: min(760px, calc(100% - 32px));
}

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

h1,
h2 {
  margin: 0 0 12px;
  line-height: 1.15;
}

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

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

.full {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 650;
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: white;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 14px;
  background: var(--ink);
  color: white;
  font-weight: 700;
  cursor: pointer;
}

button.secondary {
  border-color: var(--line);
  background: white;
  color: var(--ink);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.notice {
  border-left: 4px solid var(--accent);
  background: #ecfdf5;
  padding: 12px;
}

.error {
  border-left-color: var(--danger);
  background: #fef2f2;
}

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

.row {
  display: grid;
  grid-template-columns: 1.4fr 1.4fr 0.8fr 0.6fr auto;
  gap: 10px;
  align-items: end;
}

.hidden {
  display: none !important;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.address-search {
  position: relative;
  margin-bottom: 4px;
}

.address-suggestions {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  margin: 4px 0 0;
  padding: 4px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  max-height: 260px;
  overflow-y: auto;
}

.address-suggestions[hidden] {
  display: none;
}

.address-suggestion {
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
}

.address-suggestion:hover,
.address-suggestion:focus {
  background: var(--soft);
}

.popia-notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 14px 16px;
  font-size: 0.95rem;
  color: var(--muted);
}

.popia-notice p {
  margin: 0 0 10px;
  font-weight: 400;
}

.popia-notice p:last-child {
  margin-bottom: 0;
}

.search-hint {
  margin: 6px 2px 0;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
}

@media (max-width: 720px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .row,
  .topbar {
    grid-template-columns: 1fr;
    display: grid;
  }
}
