:root {
	color-scheme: dark;
	--bg: #0f1110;
	--bg-soft: #151817;
	--surface: #191d1b;
	--surface-2: #202622;
	--border: #2e3631;
	--text: #f3f7f2;
	--muted: #a6b0aa;
	--soft: #d8e0da;
	--accent: #2fbf9b;
	--accent-2: #7cc7ff;
	--link: #6edec6;
	--danger: #ee6a5f;
	--warning: #e8b84c;
	--success: #46c178;
	--info: #55a6d9;
	--shadow: 0 18px 48px rgba(0, 0, 0, .28);
	--radius: 8px;
	--sidebar-width: 280px;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="light"] {
	color-scheme: light;
	--bg: #f6f7f9;
	--bg-soft: #ffffff;
	--surface: #ffffff;
	--surface-2: #eef1f4;
	--border: #d9dee5;
	--text: #15171a;
	--muted: #646b75;
	--soft: #2a3038;
	--link: #097d68;
	--shadow: 0 16px 42px rgba(31, 41, 55, .12);
}

* {
	box-sizing: border-box;
}

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-size: 14px;
	line-height: 1.5;
}

a {
	color: var(--link);
	text-decoration: none;
	text-underline-offset: 3px;
}

a:hover {
	text-decoration: underline;
}

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

input[type="search"]::-webkit-search-cancel-button {
	-webkit-appearance: none;
	appearance: none;
	display: none;
}

input[type="search"]::-ms-clear,
input[type="search"]::-ms-reveal {
	display: none;
	width: 0;
	height: 0;
}

img {
	max-width: 100%;
}

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

.sidebar {
	position: sticky;
	top: 0;
	height: 100vh;
	background: var(--surface);
	border-right: 1px solid var(--border);
	display: flex;
	flex-direction: column;
	z-index: 30;
}

.sidebar-brand {
	height: 76px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 20px;
	border-bottom: 1px solid var(--border);
}

.brand-mark {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-weight: 800;
	font-size: 16px;
	color: var(--text);
}

.brand-mark:hover,
.nav-link:hover,
.dropdown-menu a:hover,
.btn:hover,
.icon-button:hover,
.table-user:hover,
.notification-item:hover {
	text-decoration: none;
}

.brand-mark img {
	width: 28px;
	height: 28px;
}

.sidebar-close {
	display: none;
}

.sidebar-nav {
	padding: 16px 12px;
	display: grid;
	gap: 4px;
	overflow-y: auto;
}

.nav-divider {
	height: 1px;
	margin: 8px 8px;
	background: var(--border);
}

.nav-link-external {
	grid-template-columns: auto minmax(0, 1fr) auto;
}

.nav-link-external svg:last-child {
	width: 14px;
	height: 14px;
	opacity: .72;
}

.nav-link {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	padding: 0 12px;
	border-radius: var(--radius);
	color: var(--muted);
	font-weight: 600;
}

.nav-link:hover,
.nav-link.active {
	color: var(--text);
	background: var(--surface-2);
}

.nav-link.active {
	box-shadow: inset 3px 0 0 var(--accent);
}

.nav-link svg,
.topbar svg,
.btn svg,
.icon-button svg {
	width: 18px;
	height: 18px;
	stroke-width: 2.1;
}

.sidebar-footer {
	margin-top: auto;
	padding: 16px;
	display: grid;
	gap: 10px;
}

.sidebar-scrim {
	display: none;
}

.mini-panel {
	padding: 14px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--bg-soft);
}

.mini-panel-title {
	font-weight: 800;
}

.mini-panel-text {
	color: var(--muted);
	font-size: 12px;
}

.demo-pill {
	padding: 8px 10px;
	border-radius: 999px;
	background: rgba(47, 191, 155, .16);
	color: var(--accent);
	font-weight: 700;
	text-align: center;
}

.app-main {
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.topbar {
	position: sticky;
	top: 0;
	height: 76px;
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 0 28px;
	background: color-mix(in srgb, var(--bg) 86%, transparent);
	backdrop-filter: blur(16px);
	border-bottom: 1px solid var(--border);
	z-index: 20;
}

.topbar-search {
	position: relative;
	flex: 1;
	max-width: 560px;
	height: 42px;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0 14px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--muted);
}

