:root {
	--customer-bg: #f5f7fb;
	--customer-surface: #ffffff;
	--customer-surface-2: #fbfdff;
	--customer-text: #071f3c;
	--customer-muted: #657086;
	--customer-border: #d9e2ef;
	--customer-accent: #0b559f;
	--customer-accent-dark: #062b5f;
	--customer-accent-soft: #e7f1fb;
	--customer-gold: #e6b76b;
	--customer-gold-soft: #fff4df;
	--customer-ok: #147a3d;
	--customer-warn: #a86600;
	--customer-danger: #b42318;
	--customer-shadow: 0 14px 34px rgba(7, 31, 60, 0.09);
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

img {
	display: block;
	height: auto;
	max-width: 100%;
}

.customer-body {
	background: var(--customer-bg);
	color: var(--customer-text);
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 15px;
	line-height: 1.45;
	margin: 0;
}

.customer-app,
.customer-auth {
	margin: 0 auto;
	max-width: 1120px;
	min-height: 100vh;
	padding: 18px 16px 36px;
}

.customer-auth {
	display: grid;
	align-content: center;
	gap: 20px;
	max-width: 440px;
	padding-bottom: 96px;
}

.customer-header,
.customer-section-head,
.customer-actions,
.customer-header-actions,
.device-card-head {
	align-items: center;
	display: flex;
	gap: 12px;
	justify-content: space-between;
}

.customer-header {
	margin-bottom: 14px;
}

.customer-header-actions {
	flex-wrap: wrap;
	justify-content: flex-end;
}

.customer-brand {
	align-items: center;
	color: var(--customer-text);
	display: inline-flex;
	gap: 10px;
	text-decoration: none;
}

.customer-brand span {
	align-items: center;
	background: #ffffff;
	border: 1px solid #cfdced;
	border-radius: 8px;
	box-shadow: 0 8px 22px rgba(7, 31, 60, 0.12);
	display: inline-flex;
	height: 42px;
	justify-content: center;
	overflow: hidden;
	width: 42px;
}

.customer-brand img {
	display: block;
	height: 42px;
	width: 42px;
}

.customer-brand strong {
	font-size: 20px;
}

.customer-tabs {
	background: rgba(255, 255, 255, 0.96);
	border: 1px solid var(--customer-border);
	border-radius: 8px;
	box-shadow: 0 10px 24px rgba(7, 31, 60, 0.07);
	display: grid;
	gap: 4px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin-bottom: 14px;
	padding: 4px;
	position: sticky;
	top: 8px;
	z-index: 5;
}

.customer-tabs button {
	background: transparent;
	border: 0;
	border-radius: 6px;
	color: var(--customer-muted);
	cursor: pointer;
	font: inherit;
	font-size: 13px;
	font-weight: 850;
	min-height: 40px;
	padding: 8px 6px;
}

.customer-tabs button.active {
	background: var(--customer-accent);
	color: #ffffff;
}

.customer-main {
	min-width: 0;
}

.customer-view {
	display: grid;
	gap: 14px;
}

.customer-view[hidden] {
	display: none;
}

.customer-hero,
.customer-panel,
.customer-stat,
.device-card,
.token-card {
	background: var(--customer-surface);
	border: 1px solid var(--customer-border);
	border-radius: 8px;
	box-shadow: var(--customer-shadow);
	min-width: 0;
}

.customer-hero,
.customer-panel {
	padding: 18px;
}

.customer-hero {
	display: grid;
	gap: 12px;
	grid-template-columns: minmax(0, 1fr) auto;
}

.customer-hero .customer-meter,
.customer-hero #plan-line {
	grid-column: 1 / -1;
}

.customer-hero h1,
.customer-panel h1,
.customer-panel h2 {
	line-height: 1.1;
	margin: 0;
}

.customer-hero h1 {
	font-size: 28px;
	margin-bottom: 8px;
}

.customer-panel h1 {
	font-size: 24px;
	margin-bottom: 16px;
}

.customer-panel h2 {
	font-size: 17px;
}

.customer-label {
	color: var(--customer-accent-dark);
	font-size: 12px;
	font-weight: 850;
	letter-spacing: 0;
	margin: 0 0 6px;
	text-transform: uppercase;
}

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

