/* The admin portal's entire stylesheet. Served from our own origin and embedded in the binary:
   the portal must render when the internet does not, which is the same reason the break-glass
   login exists. */

:root {
	color-scheme: light dark;
	--bg: #fbfbfd;
	--fg: #16181d;
	--muted: #6a707c;
	--line: #d9dce3;
	--card: #ffffff;
	--accent: #2b5cd9;
	--accent-fg: #ffffff;
	--warn-bg: #fff4d6;
	--warn-fg: #6b4a00;
	--error-bg: #fdeaea;
	--error-fg: #8a1c1c;
	--radius: 8px;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #14161a;
		--fg: #e8eaee;
		--muted: #99a0ad;
		--line: #2b3038;
		--card: #1c1f25;
		--accent: #5b86ec;
		--accent-fg: #0b0d10;
		--warn-bg: #3a3010;
		--warn-fg: #f0d492;
		--error-bg: #3a1a1a;
		--error-fg: #f3b7b7;
	}
}

* { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

main { max-width: 60rem; margin: 0 auto; padding: 1.5rem 1rem 4rem; }

.bar {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
	padding: 0.6rem 1rem;
	background: var(--card);
	border-bottom: 1px solid var(--line);
}
.bar .brand { font-weight: 650; letter-spacing: -0.01em; }
.bar nav { display: flex; gap: 0.9rem; margin-left: 0.5rem; }
.bar nav a { color: var(--fg); text-decoration: none; padding: 0.2rem 0; border-bottom: 2px solid transparent; }
.bar nav a:hover { border-bottom-color: var(--accent); }
.bar .who { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; color: var(--muted); }

/* The environment badge is not decoration. An operator with three tabs open needs to know at a
   glance which one is production before they click anything. */
.env { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
	padding: 0.15rem 0.45rem; border-radius: 4px; border: 1px solid var(--line); }
.env-prod { background: #b3261e; color: #fff; border-color: #b3261e; }
.env-uat { background: var(--warn-bg); color: var(--warn-fg); border-color: var(--warn-fg); }
.env-dev { background: transparent; color: var(--muted); }

.badge { font-size: 0.75rem; padding: 0.1rem 0.4rem; border: 1px solid var(--line); border-radius: 4px; }
.badge.warn { background: var(--warn-bg); color: var(--warn-fg); border-color: var(--warn-fg); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.card.narrow { max-width: 24rem; margin: 3rem auto; }
.card h1 { margin-top: 0; font-size: 1.25rem; }

label { display: block; margin: 0.85rem 0 0.25rem; font-weight: 550; font-size: 0.9rem; }
input[type=text], input[type=password] {
	width: 100%; padding: 0.5rem 0.6rem; font: inherit;
	background: var(--bg); color: var(--fg);
	border: 1px solid var(--line); border-radius: 6px;
}
input:focus-visible, button:focus-visible, a:focus-visible {
	outline: 2px solid var(--accent); outline-offset: 2px;
}

button, .button {
	display: inline-block; font: inherit; cursor: pointer; text-decoration: none;
	padding: 0.5rem 0.9rem; border-radius: 6px;
	border: 1px solid var(--line); background: var(--card); color: var(--fg);
}
button.primary, .button.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
button.block, .button.block { display: block; width: 100%; text-align: center; margin-top: 1rem; }
button.link { border: 0; background: none; color: var(--muted); padding: 0; text-decoration: underline; }
form.inline { display: inline; }

.divider { display: flex; align-items: center; gap: 0.6rem; color: var(--muted); font-size: 0.85rem; margin: 1.1rem 0 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

.flash { background: var(--warn-bg); color: var(--warn-fg); padding: 0.6rem 0.8rem; border-radius: 6px; }
.error { background: var(--error-bg); color: var(--error-fg); padding: 0.6rem 0.8rem; border-radius: 6px; }
.hint { color: var(--muted); font-size: 0.85rem; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line); }
th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; }