.topbar-search input {
	width: 100%;
	border: 0;
	outline: 0;
	background: transparent;
	color: var(--text);
}

.topbar-search-toggle {
	display: none;
}

.search-clear {
	width: 28px;
	height: 28px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: var(--muted);
	display: none;
	place-items: center;
	cursor: pointer;
}

.topbar-search.has-value .search-clear {
	display: grid;
}

.global-search-panel {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	right: 0;
	display: none;
	gap: 6px;
	padding: 10px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: var(--shadow);
	z-index: 60;
}

.topbar-search.search-active .global-search-panel {
	display: grid;
}

.search-result,
.search-empty {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px;
	border-radius: 6px;
	color: var(--muted);
	font-weight: 700;
}

button.search-result {
	width: 100%;
	border: 0;
	background: transparent;
	text-align: left;
	cursor: pointer;
}

.search-result:hover {
	background: var(--surface-2);
	color: var(--text);
	text-decoration: none;
}

.search-result small,
.search-empty {
	font-size: 12px;
}

.topbar-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-left: auto;
}

.icon-button {
	width: 40px;
	height: 40px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--text);
	display: inline-grid;
	place-items: center;
	cursor: pointer;
}

.icon-button:hover {
	border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
}

.sidebar-close {
	display: none;
}

.notification-button {
	position: relative;
}

.notification-dot {
	position: absolute;
	top: -6px;
	right: -6px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 999px;
	display: grid;
	place-items: center;
	background: var(--danger);
	color: #fff;
	font-size: 11px;
	font-weight: 900;
	box-shadow: 0 0 0 3px var(--bg);
}

.language-button,
.user-menu-button {
	height: 42px;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 0 12px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--text);
	cursor: pointer;
	font-weight: 700;
}

.dropdown {
	position: relative;
}

.dropdown-menu {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	min-width: 210px;
	padding: 8px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	display: none;
	z-index: 50;
}

.dropdown-menu-right {
	left: auto;
	right: 0;
}

.dropdown.open .dropdown-menu {
	display: grid;
	gap: 2px;
}

.dropdown-menu a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px;
	border-radius: 6px;
	color: var(--muted);
	font-weight: 600;
}

.dropdown-menu a:hover {
	background: var(--surface-2);
	color: var(--text);
}

.notification-menu {
	width: min(380px, calc(100vw - 32px));
}

.notification-menu-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px;
	color: var(--text);
}

.notification-menu-head span,
.notification-empty {
	color: var(--muted);
	font-size: 12px;
	font-weight: 700;
}

.notification-empty {
	padding: 12px 10px;
}

[data-notification-list] {
	display: grid;
	gap: 2px;
}

.notification-item {
	align-items: flex-start !important;
	position: relative;
}

.notification-item svg {
	flex: 0 0 auto;
	margin-top: 1px;
}

.notification-item strong {
	display: block;
	color: var(--text);
}

.notification-item small {
	display: block;
	margin-top: 2px;
	color: var(--muted);
	font-weight: 600;
	line-height: 1.35;
}

.notification-item.is-unread::after {
	content: "";
	position: absolute;
	right: 10px;
	top: 14px;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--accent);
}

.flag {
	width: 20px;
	height: 14px;
	object-fit: cover;
	border-radius: 3px;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .12);
}

.avatar-wrap {
	position: relative;
	width: var(--avatar-size);
	height: var(--avatar-size);
	flex: 0 0 var(--avatar-size);
	display: inline-grid;
	place-items: center;
	border-radius: 50%;
	background:
		linear-gradient(var(--surface), var(--surface)) padding-box,
		linear-gradient(135deg, var(--accent), var(--accent-2)) border-box;
	border: 2px solid transparent;
	box-shadow: 0 8px 22px rgba(0, 0, 0, .22);
}

