/* Engram Cloud Dashboard - TUI-aligned visual system on top of Pico CSS */

:root {
	--engram-base: #191724;
	--engram-surface: #1f1d2e;
	--engram-surface-soft: rgba(31, 29, 46, 0.82);
	--engram-overlay: #6e6a86;
	--engram-text: #e0def4;
	--engram-muted: #908caa;
	--engram-primary: #c4a7e7;
	--engram-primary-hover: #d4b8f2;
	--engram-success: #9ccfd8;
	--engram-warning: #f6c177;
	--engram-danger: #eb6f92;
	--engram-accent: #ebbcba;
	--engram-blue: #31748f;
	--engram-shadow: rgba(9, 8, 16, 0.5);
	--engram-font-display: "Iosevka", "Iosevka Term", "Iosevka Fixed", "IBM Plex Mono", "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
	--engram-font-body: "Iosevka Aile", "Iosevka Etoile", "Iosevka", "Inter", "IBM Plex Sans", "Avenir Next", "Segoe UI", sans-serif;
}

[data-theme="dark"] {
	--pico-background-color: var(--engram-base);
	--pico-card-background-color: var(--engram-surface);
	--pico-color: var(--engram-text);
	--pico-muted-color: var(--engram-muted);
	--pico-primary: var(--engram-primary);
	--pico-primary-hover: var(--engram-primary-hover);
	--pico-border-color: var(--engram-overlay);
	--pico-form-element-background-color: rgba(25, 23, 36, 0.88);
	--pico-form-element-border-color: rgba(110, 106, 134, 0.7);
	--pico-form-element-color: var(--engram-text);
	--pico-form-element-placeholder-color: rgba(144, 140, 170, 0.7);
	--pico-primary-background: var(--engram-primary);
	--pico-primary-inverse: var(--engram-base);
	--pico-secondary: var(--engram-blue);
	--pico-secondary-hover: #3b85a3;
}

html,
body {
	min-height: 100%;
}

body.shell-body {
	margin: 0;
	font-family: var(--engram-font-body);
	color: var(--engram-text);
	background:
		radial-gradient(circle at top left, rgba(196, 167, 231, 0.2), transparent 28%),
		radial-gradient(circle at 85% 18%, rgba(49, 116, 143, 0.2), transparent 22%),
		radial-gradient(circle at 18% 82%, rgba(156, 207, 216, 0.12), transparent 20%),
		linear-gradient(180deg, #120f1c 0%, #171320 32%, #191724 100%);
	background-attachment: fixed;
}

body,
button,
input,
select,
textarea,
table,
th,
td {
	font-family: var(--engram-font-body);
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand,
.section-kicker,
.status-pill,
.metric-value,
.badge,
nav [role="tab"],
.browser-subtabs [role="tab"],
.admin-nav a,
th,
.shell-footer small,
.console-key,
.hero-console,
.terminal-note,
.empty-state p,
.user-name,
.login-copy,
.login-lead {
	font-family: var(--engram-font-display);
}

a {
	color: var(--engram-primary);
	text-decoration: none;
}

a:hover {
	color: var(--engram-primary-hover);
}

.shell-backdrop {
	min-height: 100vh;
	padding: 1.1rem;
	position: relative;
	overflow-x: hidden;
}

.shell-backdrop::before {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
	background-size: 32px 32px;
	opacity: 0.45;
	mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 90%);
}

.status-ribbon {
	max-width: 1180px;
	margin: 0 auto 1rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem;
	align-items: center;
	padding: 0.85rem 1rem;
	border: 1px solid rgba(110, 106, 134, 0.85);
	background: rgba(18, 15, 28, 0.72);
	box-shadow: inset 0 0 0 1px rgba(196, 167, 231, 0.08);
	backdrop-filter: blur(12px);
}

.status-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.25rem 0.75rem;
	border: 1px solid rgba(156, 207, 216, 0.5);
	background: rgba(49, 116, 143, 0.18);
	color: var(--engram-success);
	font-size: 0.74rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.status-copy {
	color: var(--engram-muted);
	font-size: 0.9rem;
}

.app-shell,
.login-shell {
	max-width: 1240px;
	margin: 0 auto;
	border: 1px solid rgba(110, 106, 134, 0.9);
	box-shadow:
		0 30px 80px var(--engram-shadow),
		inset 0 0 0 1px rgba(196, 167, 231, 0.08);
	background: rgba(14, 12, 23, 0.82);
	backdrop-filter: blur(16px);
	position: relative;
	overflow: hidden;
}

.shell-header,
.shell-nav,
.shell-main,
.shell-footer {
	position: relative;
	z-index: 1;
	padding-left: clamp(1rem, 2vw, 2rem);
	padding-right: clamp(1rem, 2vw, 2rem);
}

.shell-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 1rem;
	padding-top: 1.5rem;
	padding-bottom: 1.2rem;
	border-bottom: 1px solid rgba(110, 106, 134, 0.65);
}

