:root {
	--bg: #0f0f0f;
	--bg-elevated: #141414;
	--surface: #1a1a1a;
	--border: rgba(255, 255, 255, 0.08);
	--border-strong: rgba(255, 255, 255, 0.12);
	--text: #f4f4f5;
	--muted: #a1a1aa;
	--accent: #6366f1;
	--accent-hover: #818cf8;
	--success: #22c55e;
	--warning: #eab308;
	--danger: #ef4444;
	--radius: 12px;
	--radius-sm: 8px;
	--shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
	--shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.55);
	--font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
	box-sizing: border-box;
}

html {
	-webkit-font-smoothing: antialiased;
}

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

a {
	color: var(--accent);
	text-decoration: none;
}

a:hover {
	color: var(--accent-hover);
}

.hidden {
	display: none !important;
}

/* Toast */
.toast-root {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 200;
	display: flex;
	flex-direction: column;
	gap: 8px;
	pointer-events: none;
}

.toast {
	padding: 12px 16px;
	border-radius: var(--radius-sm);
	background: var(--surface);
	border: 1px solid var(--border-strong);
	box-shadow: var(--shadow);
	font-size: 13px;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.25s ease, transform 0.25s ease;
	max-width: 320px;
}

.toast-show {
	opacity: 1;
	transform: translateY(0);
}

.toast-success {
	border-color: rgba(34, 197, 94, 0.35);
}

.toast-error {
	border-color: rgba(239, 68, 68, 0.45);
}

/* Login */
.login-wrap {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: radial-gradient(
			ellipse 80% 50% at 50% -20%,
			rgba(99, 102, 241, 0.15),
			transparent 50%
		),
		var(--bg);
}

.glass {
	background: rgba(26, 26, 26, 0.85);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid var(--border);
}

.login-card {
	width: 100%;
	max-width: 400px;
	border-radius: var(--radius);
	padding: 32px;
	box-shadow: var(--shadow);
}

.login-brand {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	margin-bottom: 24px;
}

.login-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: var(--radius-sm);
	background: linear-gradient(135deg, var(--accent), #8b5cf6);
	color: #fff;
	font-weight: 700;
	font-size: 18px;
	flex-shrink: 0;
}

.login-card h1 {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 600;
}

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

.field {
	margin-bottom: 16px;
}