.avatar-wrap::after {
	content: "";
	position: absolute;
	right: -1px;
	bottom: -1px;
	z-index: 3;
	width: max(9px, calc(var(--avatar-size) * .22));
	height: max(9px, calc(var(--avatar-size) * .22));
	border: 2px solid var(--surface);
	border-radius: 50%;
	background: var(--success);
}

.avatar-status-offline::after,
.avatar-status-danger::after {
	background: var(--danger);
}

.avatar-initials {
	position: absolute;
	inset: 2px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: color-mix(in srgb, var(--surface-2) 72%, var(--accent));
	color: var(--text);
	font-size: max(11px, calc(var(--avatar-size) * .32));
	font-weight: 900;
	line-height: 1;
}

.avatar {
	position: relative;
	z-index: 1;
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
	background: var(--surface-2);
}

.app-content {
	width: 100%;
	max-width: 1480px;
	margin: 0 auto;
	padding: 28px;
	flex: 1;
}

.page-heading {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 18px;
	margin-bottom: 24px;
}

.page-heading h1 {
	margin: 0;
	font-size: clamp(26px, 4vw, 42px);
	line-height: 1.05;
}

.page-heading p {
	margin: 8px 0 0;
	color: var(--muted);
	max-width: 680px;
}

.page-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.grid {
	display: grid;
	gap: 16px;
}

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

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

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

.layout-rail {
	display: grid;
	grid-template-columns: 340px minmax(0, 1fr);
	gap: 16px;
	align-items: start;
}

.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	overflow: clip;
	min-width: 0;
}

.card-pad {
	padding: 18px;
}

.card-header {
	padding: 18px;
	border-bottom: 1px solid var(--border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
}

.card-title {
	margin: 0;
	font-size: 16px;
	font-weight: 800;
}

.card-subtitle {
	margin: 4px 0 0;
	color: var(--muted);
	font-size: 13px;
}

.metric-card {
	padding: 18px;
	display: grid;
	gap: 14px;
	min-width: 0;
}

.metric-card-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	color: var(--muted);
	font-weight: 700;
}

.metric-value {
	font-size: 32px;
	line-height: 1;
	font-weight: 800;
	overflow-wrap: anywhere;
}

.metric-note {
	color: var(--muted);
	font-size: 13px;
}

.metric-up {
	color: var(--success);
	font-weight: 800;
}

.metric-down {
	color: var(--danger);
	font-weight: 800;
}

.toolbar {
	display: flex;
	gap: 10px;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
}

.search-input {
	position: relative;
	min-width: min(340px, 100%);
	flex: 1;
}

.search-input svg {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	width: 18px;
	color: var(--muted);
}

.search-input input {
	width: 100%;
	height: 42px;
	padding: 0 12px 0 40px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--bg-soft);
	color: var(--text);
	outline: 0;
}

.table-filters {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
}

.table-filters select {
	min-height: 42px;
	max-width: 180px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--bg-soft);
	color: var(--text);
	padding: 0 36px 0 12px;
	outline: 0;
	font-weight: 700;
}

.table-wrap {
	width: 100%;
	overflow-x: auto;
}

.data-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	min-width: 760px;
}

.data-table th,
.data-table td {
	padding: 14px 16px;
	border-bottom: 1px solid var(--border);
	text-align: left;
	vertical-align: middle;
}

.data-table th {
	color: var(--muted);
	font-size: 12px;
	text-transform: uppercase;
	font-weight: 800;
	white-space: nowrap;
}

.data-table th[data-sort] {
	cursor: pointer;
}

.data-table tr:hover td {
	background: color-mix(in srgb, var(--surface-2) 55%, transparent);
}

.data-table tr.row-pulse td {
	background: color-mix(in srgb, var(--accent) 18%, transparent);
}

.table-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 16px 16px;
	border-top: 1px solid var(--border);
	color: var(--muted);
	font-size: 12px;
	font-weight: 800;
}

.table-page-size,
.table-pager {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.table-page-size select {
	height: 34px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--bg-soft);
	color: var(--text);
	padding: 0 8px;
}

.table-pager .btn {
	min-height: 34px;
	padding: 0 10px;
}

.table-pager .btn:disabled {
	opacity: .45;
	cursor: not-allowed;
}

