:root {
	--bg: #ffffff;
	--haze: #f2f5f7;
	--text: #141010;
	--border: #eee;
	--theme: rgb(52, 199, 89);
	--muted: #6b7280;
}
@media (prefers-color-scheme: dark) {
	:root {
		--bg: rgb(28, 28, 30);
		--haze: rgb(36, 36, 38);
		--text: #eee;
		--border: transparent;
		--theme: rgb(48, 209, 88);
		--muted: #9ca3af;
	}
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
	font-family: 'Metropolis', -apple-system, 'Segoe UI', sans-serif;
	background: var(--bg);
	color: var(--text);
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}
.card {
	background: var(--haze);
	border-radius: 12px;
	padding: 2.5rem;
	width: 100%;
	max-width: 400px;
}
.logo {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 1.2rem;
}
.logo img {
	height: 32px;
	width: auto;
}
.subtitle {
	text-align: center;
	color: var(--muted);
	font-size: 0.95rem;
	margin-bottom: 1.8rem;
}
.field { margin-bottom: 1.1rem; }
label {
	display: block;
	font-size: 0.85rem;
	font-weight: 600;
	margin-bottom: 0.35rem;
}
input[type="text"], input[type="email"], input[type="password"] {
	width: 100%;
	padding: 0.7rem 0.9rem;
	border: 1px solid var(--border);
	border-radius: 8px;
	background: var(--bg);
	color: var(--text);
	font-size: 1rem;
	font-family: inherit;
}
input:focus { outline: 2px solid var(--theme); outline-offset: 1px; }
.modes {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 1.4rem;
}
.mode-btn {
	flex: 1;
	padding: 0.55rem;
	border: 1px solid var(--border);
	border-radius: 8px;
	background: var(--bg);
	color: var(--muted);
	font-family: inherit;
	font-size: 0.9rem;
	cursor: pointer;
}
.mode-btn.active {
	border-color: var(--theme);
	color: var(--text);
	font-weight: 600;
}
button[type="submit"] {
	width: 100%;
	padding: 0.75rem;
	border: 1px solid var(--theme);
	border-radius: 8px;
	background: transparent;
	color: var(--theme);
	font-family: inherit;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
}
button[type="submit"]:hover { background: rgba(52, 199, 89, 0.08); }
.error {
	background: rgba(220, 38, 38, 0.1);
	color: rgb(220, 38, 38);
	border-radius: 8px;
	padding: 0.7rem 0.9rem;
	font-size: 0.9rem;
	margin-bottom: 1.2rem;
	text-align: center;
}

.token-box {
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 0.9rem;
	font-family: 'Monaco', monospace;
	font-size: 0.75rem;
	word-break: break-all;
	margin-bottom: 1rem;
}
.copy-btn {
	width: 100%;
	padding: 0.6rem;
	border: 1px solid var(--theme);
	border-radius: 8px;
	background: transparent;
	color: var(--theme);
	font-family: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	margin-bottom: 1.4rem;
}
.copy-btn:hover { background: rgba(52, 199, 89, 0.1); }
.hint {
	text-align: center;
	color: var(--muted);
	font-size: 0.8rem;
	margin-bottom: 0.6rem;
}
.snippet {
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 0.9rem;
	font-family: 'Monaco', monospace;
	font-size: 0.72rem;
	white-space: pre-wrap;
	word-break: break-all;
	margin-bottom: 1rem;
	text-align: left;
}

.logout-btn {
	width: 100%;
	padding: 0.5rem;
	border: none;
	border-radius: 8px;
	background: transparent;
	color: var(--muted);
	font-family: inherit;
	font-size: 0.85rem;
	cursor: pointer;
	margin-top: 0.4rem;
}
.logout-btn:hover { color: rgb(220, 38, 38); }

/* Внешние провайдеры входа */
.oauth-sep {
  text-align: center;
  color: var(--muted, #888);
  font-size: 13px;
  margin: 14px 0 10px;
}
.oauth-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 16px;
  background: #000;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s ease;
}
.oauth-btn:hover {
  background: #222;
}
.oauth-ya {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: #fc3f1d;
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 13px;
}