.customer-meter {
	background: #e6edf6;
	border-radius: 999px;
	height: 9px;
	overflow: hidden;
}

.customer-meter span {
	background: var(--customer-accent);
	display: block;
	height: 100%;
	width: 0;
}

.customer-stat-grid,
.customer-analytics,
.customer-settings-grid {
	display: grid;
	gap: 14px;
}

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

.customer-stat {
	border-top: 3px solid var(--customer-accent);
	padding: 14px;
}

.customer-stat:nth-child(2n) {
	border-top-color: var(--customer-gold);
}

.customer-stat span,
.customer-facts dt {
	color: var(--customer-muted);
	display: block;
	font-size: 12px;
	font-weight: 850;
	text-transform: uppercase;
}

.customer-stat strong,
.customer-facts dd {
	color: var(--customer-text);
	display: block;
	font-size: 17px;
	font-weight: 850;
	margin: 4px 0;
	overflow-wrap: anywhere;
}

.customer-stat small {
	color: var(--customer-muted);
	display: block;
	font-size: 12px;
	overflow-wrap: anywhere;
}

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

.node-picker,
.device-list,
.customer-stack,
.token-list,
.customer-facts,
.customer-link-grid {
	display: grid;
	gap: 10px;
}

.node-option,
.device-card {
	background: var(--customer-surface-2);
	border: 1px solid var(--customer-border);
	border-radius: 8px;
	padding: 12px;
}

.node-option {
	align-items: center;
	cursor: pointer;
	display: flex;
	gap: 12px;
	justify-content: space-between;
	text-align: left;
	width: 100%;
}

.node-option.selected {
	border-color: var(--customer-accent);
	box-shadow: inset 0 0 0 1px var(--customer-accent);
}

.node-option strong,
.device-card strong,
.token-card strong {
	display: block;
	font-size: 16px;
	overflow-wrap: anywhere;
}

.node-option small,
.device-card small,
.token-card small {
	color: var(--customer-muted);
	display: block;
	font-size: 12px;
	margin-top: 3px;
	overflow-wrap: anywhere;
}

.billing-plans,
.billing-history {
	display: grid;
	gap: 10px;
	margin-top: 12px;
}

.billing-plan-row {
	align-items: center;
	border: 1px solid var(--customer-border);
	border-radius: 8px;
	display: flex;
	gap: 12px;
	justify-content: space-between;
	padding: 12px;
}

.billing-plan-row strong,
.billing-plan-row small {
	display: block;
}

.billing-plan-row small {
	color: var(--customer-muted);
	font-size: 12px;
	margin-top: 3px;
}

.customer-chip {
	background: #e5f4ec;
	border-radius: 999px;
	color: var(--customer-ok);
	display: inline-flex;
	font-size: 12px;
	font-weight: 850;
	line-height: 1;
	padding: 6px 9px;
	text-transform: capitalize;
	white-space: nowrap;
}

.customer-chip.warn {
	background: #fff5df;
	color: var(--customer-warn);
}

.customer-chip.danger {
	background: #fff0ee;
	color: var(--customer-danger);
}

label,
.customer-stack p {
	color: var(--customer-text);
	display: grid;
	font-size: 13px;
	font-weight: 760;
	gap: 6px;
	margin: 0;
}

input,
select,
textarea {
	background: #ffffff;
	border: 1px solid var(--customer-border);
	border-radius: 8px;
	color: var(--customer-text);
	font: inherit;
	min-height: 42px;
	padding: 9px 10px;
	width: 100%;
}

.customer-button,
.customer-icon-button,
.customer-text-button {
	border-radius: 8px;
	cursor: pointer;
	font: inherit;
	font-size: 14px;
	font-weight: 800;
	min-height: 40px;
}

.customer-button {
	background: var(--customer-accent);
	border: 1px solid var(--customer-accent);
	color: #ffffff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 9px 12px;
	text-align: center;
	text-decoration: none;
	width: 100%;
}

.customer-button.secondary {
	width: auto;
}

.customer-button.ghost,
.customer-icon-button {
	background: #ffffff;
	border: 1px solid var(--customer-border);
	color: var(--customer-text);
	padding: 9px 12px;
}

.customer-button.danger,
.customer-button.ghost.danger {
	border-color: #ffd3ce;
	color: var(--customer-danger);
}

