/* Apollo — app shell styles. Mobile first; the same sheet serves login and app. */

:root {
	color-scheme: dark;
	--bg: #0b0d12;
	--surface: #141821;
	--surface-2: #1b2130;
	--line: #262d3d;
	--text: #e8ecf4;
	--muted: #98a2b8;
	--accent: #6ea8fe;
	--accent-ink: #08101f;
	--danger: #ff7a7a;
	--radius: 14px;
	--gap: 16px;
}

* { box-sizing: border-box; }

body.apollo {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: .9em; }

/* ---------- buttons & fields ---------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 16px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--surface-2);
	color: var(--text);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.btn:hover { text-decoration: none; border-color: #36405a; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--ghost { background: transparent; }
.btn--block { width: 100%; }
.btn--sm { padding: 6px 12px; font-size: 13px; }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 13px; }
.field input {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--surface-2);
	color: var(--text);
	font: inherit;
}
.field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.check { display: flex; align-items: center; gap: 8px; margin: 4px 0 18px; color: var(--muted); font-size: 14px; }

.alert {
	margin: 0 0 14px;
	padding: 10px 12px;
	border: 1px solid #58303a;
	border-radius: 10px;
	background: #2a1a1f;
	color: var(--danger);
	font-size: 14px;
}

/* ---------- login ---------- */

.login {
	min-height: 100svh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
}
.login__card {
	width: 100%;
	max-width: 380px;
	padding: 28px 24px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
}
.login__brand { text-align: center; margin-bottom: 22px; }
.login__brand h1 { margin: 12px 0 4px; font-size: 26px; letter-spacing: .5px; }
.login__brand p { margin: 0; color: var(--muted); font-size: 14px; }
.login__mark,
.topbar__mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 12px;
	background: var(--accent);
	color: var(--accent-ink);
	font-weight: 700;
	font-size: 20px;
}

/* ---------- app shell ---------- */

.topbar {
	position: sticky;
	top: 0;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 16px;
	border-bottom: 1px solid var(--line);
	background: var(--surface);
}
.topbar__brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.topbar__brand:hover { text-decoration: none; }
.topbar__mark { width: 30px; height: 30px; border-radius: 9px; font-size: 15px; }
.topbar__right { display: flex; align-items: center; gap: 10px; }
.topbar__user { color: var(--muted); font-size: 13px; }

.layout { display: block; }

.nav {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding: 12px 16px;
	border-bottom: 1px solid var(--line);
	-webkit-overflow-scrolling: touch;
}
.nav__group { display: flex; gap: 8px; align-items: center; }
.nav__title {
	margin: 0 2px 0 8px;
	color: var(--muted);
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .08em;
	white-space: nowrap;
}
.nav__item {
	padding: 7px 13px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
	color: var(--text);
	font-size: 14px;
	white-space: nowrap;
}
.nav__item:hover { text-decoration: none; border-color: #36405a; }
.nav__item.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }

.main { padding: 20px 16px 48px; max-width: 1040px; }
.page__title { margin: 0 0 16px; font-size: 22px; }

.card {
	padding: 18px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
}
.card + .card { margin-top: var(--gap); }
.card h2 { margin: 0 0 8px; font-size: 16px; }
.card p { margin: 0 0 8px; color: var(--muted); }
.card--empty p:last-child { margin-bottom: 0; }

.page__meta { margin: -8px 0 18px; color: var(--muted); font-size: 14px; }

.list { margin: 0; padding: 0; list-style: none; }
.list__row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 10px;
	padding: 9px 0;
	border-top: 1px solid var(--line);
}
.list__row:first-child { border-top: 0; padding-top: 0; }
.list__title { flex: 1 1 60%; }
.list__meta { color: var(--muted); font-size: 13px; }

.pill {
	flex: 0 0 auto;
	min-width: 74px;
	padding: 3px 9px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface-2);
	color: var(--muted);
	font-size: 12px;
	text-align: center;
	white-space: nowrap;
}
.pill--alert { border-color: #58303a; background: #2a1a1f; color: var(--danger); }

/* ---------- desktop ---------- */

@media (min-width: 880px) {
	.layout { display: grid; grid-template-columns: 232px 1fr; align-items: start; }
	.nav {
		position: sticky;
		top: 51px;
		display: block;
		height: calc(100svh - 51px);
		overflow-y: auto;
		padding: 18px 14px;
		border-right: 1px solid var(--line);
		border-bottom: 0;
	}
	.nav__group { display: block; margin-top: 18px; }
	.nav__title { margin: 0 0 8px; }
	.nav__item { display: block; margin-bottom: 6px; border-radius: 10px; }
	.main { padding: 28px 28px 64px; }
}
