:root {
	--bg: #0f172a;
	--card: #111827;
	--card-2: #1f2937;
	--text: #e5e7eb;
	--muted: #9ca3af;
	--accent: #38bdf8;
	--danger: #ef4444;
	--warning: #f59e0b;
	--border: rgba(255,255,255,0.08);
}

* { box-sizing: border-box; }
body {
	margin: 0;
	font-family: Arial, sans-serif;
	background: var(--bg);
	color: var(--text);
}

a { color: var(--accent); }
code { word-break: break-all; }
textarea, input, button {
	font: inherit;
}
input, textarea {
	width: 100%;
	padding: 0.75rem;
	border-radius: 10px;
	border: 1px solid var(--border);
	background: #0b1220;
	color: var(--text);
}
button {
	padding: 0.75rem 1rem;
	border: 0;
	border-radius: 10px;
	cursor: pointer;
	background: var(--accent);
	color: #00111a;
	font-weight: 700;
}
button.secondary {
	background: #334155;
	color: var(--text);
}
button.danger {
	background: var(--danger);
	color: #fff;
}
.auth-page {
	min-height: 100vh;
	display: grid;
	place-items: center;
	padding: 1rem;
}
.auth-card, .card {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 18px;
	padding: 1.25rem;
	box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.card-subtle {
	background: rgba(255,255,255,0.03);
	border: 1px solid var(--border);
	border-radius: 16px;
	padding: 1rem;
}
.auth-card { max-width: 760px; width: 100%; }
.topbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1rem 1.5rem;
	border-bottom: 1px solid var(--border);
	background: rgba(15, 23, 42, 0.85);
	position: sticky;
	top: 0;
	backdrop-filter: blur(8px);
}
.topbar-actions { display: flex; gap: 1rem; align-items: center; }
.grid {
	display: grid;
	gap: 1rem;
	padding: 1rem;
}
.no-pad { padding: 0; }
.two-columns {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}
.full-width { grid-column: 1 / -1; }
.section-head, .proposal-head, .button-row, .tabs {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.75rem;
}
.button-row.wrap { flex-wrap: wrap; }
.stack-form { display: grid; gap: 0.75rem; }
.inline-form { display: grid; gap: 0.5rem; min-width: 220px; }
.compact-form { align-content: start; }
.proposal-list { display: grid; gap: 0.9rem; }
.proposal, .proposal-accordion {
	border-radius: 16px;
	background: var(--card-2);
	border: 1px solid var(--border);
}
.proposal-accordion summary {
	list-style: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	padding: 1rem;
	cursor: pointer;
}
.proposal-accordion summary::-webkit-details-marker { display: none; }
.proposal-body { padding: 0 1rem 1rem; }
.meta-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.5rem;
	margin: 0.75rem 0;
	font-size: 0.95rem;
}
.badge {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.35rem 0.65rem;
	border-radius: 999px;
	background: #172554;
	color: #bfdbfe;
	font-size: 0.85rem;
}
.badge.warning { background: #451a03; color: #fde68a; }
.badge.witness { background: #3f1d6b; color: #e9d5ff; }
.simple-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.8rem; }
.simple-list.compact { gap: 0.5rem; }
.simple-list li, .review-item {
	padding: 0.85rem;
	border-radius: 12px;
	background: rgba(255,255,255,0.03);
	border: 1px solid var(--border);
}
.review-list { display: grid; gap: 0.65rem; margin-top: 0.75rem; }
.muted { color: var(--muted); }
.alert.error {
	background: rgba(239, 68, 68, 0.15);
	border: 1px solid rgba(239, 68, 68, 0.4);
	color: #fecaca;
	padding: 0.75rem;
	border-radius: 12px;
	margin-bottom: 1rem;
}
.tab-links {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}
.tab-link {
	display: inline-flex;
	align-items: center;
	padding: 0.55rem 0.85rem;
	border-radius: 999px;
	border: 1px solid var(--border);
	background: rgba(255,255,255,0.03);
	text-decoration: none;
	color: var(--text);
}
.tab-link.active {
	background: #172554;
	color: #bfdbfe;
}
.tab-panel { display: none; margin-top: 1rem; }
.tab-panel.active { display: block; }
label { display: grid; gap: 0.45rem; margin-bottom: 0.85rem; }

@media (max-width: 900px) {
	.two-columns { grid-template-columns: 1fr; }
	.topbar { flex-direction: column; align-items: flex-start; }
	.section-head, .tabs { flex-direction: column; align-items: flex-start; }
}

.error-box { background:#2b1111; color:#ffd6d6; border:1px solid #7a2a2a; padding:0.75rem 1rem; border-radius:10px; margin:0.75rem 0; }