.table-user {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 210px;
	color: var(--text);
}

.table-user strong {
	display: block;
}

.table-user span,
.muted {
	color: var(--muted);
}

.empty-state {
	text-align: center;
	color: var(--muted);
	padding: 30px;
}

.badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 24px;
	padding: 3px 9px;
	border-radius: 999px;
	font-weight: 800;
	font-size: 12px;
}

.badge-success {
	background: color-mix(in srgb, var(--success) 18%, transparent);
	color: var(--success);
}

.badge-warning {
	background: color-mix(in srgb, var(--warning) 18%, transparent);
	color: var(--warning);
}

.badge-danger {
	background: color-mix(in srgb, var(--danger) 18%, transparent);
	color: var(--danger);
}

.badge-neutral,
.badge-info {
	background: color-mix(in srgb, var(--info) 16%, transparent);
	color: var(--info);
}

.btn {
	min-height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 0 14px;
	background: var(--surface-2);
	color: var(--text);
	cursor: pointer;
	font-weight: 800;
	white-space: nowrap;
}

.btn:hover {
	border-color: color-mix(in srgb, var(--accent) 60%, var(--border));
}

.btn-primary {
	background: var(--accent);
	border-color: var(--accent);
	color: #071310;
}

.btn-danger {
	background: var(--danger);
	border-color: var(--danger);
	color: #160706;
}

.btn-ghost {
	background: transparent;
}

.is-disabled {
	opacity: .58;
	cursor: not-allowed;
}

.is-disabled[href],
button.is-disabled,
[aria-disabled="true"] {
	cursor: not-allowed;
}

.btn-discord {
	background: #5865f2;
	border-color: #5865f2;
	color: #fff;
}

.discord-mark {
	width: 18px;
	height: 18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.discord-mark svg {
	width: 18px;
	height: 18px;
	display: block;
}

.action-group {
	display: inline-flex;
	gap: 8px;
}

.form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.field {
	display: grid;
	gap: 7px;
}

.field-full {
	grid-column: 1 / -1;
}

.field label {
	color: var(--soft);
	font-weight: 800;
	font-size: 13px;
}

.field input,
.field select,
.field textarea {
	width: 100%;
	min-height: 42px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--bg-soft);
	color: var(--text);
	padding: 10px 12px;
	outline: 0;
}

.field textarea {
	resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
	border-color: var(--accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

.field input[readonly],
.field textarea[readonly],
.field select[readonly],
.field input:disabled,
.field textarea:disabled,
.field select:disabled {
	cursor: not-allowed;
	background: color-mix(in srgb, var(--surface-2) 72%, transparent);
	color: var(--muted);
}

.input-action {
	display: flex;
	gap: 8px;
}

.input-action input {
	min-width: 0;
}

.check-row {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--muted);
	font-weight: 700;
}

.check-row input {
	width: 18px;
	height: 18px;
	accent-color: var(--accent);
}

.modal {
	width: min(560px, calc(100vw - 28px));
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--text);
	box-shadow: var(--shadow);
	padding: 0;
}

.modal::backdrop {
	background: rgba(0, 0, 0, .62);
	backdrop-filter: blur(3px);
}

.modal-header,
.modal-body,
.modal-footer {
	padding: 18px;
}

.modal-header,
.modal-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	border-bottom: 1px solid var(--border);
}

.modal-footer {
	border-top: 1px solid var(--border);
	border-bottom: 0;
	justify-content: flex-end;
}

.chart-card {
	min-height: 340px;
}

.chart-box {
	position: relative;
	height: 280px;
	padding: 12px 18px 18px;
}

.progress-row {
	display: grid;
	gap: 10px;
}

.progress-item {
	display: grid;
	gap: 6px;
}

.progress-meta {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	color: var(--muted);
}

.progress-track {
	height: 9px;
	border-radius: 999px;
	background: var(--surface-2);
	overflow: hidden;
}