.brand-stack {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}

.brand {
	font-size: clamp(1.7rem, 3vw, 2.65rem);
	font-weight: 700;
	letter-spacing: -0.04em;
	color: var(--engram-primary);
	text-shadow: 0 0 24px rgba(196, 167, 231, 0.18);
}

.brand-subtitle {
	margin: 0;
	color: var(--engram-muted);
	font-style: italic;
	font-size: 0.95rem;
}

.user-info {
	display: flex;
	align-items: baseline;
	gap: 0.55rem;
	color: var(--engram-muted);
	padding-top: 0.45rem;
}

.user-name {
	text-transform: lowercase;
	letter-spacing: 0.03em;
	font-size: 0.95rem;
	margin-right: 0.2rem;
}

.user-link {
	font-size: 0.78rem;
	color: var(--engram-muted);
	text-decoration: none;
	letter-spacing: 0.03em;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	font-family: var(--engram-font-body);
}

.user-link:hover {
	color: var(--engram-primary);
}

.user-sep {
	color: rgba(110, 106, 134, 0.5);
	font-size: 0.7rem;
}

.logout-link {
	text-transform: none;
	line-height: 1;
}

.shell-button,
button,
button[type="submit"],
button.outline.secondary {
	border-radius: 0;
	border: 1px solid rgba(156, 207, 216, 0.65);
	background: linear-gradient(180deg, rgba(49, 116, 143, 0.85), rgba(31, 29, 46, 0.95));
	color: var(--engram-text);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.76rem;
	padding: 0.72rem 1rem;
}

.shell-button:hover,
button:hover,
button[type="submit"]:hover,
button.outline.secondary:hover {
	border-color: rgba(196, 167, 231, 0.7);
	background: linear-gradient(180deg, rgba(196, 167, 231, 0.85), rgba(31, 29, 46, 0.95));
	color: var(--engram-text);
}

.shell-nav {
	padding-top: 0.8rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid rgba(110, 106, 134, 0.45);
}

nav [role="tablist"] {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	list-style: none;
	padding: 0;
	margin: 0;
}

nav [role="tab"],
.browser-subtabs [role="tab"],
.admin-nav a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.7rem 1rem;
	border: 1px solid transparent;
	background: rgba(31, 29, 46, 0.55);
	color: var(--engram-muted);
	text-transform: uppercase;
	font-size: 0.78rem;
	letter-spacing: 0.1em;
	transition: border-color 160ms ease, color 160ms ease, background 160ms ease, transform 160ms ease;
}

nav [role="tab"]:hover,
.browser-subtabs [role="tab"]:hover,
.admin-nav a:hover {
	transform: translateY(-1px);
	border-color: rgba(156, 207, 216, 0.3);
	color: var(--engram-text);
}

nav [role="tab"][aria-selected="true"],
.browser-subtabs [role="tab"].active,
.admin-nav a.active {
	border-color: rgba(196, 167, 231, 0.66);
	background: linear-gradient(180deg, rgba(196, 167, 231, 0.22), rgba(31, 29, 46, 0.9));
	color: var(--engram-primary);
	box-shadow: inset 0 -2px 0 rgba(196, 167, 231, 0.7);
}

.shell-main {
	padding-top: 1.4rem;
	padding-bottom: 2rem;
	min-height: 65vh;
	display: grid;
	gap: 1.75rem;
}

.shell-footer {
	padding-top: 1rem;
	padding-bottom: 1.15rem;
	border-top: 1px solid rgba(110, 106, 134, 0.45);
}

