:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #111111;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --accent: #111111;
  --accent-text: #ffffff;
  --error: #b91c1c;
  --error-bg: #fee2e2;
  --success: #047857;
  --success-bg: #d1fae5;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 1px 1px rgba(0,0,0,.03);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  width: 100%;
  max-width: 420px;
}

.card h1 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card .lead {
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: 14px;
}

.field { margin-bottom: 14px; }

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.field input[type=email],
.field input[type=password],
.field input[type=text],
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font: inherit;
  color: var(--text);
  transition: border-color .15s;
}

.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.field textarea { min-height: 90px; resize: vertical; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; }

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin: 14px 0 18px;
  cursor: pointer;
}

.checkbox input { margin-top: 2px; }

button.primary {
  width: 100%;
  padding: 11px 14px;
  background: var(--accent);
  color: var(--accent-text);
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: opacity .15s;
}

button.primary:hover:not(:disabled) { opacity: .9; }
button.primary:disabled { opacity: .5; cursor: not-allowed; }

button.ghost {
  padding: 8px 12px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.alt {
  margin: 18px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.alt a { color: var(--accent); text-decoration: none; font-weight: 500; }
.alt a:hover { text-decoration: underline; }

.message {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
  display: none;
}

.message.error { background: var(--error-bg); color: var(--error); display: block; }
.message.success { background: var(--success-bg); color: var(--success); display: block; }

/* Account page */
.shell {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 24px;
}

.shell header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.shell h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.shell .user-meta {
  font-size: 13px;
  color: var(--text-muted);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 18px;
}

.panel h2 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 600;
}

.panel .sub {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 13px;
}

.kv {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 8px 16px;
  font-size: 14px;
}

.kv dt { color: var(--text-muted); }
.kv dd { margin: 0; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

.badge.ok { background: var(--success-bg); color: var(--success); }
.badge.warn { background: #fef3c7; color: #92400e; }

table.shops {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table.shops th, table.shops td {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

table.shops th {
  font-weight: 500;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

table.shops tr:last-child td { border-bottom: 0; }

.empty {
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
  padding: 24px 0;
}