.progress-fill {
	height: 100%;
	border-radius: inherit;
	background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.profile-hero {
	display: grid;
	gap: 16px;
	text-align: center;
}

.profile-hero .avatar-wrap {
	margin: 0 auto;
}

.profile-name {
	font-size: 24px;
	font-weight: 800;
}

.detail-list {
	display: grid;
	gap: 12px;
}

.detail-item {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 14px;
	padding: 12px 0;
	border-bottom: 1px solid var(--border);
}

.detail-item:last-child {
	border-bottom: 0;
}

.detail-label {
	color: var(--muted);
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 700;
}

.detail-label svg {
	width: 16px;
	height: 16px;
	color: var(--accent);
}

.detail-brand-icon {
	width: 16px;
	height: 16px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--accent);
	flex: 0 0 auto;
}

.detail-brand-icon svg {
	width: 16px;
	height: 16px;
	display: block;
	color: inherit;
}

.detail-discord-icon {
	color: var(--accent);
}

.tabs {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 16px;
}

.tab-button {
	min-height: 40px;
	padding: 0 14px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--muted);
	cursor: pointer;
	font-weight: 800;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	line-height: 1;
}

.tab-button svg {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
}

.tab-button.active {
	background: var(--accent);
	border-color: var(--accent);
	color: #071310;
}

.tab-panel {
	display: none;
}

.tab-panel.active {
	display: block;
}

.footer {
	width: 100%;
	max-width: 1480px;
	margin: 0 auto;
	padding: 18px 28px 26px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	color: var(--muted);
	border-top: 1px solid var(--border);
	background: color-mix(in srgb, var(--bg) 78%, transparent);
}

.footer-brand,
.footer-links {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
}

.footer-mark {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--accent);
	box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 16%, transparent);
}

.footer-pill {
	padding: 5px 8px;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: color-mix(in srgb, var(--surface-2) 54%, transparent);
	color: var(--soft);
	font-size: 12px;
	font-weight: 800;
}

.footer-links a {
	color: var(--soft);
	font-weight: 800;
}

.link-muted {
	color: var(--muted);
}

.link-action {
	color: var(--link);
	font-weight: 800;
}

.data-table a:not(.table-user),
.compact-row a,
.detail-item a {
	color: var(--link);
	font-weight: 900;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.section-stack {
	display: grid;
	gap: 16px;
}

.compact-list {
	display: grid;
	gap: 10px;
}

.compact-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 14px;
	padding: 14px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: color-mix(in srgb, var(--surface-2) 42%, transparent);
}

.compact-row.row-pulse,
[data-search-item].row-pulse {
	background: color-mix(in srgb, var(--accent) 16%, transparent);
}

.compact-row-main {
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 12px;
}

.compact-row .icon-button {
	cursor: default;
}

.compact-row-title {
	display: block;
	color: var(--text);
	font-weight: 900;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.compact-row-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 3px;
	color: var(--muted);
	font-size: 12px;
	font-weight: 700;
}

.compact-row-value {
	text-align: right;
	font-weight: 900;
}

.pill-row {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.insight-card {
	padding: 18px;
	display: grid;
	gap: 12px;
}

.insight-card h3 {
	margin: 0;
	font-size: 15px;
}

.insight-card p {
	margin: 0;
	color: var(--muted);
}

.profile-banner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 18px;
	padding: 20px;
}

.profile-banner-main {
	display: flex;
	align-items: center;
	gap: 16px;
	min-width: 0;
}

.profile-banner-main h2 {
	margin: 0;
	font-size: 24px;
}

.profile-banner-main p {
	margin: 4px 0 0;
	color: var(--muted);
}

.download-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

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

.download-tile {
	padding: 16px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: color-mix(in srgb, var(--surface-2) 46%, transparent);
	display: grid;
	gap: 12px;
}

.download-tile-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.download-tile h3 {
	margin: 0;
	font-size: 15px;
}

.download-tile p {
	margin: 0;
	color: var(--muted);
}

.download-tile-large {
	min-height: 230px;
	align-content: space-between;
}

.download-hero {
	padding: 22px;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
	gap: 22px;
	align-items: center;
}

.download-hero h2 {
	margin: 6px 0 8px;
	font-size: clamp(26px, 4vw, 44px);
	line-height: 1;
}

