:root {
  --paper: #fafaf9;
  --surface: #ffffff;
  --surface-muted: #f5f5f4;
  --ink: #1c1917;
  --text: #44403c;
  --muted: #78716c;
  --line: #d6d3d1;
  --line-strong: #a8a29e;
  --navy: #284563;
  --danger: #991b1b;
  --danger-bg: #fef2f2;
  --warning-bg: #fff7ed;
  --warning-text: #7c2d12;
  --font-ui: "Source Serif 4", Georgia, "Times New Roman", ui-serif, serif;
  --font-mono: "Cascadia Mono", "SFMono-Regular", Consolas, ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--paper);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
}

a {
  color: var(--navy);
  text-decoration: none;
}

a:hover {
  color: var(--ink);
}

.page-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr) 36px;
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  border-color: var(--line);
  background: var(--paper);
}

.site-header {
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--ink);
  font-size: 19px;
  font-weight: 800;
}

.site-nav {
  display: flex;
  gap: 16px;
  font-weight: 800;
}

.site-footer {
  justify-content: center;
  padding: 0 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.content {
  min-width: 0;
  display: grid;
  place-items: center;
  padding: 48px 28px;
}

.panel {
  width: min(100%, 760px);
  border: 1px solid var(--line);
  background: var(--surface);
}

.panel-header,
.panel-body {
  padding: 28px;
}

.panel-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

h1 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: 0;
}

.lead {
  max-width: 620px;
  margin: 0;
  color: var(--text);
  font-size: 17px;
}

.kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label,
.checkbox-row {
  color: var(--ink);
  font-weight: 800;
}

input[type="email"],
input[type="password"] {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--surface);
  border-radius: 0;
}

input[type="email"]:focus,
input[type="password"]:focus {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.checkbox-row {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 14px;
}

.checkbox-row input {
  margin-top: 4px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.primary-button,
.secondary-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  font-weight: 800;
  letter-spacing: 0;
  cursor: pointer;
}

.primary-button {
  padding: 0 20px;
  border-color: var(--ink);
  border-radius: 999px;
  color: var(--surface);
  background: var(--ink);
}

.secondary-button {
  padding: 0 12px;
  border-color: var(--line);
  border-radius: 0;
  color: var(--ink);
  background: var(--surface);
}

.secondary-button:hover {
  background: var(--surface-muted);
}

.notice,
.error {
  padding: 12px;
  border: 1px solid var(--line);
  font-weight: 800;
}

.notice {
  color: var(--text);
  background: var(--surface-muted);
}

.error {
  border-color: #efaaa6;
  color: var(--danger);
  background: var(--danger-bg);
}

.token-box {
  overflow: auto;
  max-width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--surface-muted);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: pre-wrap;
}


/* Logowanie OAuth (Google / GitHub / LinkedIn) - wg DS: secondary button, bez kolorów marek. */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 12px;
  color: #8b96a2;
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #d3dbe2;
}

.oauth-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.oauth-button {
  text-align: center;
}