.field label,
.field-label {
	display: block;
	margin-bottom: 6px;
	color: var(--muted);
	font-size: 12px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.field input,
.input {
	width: 100%;
	padding: 10px 14px;
	border-radius: var(--radius-sm);
	border: 1px solid var(--border-strong);
	background: rgba(0, 0, 0, 0.35);
	color: var(--text);
	font-size: 14px;
	font-family: inherit;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.input:focus {
	outline: none;
	border-color: rgba(99, 102, 241, 0.6);
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.input-search {
	max-width: 280px;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 18px;
	border-radius: var(--radius-sm);
	border: none;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	font-family: inherit;
	transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.btn-block {
	width: 100%;
}

.btn-primary {
	background: linear-gradient(135deg, #6366f1, #7c3aed);
	color: #fff;
	box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover:not(:disabled) {
	transform: translateY(-1px);
	box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-danger {
	background: linear-gradient(135deg, #dc2626, #b91c1c);
	color: #fff;
}

.btn-danger:hover:not(:disabled) {
	transform: translateY(-1px);
}

.btn-ghost {
	background: transparent;
	color: var(--muted);
	border: 1px solid var(--border-strong);
}

.btn-ghost:hover:not(:disabled) {
	color: var(--text);
	border-color: rgba(255, 255, 255, 0.2);
	background: rgba(255, 255, 255, 0.04);
}

.btn-sm {
	padding: 6px 10px;
	font-size: 12px;
	border-radius: 6px;
}

.btn-accent {
	background: rgba(99, 102, 241, 0.2);
	color: #a5b4fc;
	border: 1px solid rgba(99, 102, 241, 0.35);
}

.btn-accent:hover:not(:disabled) {
	background: rgba(99, 102, 241, 0.3);
	color: #fff;
}

.btn-danger-outline {
	background: rgba(239, 68, 68, 0.1);
	color: #fca5a5;
	border: 1px solid rgba(239, 68, 68, 0.35);
}

.btn-danger-outline:hover:not(:disabled) {
	background: rgba(239, 68, 68, 0.2);
	color: #fff;
}

.btn-success {
	background: rgba(34, 197, 94, 0.15);
	color: #86efac;
	border: 1px solid rgba(34, 197, 94, 0.35);
}

.btn-success:hover:not(:disabled) {
	background: rgba(34, 197, 94, 0.25);
	color: #fff;
}

.msg-error {
	margin-top: 14px;
	padding: 12px 14px;
	border-radius: var(--radius-sm);
	background: rgba(239, 68, 68, 0.1);
	border: 1px solid rgba(239, 68, 68, 0.25);
	color: #fca5a5;
	font-size: 13px;
}

/* App shell */
.shell {
	display: flex;
	min-height: 100vh;
}

.sidebar {
	width: 248px;
	flex-shrink: 0;
	background: var(--bg-elevated);
	border-right: 1px solid var(--border);
}

.sidebar-inner {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	padding: 20px 0;
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0 20px 20px;
	font-weight: 600;
	font-size: 16px;
	letter-spacing: -0.02em;
	border-bottom: 1px solid var(--border);
	margin-bottom: 8px;
}

.brand-mark {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 8px;
	background: linear-gradient(135deg, var(--accent), #8b5cf6);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
}

.nav {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 8px 12px;
	flex: 1;
}

.nav-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 14px;
	border-radius: var(--radius-sm);
	color: var(--muted);
	font-size: 14px;
	font-weight: 500;
	transition: background 0.15s ease, color 0.15s ease;
}

.nav-item:hover {
	color: var(--text);
	background: rgba(255, 255, 255, 0.05);
	text-decoration: none;
}

.nav-item.active {
	color: #fff;
	background: rgba(99, 102, 241, 0.15);
	box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.25);
}

.sidebar-foot {
	padding: 16px 20px 0;
	margin-top: auto;
	border-top: 1px solid var(--border);
}

.main {
	flex: 1;
	padding: 28px 32px 40px;
	overflow-x: auto;
	background: linear-gradient(180deg, var(--bg) 0%, #0c0c0c 100%);
}

.page {
	animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(4px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.page-header {
	margin-bottom: 24px;
}

.page-header-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
}

.page-title {
	margin: 0;
	font-size: 1.5rem;
	font-weight: 600;
	letter-spacing: -0.03em;
}

.page-desc {
	margin: 6px 0 0;
	color: var(--muted);
	font-size: 14px;
}

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

/* Stats */
.stat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 16px;
}

.stat-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 20px 22px;
	box-shadow: var(--shadow);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-hover);
	border-color: var(--border-strong);
}

.stat-card-accent {
	background: linear-gradient(
		145deg,
		rgba(99, 102, 241, 0.12) 0%,
		var(--surface) 60%
	);
	border-color: rgba(99, 102, 241, 0.25);
}

.stat-label {
	margin: 0;
	font-size: 12px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--muted);
}

.stat-value {
	margin: 8px 0 0;
	font-size: 1.75rem;
	font-weight: 700;
	letter-spacing: -0.03em;
}

/* Cards & tables */
.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

.table-card {
	overflow: hidden;
}

.table-scroll {
	overflow: auto;
	max-width: 100%;
}

.data-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

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

.data-table th {
	color: var(--muted);
	font-weight: 600;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	background: rgba(0, 0, 0, 0.25);
	white-space: nowrap;
}

.data-table tbody tr {
	transition: background 0.12s ease;
}

.data-table tbody tr:hover td {
	background: rgba(255, 255, 255, 0.03);
}

.data-table tbody tr:last-child td {
	border-bottom: none;
}

.td-email {
	font-weight: 500;
	max-width: 220px;
	overflow: hidden;
	text-overflow: ellipsis;
}

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

.td-mono {
	font-family: ui-monospace, monospace;
	font-size: 12px;
}

.td-actions {
	white-space: nowrap;
}

.td-actions .btn {
	margin-right: 6px;
	margin-bottom: 4px;
}

.table-empty {
	padding: 40px 24px;
	text-align: center;
	color: var(--muted);
	font-size: 14px;
}

.empty-inline {
	text-align: center;
	color: var(--muted);
	padding: 24px !important;
}

.loading {
	color: var(--muted);
	padding: 24px !important;
	text-align: center;
}

/* Badges */
.badge {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.badge-success {
	background: rgba(34, 197, 94, 0.15);
	color: #86efac;
	border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-pending {
	background: rgba(234, 179, 8, 0.12);
	color: #fde047;
	border: 1px solid rgba(234, 179, 8, 0.35);
}

.badge-failed {
	background: rgba(239, 68, 68, 0.12);
	color: #fca5a5;
	border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-neutral {
	background: rgba(161, 161, 170, 0.12);
	color: #d4d4d8;
	border: 1px solid rgba(161, 161, 170, 0.25);
}

/* Dedicated credits modal — above shell, toasts, and other overlays */
.admin-credit-modal-root {
	position: fixed;
	inset: 0;
	z-index: 10050;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.admin-credit-modal-root.hidden {
	display: none !important;
}

/* Modal */
.modal-root {
	position: fixed;
	inset: 0;
	z-index: 150;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.modal-root.hidden {
	display: none;
}

.modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.65);
	backdrop-filter: blur(4px);
}

.modal-dialog {
	position: relative;
	width: 100%;
	max-width: 400px;
	border-radius: var(--radius);
	padding: 24px;
	box-shadow: var(--shadow-hover);
	animation: modalIn 0.2s ease;
}

@keyframes modalIn {
	from {
		opacity: 0;
		transform: scale(0.96);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.modal-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
}

.modal-title {
	margin: 0;
	font-size: 1.1rem;
	font-weight: 600;
}

.modal-close {
	background: none;
	border: none;
	color: var(--muted);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
	border-radius: 4px;
}

.modal-close:hover {
	color: var(--text);
	background: rgba(255, 255, 255, 0.06);
}

.modal-desc {
	margin: 0 0 16px;
	font-size: 13px;
	color: var(--muted);
	line-height: 1.5;
}

.modal-body {
	margin-bottom: 20px;
}

.modal-body .input.hidden {
	display: none;
}

.modal-body .field-label.hidden {
	display: none;
}

.modal-actions {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
}

@media (max-width: 900px) {
	.shell {
		flex-direction: column;
	}

	.sidebar {
		width: 100%;
		border-right: none;
		border-bottom: 1px solid var(--border);
	}

	.sidebar-inner {
		min-height: auto;
	}

	.nav {
		flex-direction: row;
		flex-wrap: wrap;
		padding: 8px 12px 12px;
	}

	.sidebar-foot {
		border-top: none;
		padding-top: 0;
		width: 100%;
	}

	.main {
		padding: 20px 16px 32px;
	}

	.input-search {
		max-width: 100%;
		width: 100%;
	}

	.chart-grid {
		grid-template-columns: 1fr;
	}
}

/* Dashboard charts */
.stat-grid-6 {
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.stat-value-sm {
	font-size: 1.35rem;
}

.chart-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 20px;
	margin-top: 24px;
}

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

.chart-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-hover);
	border-color: var(--border-strong);
}

.chart-title {
	margin: 0;
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: -0.02em;
}

.chart-sub {
	margin: 4px 0 16px;
	font-size: 12px;
	color: var(--muted);
}

.chart-canvas-wrap {
	position: relative;
	height: 240px;
}

/* User detail */
.modal-dialog-wide {
	max-width: 520px;
}

.modal-hint {
	margin: 10px 0 0;
	font-size: 12px;
	color: var(--muted);
	line-height: 1.45;
}

.modal-field-mode {
	margin-bottom: 12px;
}

.modal-body-flush {
	margin-bottom: 0;
	padding-top: 4px;
}

.detail-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 16px 24px;
	margin: 0;
}

.detail-grid dt {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--muted);
	margin: 0 0 4px;
}

.detail-grid dd {
	margin: 0;
	font-size: 14px;
	color: var(--text);
	word-break: break-word;
}

/* Integrations */
.integration-intro {
	margin: 0 0 20px;
	font-size: 13px;
	color: var(--muted);
	line-height: 1.55;
	max-width: 640px;
}

.integration-form {
	max-width: 640px;
}

.integration-field {
	padding: 18px 20px;
	margin-bottom: 14px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.integration-field:hover {
	border-color: var(--border-strong);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.integration-label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 6px;
}

.integration-hint {
	margin: 0 0 12px;
	font-size: 12px;
	color: var(--muted);
}

.integration-actions {
	margin-top: 8px;
}

.integration-loading,
.integration-error {
	color: var(--muted);
	font-size: 14px;
}

.integration-subtitle {
	margin: 0 0 10px;
	font-size: 15px;
	font-weight: 600;
}

.inline-code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 12px;
	background: rgba(255, 255, 255, 0.06);
	padding: 2px 6px;
	border-radius: 4px;
}

.np-stack {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-bottom: 20px;
}

.np-card {
	padding: 18px 20px;
}

.np-card-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

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

.np-secret-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-bottom: 14px;
}

@media (max-width: 720px) {
	.np-secret-grid {
		grid-template-columns: 1fr;
	}
}

.np-secret-grid dt {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--muted);
	margin: 0 0 4px;
}

.np-secret-grid dd {
	margin: 0 0 8px;
	font-size: 13px;
}

.np-secret-actions {
	margin-top: 4px;
}

.np-card-actions {
	margin-top: 8px;
}

.np-edit-panel {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid var(--border);
}

.np-edit-panel .input {
	margin-bottom: 10px;
}

.np-seed {
	margin-top: 16px;
	padding: 16px 18px;
}

.np-seed .input {
	margin-bottom: 10px;
}

.pool-add {
	margin-top: 16px;
}

.pool-add-row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.pool-add-row .input {
	flex: 1;
	min-width: 140px;
}

.pool-credits-inp {
	max-width: 160px;
}

.np-revealed {
	color: #a7f3d0;
	word-break: break-all;
}

.np-revealed-code {
	display: block;
	max-width: min(100%, 480px);
	overflow: auto;
	font-size: 11px;
	word-break: break-all;
}

.integration-legacy-foot {
	margin-top: 8px;
}

/* Operator dashboard — live + glow */
.page-header-dashboard {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}

.live-indicator {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #a5b4fc;
	background: rgba(99, 102, 241, 0.12);
	border: 1px solid rgba(99, 102, 241, 0.35);
	box-shadow: 0 0 24px rgba(99, 102, 241, 0.15);
}

.live-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #22c55e;
	box-shadow: 0 0 10px #22c55e;
	animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
	0%,
	100% {
		opacity: 1;
		transform: scale(1);
	}
	50% {
		opacity: 0.65;
		transform: scale(0.92);
	}
}

.live-indicator.live-tick {
	animation: liveFlash 0.45s ease;
}

@keyframes liveFlash {
	0% {
		box-shadow: 0 0 24px rgba(99, 102, 241, 0.15);
	}
	50% {
		box-shadow: 0 0 32px rgba(52, 211, 153, 0.35);
		border-color: rgba(52, 211, 153, 0.45);
	}
	100% {
		box-shadow: 0 0 24px rgba(99, 102, 241, 0.15);
	}
}

.stat-row-live {
	margin-bottom: 8px;
}

.stat-grid-3 {
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.stat-card-glow {
	border-color: rgba(99, 102, 241, 0.22);
	box-shadow:
		0 4px 24px rgba(0, 0, 0, 0.45),
		0 0 0 1px rgba(99, 102, 241, 0.08),
		inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.stat-card-glow:hover {
	border-color: rgba(129, 140, 248, 0.45);
	box-shadow:
		0 8px 36px rgba(0, 0, 0, 0.55),
		0 0 40px rgba(99, 102, 241, 0.12);
}

.stat-card-mint {
	border-color: rgba(52, 211, 153, 0.2);
}

.stat-card-rose {
	border-color: rgba(251, 113, 133, 0.22);
}

.card-glow {
	border-color: rgba(99, 102, 241, 0.18);
	box-shadow:
		0 4px 28px rgba(0, 0, 0, 0.4),
		0 0 0 1px rgba(139, 92, 246, 0.06);
}

.chart-card-funnel {
	min-height: 280px;
}

.chart-canvas-funnel {
	height: 220px;
}

.badge-stream-on {
	background: rgba(52, 211, 153, 0.12);
	color: #6ee7b7;
	border: 1px solid rgba(52, 211, 153, 0.35);
}

.badge-stream-off {
	background: rgba(113, 113, 122, 0.15);
	color: #d4d4d8;
	border: 1px solid rgba(113, 113, 122, 0.3);
}

.td-actions-wrap {
	max-width: 420px;
	white-space: normal;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
}

.btn-icon {
	min-width: 2.25rem;
	padding-left: 10px;
	padding-right: 10px;
}

.integration-field-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}

.integration-updated {
	margin: 6px 0 0;
	font-size: 11px;
	color: var(--muted);
}

.integration-quick {
	display: flex;
	gap: 8px;
	flex-shrink: 0;
}

.dashboard-header-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.alert-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	color: #fca5a5;
	background: rgba(239, 68, 68, 0.12);
	border: 1px solid rgba(239, 68, 68, 0.35);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.alert-pill-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #ef4444;
	box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

.nav-badge {
	min-width: 1.25rem;
	height: 1.25rem;
	padding: 0 6px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.25rem;
	text-align: center;
	background: rgba(239, 68, 68, 0.9);
	color: #fff;
}

.stat-hint {
	margin: 6px 0 0;
	font-size: 11px;
	color: var(--muted);
	line-height: 1.35;
}

.stat-card-metric .stat-value {
	font-size: 1.5rem;
}

.dashboard-panels {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 20px;
	margin-top: 24px;
}

.dashboard-panel {
	padding: 20px 22px 18px;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dashboard-panel:hover {
	transform: translateY(-1px);
	box-shadow: var(--shadow-hover);
	border-color: var(--border-strong);
}

.dashboard-panel-head {
	margin-bottom: 12px;
}

.table-scroll-tight {
	max-height: 280px;
}

.data-table-compact th,
.data-table-compact td {
	padding: 10px 12px;
	font-size: 12px;
}

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

.alert-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-height: 320px;
	overflow: auto;
}

.alert-list-item {
	padding: 12px 14px;
	border-radius: var(--radius-sm);
	border: 1px solid var(--border);
	background: rgba(0, 0, 0, 0.2);
	transition: border-color 0.15s ease, background 0.15s ease;
}

.alert-list-item:hover {
	border-color: var(--border-strong);
}

.alert-list-item-resolved {
	opacity: 0.65;
}

.alert-list-meta {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--muted);
	margin-bottom: 6px;
}

.alert-list-msg {
	margin: 0;
	font-size: 13px;
	line-height: 1.45;
	color: var(--text);
}

.alert-list-item .btn-sm {
	margin-top: 10px;
}

.detail-sub {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	color: var(--muted);
	line-height: 1.35;
}

.td-credit-hint {
	font-size: 11px;
	color: var(--muted);
	margin-top: 4px;
	line-height: 1.3;
}

.td-credits {
	vertical-align: top;
}

.integration-section {
	padding: 20px 22px;
	margin-bottom: 20px;
}

.integration-section-title {
	margin: 0 0 12px;
	font-size: 1.05rem;
	font-weight: 600;
}

.billing-inline-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-top: 8px;
}

.billing-cps-input {
	max-width: 160px;
}

.cred-history-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-height: 360px;
	overflow: auto;
}