.download-hero p {
	margin: 0;
	color: var(--muted);
	max-width: 720px;
}

.download-hero-meta {
	display: grid;
	gap: 10px;
}

.download-hero-meta div {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 12px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: color-mix(in srgb, var(--surface-2) 48%, transparent);
}

.download-hero-meta span,
.table-subtext {
	color: var(--muted);
	font-size: 13px;
	font-weight: 700;
}

.table-subtext {
	display: block;
	margin-top: 4px;
}

.eyebrow {
	color: var(--accent);
	font-size: 12px;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: .08em;
}

.state-text {
	color: var(--text);
}

.state-active,
.state-success {
	color: var(--success);
}

.state-expiring,
.state-warning,
.state-unknown {
	color: var(--warning);
}

.state-expired,
.state-danger {
	color: var(--danger);
}

.state-pill {
	display: inline-flex;
	align-items: center;
	min-height: 34px;
	padding: 0 11px;
	border: 1px solid currentColor;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 900;
	white-space: nowrap;
}

.request-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	flex-wrap: wrap;
}

.legal-layout {
	display: grid;
	grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
	gap: 16px;
	align-items: start;
}

.legal-rail {
	position: sticky;
	top: 92px;
	display: grid;
	gap: 10px;
}

.legal-stat {
	padding: 14px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	display: grid;
	gap: 6px;
}

.legal-stat span {
	color: var(--muted);
	font-size: 12px;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: .06em;
}

.legal-stat strong {
	font-size: 15px;
}

.legal-content {
	display: grid;
	gap: 12px;
}

.legal-section {
	padding: 18px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
}

.legal-layout-modern .legal-section {
	padding: 22px;
	background:
		linear-gradient(180deg, color-mix(in srgb, var(--surface-2) 42%, transparent), transparent 140px),
		var(--surface);
}

.legal-intro {
	border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

.legal-section h2 {
	margin: 0 0 8px;
	font-size: 18px;
}

.legal-section p {
	margin: 0;
	color: var(--muted);
	line-height: 1.65;
}

.legal-section ul {
	margin: 14px 0 0;
	padding-left: 20px;
	color: var(--muted);
	line-height: 1.65;
}

.legal-section li + li {
	margin-top: 7px;
}

.form-shell {
	display: grid;
	grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
	gap: 16px;
	align-items: start;
}

.form-nav {
	position: sticky;
	top: 92px;
	display: grid;
	gap: 8px;
}

.form-nav a {
	padding: 11px 12px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	color: var(--muted);
	font-weight: 800;
	background: var(--surface);
}

.form-nav a:hover {
	color: var(--text);
	border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
	text-decoration: none;
}

.field-help {
	color: var(--muted);
	font-size: 12px;
}

[data-tooltip] {
	position: relative;
}

[data-tooltip]::before,
[data-tooltip]::after {
	display: none;
}

.osf-tooltip {
	position: fixed;
	z-index: 5000;
	max-width: 240px;
	padding: 7px 9px;
	border-radius: 6px;
	background: #070807;
	color: #fff;
	font-size: 12px;
	font-weight: 800;
	line-height: 1.25;
	box-shadow: var(--shadow);
	pointer-events: none;
}

.auth-page {
	min-height: 100vh;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(420px, 540px);
	background:
		linear-gradient(120deg, rgba(52, 197, 160, .13), transparent 32%),
		linear-gradient(315deg, rgba(47, 128, 237, .16), transparent 34%),
		var(--bg);
	position: relative;
	overflow: hidden;
}

.auth-page::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(color-mix(in srgb, var(--border) 72%, transparent) 1px, transparent 1px),
		linear-gradient(90deg, color-mix(in srgb, var(--border) 72%, transparent) 1px, transparent 1px);
	background-size: 48px 48px;
	mask-image: linear-gradient(90deg, rgba(0, 0, 0, .8), transparent 72%);
	opacity: .32;
	pointer-events: none;
}

