:root {
	color-scheme: dark;
	--bg: #060a12;
	--bg-2: #0c1220;
	--panel: rgba(16, 23, 40, 0.72);
	--panel-strong: rgba(22, 31, 50, 0.9);
	--border: #1f2a44;
	--border-strong: #2e3c60;
	--text: #e8edf7;
	--muted: #9fb0c8;
	--accent-a: #61e7ff;
	--accent-b: #7c6cff;
	--accent-c: #5af0c6;
	--danger: #ff5c8a;
	--success: #4be0a5;
	--shadow-1: 0 12px 40px rgba(0, 0, 0, 0.35);
	--shadow-2: 0 20px 60px rgba(0, 0, 0, 0.45);
	--radius-sm: 10px;
	--radius-md: 14px;
	--radius-pill: 999px;
	--blur: 14px;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	min-height: 100vh;
	font-family: "Space Grotesk", "Inter", system-ui, -apple-system, sans-serif;
	background: radial-gradient(120% 120% at 10% 20%, rgba(97, 231, 255, 0.08), transparent 42%),
		radial-gradient(90% 90% at 80% 10%, rgba(124, 108, 255, 0.12), transparent 40%),
		radial-gradient(80% 80% at 50% 80%, rgba(90, 240, 198, 0.08), transparent 40%),
		linear-gradient(145deg, #060a12, #0b1424 40%, #060a12 90%);
	color: var(--text);
	line-height: 1.5;
}

a {
	color: var(--accent-a);
	text-decoration: none;
	transition: opacity 0.2s ease, color 0.2s ease;
}

a:hover {
	color: var(--accent-b);
}

a:focus-visible,
.btn:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 2px solid rgba(97, 231, 255, 0.35);
	outline-offset: 2px;
	border-radius: 8px;
}

.container {
	width: min(1180px, 92vw);
	margin: 0 auto;
	padding: 18px 0 32px;
}

.topbar {
	position: sticky;
	top: 0;
	z-index: 50;
	backdrop-filter: blur(18px);
	background: linear-gradient(120deg, rgba(8, 14, 26, 0.9), rgba(11, 19, 34, 0.82));
	border-bottom: 1px solid rgba(145, 169, 214, 0.18);
	box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

.topbar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 74px;
	gap: 16px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 8px 12px;
	border-radius: 14px;
	border: 1px solid rgba(145, 169, 214, 0.22);
	background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 10px 24px rgba(0, 0, 0, 0.2);
	color: #fff;
	transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.brand:hover {
	transform: translateY(-1px);
	border-color: rgba(97, 231, 255, 0.45);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 14px 28px rgba(0, 0, 0, 0.28);
}

.brand-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 11px;
	font-size: 1.05rem;
	background: linear-gradient(135deg, rgba(97, 231, 255, 0.2), rgba(124, 108, 255, 0.26));
	border: 1px solid rgba(145, 169, 214, 0.28);
}

.brand-copy {
	display: grid;
	gap: 1px;
}

.brand-title {
	font-weight: 700;
	font-size: 1rem;
	letter-spacing: 0.01em;
}