.cred-history-item {
	padding: 12px 14px;
	border-radius: var(--radius-sm);
	border: 1px solid var(--border);
	background: rgba(0, 0, 0, 0.2);
}

.cred-history-meta {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	font-size: 12px;
	color: var(--muted);
}

.cred-history-name {
	font-weight: 600;
	color: var(--text);
}

.cred-history-mask {
	margin: 8px 0 0;
	font-family: ui-monospace, monospace;
	font-size: 12px;
}

.cred-history-actions {
	display: flex;
	gap: 8px;
	margin-top: 8px;
}

.email-broadcast-card {
	padding: 22px 24px;
	max-width: 640px;
}

.email-textarea {
	min-height: 160px;
	resize: vertical;
	font-family: inherit;
}

.email-result {
	margin-top: 16px;
	padding: 12px;
	border-radius: var(--radius-sm);
	background: rgba(0, 0, 0, 0.35);
	border: 1px solid var(--border);
	font-size: 12px;
	overflow: auto;
	max-height: 280px;
	white-space: pre-wrap;
}

.field-row {
	margin-top: 4px;
}

.checkbox-label {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	font-size: 14px;
}

.user-identities-block {
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid var(--border);
}

.user-identities-title {
	margin: 0 0 12px;
	font-size: 0.95rem;
	font-weight: 600;
}