.auth-page::after {
	content: "";
	position: absolute;
	inset: -30% -20%;
	background: linear-gradient(115deg, transparent 35%, rgba(52, 197, 160, .12) 48%, rgba(47, 128, 237, .1) 56%, transparent 68%);
	animation: authSweep 14s ease-in-out infinite;
	pointer-events: none;
}

@keyframes authSweep {
	0%, 100% {
		transform: translateX(-8%);
		opacity: .55;
	}
	50% {
		transform: translateX(8%);
		opacity: .9;
	}
}

.auth-visual {
	padding: 48px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	position: relative;
	z-index: 1;
}

.auth-visual h1 {
	max-width: 760px;
	margin: 0;
	font-size: clamp(44px, 5.8vw, 78px);
	line-height: 1;
}

.auth-visual p {
	max-width: 560px;
	color: var(--muted);
	font-size: 18px;
}

.auth-card {
	min-height: 100vh;
	display: flex;
	align-items: center;
	padding: 32px;
	background: color-mix(in srgb, var(--surface) 94%, transparent);
	border-left: 1px solid var(--border);
	box-shadow: -24px 0 80px rgba(0, 0, 0, .12);
	position: relative;
	z-index: 1;
	backdrop-filter: blur(14px);
}

.auth-inner {
	width: 100%;
	display: grid;
	gap: 18px;
	padding: 6px;
	animation: authCardIn .45s ease both;
}

@keyframes authCardIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.auth-title h2 {
	margin: 0;
	font-size: 30px;
}

.auth-title p {
	margin: 6px 0 0;
	color: var(--muted);
}

.divider {
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--muted);
	font-weight: 800;
}

.divider::before,
.divider::after {
	content: "";
	height: 1px;
	background: var(--border);
	flex: 1;
}

.toast-stack {
	position: fixed;
	right: 18px;
	top: 18px;
	display: grid;
	gap: 10px;
	z-index: 5000;
}

.modal-toast-stack {
	z-index: 2147483647;
}

.auth-toast-stack {
	z-index: 5100;
}

.toast {
	max-width: min(420px, calc(100vw - 36px));
	padding: 12px;
	border-radius: var(--radius);
	background: var(--surface);
	border: 1px solid var(--border);
	box-shadow: var(--shadow);
	color: var(--text);
	font-weight: 700;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 32px;
	align-items: center;
	gap: 12px;
}

.toast button {
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 8px;
	display: grid;
	place-items: center;
	background: var(--surface-2);
	color: var(--text);
	cursor: pointer;
	padding: 0;
	flex: 0 0 auto;
	align-self: start;
	margin-top: -2px;
}

.toast button svg {
	width: 18px;
	height: 18px;
}

.toast.success {
	border-color: color-mix(in srgb, var(--success) 50%, var(--border));
}

.toast.info,
.toast.primary,
.toast.neutral {
	border-color: color-mix(in srgb, var(--info) 46%, var(--border));
}

.toast.danger {
	border-color: color-mix(in srgb, var(--danger) 50%, var(--border));
}

.toast.warning {
	border-color: color-mix(in srgb, var(--warning) 50%, var(--border));
}

.payment-method-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 12px;
}

.payment-method-card {
	padding: 14px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: color-mix(in srgb, var(--surface-2) 48%, transparent);
	display: grid;
	gap: 12px;
}

.payment-method-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.payment-method-name {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 900;
}

.payment-method-name svg {
	width: 18px;
	height: 18px;
	color: var(--accent);
}

.payment-method-value {
	font-size: 24px;
	line-height: 1;
	font-weight: 900;
}

.mobile-menu {
	display: none;
}

.theme-sun {
	display: none;
}

:root[data-theme="light"] .theme-sun {
	display: block;
}

:root[data-theme="light"] .theme-moon {
	display: none;
}

