:root {
	--bg: #ffffff;
	--surface: #ffffff;
	--surface-strong: #f4f7f6;
	--ink: #0b1a30;
	--muted: #5e6a7d;
	--line: #e2e8f0;
	--green: #0ed145;
	--blue: #0b1a30;
	--orange: #ff9800;
	--red: #e53e3e;
	--shadow: 0 10px 30px rgba(11, 26, 48, 0.08);
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	letter-spacing: 0;
}

button,
input,
select,
textarea {
	font: inherit;
}

button {
	border: 0;
	background: var(--green);
	color: #fff;
	min-height: 42px;
	padding: 0 16px;
	border-radius: 6px;
	cursor: pointer;
	font-weight: 700;
}

.secondary-button {
	background: var(--surface-strong);
	color: var(--ink);
	border: 1px solid var(--line);
}

button:hover {
	filter: brightness(0.95);
}

input,
select,
textarea {
	width: 100%;
	border: 1px solid var(--line);
	background: #fff;
	color: var(--ink);
	border-radius: 6px;
	padding: 10px 12px;
}

textarea {
	resize: vertical;
}

.app-shell {
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr);
	min-height: 100vh;
}

.sidebar {
	position: sticky;
	top: 0;
	height: 100vh;
	background: #ffffff;
	border-right: 1px solid var(--line);
	padding: 22px;
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.brand {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.brand img {
	width: 44px;
	height: 44px;
	object-fit: contain;
}

.brand strong {
	display: block;
	font-size: 20px;
}

.brand span,
.eyebrow,
label,
.muted {
	color: var(--muted);
}

.nav-tabs {
	display: grid;
	gap: 8px;
}

.nav-tab {
	background: transparent;
	color: var(--ink);
	text-align: left;
	border: 1px solid transparent;
	font-weight: 700;
}

.nav-tab.active {
	background: var(--surface-strong);
	border-color: #0ed145;
	color: #0b1a30;
}

.sidebar-note {
	margin-top: auto;
	color: var(--muted);
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
}

.status-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--orange);
}

.status-dot.online {
	background: var(--green);
}

.workspace {
	padding: 28px;
	min-width: 0;
}

.auth-screen {
	position: fixed;
	inset: 0;
	z-index: 10;
	display: grid;
	place-items: center;
	padding: 20px;
	background: rgba(255, 255, 255, 0.96);
}

.auth-screen.hidden {
	display: none;
}

.auth-card {
	width: min(460px, 100%);
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 8px;
	box-shadow: var(--shadow);
	padding: 24px;
	display: grid;
	gap: 14px;
}

.auth-card img {
	width: 58px;
	height: 58px;
	object-fit: contain;
}

.auth-card h1 {
	margin: 0;
	font-size: 26px;
	line-height: 1.15;
}

.auth-actions,
.topbar-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
}

.topbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	margin-bottom: 24px;
}

.topbar h1,
.share-hero h1 {
	margin: 0;
	font-size: 34px;
	line-height: 1.1;
}

.eyebrow {
	margin: 0 0 6px;
	text-transform: uppercase;
	font-size: 12px;
	font-weight: 800;
}

.icon-button {
	width: 42px;
	padding: 0;
	background: var(--blue);
	font-size: 22px;
	line-height: 1;
}

.tab-panel {
	display: none;
}

.tab-panel.active {
	display: block;
}

.metrics {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
	margin-bottom: 22px;
}

.metric,
.card,
.panel-form,
.inline-form {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 8px;
	box-shadow: var(--shadow);
}

.metric {
	padding: 18px;
	min-height: 98px;
}

.metric strong {
	display: block;
	font-size: 30px;
}

.content-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	align-items: start;
}

.split-layout {
	display: grid;
	grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
	gap: 22px;
	align-items: start;
}

.section-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

h2 {
	font-size: 18px;
	margin: 0;
}

.item-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 14px;
}

.stack,
.form-stack {
	display: grid;
	gap: 14px;
}

.card {
	padding: 16px;
	min-width: 0;
}

.item-head {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	align-items: flex-start;
}

.item-head strong {
	font-size: 16px;
	word-break: break-word;
}

.item-head span,
.pill {
	background: #e6f9ec;
	color: #0c9e33;
	border-radius: 999px;
	padding: 4px 8px;
	font-size: 12px;
	font-weight: 800;
	white-space: nowrap;
}

.card p {
	color: var(--muted);
	margin: 10px 0 0;
	line-height: 1.45;
}

.post-media {
	display: grid;
	gap: 10px;
	margin-top: 12px;
}

.post-media img,
.post-media video {
	display: block;
	width: 100%;
	max-height: 420px;
	object-fit: contain;
	background: var(--surface-strong);
	border: 1px solid var(--line);
	border-radius: 8px;
}

.card-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 14px;
}

.card-actions button {
	min-height: 34px;
	padding: 0 10px;
	font-size: 13px;
	background: var(--blue);
}

.panel-form {
	display: grid;
	gap: 12px;
	padding: 18px;
}

.panel-form h2 {
	margin-bottom: 4px;
}

label {
	display: grid;
	gap: 6px;
	font-size: 13px;
	font-weight: 700;
}

.inline-form {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	padding: 14px;
	align-items: end;
}

.poll-options {
	display: grid;
	gap: 8px;
	margin-top: 12px;
}

.poll-options button {
	background: var(--surface-strong);
	color: var(--ink);
	border: 1px solid var(--line);
	text-align: left;
}

#toast {
	position: fixed;
	right: 18px;
	bottom: 18px;
	background: var(--ink);
	color: #fff;
	padding: 12px 14px;
	border-radius: 8px;
	box-shadow: var(--shadow);
	opacity: 0;
	transform: translateY(10px);
	pointer-events: none;
	transition: opacity .2s ease, transform .2s ease;
	max-width: 360px;
}

#toast.show {
	opacity: 1;
	transform: translateY(0);
}

.share-page {
	background: var(--bg);
}

.share-shell {
	max-width: 780px;
	margin: 0 auto;
	padding: 36px 18px;
}

.share-hero {
	padding: 22px 0;
}

@media (max-width: 980px) {
	.app-shell {
		grid-template-columns: 1fr;
	}

	.sidebar {
		position: static;
		height: auto;
	}

	.nav-tabs {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.content-grid,
	.split-layout,
	.metrics,
	.inline-form {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 560px) {
	.workspace {
		padding: 18px;
	}

	.topbar {
		align-items: flex-start;
	}

	.topbar h1,
	.share-hero h1 {
		font-size: 26px;
	}

	.nav-tabs {
		grid-template-columns: 1fr 1fr;
	}
}