.shell-footer small {
	color: var(--engram-muted);
	font-size: 0.74rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.hero-panel,
.data-frame,
.card,
.login-container,
.login-sidepanel,
.stat-card,
.metric-card,
.empty-state {
	border: 1px solid rgba(110, 106, 134, 0.85);
	background: var(--engram-surface-soft);
	box-shadow: inset 0 0 0 1px rgba(196, 167, 231, 0.05);
}

.hero-panel,
.data-frame,
.login-container,
.login-sidepanel,
.empty-state {
	padding: clamp(1rem, 2vw, 1.5rem);
}

.frame-section {
	padding: 0;
	border: none;
	background: transparent;
	box-shadow: none;
	min-width: 0;
}

.browser-shell {
	padding: 1.4rem 1.5rem 1.5rem;
	border: 1px solid rgba(110, 106, 134, 0.85);
	background:
		radial-gradient(circle at top left, rgba(196, 167, 231, 0.06), transparent 28%),
		radial-gradient(circle at bottom right, rgba(49, 116, 143, 0.08), transparent 24%),
		rgba(14, 12, 23, 0.82);
	box-shadow:
		0 18px 36px rgba(9, 8, 16, 0.18),
		inset 0 0 0 1px rgba(196, 167, 231, 0.05);
}

.hero-panel {
	display: grid;
	gap: 1rem;
}

.hero-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.5fr) minmax(16rem, 1fr);
	gap: 1.4rem;
	align-items: start;
}

.section-kicker {
	margin: 0 0 0.55rem;
	font-size: 0.74rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--engram-accent);
}

.hero-copy h2,
.section-header h2,
.login-container h2,
.login-sidepanel h1 {
	margin: 0 0 1rem;
	color: var(--engram-text);
	font-size: clamp(1.7rem, 3.4vw, 2.9rem);
	line-height: 0.98;
	letter-spacing: -0.05em;
}

.section-header h2,
.section-header h3,
.section-block-title,
.project-card h3,
.empty-state h3 {
	font-family: var(--engram-font-display);
	letter-spacing: -0.03em;
}

.section-header h2,
.section-header h3,
.section-block-title {
	font-size: clamp(1.15rem, 2vw, 1.5rem);
	margin: 0;
}

.hero-lead,
.login-lead,
.login-copy,
.empty-state p,
.card p,
td,
label,
.status-copy {
	font-size: 1rem;
	line-height: 1.72;
	color: var(--engram-text);
}

.hero-lead,
.login-lead,
.login-copy,
.empty-state p {
	margin-bottom: 0;
	max-width: 64ch;
	color: rgba(224, 222, 244, 0.92);
}

.hero-console,
.terminal-note,
.login-console {
	padding: 1rem;
	border: 1px solid rgba(110, 106, 134, 0.72);
	background: rgba(13, 11, 20, 0.75);
	color: var(--engram-success);
	font-size: 0.86rem;
	line-height: 1.85;
}

.hero-console p,
.login-console p {
	margin: 0;
}

.console-key {
	display: inline-block;
	min-width: 7.2rem;
	color: var(--engram-primary);
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.metric-strip,
.dashboard-grid,
.project-grid {
	display: grid;
	gap: 1rem;
}

.metric-strip {
	grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
	margin-bottom: 0.75rem;
}

.metric-card,
.stat-card {
	padding: 1rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.35rem;
	min-height: 8rem;
}

.metric-value,
.stat-value {
	color: var(--engram-success);
	font-size: clamp(1.7rem, 3vw, 2.6rem);
	line-height: 1;
	font-weight: 700;
}

.hero-copy {
	max-width: 44rem;
}

.hero-copy .section-kicker {
	max-width: 28rem;
	line-height: 1.5;
}

.metric-label,
.stat-label,
.stat-card h4 {
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--engram-muted);
	margin: 0;
}

.dashboard-grid {
	grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
	margin-bottom: 1.25rem;
}

.section-header {
	display: flex;
	justify-content: space-between;
	align-items: end;
	gap: 1rem;
	margin-bottom: 1.15rem;
}

.section-header.compact {
	margin-bottom: 0.55rem;
}

.metric-tags {
	margin-bottom: 0.9rem;
}

.section-block-title {
	margin: 1.4rem 0 0.85rem;
	color: var(--engram-accent);
}

.project-chip-list,
.stat-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem;
	padding: 0.35rem 0 0.9rem;
}

.badge {
	display: inline-flex;
	align-items: center;
	padding: 0.5rem 0.9rem;
	border: 1px solid transparent;
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	background: rgba(110, 106, 134, 0.16);
}

.badge-success {
	border-color: rgba(156, 207, 216, 0.45);
	background: rgba(49, 116, 143, 0.22);
	color: var(--engram-success);
}

.badge-warning {
	border-color: rgba(246, 193, 119, 0.4);
	background: rgba(246, 193, 119, 0.16);
	color: var(--engram-warning);
}