.hide {
	display: none !important;
}

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

	.grid-3,
	.download-grid-wide,
	.layout-rail {
		grid-template-columns: 1fr;
	}
}

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

	.sidebar {
		position: fixed;
		left: 0;
		top: 0;
		width: min(var(--sidebar-width), calc(100vw - 48px));
		transform: translateX(-100%);
		transition: transform .2s ease;
	}

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

	body.sidebar-open {
		overflow: hidden;
	}

	.sidebar-scrim {
		display: block;
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, .5);
		z-index: 25;
		opacity: 0;
		pointer-events: none;
		transition: opacity .2s ease;
	}

	body.sidebar-open .sidebar-scrim {
		opacity: 1;
		pointer-events: auto;
	}

	.sidebar-close,
	.mobile-menu {
		display: inline-grid;
	}

	.topbar {
		padding: 0 16px;
	}

	.topbar-search {
		position: fixed;
		left: 16px;
		right: 16px;
		top: 86px;
		max-width: none;
		display: none;
		z-index: 80;
	}

	body.search-open .topbar-search {
		display: flex;
	}

	.topbar-search-toggle {
		display: inline-grid;
	}

	.user-menu-button span,
	.language-button span {
		display: none;
	}

	.notification-menu,
	.language-menu {
		position: fixed;
		top: 78px;
		left: 16px !important;
		right: 16px !important;
		width: auto;
		max-height: calc(100vh - 96px);
		overflow-y: auto;
	}

	.app-content {
		padding: 20px 16px;
	}

	.page-heading {
		display: grid;
	}

	.page-actions {
		justify-content: stretch;
	}

	.page-actions .btn {
		flex: 1;
	}

	.grid-2,
	.grid-4,
	.form-grid,
	.download-grid,
	.form-shell,
	.download-hero,
	.legal-layout {
		grid-template-columns: 1fr;
	}

	.form-nav {
		position: static;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.profile-banner {
		grid-template-columns: 1fr;
	}

	.legal-rail {
		position: static;
	}

	.request-actions {
		justify-content: stretch;
	}

	.request-actions .btn {
		flex: 1;
	}

	.compact-row {
		grid-template-columns: 1fr;
	}

	.compact-row-value {
		text-align: left;
	}

	.footer {
		padding: 18px 16px 24px;
		display: grid;
	}

	.auth-page {
		grid-template-columns: 1fr;
	}

	.auth-visual {
		display: none;
	}

	.auth-card {
		min-height: 100vh;
		border-left: 0;
	}
}

@media (max-width: 700px) {
	.toolbar {
		align-items: stretch;
	}

	.search-input,
	.table-filters,
	.table-filters select {
		width: 100%;
	}

	.table-wrap {
		overflow: visible;
		padding: 0 14px 14px;
	}

	.data-table {
		min-width: 0;
		border-collapse: separate;
	}

	.data-table thead {
		display: none;
	}

	.data-table tbody,
	.data-table tr,
	.data-table td {
		display: block;
		width: 100%;
	}

	.data-table tbody {
		display: grid;
		gap: 12px;
	}

	.data-table tr {
		border: 1px solid var(--border);
		border-radius: var(--radius);
		background: color-mix(in srgb, var(--surface-2) 36%, transparent);
		overflow: hidden;
	}

	.data-table td {
		display: grid;
		grid-template-columns: minmax(92px, 36%) minmax(0, 1fr);
		gap: 12px;
		align-items: center;
		padding: 11px 12px;
		border-bottom: 1px solid var(--border);
		overflow-wrap: anywhere;
	}

	.data-table td:last-child {
		border-bottom: 0;
	}

	.data-table td::before {
		content: attr(data-label);
		color: var(--muted);
		font-size: 11px;
		text-transform: uppercase;
		font-weight: 900;
		letter-spacing: 0;
	}

	.data-table tr:hover td {
		background: transparent;
	}

	.empty-state {
		display: block !important;
	}

	.empty-state::before {
		content: none !important;
	}

	.table-user {
		min-width: 0;
	}

	.table-footer {
		display: grid;
	}

	.table-page-size,
	.table-pager {
		justify-content: space-between;
	}

	.table-pager {
		width: 100%;
	}
}

@media (max-width: 520px) {
	.topbar-actions {
		gap: 6px;
	}

	.icon-button,
	.language-button,
	.user-menu-button {
		height: 38px;
		min-width: 38px;
	}

	.card-header,
	.card-pad {
		padding: 14px;
	}

	.metric-value {
		font-size: 28px;
	}
}