.brand-subtitle {
	font-size: 0.75rem;
	color: rgba(232, 237, 247, 0.7);
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.top-nav {
	display: flex;
	align-items: center;
	gap: 9px;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.profile-menu {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 10px;
}

.profile-menu .top-link {
	width: 100%;
}

.admin-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.admin-actions form {
	margin: 0;
}

.admin-actions .btn,
.admin-actions button {
	min-height: 34px;
	padding: 0.38rem 0.75rem;
	font-size: 0.84rem;
}

.admin-actions .admin-input {
	min-height: 34px;
	padding: 6px 8px;
	font-size: 0.84rem;
}

.admin-input {
	min-width: 110px;
	padding: 8px 10px;
	margin-top: 0;
	font-size: 0.9rem;
}

.top-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 38px;
	padding: 0.45rem 0.92rem;
	border-radius: 11px;
	border: 1px solid rgba(145, 169, 214, 0.18);
	background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
	color: var(--text);
	font-weight: 600;
	font-size: 0.9rem;
	letter-spacing: 0.02em;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
	transition: transform 0.12s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.top-link:hover {
	transform: translateY(-1px);
	border-color: rgba(97, 231, 255, 0.42);
	box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
}

.top-link.is-active {
	border-color: rgba(97, 231, 255, 0.55);
	background: linear-gradient(135deg, rgba(97, 231, 255, 0.22), rgba(124, 108, 255, 0.26));
	color: #f8fdff;
	box-shadow: 0 10px 22px rgba(97, 231, 255, 0.2);
}

.top-link-logout {
	border-color: rgba(255, 92, 138, 0.34);
	background: linear-gradient(135deg, rgba(255, 92, 138, 0.14), rgba(255, 120, 160, 0.06));
}

.top-link-logout:hover {
	border-color: rgba(255, 92, 138, 0.6);
	box-shadow: 0 12px 25px rgba(255, 92, 138, 0.16);
}

.card {
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	padding: 18px;
	margin-top: 18px;
	box-shadow: var(--shadow-1);
	backdrop-filter: blur(var(--blur));
}

.inner {
	background: var(--panel-strong);
	border-color: var(--border-strong);
}

.auth-card {
	width: min(520px, 100%);
	margin: 32px auto 0;
}

h1,
h2,
h3 {
	margin: 0;
	line-height: 1.2;
	letter-spacing: 0.01em;
	color: var(--text);
}

h1 {
	font-size: 1.6rem;
	font-weight: 700;
}

h2 {
	font-size: 1.22rem;
	font-weight: 700;
}

h3 {
	font-size: 1.05rem;
	font-weight: 700;
	color: #f2f5ff;
}

p {
	margin: 0;
	color: var(--muted);
}

p + p {
	margin-top: 8px;
}

b,
strong {
	color: #f7fbff;
	font-weight: 700;
}

.form-grid {
	display: grid;
	gap: 12px;
}

label {
	color: var(--muted);
	font-weight: 600;
	font-size: 0.94rem;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
select,
textarea {
	width: 100%;
	margin-top: 6px;
	padding: 12px 12px;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(255, 255, 255, 0.02);
	color: var(--text);
	font-size: 0.96rem;
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

select,
select option,
select optgroup {
	color: var(--text);
	background: #0f172a;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"])::placeholder,
textarea::placeholder {
	color: rgba(255, 255, 255, 0.55);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus,
select:focus,
textarea:focus {
	border-color: rgba(97, 231, 255, 0.55);
	background: rgba(255, 255, 255, 0.04);
	box-shadow: 0 0 0 4px rgba(97, 231, 255, 0.12);
}

input[type="checkbox"],
input[type="radio"] {
	width: auto;
	height: auto;
	margin-top: 0;
	padding: 0;
	border: 0;
	box-shadow: none;
	accent-color: var(--accent-a);
}

.btn,
button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0.6rem 1.2rem;
	border-radius: var(--radius-pill);
	text-decoration: none;
	font-size: 0.96rem;
	font-weight: 700;
	background: linear-gradient(135deg, var(--accent-a), var(--accent-b));
	color: #05101f;
	border: 1px solid rgba(97, 231, 255, 0.35);
	cursor: pointer;
	transition: transform 0.12s ease, box-shadow 0.2s ease, opacity 0.2s ease;
	box-shadow: 0 16px 32px rgba(97, 231, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn:hover,
button:hover {
	transform: translateY(-1px);
	box-shadow: 0 20px 36px rgba(124, 108, 255, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn:active,
button:active {
	transform: translateY(0);
}

.btn:disabled,
button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	box-shadow: none;
}

.auth-card .btn,
.auth-card button {
	width: 100%;
}

.notice,
.app-notice {
	margin-bottom: 1rem;
	padding: 0.8rem 0.95rem;
	border-radius: var(--radius-md);
	border: 1px solid var(--border);
	background: var(--panel-strong);
	color: var(--text);
	box-shadow: var(--shadow-1);
	font-weight: 600;
	font-size: 0.92rem;
	display: flex;
	align-items: center;
	gap: 0.55rem;
}

.notice.success,
.app-notice-success {
	border-color: rgba(75, 224, 165, 0.45);
	background: rgba(75, 224, 165, 0.12);
}

.notice.error,
.app-notice-error {
	border-color: rgba(255, 92, 138, 0.45);
	background: rgba(255, 92, 138, 0.14);
}

.grid.two {
	display: grid;
	grid-template-columns: repeat(2, minmax(240px, 1fr));
	gap: 14px;
}

.mt16 {
	margin-top: 16px;
}

.muted {
	color: var(--muted);
}

main.container > .card:first-child {
	margin-top: 20px;
}

.card .form-grid + p.muted {
	margin-top: 10px;
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	background: rgba(255, 255, 255, 0.02);
	border-radius: var(--radius-md);
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.06);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
	margin-top: 10px;
}

th,
td {
	padding: 12px 12px;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

thead th {
	background: linear-gradient(120deg, rgba(97, 231, 255, 0.22), rgba(124, 108, 255, 0.18));
	color: #f8fbff;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

tbody tr {
	background: transparent;
}

tbody tr:nth-child(2n) {
	background: rgba(255, 255, 255, 0.02);
}

tbody tr:hover {
	background: rgba(97, 231, 255, 0.06);
}

tbody tr:last-child td {
	border-bottom: 0;
}

.break-all {
	word-break: break-all;
}

.hero-card {
	padding: 22px;
}

.hero-row {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	flex-wrap: wrap;
}

.hero-lead {
	max-width: 740px;
	font-size: 1.02rem;
	color: var(--text);
	opacity: 0.92;
}

.hero-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.stats-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(180px, 1fr));
	gap: 14px;
}

.stat-card {
	padding: 16px;
}

.stat-value {
	font-size: 1.55rem;
	font-weight: 700;
	color: var(--text);
	margin-top: 10px;
	margin-bottom: 6px;
}

.section-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.tariffs-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(220px, 1fr));
	gap: 14px;
}

.tariff-card {
	display: flex;
	flex-direction: column;
	min-height: 205px;
}

.tariff-badge {
	font-size: 0.78rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--accent-a);
}

.tariff-price {
	font-size: 1.35rem;
	font-weight: 700;
	color: var(--text);
}

.benefits-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(250px, 1fr));
	gap: 14px;
}

.benefit-card {
	padding: 16px;
}

.install-top-actions,
.install-card-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.install-grid {
	display: grid;
	grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
	gap: 14px;
}

.install-sidebar,
.install-main {
	margin-top: 0;
	padding: 14px;
}

.platform-tabs,
.apps-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 8px;
}

.platform-tab,
.app-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 0.5rem 0.85rem;
	border-radius: 11px;
	border: 1px solid rgba(145, 169, 214, 0.2);
	background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
	color: var(--text);
	font-weight: 600;
	font-size: 0.92rem;
	line-height: 1.2;
	text-align: center;
	word-break: break-word;
	cursor: pointer;
	transition: transform 0.12s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.platform-tab:hover,
.app-btn:hover {
	transform: translateY(-1px);
	border-color: rgba(97, 231, 255, 0.42);
	box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
}

.platform-tab.is-active,
.app-btn.is-active {
	border-color: rgba(97, 231, 255, 0.55);
	background: linear-gradient(135deg, rgba(97, 231, 255, 0.22), rgba(124, 108, 255, 0.26));
	color: #f8fdff;
	box-shadow: 0 10px 22px rgba(97, 231, 255, 0.2);
}

.app-card {
	padding: 14px;
	border-radius: 12px;
	border: 1px solid rgba(145, 169, 214, 0.2);
	background: rgba(255, 255, 255, 0.03);
}

.app-card p {
	margin-top: 6px;
}

.list-steps {
	margin: 0;
	padding-left: 20px;
	display: grid;
	gap: 6px;
	color: var(--text);
}

.list-steps li {
	line-height: 1.45;
}

@media (max-width: 820px) {
	.container {
		width: min(1180px, 94vw);
	}

	.grid.two {
		grid-template-columns: 1fr;
	}

	.topbar-inner {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
		padding-top: 8px;
		padding-bottom: 10px;
		min-height: 0;
	}

	.brand {
		width: 100%;
		justify-content: flex-start;
	}

	.top-nav {
		width: 100%;
		gap: 7px;
		flex-wrap: wrap;
		justify-content: flex-start;
	}

	.top-link {
		width: auto;
		min-height: 36px;
		font-size: 0.9rem;
	}

	.profile-menu {
		grid-template-columns: 1fr;
	}

	.btn,
	button {
		min-height: 42px;
		font-size: 0.94rem;
	}

	h1 {
		font-size: 1.42rem;
	}

	h3 {
		font-size: 1rem;
	}

	.stats-grid,
	.tariffs-grid,
	.benefits-grid {
		grid-template-columns: 1fr;
	}

	.install-grid {
		grid-template-columns: 1fr;
	}

	.install-top-actions .btn,
	.install-card-actions .btn {
		width: 100%;
	}

	.hero-actions {
		width: 100%;
	}

	.hero-actions .btn {
		width: 100%;
	}

	table {
		display: block;
		overflow-x: auto;
		white-space: nowrap;
	}
}
