:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #16202a;
  --muted: #5f7185;
  --primary: #1565c0;
  --primary-hover: #0f4f98;
  --border: #d9e1ea;
  --error: #b00020;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

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

.btn-link {
  background: #e7edf4;
  color: #233241;
  border-radius: 8px;
  padding: 10px 14px;
  text-decoration: none;
  font-weight: 600;
}

.container {
  max-width: 900px;
  margin: 24px auto;
  padding: 0 16px;
  display: grid;
  gap: 16px;
}

h1,
h2 {
  margin-top: 0;
}

label {
  display: block;
  margin-top: 12px;
  margin-bottom: 6px;
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}

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

button {
  margin-top: 14px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
}

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

button.secondary {
  margin-top: 0;
  background: #e7edf4;
  color: #233241;
}

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

.button-row button {
  margin-top: 0;
}

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

.muted {
  color: var(--muted);
  margin-top: -4px;
}

.result {
  margin-top: 12px;
  padding: 12px;
  background: #f1f5fb;
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: auto;
  min-height: 56px;
  white-space: pre-wrap;
}

.error {
  color: var(--error);
  min-height: 20px;
}
