:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1d2430;
  --muted: #667085;
  --line: #d8dee8;
  --primary: #0f766e;
  --primary-hover: #115e59;
  --danger-bg: #fff1f2;
  --danger-text: #be123c;
  --success-bg: #ecfdf3;
  --success-text: #047857;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: var(--primary);
}

.site-header {
  min-height: 64px;
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.nav a,
.link-button {
  color: var(--text);
  font: inherit;
  text-decoration: none;
}

.link-button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.main {
  width: min(960px, calc(100% - 32px));
  margin: 40px auto;
}

.panel {
  max-width: 560px;
  margin: 0 auto;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

h1 {
  margin: 0 0 24px;
  font-size: 28px;
  line-height: 1.25;
}

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

.compact-form {
  margin-top: 24px;
}

.auth-links {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

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

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  color: var(--text);
  font: inherit;
  background: #fff;
}

textarea {
  resize: vertical;
}

button {
  border: 0;
  border-radius: 6px;
  padding: 12px 16px;
  background: var(--primary);
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 12px 16px;
  background: var(--primary);
  color: white;
  font-weight: 700;
  text-decoration: none;
}

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

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

button:disabled,
button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.68;
}

button:disabled:hover,
button[aria-disabled="true"]:hover {
  background: var(--primary);
}

.hint {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.errors,
.flash-error {
  margin-bottom: 20px;
  padding: 12px 14px;
  border-radius: 6px;
  background: var(--danger-bg);
  color: var(--danger-text);
}

.errors p {
  margin: 0;
}

.flash-success {
  margin-bottom: 20px;
  padding: 12px 14px;
  border-radius: 6px;
  background: var(--success-bg);
  color: var(--success-text);
}

.store-hero {
  padding: 48px 0;
}

.store-id {
  margin: 0 0 8px;
  color: var(--muted);
  font-weight: 700;
}

.store-hero h1 {
  font-size: 40px;
}

.store-description {
  max-width: 720px;
  white-space: pre-wrap;
}

.customer-box {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.customer-box h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.customer-box p {
  margin: 0;
}

.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.details {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px 16px;
}

.details dt {
  color: var(--muted);
  font-weight: 700;
}

.details dd {
  margin: 0;
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .main {
    margin: 24px auto;
  }

  .panel {
    padding: 24px 18px;
  }

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

  .customer-box {
    align-items: stretch;
    flex-direction: column;
  }

  .button-row,
  .button-link {
    width: 100%;
  }
}