.user-identities-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 12px;
}

.identity-card {
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: 8px;
	background: rgba(0, 0, 0, 0.2);
}

.identity-thumb-wrap {
	display: block;
	width: 100%;
	border: none;
	padding: 0;
	cursor: zoom-in;
	border-radius: 6px;
	overflow: hidden;
	aspect-ratio: 1;
	background: rgba(255, 255, 255, 0.04);
	font: inherit;
	color: inherit;
	text-align: left;
}

.identity-thumb-wrap:focus-visible {
	outline: 2px solid rgba(99, 102, 241, 0.7);
	outline-offset: 2px;
}

.identity-card-links {
	margin: 0 0 4px;
	font-size: 11px;
}

.identity-open-tab {
	color: var(--accent, #818cf8);
	text-decoration: none;
}

.identity-open-tab:hover {
	text-decoration: underline;
}

.identity-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.identity-label {
	margin: 8px 0 6px;
	font-size: 11px;
	color: var(--muted);
	word-break: break-word;
}

.pricing-form-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 16px;
	align-items: end;
}

.pricing-form-actions {
	display: flex;
	align-items: flex-end;
}

.pricing-table-card {
	margin-top: 20px;
}

.pricing-edit-minutes {
	margin: 0 0 12px;
}

.logs-page-hint {
	margin: 0 0 12px;
}

