*,
*::before,
*::after {
	box-sizing: border-box;
}

:root {
	--bg: #04060d;
	--bg-soft: #070b18;
	--panel: rgba(12, 18, 34, 0.78);
	--panel-strong: rgba(8, 12, 24, 0.94);
	--text: #f3f6fb;
	--muted: #9aa8c6;
	--line: rgba(255, 255, 255, 0.12);
	--green: #19d76a;
	--blue: #285bff;
	--red: #ff4d5f;
	--yellow: #ffc64d;
	--shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
	--radius: 28px;
	font-synthesis-weight: none;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: var(--text);
	background:
		radial-gradient(circle at 35% 20%, rgba(40, 91, 255, 0.30), transparent 35%),
		radial-gradient(circle at 65% 55%, rgba(25, 215, 106, 0.15), transparent 30%),
		linear-gradient(180deg, #03050b 0%, #04060d 100%);
	min-height: 100vh;
}

a {
	color: inherit;
	text-decoration: none;
}

button,
input,
select,
textarea {
	font: inherit;
}

.app-shell {
	display: grid;
	grid-template-columns: 320px minmax(0, 1fr);
	min-height: 100vh;
}

.sidebar {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 28px 20px;
	border-right: 1px solid var(--line);
	background:
		linear-gradient(180deg, rgba(17, 21, 35, 0.95) 0%, rgba(5, 9, 19, 0.96) 100%);
	backdrop-filter: blur(18px);
	position: sticky;
	top: 0;
	height: 100vh;
	transition: transform 0.25s ease;
	z-index: 20;
}

.brand,
.user-card,
.panel-header,
.hero-top,
.stats-row,
.progress-label,
.activity-item,
.table-row,
.catalog-tags,
.catalog-meta,
.module-choice-top,
.module-choice-footer,
.wizard-actions,
.topbar,
.company-switch,
.auth-links,
.two-col,
.detail-nav,
.step-item,
.module-detail-layout {
	display: flex;
	align-items: center;
}

.brand {
	gap: 14px;
	margin-bottom: 20px;
}

.brand-mark {
	width: 38px;
	height: 38px;
	border-radius: 12px;
	background: linear-gradient(135deg, var(--blue), var(--green));
	box-shadow: 0 8px 24px rgba(40, 91, 255, 0.35);
}

.brand-name {
	font-size: 1.45rem;
	font-weight: 700;
}

.brand-subtitle {
	color: var(--muted);
	font-size: 0.9rem;
}

.nav {
	display: grid;
	gap: 8px;
}

.nav a {
	padding: 14px 16px;
	border: 1px solid transparent;
	border-radius: 18px;
	color: var(--muted);
	transition: 0.2s ease;
}

.nav a:hover,
.nav a.active {
	border-color: rgba(40, 91, 255, 0.35);
	background: rgba(40, 91, 255, 0.1);
	color: var(--text);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.sidebar-footer {
	display: grid;
	gap: 18px;
}

.company-switch {
	flex-direction: column;
	align-items: stretch;
	gap: 8px;
}

.company-switch select,
.auth-card input,
.auth-card select,
.panel-card input,
.panel-card select,
.panel-card textarea,
.auth-card button,
.panel-card button,
.button {
	width: 100%;
	padding: 14px 16px;
	border-radius: 16px;
	border: 1px solid var(--line);
	background: rgba(255, 255, 255, 0.03);
	color: var(--text);
}

.user-card {
	gap: 14px;
	padding: 16px;
	border: 1px solid var(--line);
	border-radius: 22px;
	background: rgba(255, 255, 255, 0.03);
}

.user-avatar {
	width: 46px;
	height: 46px;
	display: grid;
	place-items: center;
	border-radius: 16px;
	background: linear-gradient(160deg, rgba(40, 91, 255, 0.45), rgba(25, 215, 106, 0.35));
	font-weight: 700;
}

.user-name {
	font-weight: 600;
}

.user-email {
	color: var(--muted);
	font-size: 0.9rem;
}

.ghost-link,
.text-link {
	color: #dbe6ff;
}

.main-shell {
	min-width: 0;
	padding: 22px 28px 42px;
}

.topbar {
	justify-content: space-between;
	gap: 18px;
	padding: 10px 0 18px;
	border-bottom: 1px solid var(--line);
}

.page-title {
	margin: 4px 0 0;
	font-size: clamp(1.8rem, 3vw, 3rem);
	line-height: 1.05;
}

.eyebrow {
	font-size: 0.82rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #d6e0ff;
	font-weight: 700;
}

.topbar-actions {
	display: flex;
	gap: 12px;
	align-items: center;
}

.status-pill,
.tag {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 14px;
	border-radius: 999px;
	font-size: 0.88rem;
	border: 1px solid var(--line);
	background: rgba(255, 255, 255, 0.03);
}

.status-pill.ok,
.tag.ok {
	border-color: rgba(25, 215, 106, 0.45);
	background: rgba(25, 215, 106, 0.14);
	color: #7af5a8;
}

.status-pill.warn {
	border-color: rgba(255, 198, 77, 0.35);
	background: rgba(255, 198, 77, 0.12);
	color: #ffd987;
}

.status-pill.danger {
	border-color: rgba(255, 77, 95, 0.4);
	background: rgba(255, 77, 95, 0.12);
	color: #ff97a2;
}

.status-pill.dark,
.tag.dark {
	background: rgba(255, 255, 255, 0.03);
	color: var(--muted);
}

.page-content {
	padding-top: 28px;
}

.flash {
	margin-bottom: 16px;
	padding: 16px 18px;
	border-radius: 18px;
	border: 1px solid var(--line);
	background: rgba(255, 255, 255, 0.04);
}

.flash.success {
	border-color: rgba(25, 215, 106, 0.35);
	background: rgba(25, 215, 106, 0.08);
}

.dashboard-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 22px;
}

.hero-card,
.panel-card,
.auth-card,
.choice-card,
.module-choice,
.plan-card,
.catalog-card {
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: linear-gradient(180deg, rgba(8, 12, 24, 0.86), rgba(8, 12, 22, 0.74));
	backdrop-filter: blur(16px);
	box-shadow: var(--shadow);
}

.hero-card,
.panel-card {
	padding: 24px;
}

.hero-card {
	grid-column: span 2;
	min-height: 330px;
}

.hero-card h2,
.panel-card h2,
.panel-card h3,
.choice-card strong,
.catalog-card h3,
.module-choice h3,
.plan-card h3 {
	margin: 0;
}

.hero-top,
.panel-header,
.catalog-meta,
.module-choice-footer,
.wizard-actions,
.activity-item,
.table-row {
	justify-content: space-between;
	gap: 16px;
}

.hero-actions,
.stats-row,
.catalog-tags,
.auth-links,
.two-col {
	display: flex;
	gap: 12px;
}

.stats-row {
	flex-wrap: wrap;
	margin-top: 28px;
}

.radial-metric {
	width: 156px;
	height: 156px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	border: 2px solid rgba(25, 215, 106, 0.7);
	box-shadow: inset 0 0 40px rgba(25, 215, 106, 0.12);
}

.radial-number {
	font-size: 3rem;
	font-weight: 700;
}

.radial-number small {
	font-size: 1.4rem;
}

.metric-card {
	min-width: 160px;
	padding: 18px;
	border: 1px solid var(--line);
	border-radius: 22px;
	background: rgba(255, 255, 255, 0.03);
	display: grid;
	gap: 8px;
}

.metric-card span,
.module-meta,
.catalog-meta,
.auth-card p,
.plan-card p,
.info-box p {
	color: var(--muted);
}

.metric-card strong {
	font-size: 1.2rem;
}

.progress-group {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
	margin-top: 24px;
}

.progress-label {
	justify-content: space-between;
	margin-bottom: 10px;
}

.progress {
	height: 14px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid var(--line);
	overflow: hidden;
}

.progress span {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: linear-gradient(90deg, rgba(25, 215, 106, 0.5), rgba(25, 215, 106, 0.95));
	animation: grow 0.7s ease;
}

.progress.danger span {
	background: linear-gradient(90deg, rgba(255, 77, 95, 0.5), rgba(255, 77, 95, 0.95));
}

@keyframes grow {
	from { width: 0; }
}

.checklist,
.simple-list,
.activity-feed,
.table-like {
	display: grid;
	gap: 12px;
}

.check-item {
	display: grid;
	grid-template-columns: 28px 1fr;
	gap: 12px;
	align-items: center;
	padding: 14px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.check-mark {
	width: 20px;
	height: 20px;
	border-radius: 999px;
	border: 1px solid var(--line);
}

.check-mark.done {
	background: radial-gradient(circle at 50% 50%, #7af5a8 0, #19d76a 60%, rgba(25, 215, 106, 0.1) 100%);
}

.check-mark.todo {
	background: rgba(255, 255, 255, 0.06);
}

.module-grid,
.catalog-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
}

.module-card,
.catalog-card {
	padding: 20px;
	transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.module-card:hover,
.catalog-card:hover,
.choice-card:hover,
.module-choice:hover,
.plan-card:hover {
	transform: translateY(-4px);
	border-color: rgba(40, 91, 255, 0.45);
}

.module-card.active {
	border-color: rgba(25, 215, 106, 0.35);
}

.module-card.warning {
	border-color: rgba(255, 198, 77, 0.35);
}

.module-card.error {
	border-color: rgba(255, 77, 95, 0.35);
}

.module-state {
	width: 16px;
	height: 16px;
	border-radius: 999px;
	margin-bottom: 14px;
	box-shadow: 0 0 18px currentColor;
}

.module-state.active {
	color: #19d76a;
	background: #19d76a;
}

.module-state.warning {
	color: #ffc64d;
	background: #ffc64d;
}

.module-state.error {
	color: #ff4d5f;
	background: #ff4d5f;
}

.module-category,
.section-title {
	margin: 14px 0 10px;
	color: #dbe6ff;
	font-size: 0.9rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.activity-item,
.table-row {
	padding: 14px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	align-items: center;
}

.activity-dot {
	width: 12px;
	height: 12px;
	border-radius: 999px;
	margin-right: 4px;
}

.activity-dot.success,
.run-status.ok {
	background: rgba(25, 215, 106, 0.25);
	color: #7af5a8;
}

.activity-dot.warning {
	background: rgba(255, 198, 77, 0.24);
}

.activity-dot.error,
.run-status.fail {
	background: rgba(255, 77, 95, 0.24);
	color: #ff97a2;
}

.activity-dot.info {
	background: rgba(40, 91, 255, 0.24);
}

.run-status {
	padding: 8px 12px;
	border-radius: 999px;
}

.span-2 {
	grid-column: span 2;
}

.span-3 {
	grid-column: span 3;
}

.button,
.auth-card button,
.panel-card button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background: linear-gradient(135deg, rgba(40, 91, 255, 0.72), rgba(25, 215, 106, 0.62));
	border-color: rgba(40, 91, 255, 0.42);
	color: white;
	cursor: pointer;
	font-weight: 600;
	transition: transform 0.2s ease, filter 0.2s ease;
}

.button:hover,
.auth-card button:hover,
.panel-card button:hover {
	transform: translateY(-2px);
	filter: brightness(1.06);
}

.button-secondary {
	background: rgba(255, 255, 255, 0.03);
	color: var(--text);
}

.full-width {
	width: 100%;
}

.empty-state,
.empty-inline {
	padding: 34px;
	border-radius: 28px;
	border: 1px dashed var(--line);
	background: rgba(255, 255, 255, 0.02);
	color: var(--muted);
}

.auth-shell {
	display: grid;
	place-items: center;
	padding: 30px 16px;
}

.auth-card {
	width: min(560px, 100%);
	padding: 36px;
}

.auth-card-wide {
	width: min(820px, 100%);
}

.auth-card form,
.panel-card form {
	display: grid;
	gap: 14px;
	margin-top: 16px;
}

.auth-links {
	justify-content: space-between;
	flex-wrap: wrap;
	margin-top: 20px;
	font-size: 0.95rem;
	color: var(--muted);
}

form ul,
ul.error {
	margin: 0;
	padding-left: 18px;
	color: #ff97a2;
}

.wizard-shell {
	display: grid;
	grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
	gap: 26px;
}

.wizard-side,
.wizard-main {
	min-width: 0;
}

.wizard-progress {
	padding: 24px;
	border: 1px solid var(--line);
	border-radius: 28px;
	background: rgba(255, 255, 255, 0.03);
	position: sticky;
	top: 20px;
}

.step-list {
	display: grid;
	gap: 16px;
	margin-top: 26px;
}

.step-item {
	gap: 14px;
	align-items: flex-start;
	color: var(--muted);
}

.step-item.active {
	color: var(--text);
}

.step-dot {
	width: 14px;
	height: 14px;
	border-radius: 999px;
	margin-top: 6px;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid var(--line);
}

.step-item.active .step-dot {
	background: #19d76a;
	box-shadow: 0 0 16px rgba(25, 215, 106, 0.5);
}

.wizard-card-grid {
	display: grid;
	gap: 18px;
}

.wizard-card-grid-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wizard-card-grid-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wizard-card-grid-4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.choice-card,
.module-choice,
.plan-card {
	width: 100%;
	padding: 22px;
	text-align: left;
	cursor: pointer;
	min-height: 180px;
}

.choice-card.selected,
.module-choice.selected,
.plan-card.selected {
	border-color: rgba(25, 215, 106, 0.6);
	box-shadow: 0 0 0 1px rgba(25, 215, 106, 0.16), 0 24px 50px rgba(25, 215, 106, 0.12);
}

.choice-icon {
	width: 46px;
	height: 46px;
	border-radius: 14px;
	background: linear-gradient(135deg, rgba(40, 91, 255, 0.42), rgba(25, 215, 106, 0.28));
	margin-bottom: 16px;
}

.module-choice p {
	margin: 12px 0 20px;
}

.plan-card {
	position: relative;
	padding-top: 42px;
}

.plan-badge {
	position: absolute;
	top: 16px;
	left: 20px;
	padding: 8px 14px;
	border-radius: 999px;
	background: rgba(40, 91, 255, 0.96);
	box-shadow: 0 10px 26px rgba(40, 91, 255, 0.35);
}

.catalog-card {
	display: grid;
	gap: 12px;
}

.catalog-status.active {
	color: #7af5a8;
}

.catalog-status.error {
	color: #ff97a2;
}

.catalog-status.warning {
	color: #ffd987;
}

.module-detail-layout {
	align-items: flex-start;
	gap: 22px;
}

.detail-nav {
	position: sticky;
	top: 20px;
	flex-direction: column;
	align-items: stretch;
	gap: 10px;
	width: 220px;
}

.detail-nav a {
	padding: 14px 16px;
	border: 1px solid var(--line);
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.03);
}

.detail-content {
	flex: 1;
	display: grid;
	gap: 22px;
}

.two-col {
	align-items: stretch;
	flex-wrap: wrap;
}

.info-box,
.support-box {
	flex: 1;
	min-width: 260px;
	padding: 20px;
	border-radius: 22px;
	border: 1px solid var(--line);
	background: rgba(255, 255, 255, 0.03);
}

.nav-toggle {
	display: none;
	padding: 10px 12px;
	border-radius: 14px;
	border: 1px solid var(--line);
	background: rgba(255, 255, 255, 0.03);
	color: var(--text);
}

@media (max-width: 1320px) {
	.dashboard-grid,
	.wizard-card-grid-4,
	.wizard-card-grid-3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.span-3,
	.span-2,
	.hero-card {
		grid-column: span 2;
	}

	.module-detail-layout {
		flex-direction: column;
	}

	.detail-nav {
		width: 100%;
		position: static;
		flex-direction: row;
		flex-wrap: wrap;
	}
}

@media (max-width: 1024px) {
	.app-shell {
		grid-template-columns: 1fr;
	}

	.sidebar {
		position: fixed;
		left: 0;
		top: 0;
		width: 300px;
		transform: translateX(-100%);
	}

	.sidebar.is-open {
		transform: translateX(0);
	}

	.nav-toggle {
		display: inline-flex;
	}
}

@media (max-width: 860px) {
	.main-shell {
		padding: 18px 16px 40px;
	}

	.dashboard-grid,
	.wizard-shell,
	.wizard-card-grid-2,
	.wizard-card-grid-3,
	.wizard-card-grid-4,
	.progress-group {
		grid-template-columns: 1fr;
	}

	.span-3,
	.span-2,
	.hero-card {
		grid-column: span 1;
	}

	.topbar {
		align-items: flex-start;
		flex-direction: column;
	}

	.hero-actions,
	.auth-links,
	.stats-row,
	.wizard-actions {
		flex-direction: column;
	}
}