.badge-danger {
	border-color: rgba(235, 111, 146, 0.4);
	background: rgba(235, 111, 146, 0.16);
	color: var(--engram-danger);
}

.badge-muted {
	border-color: rgba(110, 106, 134, 0.42);
	background: rgba(110, 106, 134, 0.15);
	color: var(--engram-muted);
}

.browser-controls {
	display: grid;
	grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
	gap: 1rem;
	margin-bottom: 1rem;
}

form.browser-controls {
	grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
	align-items: start;
}

form.browser-controls button[type="submit"] {
	width: 100%;
	min-width: 8rem;
	margin: 0;
	padding-block: var(--pico-form-element-spacing-vertical);
	line-height: 1.5rem;
	justify-self: stretch;
	align-self: start;
}

.browser-controls > :only-child {
	grid-column: 1 / -1;
}

.browser-content-frame {
	padding: 1rem;
	border: 1px solid rgba(110, 106, 134, 0.38);
	background: rgba(13, 11, 20, 0.34);
	box-shadow: inset 0 0 0 1px rgba(196, 167, 231, 0.03);
}

.browser-subtabs,
.admin-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	margin-bottom: 1rem;
}

.filter-strip {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-bottom: 1rem;
}

.type-pill {
	display: inline-flex;
	align-items: center;
	padding: 0.4rem 0.72rem;
	border: 1px solid rgba(110, 106, 134, 0.55);
	background: rgba(13, 11, 20, 0.5);
	color: var(--engram-muted);
	font-family: var(--engram-font-display);
	font-size: 0.74rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.type-pill:hover {
	border-color: rgba(156, 207, 216, 0.4);
	color: var(--engram-text);
}

.type-pill.active {
	border-color: rgba(196, 167, 231, 0.7);
	background: rgba(196, 167, 231, 0.16);
	color: var(--engram-primary);
}

.card-link {
	display: block;
	color: inherit;
	text-decoration: none;
	cursor: pointer;
}

.card-link:hover {
	color: inherit;
}

/* Clickable stat cards — used for drill-down from dashboard home and contributor detail. */
.stat-card-link {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.35rem;
	text-decoration: none;
	color: inherit;
	cursor: pointer;
}

.stat-card-link:hover {
	color: var(--engram-iris);
	border-color: rgba(196, 167, 231, 0.44);
	text-decoration: none;
}

.metric-card.stat-card-link {
	display: flex;
}

.card-link:hover .card {
	transform: translateY(-1px);
	border-color: rgba(196, 167, 231, 0.44);
	box-shadow: 0 14px 28px rgba(9, 8, 16, 0.18), inset 0 0 0 1px rgba(196, 167, 231, 0.04);
}

.card {
	padding: 1.15rem 1.25rem;
	margin-bottom: 0;
	overflow: hidden;
	transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.observation-list,
.prompt-list {
	display: grid;
	gap: 0.9rem;
}

.card header {
	display: flex;
	align-items: center;
	gap: 0.8rem;
	padding: 0.25rem 0 1rem;
	margin-bottom: 0.9rem;
	border-bottom: 1px solid rgba(110, 106, 134, 0.35);
}

.card header strong {
	flex: 1;
	font-family: var(--engram-font-display);
	font-size: 1rem;
	color: var(--engram-text);
}

.card header strong a {
	display: block;
	padding-right: 0.2rem;
	line-height: 1.35;
}

.observation-list .card p,
.prompt-list .card p {
	font-size: 1.08rem;
	line-height: 1.7;
	margin: 0;
}

.prompt-list .card p a,
.observation-list .card p a {
	color: var(--engram-text);
}

.prompt-list .card p a:hover,
.observation-list .card p a:hover {
	color: var(--engram-primary-hover);
}

.card footer {
	display: flex;
	flex-wrap: wrap;
	gap: 0.7rem 1rem;
	margin-top: 0.95rem;
	padding-top: 0.75rem;
	border-top: 1px solid rgba(110, 106, 134, 0.28);
	color: var(--engram-muted);
	font-size: 0.82rem;
}

.project-grid {
	grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
}

.project-card {
	transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.project-card:hover {
	transform: translateY(-2px);
	border-color: rgba(196, 167, 231, 0.6);
	box-shadow: 0 12px 32px rgba(10, 8, 16, 0.35);
}

.project-card h3 {
	margin: 0;
	font-size: 1.15rem;
}

.project-stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.75rem;
	margin: 0.9rem 0;
}

.project-stats .stat {
	padding: 0.8rem 0.55rem;
	border: 1px solid rgba(110, 106, 134, 0.4);
	background: rgba(13, 11, 20, 0.48);
	text-align: center;
}

.project-stats .stat-label {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.94rem;
}

.table-scroll {
	overflow-x: auto;
}

.data-table {
	background: rgba(13, 11, 20, 0.38);
	border: 1px solid rgba(110, 106, 134, 0.42);
	border-spacing: 0;
	overflow: hidden;
}

th,
td {
	padding: 0.9rem 1rem;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid rgba(110, 106, 134, 0.3);
}

th {
	color: var(--engram-muted);
	font-size: 0.72rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	background: rgba(13, 11, 20, 0.62);
}

tbody tr:nth-child(even) {
	background: rgba(255, 255, 255, 0.01);
}

tbody tr:hover {
	background: rgba(196, 167, 231, 0.06);
}

.muted {
	color: var(--engram-muted);
	font-family: var(--engram-font-display);
	font-size: 0.86rem;
}

.empty-state {
	display: grid;
	place-items: center;
	text-align: center;
	gap: 0.5rem;
	min-height: 15rem;
	background:
		radial-gradient(circle at top, rgba(196, 167, 231, 0.12), transparent 34%),
		rgba(31, 29, 46, 0.74);
}

.empty-state h3 {
	margin: 0;
	font-size: clamp(1.5rem, 3vw, 2.4rem);
	color: var(--engram-text);
}

.observation-content-block {
	margin-top: 1rem;
	padding-top: 1.2rem;
	border-top: 1px solid rgba(110, 106, 134, 0.35);
}

.structured-content {
	display: grid;
	gap: 1rem;
}

.structured-block {
	padding: 0.95rem 1rem;
	border: 1px solid rgba(110, 106, 134, 0.42);
	background: rgba(13, 11, 20, 0.45);
}

.structured-block h4 {
	margin: 0 0 0.55rem;
	font-family: var(--engram-font-display);
	font-size: 0.82rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--engram-accent);
}

.structured-block p {
	margin: 0;
	font-size: 1.02rem;
	line-height: 1.75;
	color: var(--engram-text);
}

.observation-content-block pre {
	margin: 0;
	padding: 1.15rem 1.2rem;
	overflow-x: auto;
	white-space: pre-wrap;
	background: rgba(13, 11, 20, 0.76);
	border: 1px solid rgba(110, 106, 134, 0.48);
	color: var(--engram-text);
	font-family: var(--engram-font-display);
	font-size: 0.9rem;
	line-height: 1.65;
}

.linked-session-panel,
.session-meta {
	margin-top: 1rem;
}

.observation-detail-body,
.session-meta,
.linked-session-panel {
	padding: 1.25rem 1.35rem;
}

.observation-detail-body > table,
.session-meta > table {
	margin-top: 0.35rem;
}

.policy-note {
	margin-bottom: 1rem;
}

.policy-note p:last-child {
	margin-bottom: 0;
}

.danger-note {
	border-color: rgba(235, 111, 146, 0.45);
	background: rgba(78, 26, 40, 0.16);
}

.stat-copy {
	font-size: 1rem;
	line-height: 1.35;
	color: var(--engram-text);
}

.switch-form {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 0.65rem;
}

.reason-input {
	min-width: 14rem;
	margin: 0;
	padding: 0.5rem 0.7rem;
	font-size: 0.85rem;
}

.linked-session-panel h3,
.observation-detail-body table td,
.session-meta table td {
	word-break: break-word;
}

.switch-button {
	min-width: 4.6rem;
	padding: 0.45rem 0.8rem;
	font-size: 0.72rem;
	font-weight: 700;
}

.switch-button.is-on {
	border-color: rgba(156, 207, 216, 0.6);
	background: linear-gradient(180deg, rgba(79, 149, 178, 0.95), rgba(36, 81, 98, 0.98));
	color: #f4fbff;
	text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.switch-button.is-off {
	border-color: rgba(235, 111, 146, 0.55);
	background: linear-gradient(180deg, rgba(78, 26, 40, 0.9), rgba(31, 29, 46, 0.98));
	color: #ffe6ee;
	text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.terminal-note {
	margin: 0;
	color: var(--engram-muted);
}

.login-shell {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(20rem, 0.9fr);
	gap: 0;
}

.login-sidepanel,
.login-container {
	min-height: min(80vh, 42rem);
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 1rem;
	border: none;
	box-shadow: none;
	background: transparent;
}

.login-sidepanel {
	border-right: 1px solid rgba(110, 106, 134, 0.45);
	padding: clamp(1.5rem, 4vw, 3rem);
}

.login-container {
	padding: clamp(1.5rem, 4vw, 3rem);
}

.login-form {
	display: grid;
	gap: 1rem;
	margin-top: 0.5rem;
}

.login-form label {
	display: grid;
	gap: 0.45rem;
	color: var(--engram-muted);
	font-size: 0.86rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.login-form input,
.browser-controls input,
.browser-controls select,
input[type="search"],
input[type="text"],
input[type="password"],
select {
	border-radius: 0;
	background: rgba(13, 11, 20, 0.76);
	border: 1px solid rgba(110, 106, 134, 0.65);
	box-shadow: inset 0 0 0 1px rgba(196, 167, 231, 0.04);
	color: var(--engram-text);
}

.login-form input:focus,
.browser-controls input:focus,
.browser-controls select:focus,
input[type="search"]:focus,
input[type="text"]:focus,
input[type="password"]:focus,
select:focus {
	border-color: rgba(196, 167, 231, 0.8);
	box-shadow: 0 0 0 0.15rem rgba(196, 167, 231, 0.16);
}

.login-error {
	padding: 0.8rem 1rem;
	border: 1px solid rgba(235, 111, 146, 0.42);
	background: rgba(235, 111, 146, 0.16);
	color: var(--engram-danger);
}

@media (max-width: 900px) {
	.hero-grid,
	.login-shell,
	.browser-controls {
		grid-template-columns: 1fr;
	}

	.login-sidepanel {
		border-right: none;
		border-bottom: 1px solid rgba(110, 106, 134, 0.45);
	}
}

@media (max-width: 720px) {
	.shell-backdrop {
		padding: 0.55rem;
	}

	.status-ribbon,
	.shell-header,
	.shell-nav,
	.shell-main,
	.shell-footer {
		padding-left: 0.9rem;
		padding-right: 0.9rem;
	}

	.shell-header {
		flex-direction: column;
		align-items: stretch;
	}

	.user-info {
		justify-content: space-between;
	}

	nav [role="tablist"] {
		gap: 0.5rem;
	}

	.project-stats {
		grid-template-columns: 1fr;
	}

	.card footer,
	.section-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.metric-strip,
	.dashboard-grid,
	.project-grid {
		grid-template-columns: 1fr;
	}
}

/* ─── Alerts ──────────────────────────────────────────────────────────────── */

.alert {
	padding: 0.85rem 1.15rem;
	border-radius: 6px;
	margin-bottom: 1rem;
	font-size: 0.92rem;
	line-height: 1.5;
}

.alert-danger {
	background: rgba(235, 111, 146, 0.12);
	border: 1px solid rgba(235, 111, 146, 0.4);
	color: #eb6f92;
}

.alert-success {
	background: rgba(156, 207, 216, 0.12);
	border: 1px solid rgba(156, 207, 216, 0.4);
	color: #9ccfd8;
}

/* ─── Pagination ──────────────────────────────────────────────────────────── */

.pagination-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1.2rem;
	padding: 0.8rem 0 0.2rem;
	border-top: 1px solid rgba(110, 106, 134, 0.25);
}

.pagination-info {
	font-size: 0.8rem;
	color: var(--engram-muted);
	font-family: var(--engram-font-display);
	letter-spacing: 0.02em;
}

.pagination-pages,
.pagination-size {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.pagination-size-label {
	font-size: 0.75rem;
	color: var(--engram-muted);
	margin-right: 0.3rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.page-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.8rem;
	height: 1.8rem;
	padding: 0 0.4rem;
	font-size: 0.78rem;
	font-family: var(--engram-font-display);
	color: var(--engram-muted);
	border: 1px solid rgba(110, 106, 134, 0.35);
	background: transparent;
	text-decoration: none;
	cursor: pointer;
	transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}

.page-btn:hover {
	border-color: rgba(196, 167, 231, 0.6);
	color: var(--engram-text);
	background: rgba(196, 167, 231, 0.08);
}

.page-btn.active {
	border-color: rgba(196, 167, 231, 0.7);
	color: var(--engram-primary);
	background: rgba(196, 167, 231, 0.14);
	cursor: default;
}

.page-ellipsis {
	color: var(--engram-muted);
	font-size: 0.8rem;
	padding: 0 0.15rem;
}

@media (max-width: 640px) {
	.pagination-bar {
		flex-direction: column;
		align-items: flex-start;
	}
}