.th-log-expand {
	width: 44px;
}

.td-log-expand {
	width: 44px;
	vertical-align: middle;
}

.log-expand-btn {
	min-width: 32px;
	padding: 4px 8px;
	font-size: 12px;
}

.td-log-action {
	max-width: 220px;
	word-break: break-word;
}

.td-log-target {
	max-width: 280px;
	word-break: break-word;
}

.td-log-meta-cell {
	padding: 0 12px 12px 48px !important;
	background: rgba(0, 0, 0, 0.18);
	border-bottom: 1px solid var(--border);
}

.log-meta-pre {
	margin: 0;
	padding: 12px;
	font-size: 11px;
	line-height: 1.45;
	color: var(--muted);
	white-space: pre-wrap;
	word-break: break-word;
	max-height: 240px;
	overflow: auto;
	border-radius: 6px;
	border: 1px solid var(--border);
	background: rgba(0, 0, 0, 0.25);
}

.identity-lightbox {
	z-index: 12000;
}

.identity-lightbox-inner {
	position: relative;
	z-index: 1;
	max-width: min(96vw, 1100px);
	max-height: min(92vh, 900px);
	margin: auto;
	padding: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.identity-lightbox-img {
	max-width: 100%;
	max-height: min(88vh, 860px);
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 8px;
	box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55);
}

.identity-lightbox-close {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 2;
	width: 40px;
	height: 40px;
	border: none;
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.identity-lightbox-close:hover {
	background: rgba(0, 0, 0, 0.75);
}

.integration-secrets-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 8px;
}

.integration-secrets-head .integration-section-title {
	margin: 0;
}

.cred-history-modal-body {
	max-height: min(70vh, 560px);
	overflow: auto;
	padding-right: 4px;
}

.broadcast-card {
	padding: 20px 24px;
}

.broadcast-form .field {
	margin-bottom: 16px;
}

.updates-form .field {
	margin-bottom: 14px;
}