.customer-button:disabled {
	cursor: not-allowed;
	opacity: 0.55;
}

.customer-text-button {
	background: transparent;
	border: 0;
	color: var(--customer-accent-dark);
	padding: 0;
	text-decoration: none;
}

.customer-text-button.danger {
	color: var(--customer-danger);
}

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

.device-card.disabled {
	opacity: 0.75;
}

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

.profile-row {
	background: #ffffff;
	border: 1px solid var(--customer-border);
	border-radius: 8px;
	padding: 10px;
}

.profile-row span {
	display: inline-flex;
	gap: 10px;
}

.device-actions {
	align-items: center;
}

.device-actions .customer-text-button {
	min-height: 0;
}

.customer-config {
	background: #071f3c;
	border-radius: 8px;
	color: #e5fff8;
	font-family: "SFMono-Regular", Consolas, monospace;
	font-size: 12px;
	line-height: 1.5;
	min-height: 280px;
	overflow: auto;
	padding: 14px;
	white-space: pre-wrap;
}

.customer-chart {
	align-items: end;
	display: grid;
	gap: 4px;
	grid-template-columns: repeat(30, minmax(4px, 1fr));
	min-height: 132px;
}

.customer-chart.monthly {
	grid-template-columns: repeat(12, minmax(10px, 1fr));
}

.customer-bar {
	align-items: stretch;
	display: grid;
	gap: 5px;
	grid-template-rows: 100px auto;
	min-width: 0;
}

.customer-bar span {
	align-self: end;
	background: var(--customer-accent);
	border-radius: 5px 5px 2px 2px;
	min-height: 2px;
	height: var(--bar-size, 0);
}

.customer-bar:nth-child(4n) span {
	background: var(--customer-gold);
}

.customer-bar small {
	color: var(--customer-muted);
	font-size: 10px;
	overflow: hidden;
	text-align: center;
	text-overflow: clip;
	white-space: nowrap;
}

.customer-facts {
	margin: 0;
}

.customer-facts div {
	border-bottom: 1px solid var(--customer-border);
	padding-bottom: 10px;
}

.customer-facts div:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.customer-facts dd {
	font-size: 14px;
	margin-left: 0;
}

.customer-toggle-row {
	align-items: center;
	border: 1px solid var(--customer-border);
	border-radius: 8px;
	display: flex;
	gap: 12px;
	justify-content: space-between;
	padding: 12px;
}

.customer-toggle-row strong,
.customer-toggle-row small {
	display: block;
	overflow-wrap: anywhere;
}

.customer-toggle-row small {
	color: var(--customer-muted);
	font-size: 12px;
	font-weight: 500;
	margin-top: 3px;
}

.customer-toggle-row input {
	flex: 0 0 auto;
	min-height: 24px;
	width: 24px;
}

.token-card {
	align-items: center;
	display: flex;
	gap: 12px;
	justify-content: space-between;
	padding: 12px;
}

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

.customer-link-grid a {
	background: var(--customer-surface-2);
	border: 1px solid var(--customer-border);
	border-radius: 8px;
	color: var(--customer-accent-dark);
	font-weight: 850;
	padding: 12px;
	text-align: center;
	text-decoration: none;
}

.errorlist {
	color: var(--customer-danger);
	font-size: 13px;
	margin: 0;
	padding-left: 18px;
}

@media (max-width: 860px) {
	.customer-app {
		max-width: 560px;
		padding-bottom: 90px;
	}

	.customer-tabs {
		border-radius: 8px 8px 0 0;
		bottom: 0;
		left: 50%;
		margin-bottom: 0;
		max-width: 560px;
		position: fixed;
		top: auto;
		transform: translateX(-50%);
		width: 100%;
	}

	.customer-stat-grid,
	.customer-analytics,
	.customer-settings-grid,
	.customer-link-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 520px) {
	.customer-header,
	.customer-section-head,
	.customer-actions,
	.billing-plan-row,
	.device-card-head,
	.token-card,
	.node-option {
		align-items: stretch;
		flex-direction: column;
	}

	.customer-header-actions,
	.profile-row span {
		justify-content: flex-start;
	}

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

	.customer-hero h1 {
		font-size: 25px;
	}

	.customer-button.secondary,
	.customer-button.ghost,
	.customer-icon-button {
		width: 100%;
	}
}
