:root {
	--bg: #e7edf6;
	--bg-2: #d3dbe7;
	--surface: #ffffff;
	--surface-2: #f2f6fb;
	--modal-header-bg: #dbe5f2;
	--modal-body-bg: #f2f6fb;
	--text: #0f172a;
	--muted: #475569;
	--border: #c7d1dd;
	--accent: #1f4f99;
	--accent-2: #0ea5a3;
	--shadow: 0 22px 40px rgba(15, 23, 42, 0.12);
	--shadow-soft: 0 12px 22px rgba(15, 23, 42, 0.08);
	--form-input-text: var(--text);
	--form-input-placeholder: rgba(15, 23, 42, 0.5);
}
* { box-sizing: border-box; }
body {
	margin: 0;
	min-height: 100vh;
	font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif;
	color: var(--text);
	background:
		radial-gradient(circle at 15% -20%, rgba(255, 255, 255, 0.9), transparent 45%),
		radial-gradient(circle at 85% 0%, rgba(255, 255, 255, 0.8), transparent 40%),
		linear-gradient(180deg, #f2f6fb 0%, var(--bg) 40%, var(--bg-2) 100%);
}
input,
textarea {
	color: var(--form-input-text);
}
input::placeholder,
textarea::placeholder {
	color: var(--form-input-placeholder);
	opacity: 1;
}
input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
	color: var(--form-input-placeholder);
	opacity: 1;
}
input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
	color: var(--form-input-placeholder);
	opacity: 1;
}
input::-ms-input-placeholder,
textarea::-ms-input-placeholder {
	color: var(--form-input-placeholder);
	opacity: 1;
}
label {
	letter-spacing: 0.05em;
}
.app {
	max-width: none;
	margin: 0;
	padding: 4px 8px 6px;
	min-height: 100vh;
	height: 100vh;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.topbar {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 18px;
	padding: 8px 12px;
	box-shadow: var(--shadow-soft);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}
.topbar-left,
.topbar-right {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}
.zoom-toolbar {
	display: flex;
	align-items: center;
	gap: 2px;
	flex-wrap: nowrap;
	padding: 0;
	border: none;
	background: transparent;
}
.document-preview-card .zoom-toolbar {
	margin: 2px 6px 4px;
	border-radius: 8px;
	background: transparent;
	justify-content: center;
	padding: 0;
}
.topbar-export {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	padding: 6px 8px;
	border: 1px solid var(--border);
	border-radius: 12px;
	background: var(--surface-2);
}
.topbar-export-actions {
	margin-left: auto;
	display: flex;
	align-items: center;
}
.topbar-export .topbar-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.topbar-export label {
	font-weight: 600;
	color: var(--muted);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.topbar-export select {
	padding: 5px 8px;
	border-radius: 10px;
	border: 1px solid var(--border);
	background: var(--surface);
	font-size: 13px;
	color: var(--text);
}
#output-format {
	min-width: 78px;
}
.brand-compact {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.brand-link {
	display: flex;
	flex-direction: column;
	gap: 4px;
	color: inherit;
	text-decoration: none;
	align-items: center;
}
.brand-link:hover {
	color: inherit;
	text-decoration: none;
}
.brand-link:focus-visible {
	outline: 2px solid var(--accent-2);
	outline-offset: 3px;
	border-radius: 10px;
}
.brand-tagline {
	display: block;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
}
.brand-compact .eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.28em;
	font-size: 10px;
	font-weight: 600;
	color: var(--muted);
}
.brand-compact .title {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 0;
}
.brand-compact .title-brand {
	font-family: 'Space Grotesk', 'Trebuchet MS', sans-serif;
	font-size: 22px;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--text);
	line-height: 1.2;
}
.brand-compact .title-product {
	font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: none;
	color: var(--muted);
}
.brand-logo {
	width: 160px;
	height: auto;
	display: block;
}

.brand-logo--admin {
	filter: sepia(1) saturate(2200%) hue-rotate(-20deg) brightness(0.9);
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
	white-space: nowrap;
}

@media (max-width: 720px) {
	.brand-logo {
		width: 120px;
	}
}

.upload-button.compact {
	padding: 8px 12px;
	border-radius: 10px;
	font-size: 13px;
	box-shadow: 0 6px 12px rgba(31, 79, 153, 0.22);
}
.workspace {
	display: grid;
	grid-template-columns: 240px minmax(0, 1fr);
	grid-template-rows: minmax(0, 1fr);
	gap: 12px;
	align-items: stretch;
	flex: 1;
	min-height: 0;
}
.sidebar {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 16px;
	padding: 10px;
	box-shadow: var(--shadow-soft);
	display: flex;
	flex-direction: column;
	gap: 8px;
	position: sticky;
	top: 12px;
	min-height: 0;
	max-height: calc(100vh - 110px);
	overflow-y: auto;
	overflow-x: hidden;
	scrollbar-gutter: auto;
}
.sidebar-section {
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 10px 12px;
}
.sidebar-section-title {
	font-weight: 600;
	color: var(--muted);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.12em;
}
.sidebar-card {
	background: linear-gradient(135deg, rgba(31, 79, 153, 0.08), rgba(14, 165, 163, 0.06));
	border: 1px solid rgba(31, 79, 153, 0.2);
	border-radius: 14px;
	padding: 10px;
	box-shadow: var(--shadow-soft);
	position: sticky;
	top: 12px;
	z-index: 1;
}
.document-preview-card {
	border-radius: 12px;
	border: none;
	background: transparent;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
	box-shadow: none;
}
.document-preview-card .document-preview {
	position: relative;
	border: none;
	border-radius: 12px;
	padding: 0;
	background: var(--surface);
	height: 180px;
	width: 100%;
	min-width: 80px;
	max-width: 100%;
	margin: 0 auto;
	overflow: hidden;
	cursor: pointer;
}
.document-preview canvas {
	display: block;
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}
.document-preview-viewport {
	position: absolute;
	border: 2px solid var(--accent);
	border-radius: 8px;
	background: rgba(31, 79, 153, 0.18);
	pointer-events: none;
	transition: transform 0.15s ease;
	display: none;
}
.document-preview-empty {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	color: var(--muted);
	font-size: 12px;
	padding: 8px;
	letter-spacing: 0.02em;
}
.document-preview-empty.hidden {
	display: none;
}

.document-preview-tools {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 2px;
	padding: 0 2px;
	margin-bottom: 3px;
	border-radius: 9px;
	border: 1px solid var(--border);
	background: var(--surface);
	box-shadow: none;
	font-size: 12px;
	color: var(--text);
	align-self: center;
	max-width: 100%;
}
.document-preview-tools.is-disabled {
	opacity: 0.6;
}
.document-preview-page-label {
	text-align: center;
	font-weight: 600;
	white-space: nowrap;
	line-height: 1;
	cursor: pointer;
	user-select: none;
	min-width: 0;
}
.document-preview-page-label[aria-disabled="true"] {
	cursor: not-allowed;
	opacity: 0.6;
}
.preview-page-nav {
	width: 20px;
	height: 20px;
	border-radius: 7px;
	border: 1px solid transparent;
	background: transparent;
	color: var(--text);
	font-size: 18px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.preview-page-nav:enabled:hover {
	border-color: var(--accent);
	color: var(--accent);
	background: rgba(31, 79, 153, 0.08);
}
.preview-page-nav:disabled {
	opacity: 0.45;
	cursor: default;
}
.sidebar-card .card-title {
	font-family: 'Space Grotesk', 'Trebuchet MS', sans-serif;
	font-size: 14px;
	font-weight: 700;
	margin: 0 0 10px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--accent);
}
.sidebar-card .field + .field {
	margin-top: 5px;
}
.sidebar-section summary {
	list-style: none;
	cursor: pointer;
	font-weight: 600;
	color: var(--muted);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.sidebar-section summary::-webkit-details-marker {
	display: none;
}
.sidebar-section summary::after {
	content: '+';
	font-weight: 700;
}
.sidebar-section[open] summary::after {
	content: '-';
}
.sidebar-section-body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding-top: 10px;
}
.sidebar .field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.brush-thickness-field[hidden] {
	display: none !important;
}
.sidebar label {
	font-weight: 600;
	color: var(--muted);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.sidebar select {
	padding: 8px 10px;
	border-radius: 10px;
	border: 1px solid var(--border);
	background: var(--surface);
	font-size: 14px;
	color: var(--text);
}
.sidebar-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}
.brush-thickness-control {
	display: flex;
	align-items: center;
	gap: 10px;
}
#brush-thickness {
	flex: 1;
	min-width: 100px;
	height: 6px;
	border-radius: 3px;
	border: 1px solid var(--border);
	background: var(--surface-2);
	outline: none;
	-webkit-appearance: none;
	appearance: none;
}
#brush-thickness::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--accent);
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(31, 79, 153, 0.3);
}
#brush-thickness::-moz-range-thumb {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--accent);
	cursor: pointer;
	border: none;
	box-shadow: 0 2px 6px rgba(31, 79, 153, 0.3);
}
#brush-thickness::-moz-range-track {
	background: transparent;
	border: none;
}
.brush-thickness-value {
	font-size: 13px;
	color: var(--muted);
	font-weight: 600;
	min-width: 32px;
	text-align: right;
}
.mode-toggle-group {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(44px, 44px));
	gap: 8px;
}
.mode-button {
	padding: 0;
	height: 40px;
	border-radius: 12px;
	border: 1px solid var(--border);
	background: var(--surface);
	box-shadow: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
}
.mode-button img,
.mode-button svg {
	width: 22px;
	height: 22px;
	display: block;
}
.mode-button[aria-pressed="true"] {
	background: var(--accent);
	color: #fff;
	border-color: var(--accent);
	box-shadow: 0 8px 16px rgba(31, 79, 153, 0.25);
}
.mode-button[aria-pressed="true"] img,
.mode-button[aria-pressed="true"] svg {
	filter: brightness(0) invert(1);
}
.mode-button:focus-visible {
	outline: 2px solid var(--accent-2);
	outline-offset: 2px;
}
.history-modal {
	width: min(640px, 94vw);
	max-height: 72vh;
	display: flex;
	flex-direction: column;
	gap: 12px;
	overflow: hidden;
}
.history-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
.history-modal-body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	overflow: auto;
}
.history-title {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--muted);
	font-weight: 600;
}
.history-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.history-item {
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 10px;
	background: #fff;
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}
.history-item.is-active {
	border-color: var(--accent);
	box-shadow: 0 6px 14px rgba(31, 79, 153, 0.12);
}
.history-meta {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1;
	min-width: 0;
}
.history-name-row {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}
.history-name {
	font-size: 13px;
	font-weight: 600;
	color: var(--text);
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.history-delete-icon {
	padding: 2px;
	border: none;
	background: transparent;
	box-shadow: none;
	border-radius: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.history-date {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--muted);
}
.history-status {
	align-self: flex-start;
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	background: rgba(31, 79, 153, 0.14);
	color: var(--accent);
	padding: 2px 6px;
	border-radius: 999px;
	font-weight: 600;
}
.history-actions {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	justify-content: flex-end;
	align-items: flex-start;
	flex-shrink: 0;
}
.history-action {
	padding: 6px 10px;
	font-size: 12px;
	border-radius: 8px;
	background: transparent;
	border: 1px solid var(--border);
	box-shadow: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
}
.history-action.icon-only {
	padding: 6px;
	min-width: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.history-action img {
	width: 16px;
	height: 16px;
	display: block;
}
.history-action:hover {
	background: var(--surface-2);
	transform: none;
	box-shadow: none;
}
.history-action.primary {
	background: var(--accent);
	border-color: transparent;
	color: #fff;
}
.history-action.primary:hover {
	background: #1b4585;
}
.history-action.danger {
	border-color: #fca5a5;
	color: #9e3b2f;
}
.history-action.danger:hover {
	background: #fee2e2;
	transform: none;
	box-shadow: none;
}
.history-delete-icon img {
	width: 14px;
	height: 14px;
	display: block;
}
.history-delete-icon:hover {
	background: var(--surface-2);
}
.history-empty {
	font-size: 12px;
	color: var(--muted);
	border: 1px dashed var(--border);
	border-radius: 14px;
	padding: 18px;
	background: linear-gradient(135deg, rgba(248, 250, 252, 0.9), rgba(241, 245, 249, 0.9));
}
.history-empty-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	text-align: center;
}
.history-empty-title {
	font-size: 14px;
	font-weight: 700;
	color: var(--text);
}
.history-empty-message {
	font-size: 12px;
	color: var(--muted);
	max-width: 44ch;
}
.history-empty-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
}
@media (max-width: 520px) {
	.history-item {
		flex-direction: column;
	}
	.history-actions {
		justify-content: flex-start;
		align-items: flex-start;
	}
}
.canvas-panel {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-height: 0;
	position: relative;
}
.canvas-shell {
	position: relative;
	flex: 1;
	min-height: 0;
	display: flex;
}
.empty-state {
	position: absolute;
	inset: 12px;
	border-radius: 18px;
	border: 1px dashed #bcc7d5;
	background: linear-gradient(135deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.96));
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 18px;
	z-index: 2;
}
.empty-state.hidden {
	display: none;
}
.canvas-shell.dragging .empty-state {
	border-color: var(--accent);
	background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(248, 250, 252, 0.96));
}
.empty-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 16px;
	padding: 24px;
	box-shadow: var(--shadow-soft);
	display: flex;
	flex-direction: column;
	gap: 12px;
	align-items: center;
	max-width: 420px;
}
.empty-title {
	font-family: 'Space Grotesk', 'Trebuchet MS', sans-serif;
	font-size: 22px;
	margin: 0;
}
.empty-subtitle {
	margin: 0;
	color: var(--muted);
	line-height: 1.5;
}
.empty-note {
	margin: 0;
	color: var(--muted);
	font-size: 12px;
}
.brand { max-width: 520px; }
.brand .eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.25em;
	font-size: 12px;
	font-weight: 600;
	color: var(--muted);
}
.brand h1 {
	font-family: 'Space Grotesk', 'Trebuchet MS', sans-serif;
	font-size: 38px;
	margin: 6px 0 10px;
}
.brand p {
	margin: 0;
	line-height: 1.6;
	color: var(--muted);
}
.file-name {
	font-size: 13px;
	color: var(--text);
	font-weight: 500;
	word-break: break-word;
}
#upload {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}
.upload-button {
	background: linear-gradient(135deg, #1f4f99 0%, #2c6fe2 60%, #1f4f99 100%);
	color: #fff;
	border: none;
	padding: 10px 16px;
	border-radius: 12px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	box-shadow: 0 10px 22px rgba(31, 79, 153, 0.28);
	font-size: 14px;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.upload-button:hover {
	background: linear-gradient(135deg, #1b4585 0%, #255fbf 60%, #1b4585 100%);
	transform: translateY(-1px);
}
.upload-button.new-document {
	background: linear-gradient(135deg, #0b7a78 0%, #0ea5a3 60%, #0b7a78 100%);
	color: #fff;
	box-shadow: 0 10px 22px rgba(14, 165, 163, 0.25);
}
.upload-button.new-document:hover {
	background: linear-gradient(135deg, #0a6664 0%, #0b8f8d 60%, #0a6664 100%);
}
button {
	border: none;
	border-radius: 10px;
	padding: 10px 16px;
	background: var(--surface-2);
	color: var(--text);
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 6px 12px rgba(15, 23, 42, 0.08);
	transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
button:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 18px rgba(15, 23, 42, 0.12);
}
button:disabled {
	cursor: not-allowed;
	opacity: 0.5;
	box-shadow: none;
	transform: none;
}
button:disabled:hover {
	transform: none;
	box-shadow: none;
}
button.primary { background: var(--accent); color: #fff; }
button.primary:hover { background: #1b4585; }
#org-logo {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	border: 0;
	white-space: nowrap;
}
button.danger { background: #9e3b2f; color: #fff; }
button.danger:hover { background: #862f25; }
button.cta-glow {
	background: linear-gradient(135deg, #1f4f99 0%, #2c6fe2 55%, #1f4f99 100%);
	color: #fff;
	box-shadow: 0 10px 22px rgba(31, 79, 153, 0.22);
	letter-spacing: 0.01em;
}
button.cta-glow:hover {
	background: linear-gradient(135deg, #183a70 0%, #255fbf 55%, #183a70 100%);
	box-shadow: 0 14px 26px rgba(31, 79, 153, 0.28);
}
.icon-button {
	width: 40px;
	height: 40px;
	padding: 0;
	min-width: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	line-height: 0;
}
.icon-button svg,
.icon-button img {
	width: 28px;
	height: 28px;
	display: block;
	fill: currentColor;
}
.icon-button:disabled img,
.icon-button:disabled svg {
	opacity: 0.35;
	filter: grayscale(1);
}
#delete-selected { }
.status-bar {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 4px 0 8px;
	min-height: 24px;
}
.status-bar.is-hidden {
	display: none;
	margin: 0;
	min-height: 0;
}
#billing-expiration-banner {
	margin: 6px 18px 10px;
}
.billing-expiration-banner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 18px;
	border-radius: 14px;
	border: 1px solid rgba(14, 165, 163, 0.35);
	background: rgba(14, 165, 163, 0.12);
	color: var(--text);
}
.billing-expiration-banner-hidden {
	display: none;
}
.billing-expiration-banner.is-urgent {
	border-color: rgba(158, 59, 47, 0.45);
	background: rgba(158, 59, 47, 0.12);
}
.billing-expiration-banner-body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}
.billing-expiration-banner-title {
	font-family: 'Space Grotesk', 'Trebuchet MS', sans-serif;
	font-weight: 700;
	letter-spacing: 0.02em;
}
.billing-expiration-banner-message {
	color: var(--muted);
	line-height: 1.35;
	overflow: hidden;
	text-overflow: ellipsis;
}
.billing-expiration-banner-actions {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-shrink: 0;
}
#status { color: var(--muted); font-size: 14px; }
/* Email verification grace-period banner */
#email-verification-banner {
	margin: 1px 18px 1px;
	display: none;
}
#email-verification-banner.show {
	display: flex;
}
.email-verification-banner {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 10px;
	border-radius: 8px;
	border: 1px solid rgba(180, 120, 20, 0.3);
	background: rgba(251, 191, 36, 0.1);
	font-size: 12.5px;
}
.email-verification-banner-message {
	flex: 1;
	color: var(--muted);
	line-height: 1.2;
}
#email-verification-banner-dismiss {
	flex-shrink: 0;
	background: none;
	border: none;
	padding: 2px 4px;
	margin: 0;
	cursor: pointer;
	color: var(--muted);
	opacity: 0.6;
	font-size: 16px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}
#email-verification-banner-dismiss:hover {
	opacity: 1;
}
.email-verification-banner-message button.text-link {
	background: none;
	border: none;
	padding: 0;
	margin: 0;
	font: inherit;
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
	opacity: 0.8;
}
.email-verification-banner-message button.text-link:hover {
	opacity: 1;
}
.progress {
	flex: 1;
	height: 8px;
	background: #cfd8e3;
	border-radius: 999px;
	overflow: hidden;
	opacity: 0;
	transform: scaleY(0.7);
	transition: opacity 0.2s ease, transform 0.2s ease;
}
.progress.active { opacity: 1; transform: scaleY(1); }
.progress-bar {
	height: 100%;
	width: 0%;
	background: linear-gradient(90deg, var(--accent), var(--accent-2));
	transition: width 0.2s ease;
	transform-origin: left center;
}
.page-controls {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	flex-wrap: wrap;
	padding: 0;
}
.page-controls.hidden {
	display: none;
}
.page-indicator-input {
	appearance: textfield;
	-moz-appearance: textfield;
}
.page-indicator-input::-webkit-outer-spin-button,
.page-indicator-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
.page-indicator {
	font-size: 13px;
	color: var(--muted);
	letter-spacing: 0.02em;
	white-space: nowrap;
	cursor: pointer;
	padding: 2px 4px;
	border-radius: 8px;
	border: 1px solid transparent;
	transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
	min-width: 0;
}
.page-indicator:hover,
.page-indicator:focus-visible {
	border-color: var(--accent);
	color: var(--text);
	background: rgba(31, 79, 153, 0.08);
	outline: none;
}
.page-indicator .page-indicator-input {
	width: 60px;
	max-width: 100%;
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 2px 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--text);
	background: var(--surface);
	box-shadow: none;
	outline: none;
}
.page-indicator .page-indicator-input:focus {
	border-color: var(--accent);
	box-shadow: 0 0 0 2px rgba(31, 79, 153, 0.18);
}
.page-actions {
	display: inline-flex;
	align-items: center;
	gap: 2px;
}
.page-nav-button {
	width: 28px;
	height: 28px;
	padding: 0;
	border-radius: 9px;
	border: 1px solid var(--border);
	background: var(--surface);
	font-size: 18px;
	line-height: 1;
	box-shadow: none;
}
.page-nav-button:hover {
	box-shadow: 0 6px 12px rgba(15, 23, 42, 0.15);
}
#page-selector {
	min-width: 72px;
	border-radius: 10px;
	border: 1px solid var(--border);
	padding: 4px 8px;
	background: var(--surface);
	font-size: 13px;
	color: var(--text);
	box-shadow: none;
}
.page-mode-toggle {
	padding: 4px 8px;
	font-size: 12px;
	text-transform: none;
	letter-spacing: 0.04em;
}
#canvas-container {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	border: 1px solid var(--border);
	border-radius: 18px;
	width: 100%;
	min-height: 0;
	height: 100%;
	overflow: auto;
	padding: 10px;
	background: var(--surface);
	box-shadow: var(--shadow);
	flex: 1;
	min-height: 420px;
	position: relative;
	z-index: 1;
	scrollbar-gutter: stable;
	scrollbar-color: #c5b29a #f3eee5;
	scrollbar-width: auto;
}
#canvas-container::-webkit-scrollbar {
	width: 14px;
	height: 14px;
}
#canvas-container::-webkit-scrollbar-thumb {
	background: #c5b29a;
	border-radius: 999px;
	border: 3px solid #f3eee5;
}
#canvas-container::-webkit-scrollbar-track {
	background: #f3eee5;
	border-radius: 999px;
}
#canvas-container.pan-ready {
	cursor: default;
}
#canvas-container.is-panning {
	cursor: pointer;
}
#canvas-container.view-fit-page {
	padding: 4px 6px;
	align-items: center;
	justify-content: flex-start;
}
#canvas-container.view-fit-page.view-fit-page-left {
	align-items: flex-start;
}
#canvas-container.view-fit-page canvas {
	margin: 0;
}
canvas {
	border: 1px solid #d7cbb8;
	box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
	/* Keep pages centered without creating blank scrollable space above the first page. */
	margin: 0 auto 12px auto;
	cursor: pointer;
	user-select: none;
	border-radius: 6px;
	background: #fff;
}
.canvas-container.single-page-mode canvas.page-active {
	margin-bottom: 0;
}
.canvas-container:not(.single-page-mode) .canvas-page.page-active {
	outline: 2px solid var(--accent);
	outline-offset: -2px;
}
.canvas-page {
	transition: opacity 0.2s ease;
	/* #canvas-container is a column flexbox; prevent pages from being flex-shrunk into invisibility. */
	flex: 0 0 auto;
}
.canvas-container.single-page-mode .canvas-page {
	display: none;
}
.canvas-container.single-page-mode .canvas-page.page-active {
	display: block;
}
.zoom-group { align-items: center; }
.zoom-button {
	padding: 0 8px;
	min-width: 28px;
	height: 28px;
	border-radius: 6px;
	background: #fff;
	border: 1px solid var(--border);
	color: var(--text);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	line-height: 1;
}
.zoom-button[aria-pressed="true"] {
	background: var(--accent);
	color: #fff;
	border-color: var(--accent);
	box-shadow: none;
}
.zoom-select {
	min-width: 65px;
	height: 32px;
	padding: 0 8px;
	font-size: 12px;
	border-radius: 6px;
	border: 1px solid var(--border);
	background: #fff;
	color: var(--text);
	line-height: 32px;
	text-align: center;
	padding: 8px 0 !important;
}
.text-layer-proxy {
	position: absolute;
	top: 0;
	left: 0;
	transform-origin: 0 0;
	line-height: 1;
}
.text-layer-proxy span {
	position: absolute;
	white-space: pre;
	transform-origin: 0 0;
}
#toast {
	position: fixed;
	right: 24px;
	bottom: 24px;
	background: #1f2522;
	color: #fff;
	padding: 10px 14px;
	border-radius: 12px;
	box-shadow: 0 12px 24px rgba(15, 23, 42, 0.2);
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.2s ease, transform 0.2s ease;
	pointer-events: auto;
	font-size: 14px;
	z-index: 80;
	display: inline-flex;
	align-items: center;
	gap: 12px;
	max-width: min(360px, 90vw);
}
#toast.show { opacity: 1; transform: translateY(0); }
#toast.toast-error {
	background: #c0392b;
	box-shadow: 0 12px 24px rgba(192, 57, 43, 0.25);
}
#toast .toast-text {
	flex: 1;
	line-height: 1.4;
	white-space: pre-wrap;
	user-select: text;
}
#toast .toast-close {
	background: transparent;
	border: none;
	color: inherit;
	font-size: 18px;
	line-height: 1;
	padding: 0;
	cursor: pointer;
	transition: opacity 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 12px;
	outline: none;
	-webkit-appearance: none;
}
#toast .toast-close:hover,
#toast .toast-close:focus-visible {
	opacity: 0.75;
	outline: 2px solid rgba(255, 255, 255, 0.8);
	outline-offset: 2px;
}
.modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(19, 24, 21, 0.45);
	backdrop-filter: blur(2px);
	display: none;
	align-items: center;
	justify-content: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
	z-index: 50;
}
.modal-overlay.show {
	display: flex;
	opacity: 1;
	pointer-events: auto;
}
body.modal-open {
	overflow: hidden;
}
#delete-account-overlay {
	z-index: 60;
}
.loading-overlay {
	/* Keep this below the OCR progress overlay so OCR can take over when needed. */
	z-index: 110;
}
.loading-panel {
	background: var(--surface);
	border-radius: 20px;
	border: 1px solid var(--border);
	box-shadow: var(--shadow);
	width: min(320px, 90vw);
	padding: 24px 28px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	text-align: center;
}
.loading-track {
	width: 100%;
	height: 10px;
	border-radius: 999px;
	background: #ede7df;
	overflow: hidden;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}
.loading-fill {
	height: 100%;
	width: 0;
	background: linear-gradient(90deg, var(--accent), var(--accent-2));
	transition: width 0.2s ease;
}
.loading-spinner {
	width: 42px;
	height: 42px;
	border: 4px solid rgba(31, 79, 153, 0.25);
	border-top-color: var(--accent);
	border-radius: 50%;
	animation: loading-spin 0.9s linear infinite;
}
.loading-message {
	margin: 0;
	font-size: 14px;
	color: var(--muted);
	letter-spacing: 0.02em;
}
@keyframes loading-spin {
	to { transform: rotate(360deg); }
}
.ocr-progress-overlay {
	z-index: 120;
}
.ocr-progress-panel {
	background: var(--surface);
	border-radius: 20px;
	border: 1px solid var(--border);
	box-shadow: var(--shadow);
	max-width: min(420px, 90vw);
	width: 100%;
	padding: 28px 30px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	text-align: center;
}
.plan-limit-overlay {
	z-index: 130;
}
.email-change-overlay {
	z-index: 90;
}
.email-verification-overlay {
	z-index: 140;
	background: rgba(10, 14, 12, 0.62);
	-webkit-backdrop-filter: blur(9px) saturate(1.2);
	backdrop-filter: blur(9px) saturate(1.2);
}
#account-deletion-overlay {
	z-index: 150;
}
.email-verification-modal {
	width: min(520px, 92vw);
	transform: translateY(10px) scale(0.985);
	transition: transform 0.2s ease;
}
.modal-overlay.show .email-verification-modal {
	transform: translateY(0) scale(1);
}
.modal-header.email-verification-header {
	background: linear-gradient(135deg, rgba(31, 79, 153, 0.16), rgba(14, 165, 163, 0.12));
	border-bottom: 1px solid var(--border);
	box-shadow: none;
	background-image: none;
	padding-bottom: 12px;
}
.email-verification-eyebrow {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.18em;
	font-weight: 700;
	color: var(--muted);
	margin-top: 6px;
}
.modal-header.email-verification-header h2 {
	margin-top: 6px;
}
.email-verification-subtitle {
	margin: 0;
	color: var(--muted);
	font-size: 13px;
	line-height: 1.5;
}
.email-verification-body {
	padding: 18px 20px 10px;
	flex-direction: column;
	gap: 14px;
}
.email-verification-target {
	color: rgba(22, 27, 24, 0.72);
	font-size: 13px;
	line-height: 1.5;
	background: rgba(255, 255, 255, 0.7);
	border: 1px solid rgba(120, 98, 72, 0.18);
	border-radius: 14px;
	padding: 10px 12px;
}
.email-verification-email {
	font-weight: 600;
	color: var(--text);
}
.email-verification-steps {
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
	color: var(--muted);
	font-size: 13px;
	line-height: 1.5;
	list-style: none;
	counter-reset: email-verify-step;
}
.email-verification-steps li {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}
.email-verification-steps li::before {
	counter-increment: email-verify-step;
	content: counter(email-verify-step);
	width: 18px;
	height: 18px;
	border-radius: 999px;
	border: 1px solid rgba(120, 98, 72, 0.25);
	background: rgba(255, 255, 255, 0.7);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 700;
	color: rgba(22, 27, 24, 0.7);
	flex: 0 0 auto;
	margin-top: 1px;
}
.email-verification-helper {
	margin-top: 0;
	font-size: 13px;
	color: var(--muted);
}
.email-verification-actions {
	padding: 0 20px 18px;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 8px;
}
.email-verification-actions button {
	width: 100%;
	padding: 8px 14px;
	font-size: 13px;
	border-radius: 12px;
	box-shadow: var(--shadow-soft);
}
.email-verification-actions button:hover {
	transform: none;
	box-shadow: var(--shadow-soft);
}
.email-verification-actions button#email-verification-sign-out {
	background: transparent;
	color: #9e3b2f;
	border: 1px solid rgba(158, 59, 47, 0.38);
	box-shadow: none;
}
.email-verification-actions button#email-verification-sign-out:hover {
	background: rgba(158, 59, 47, 0.08);
}
@media (max-width: 420px) {
	.email-verification-actions {
		flex-direction: column;
	}
}
.ocr-progress-heading h2 {
	font-family: 'Space Grotesk', 'Trebuchet MS', sans-serif;
	font-size: 22px;
	margin: 0;
}
.ocr-progress-status {
	margin: 0;
	color: var(--muted);
	font-size: 14px;
	line-height: 1.4;
}
.ocr-progress-track {
	width: 100%;
	height: 10px;
	border-radius: 999px;
	background: #ede7df;
	overflow: hidden;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}
.ocr-progress-fill {
	height: 100%;
	width: 0;
	background: linear-gradient(90deg, var(--accent), var(--accent-2));
	transition: width 0.2s ease;
	transform-origin: left center;
}
.ocr-progress-actions {
	display: flex;
	justify-content: center;
}
.ocr-progress-actions button {
	min-width: 160px;
	padding: 10px 18px;
}
.modal {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 16px;
	width: min(420px, 92vw);
	box-shadow: var(--shadow);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	padding: 0;
}
.modal input::placeholder,
.modal textarea::placeholder {
	color: var(--form-input-placeholder);
	opacity: 1;
}
.modal input::-webkit-input-placeholder,
.modal textarea::-webkit-input-placeholder {
	color: var(--form-input-placeholder);
	opacity: 1;
}
#account-overlay input::placeholder,
#account-overlay textarea::placeholder {
	color: var(--form-input-placeholder) !important;
	opacity: 1;
}
#account-overlay input::-webkit-input-placeholder,
#account-overlay textarea::-webkit-input-placeholder {
	color: var(--form-input-placeholder) !important;
	opacity: 1;
}
.modal-header {
	padding: 8px 20px 4px;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	position: relative;
	background: var(--modal-header-bg);
	border-bottom: 1px solid rgba(120, 98, 72, 0.18);
	box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.35);
	background-image: linear-gradient(135deg, rgba(0, 0, 0, 0.05) 0, rgba(0, 0, 0, 0.05) 1px, transparent 1px, transparent 8px),
		linear-gradient(45deg, rgba(255, 255, 255, 0.35) 0, rgba(255, 255, 255, 0.35) 1px, transparent 1px, transparent 8px),
		url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiB2aWV3Qm94PSIwIDAgMTIwIDEyMCI+PGZpbHRlciBpZD0ibiIgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSI+PGZlVHVyYnVsZW5jZSB0eXBlPSJmcmFjdGFsTm9pc2UiIGJhc2VGcmVxdWVuY3k9IjAuOSIgbnVtT2N0YXZlcz0iMSIgc3RpdGNoVGlsZXM9InN0aXRjaCIvPjxmZUNvbG9yTWF0cml4IHR5cGU9InNhdHVyYXRlIiB2YWx1ZXM9IjAiLz48ZmVDb21wb25lbnRUcmFuc2Zlcj48ZmVGdW5jQSB0eXBlPSJ0YWJsZSIgdGFibGVWYWx1ZXM9IjAgMC4xIi8+PC9mZUNvbG9yTWF0cml4PjwvZmlsdGVyPjxyZWN0IHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiBmaWx0ZXI9InVybCgjbikiIG9wYWNpdHk9IjEiLz48L3N2Zz4=");
	background-size: 12px 12px, 12px 12px, 90px 90px;
}
.modal-header > div {
	flex: 1;
	min-width: 0;
}
.modal-header h2 {
	font-family: 'Space Grotesk', 'Trebuchet MS', sans-serif;
	margin: 0;
	font-size: 22px;
}
.modal-body {
	padding: 8px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	background: var(--modal-body-bg);
	border-top: 1px solid var(--border);
	flex: 1;
	overflow-y: auto;
}
.modal-body .account-actions {
	position: sticky;
	bottom: 0;
	background: var(--modal-body-bg);
	padding-top: 12px;
	margin-top: auto;
	border-top: 1px solid var(--border);
}
.modal-body p {
	margin: 0;
	color: var(--muted);
	line-height: 1.5;
}
.history-modal-body.modal-body {
	gap: 10px;
}
.modal-actions {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	flex-wrap: wrap;
	margin: 0;
}
.modal-actions button:not(.primary):not(.danger):not(.ghost) {
	background: var(--surface);
	border: 1px solid var(--border);
	box-shadow: var(--shadow-soft);
}
.modal-actions button:not(.primary):not(.danger):not(.ghost):hover {
	background: #fffaf2;
	box-shadow: var(--shadow);
}
.admin-modal {
	width: min(960px, 94vw);
	max-height: 88vh;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 24px;
}
.admin-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
.admin-modal-body {
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-height: calc(88vh - 120px);
	overflow: hidden;
}
.admin-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
}
.admin-summary {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 12px;
}
.admin-issues {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 8px 10px;
	border: 1px solid var(--border);
	border-radius: 8px;
	background: var(--surface-2);
}
.admin-issues-title {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-weight: 700;
	color: var(--muted);
}
.admin-issues-empty {
	font-size: 13px;
	color: var(--muted);
}
.admin-issues-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.admin-issue-row {
	display: grid;
	grid-template-columns: minmax(120px, 1fr) minmax(0, 2fr) auto;
	gap: 10px;
	align-items: center;
	padding: 8px 10px;
	border-radius: 10px;
	background: #fff;
	border: 1px solid var(--border);
}
.admin-issue-row.is-critical {
	border-color: rgba(158, 59, 47, 0.35);
	background: rgba(158, 59, 47, 0.08);
}
.admin-issue-row.is-warning {
	border-color: rgba(14, 165, 163, 0.35);
	background: rgba(14, 165, 163, 0.1);
}
.admin-issue-row.is-info {
	border-color: rgba(31, 79, 153, 0.25);
	background: rgba(31, 79, 153, 0.08);
}
.admin-issue-account {
	font-size: 12px;
	font-weight: 700;
	color: var(--text);
}
.admin-issue-message {
	font-size: 12px;
	color: var(--text);
}
.admin-dispute-refs {
	font-size: 11px;
	color: var(--muted);
	margin-top: 2px;
	word-break: break-all;
}
.admin-issue-meta {
	font-size: 11px;
	color: var(--muted);
	white-space: nowrap;
}
.admin-summary-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 8px 12px;
	display: flex;
	flex-direction: column;
	gap: 3px;
	box-shadow: 0 1px 3px rgba(15, 21, 62, 0.06);
}
.admin-summary-card.is-critical {
	border-color: rgba(158, 59, 47, 0.35);
	background: rgba(158, 59, 47, 0.08);
}
.admin-summary-card.is-warning {
	border-color: rgba(14, 165, 163, 0.35);
	background: rgba(14, 165, 163, 0.1);
}
.admin-summary-card.is-ok {
	border-color: rgba(31, 79, 153, 0.3);
	background: rgba(31, 79, 153, 0.08);
}
.admin-summary-card.is-clickable {
	cursor: pointer;
}
.admin-summary-card.is-clickable:hover,
.admin-summary-card.is-clickable:focus-visible {
	border-color: #3b82f6;
	box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
	outline: none;
}
.admin-billing-drilldown {
	margin: 0 0 18px;
	padding: 16px;
	border: 1px solid var(--border);
	border-radius: 8px;
	background: var(--surface-muted, #f8fafc);
	overflow-x: auto;
}
.admin-billing-drilldown-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
.admin-billing-drilldown-header h2 {
	margin: 0;
	font-size: 1rem;
}
.admin-billing-drilldown-note {
	margin: 8px 0 14px;
	color: var(--muted);
	font-size: 0.85rem;
}
.admin-billing-drilldown-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.85rem;
	background: var(--surface);
}
.admin-billing-drilldown-table th,
.admin-billing-drilldown-table td {
	padding: 9px 10px;
	border-bottom: 1px solid var(--border);
	text-align: left;
	white-space: nowrap;
}
.admin-billing-drilldown-table th {
	color: var(--muted);
	font-weight: 600;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.admin-billing-drilldown-table td:nth-child(3) {
	font-variant-numeric: tabular-nums;
	font-weight: 600;
}
.admin-billing-drilldown-table td.is-negative {
	color: #b42318;
}
.admin-summary-label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--muted);
	font-weight: 600;
}
.admin-summary-value {
	font-size: 22px;
	font-weight: 700;
	color: var(--text);
	line-height: 1.2;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.admin-summary-seat-hint {
	font-size: 12px;
	color: var(--muted);
}
.admin-search-field {
	flex: 1;
	min-width: 200px;
	display: flex;
	flex-direction: column;
	gap: 0;
}
.admin-search-field label {
	display: none;
}
.admin-search-field input {
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 6px 10px;
	background: var(--surface);
	font-size: 13px;
	color: var(--text);
}
.admin-loading,
.admin-error,
.admin-account-empty {
	font-size: 13px;
	color: var(--muted);
}
.admin-account-empty.admin-hidden {
	display: none;
}
.admin-error {
	color: #9e3b2f;
}
.admin-account-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
	overflow: auto;
	flex: 1;
	min-height: 0;
	padding-right: 4px;
}
.admin-account-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 8px 10px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
.admin-account-card.is-critical {
	border-color: rgba(158, 59, 47, 0.4);
}
.admin-account-card.is-warning {
	border-color: rgba(14, 165, 163, 0.4);
}
.admin-card-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 6px;
	flex-wrap: nowrap;
}

.admin-header-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.admin-name-status-row {
	display: flex;
	align-items: center;
	gap: 6px;
}

.admin-status-indicator {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex-shrink: 0;
	border: 1px solid currentColor;
}

.admin-status-indicator.is-ok {
	background: #10b981;
	border-color: #059669;
}

.admin-status-indicator.is-warning {
	background: #f59e0b;
	border-color: #d97706;
}

.admin-status-indicator.is-critical {
	background: #ef4444;
	border-color: #dc2626;
}

.admin-status-indicator.is-info {
	background: #6366f1;
	border-color: #4f46e5;
}

.admin-payment-indicator {
	font-size: 10px;
	font-weight: 600;
	padding: 2px 6px;
	border-radius: 4px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	width: fit-content;
}

.admin-payment-indicator.is-ok {
	background: rgba(16, 185, 129, 0.1);
	color: #059669;
	border: 1px solid rgba(16, 185, 129, 0.3);
}

.admin-payment-indicator.is-warning {
	background: rgba(245, 158, 11, 0.1);
	color: #b45309;
	border: 1px solid rgba(245, 158, 11, 0.3);
}

.admin-payment-indicator.is-critical {
	background: rgba(239, 68, 68, 0.1);
	color: #991b1b;
	border: 1px solid rgba(239, 68, 68, 0.3);
}

.admin-header-quick-stats {
	font-size: 11px;
	color: var(--muted);
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: center;
}

.admin-stat-item {
	white-space: nowrap;
}

.admin-renewal-countdown {
	font-weight: 600;
	padding: 1px 4px;
	border-radius: 3px;
	font-size: 10px;
}

.admin-renewal-countdown.is-ok {
	color: #059669;
	background: rgba(16, 185, 129, 0.1);
}

.admin-renewal-countdown.is-warning {
	color: #b45309;
	background: rgba(245, 158, 11, 0.1);
	font-weight: 700;
}

.admin-renewal-countdown.is-critical {
	color: #991b1b;
	background: rgba(239, 68, 68, 0.15);
	font-weight: 700;
}
.admin-card-header-actions {
	display: flex;
	align-items: center;
	gap: 4px;
	flex-wrap: wrap;
	justify-content: flex-end;
	flex-shrink: 0;
}
.admin-detail-toggle {
	border-radius: 4px;
	border: 1px solid var(--border);
	padding: 2px 6px;
	font-size: 10px;
	color: var(--accent);
	background: transparent;
	transition: background 0.15s ease, color 0.15s ease;
	min-width: 24px;
	text-align: center;
}
.admin-detail-toggle[aria-expanded="true"] {
	background: rgba(31, 79, 153, 0.1);
	color: var(--accent);
}
.admin-account-name {
	font-size: 14px;
	font-weight: 600;
	color: var(--text);
}
.admin-account-meta {
	font-size: 12px;
	color: var(--muted);
}
.admin-plan-pill {
	background: rgba(31, 79, 153, 0.12);
	border-radius: 6px;
	padding: 2px 6px;
	color: var(--accent);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-size: 9px;
	font-weight: 600;
	white-space: nowrap;
}
.admin-plan-pill.status-active {
	background: rgba(31, 79, 153, 0.12);
	color: var(--accent);
}
.admin-plan-pill.status-past_due {
	background: rgba(158, 59, 47, 0.14);
	color: #9e3b2f;
}
.admin-plan-pill.status-canceled {
	background: rgba(14, 165, 163, 0.14);
	color: var(--accent-2);
}
.admin-card-details {
	display: none;
	flex-direction: column;
	gap: 4px;
	border-top: 1px solid var(--border);
	padding-top: 4px;
	margin-top: 4px;
}
.admin-card-details.is-expanded {
	display: flex;
}
.admin-account-card.is-expanded {
	outline: 2px solid rgba(31, 79, 153, 0.28);
	outline-offset: -1px;
}
.admin-account-card.is-expanded .admin-card-header {
	position: sticky;
	top: 0;
	background: var(--surface, #fff);
	z-index: 10;
	border-bottom: 1px solid var(--border);
	padding-bottom: 6px;
	margin-bottom: 2px;
}
.admin-usage-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 6px;
}
.admin-usage-item {
	font-size: 12px;
	color: var(--muted);
	line-height: 1.3;
	padding: 4px 0;
}
.admin-usage-item strong {
	color: var(--text);
	font-weight: 600;
}
.admin-compact-summary {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 10px;
}
.admin-compact-metric {
	padding: 10px 12px;
	border-radius: 12px;
	background: var(--surface-2);
	border: 1px solid var(--border);
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.admin-compact-metric.is-critical {
	border-color: rgba(158, 59, 47, 0.35);
	background: rgba(158, 59, 47, 0.08);
}
.admin-compact-metric.is-ok {
	border-color: rgba(31, 79, 153, 0.25);
	background: rgba(31, 79, 153, 0.08);
}
.admin-compact-metric-label {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--muted);
}
.admin-compact-metric-value {
	font-size: 14px;
	font-weight: 600;
	color: var(--text);
}
.admin-bonus-note {
	font-size: 12px;
	color: var(--accent);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.admin-health-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.admin-quick-action {
	padding: 4px 8px;
	font-size: 11px;
	white-space: nowrap;
}
.admin-health-badge {
	font-size: 10px;
	padding: 2px 6px;
	border-radius: 6px;
	border: 1px solid var(--border);
	background: var(--surface-2);
	color: var(--muted);
	white-space: nowrap;
}
.admin-health-badge.is-critical {
	border-color: rgba(158, 59, 47, 0.35);
	background: rgba(158, 59, 47, 0.08);
	color: #9e3b2f;
}
.admin-health-badge.is-warning {
	border-color: rgba(14, 165, 163, 0.35);
	background: rgba(14, 165, 163, 0.12);
	color: var(--accent-2);
}
.admin-health-badge.is-info {
	border-color: rgba(31, 79, 153, 0.25);
	background: rgba(31, 79, 153, 0.08);
	color: var(--accent);
}
.admin-health-badge.is-ok {
	border-color: rgba(31, 79, 153, 0.3);
	background: rgba(31, 79, 153, 0.08);
	color: var(--accent);
}
.admin-health-section {
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 8px 10px;
	background: var(--surface-2);
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.admin-health-title {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-weight: 700;
	color: var(--muted);
}
.admin-health-rows {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.admin-health-row {
	font-size: 13px;
	color: var(--text);
	padding: 2px 0;
}
.admin-users-section {
	border-top: 1px solid var(--border);
	padding-top: 6px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.admin-users-title {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--muted);
	font-weight: 600;
}
.admin-users-list {
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.admin-user-chip {
	border-radius: 999px;
	border: 1px solid var(--border);
	padding: 4px 10px;
	background: var(--surface-2);
	font-size: 12px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.admin-user-chip span {
	font-weight: 600;
}

.admin-user-row {
	display: grid;
	grid-template-columns: 1fr auto auto auto auto;
	gap: 6px;
	align-items: center;
	padding: 4px 0;
	border-bottom: 1px solid rgba(15, 23, 42, 0.06);
	font-size: 0.85rem;
}
.admin-user-row:last-child {
	border-bottom: none;
}
.admin-user-row-info {
	flex: 1;
	font-size: 0.85rem;
	min-width: 150px;
	word-break: break-word;
}

.admin-danger-zone {
	border: 1px solid rgba(158, 59, 47, 0.4);
	background: rgba(158, 59, 47, 0.06);
	border-radius: 10px;
	padding: 12px;
	margin-top: 8px;
}

.admin-danger-zone-title {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-weight: 700;
	color: #9e3b2f;
	margin-bottom: 8px;
}
.admin-user-tier-sel {
	font-size: 0.82rem;
	padding: 3px 6px;
	border-radius: 6px;
	border: 1px solid var(--border);
}

.admin-filter-chips {
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
	padding: 2px 0;
}
.admin-filter-chip {
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 500;
	background: transparent;
	border: 1px solid rgba(15, 23, 42, 0.15);
	cursor: pointer;
	color: #475467;
	transition: background 0.12s, color 0.12s, border-color 0.12s;
	font-family: inherit;
}
.admin-filter-chip:hover {
	background: rgba(15, 23, 42, 0.06);
	color: #0f172a;
}
.admin-filter-chip.is-active {
	background: #0f172a;
	color: #fff;
	border-color: #0f172a;
}

.admin-health-row--flex {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}
.admin-inline-num {
	width: 64px;
	padding: 4px 6px;
	border-radius: 6px;
	border: 1px solid var(--border);
	font-size: 0.85rem;
}
.admin-danger-btn {
	color: #a12008 !important;
}

.admin-adjust {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.admin-tab-pane .admin-adjust {
	border: 1px solid rgba(15, 23, 42, 0.1);
	border-radius: 12px;
	padding: 12px 14px;
	background: #f8faff;
}
.admin-tab-pane .admin-adjust > div:first-child {
	font-weight: 650;
	font-size: 0.88rem;
	color: #0f172a;
}
.admin-adjust-row {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: flex-start;
}
.admin-adjust-row label {
	font-size: 0.82rem;
	color: #334155;
}
.admin-adjust-row input[type="text"],
.admin-adjust-row input[type="email"],
.admin-adjust-row input[type="number"],
.admin-adjust-row input[type="datetime-local"],
.admin-adjust-row input[type="date"],
.admin-adjust-row input[type="time"],
.admin-adjust-row select,
.admin-adjust-row textarea {
	flex: 1;
	min-width: 140px;
	padding: 10px 12px;
	font-size: 13px;
	border-radius: 10px;
	border: 1px solid var(--border);
	background: var(--surface);
	color: var(--text);
}
.admin-adjust-row input[type="checkbox"] {
	flex: 0;
	width: auto;
	margin-right: 4px;
}
.admin-adjust-row button {
	min-width: 160px;
	flex-shrink: 0;
}
.admin-adjust-hint {
	font-size: 12px;
	color: var(--muted);
}
.admin-form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px 12px;
}
.admin-form-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.admin-form-field--compact {
	max-width: 280px;
}
.admin-form-field input,
.admin-form-field select,
.admin-form-field textarea {
	width: 100%;
	padding: 10px 12px;
	font-size: 13px;
	border-radius: 10px;
	border: 1px solid var(--border);
	background: var(--surface);
	color: var(--text);
	box-sizing: border-box;
}
.admin-saml-section .admin-mono-input {
	min-height: 120px;
}
.admin-saml-metadata-block {
	border: 1px dashed rgba(31, 79, 153, 0.35);
	border-radius: 12px;
	padding: 10px 12px;
	background: rgba(31, 79, 153, 0.06);
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.admin-saml-metadata-warning {
	font-size: 12px;
	color: #8b3f2f;
}
.admin-saml-metadata-status {
	font-size: 12px;
	color: #1f4f99;
}

.admin-body {
	background-color: #f6f7fb;
	min-height: 100vh;
	font-family: 'IBM Plex Sans', 'Space Grotesk', sans-serif;
}

.admin-page {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.topbar--admin {
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	background: #fff;
	padding: 5px 16px;
	border-radius: 0;
}

.topbar--admin .brand-link {
	flex-direction: row;
	gap: 12px;
	align-items: center;
}

.topbar--admin .brand-link .title {
	margin: 0;
}

.admin-main {
	flex: 1;
	padding: 0.5rem 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.admin-nav {
	display: flex;
	gap: 4px;
	background: transparent;
	border-radius: 0;
	padding: 0;
	box-shadow: none;
	align-self: flex-start;
}

.admin-nav-btn {
	padding: 5px 12px;
	border-radius: 6px;
	font-size: 0.82rem;
	font-weight: 550;
	background: transparent;
	border: none;
	cursor: pointer;
	color: #475467;
	transition: background 0.12s, color 0.12s;
	font-family: inherit;
}

.admin-nav-btn:hover {
	background: rgba(15, 23, 42, 0.06);
	color: #0f172a;
}

.admin-nav-btn.is-active {
	background: #0f172a;
	color: #fff;
}

.admin-panel {
	background: #fff;
	border-radius: 10px;
	padding: 0.6rem 0.75rem;
	box-shadow: 0 2px 8px rgba(15, 21, 62, 0.07);
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.admin-section[hidden] {
	display: none !important;
}

.admin-settings {
	border: 1px solid rgba(15, 23, 42, 0.08);
	border-radius: 14px;
	padding: 1rem;
	background: #fbfcff;
}

.admin-settings-summary {
	font-weight: 650;
	cursor: pointer;
	user-select: none;
}

.admin-settings-body {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	margin-top: 0.75rem;
}

.admin-settings-section-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
}

.admin-settings-title {
	margin: 0;
	font-size: 1rem;
	font-weight: 650;
}

.admin-pricing-panel {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.admin-pricing-card {
	border: 1px solid rgba(15, 23, 42, 0.08);
	border-radius: 12px;
	padding: 12px;
	background: #fff;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.admin-pricing-card-title {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
}

.admin-pricing-card-title strong {
	font-weight: 650;
}

.admin-pricing-meta {
	color: var(--muted);
	font-size: 0.85rem;
}

.admin-pricing-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px 14px;
}

.admin-pricing-item {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.admin-pricing-item label {
	font-size: 12px;
	color: var(--muted);
}

.admin-pricing-item input {
	width: 100%;
	padding: 10px 12px;
	border-radius: 10px;
	border: 1px solid rgba(15, 23, 42, 0.14);
}

.admin-pricing-actions {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
}

.admin-settings-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.admin-setting-row {
	border: 1px solid rgba(15, 23, 42, 0.08);
	border-radius: 12px;
	padding: 10px 12px;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.admin-setting-row code {
	font-size: 0.85rem;
	color: #0f172a;
}

.admin-setting-row pre {
	margin: 0;
	font-size: 12px;
	white-space: pre-wrap;
	color: var(--muted);
}

.admin-setting-actions {
	display: flex;
	gap: 10px;
}

@media (max-width: 900px) {
	.admin-pricing-grid {
		grid-template-columns: 1fr;
	}
}

.admin-refresh {
	align-self: flex-end;
}

.admin-toast {
	padding: 0.6rem 1rem;
	border-radius: 8px;
	font-size: 0.9rem;
	display: none;
	align-items: center;
	gap: 0.5rem;
	box-shadow: 0 4px 12px rgba(15, 21, 62, 0.12);
	position: fixed;
	bottom: 20px;
	right: 20px;
	max-width: 400px;
	z-index: 1000;
}

.admin-toast:not([hidden]) {
	display: inline-flex;
}

.admin-toast-success {
	background: #e6fbef;
	color: #0d7a3c;
}

.admin-toast-error {
	background: #ffe8e8;
	color: #a12008;
}

.admin-detail-tabs {
	display: flex;
	gap: 0;
	border-bottom: 1px solid var(--border);
	margin-bottom: 8px;
}

.admin-detail-tab-btn {
	padding: 5px 14px;
	border: none;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	background: transparent;
	font-size: 0.82rem;
	font-weight: 550;
	color: var(--muted);
	cursor: pointer;
	font-family: inherit;
	transition: color 0.12s, border-color 0.12s;
}

.admin-detail-tab-btn:hover {
	color: var(--text);
}

.admin-detail-tab-btn.is-active {
	color: var(--text);
	border-bottom-color: var(--accent);
}

.admin-detail-tab-pane {
	display: none;
	flex-direction: column;
	gap: 8px;
}

.admin-detail-tab-pane.is-active {
	display: flex;
}

/* Admin Account Detail Tabs */
.admin-tab-container {
	margin-bottom: 0;
}

.admin-tab-bar {
	display: flex;
	border-bottom: 1px solid var(--border);
	margin-bottom: 0;
	gap: 2px;
	background: transparent;
	padding: 0;
	border-radius: 0;
}

.admin-tab-btn {
	padding: 4px 10px;
	border: none;
	background: transparent;
	cursor: pointer;
	font-size: 12px;
	font-weight: 600;
	transition: color 0.2s ease, border-color 0.2s ease;
	color: var(--muted);
	white-space: nowrap;
	font-family: inherit;
	border-radius: 0;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
}

.admin-tab-btn:hover {
	color: #0f172a;
}

.admin-tab-btn.active {
	border-bottom-color: var(--accent);
	color: var(--accent);
	background: transparent;
}

.admin-tabs-panes {
	padding-top: 6px;
}

.admin-tab-pane {
	display: none;
	flex-direction: column;
	gap: 8px;
}

.admin-confirm-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
}

.admin-confirm-modal {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 24px;
	max-width: 400px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.admin-confirm-header {
	margin-bottom: 12px;
}

.admin-confirm-header h3 {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: var(--text);
}

.admin-confirm-body {
	margin-bottom: 16px;
}

.admin-confirm-body p {
	margin: 0;
	font-size: 14px;
	color: var(--text);
	line-height: 1.5;
}

.admin-confirm-actions {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
}

.admin-confirm-actions button {
	padding: 6px 12px;
	font-size: 13px;
}

.admin-tab-pane[style*="block"] {
	display: flex;
}
@media (max-width: 900px) {
	.admin-form-grid {
		grid-template-columns: 1fr;
	}
}
.admin-page button.ghost {
	background: #e7eef9;
	border: 1px solid rgba(31, 79, 153, 0.3);
	color: #163a71;
	box-shadow: 0 4px 10px rgba(15, 23, 42, 0.1);
}
.admin-page button.ghost:hover {
	background: #dbe7f8;
	border-color: rgba(31, 79, 153, 0.45);
}
.admin-page button.ghost.admin-danger-btn {
	background: rgba(158, 59, 47, 0.12);
	border-color: rgba(158, 59, 47, 0.45);
	color: #8f2818 !important;
}
.admin-page button.ghost.admin-danger-btn:hover {
	background: rgba(158, 59, 47, 0.2);
	border-color: rgba(158, 59, 47, 0.6);
}

.admin-field-label {
	display: block;
	font-size: 0.78rem;
	color: var(--muted);
	margin-bottom: 2px;
}

.admin-mono-input {
	font-family: 'IBM Plex Mono', monospace;
	font-size: 0.75rem;
}

.admin-billing {
	margin-bottom: 0;
}

.admin-billing-title {
	font-weight: 600;
	margin-bottom: 4px;
	font-size: 12px;
}

.admin-billing-empty {
	font-size: 0.9rem;
	color: #6f6f6f;
}

.admin-billing-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.75rem 0;
	border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.admin-billing-row.is-payment-failed {
	background: rgba(158, 59, 47, 0.06);
	border-radius: 10px;
	padding-left: 8px;
	padding-right: 8px;
}

.admin-billing-row.is-refund {
	background: rgba(15, 118, 110, 0.08);
	border-radius: 10px;
	padding-left: 8px;
	padding-right: 8px;
}
.admin-billing-row.is-refunded {
	background: rgba(15, 118, 110, 0.04);
	border-radius: 10px;
	padding-left: 8px;
	padding-right: 8px;
}

.admin-billing-row:first-of-type {
	border-top: none;
}

.admin-billing-meta {
	flex: 1;
}

.admin-billing-label {
	font-weight: 600;
}

.admin-billing-detail {
	font-size: 0.85rem;
	color: #6f6f6f;
	margin-top: 0.25rem;
}

.admin-billing-refunds {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.35rem;
	font-size: 0.85rem;
	color: #0f6c4e;
	line-height: 1.2;
}
.admin-billing-refunds span {
	display: inline-block;
}
.admin-billing-refunds-main {
	font-weight: 600;
}
.admin-billing-refunds-count {
	color: #0f6c4e;
}
.admin-billing-refunds-remaining {
	color: #0f6c4e;
}
.admin-billing-refunds-reason {
	color: #475467;
}

.admin-billing-actions {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.admin-billing-amount {
	font-weight: 600;
}
.admin-billing-amount.is-negative {
	color: #9e3b2f;
}

.admin-billing-status {
	font-size: 0.85rem;
	font-weight: 600;
	color: #0f6c4e;
	margin-top: 0.25rem;
}

.admin-billing-date {
	font-size: 0.85rem;
	color: #6f6f6f;
}

.admin-refund-button {
	white-space: nowrap;
}
@media (max-width: 720px) {
	.admin-issue-row {
		grid-template-columns: minmax(0, 1fr);
	}
}
@media (max-width: 980px) {
	.workspace { grid-template-columns: 1fr; }
	.sidebar {
		position: static;
		max-height: none;
	}
}
@media (max-width: 800px) {
	.topbar { align-items: flex-start; }
	.topbar-left,
	.topbar-right {
		width: 100%;
		justify-content: space-between;
	}
}
@media (max-width: 640px) {
	.topbar { padding: 12px; }
	.topbar-export { width: 100%; }
	button:not(.icon-button):not(.zoom-button),
	.upload-button {
		width: 100%;
		justify-content: center;
	}
	.zoom-select { flex: 1; }
	.account-columns { grid-template-columns: 1fr; }
	.account-grid { grid-template-columns: 1fr; }
	.account-full { grid-column: span 1; }
	.user-tier-grid { grid-template-columns: 1fr; }
}
.app-footer {
	margin-top: 2px;
	padding: 2px 6px;
	border-top: 1px solid var(--border);
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	color: var(--muted);
	font-size: 13px;
}
.footer-links {
	display: flex;
	gap: 24px;
	flex-wrap: wrap;
	align-items: center;
}
.footer-version {
	font-weight: 600;
	color: var(--text);
	font-size: 13px;
}
.app-footer a {
	color: var(--accent);
	text-decoration: none;
	font-weight: 600;
}
.app-footer a:hover { text-decoration: underline; }
#user-card {
	position: relative;
	display: none;
}
#user-card.show {
	display: block;
}

#document-menu {
	position: relative;
}
#document-menu summary {
	list-style: none;
	cursor: var(--outline-pointer);
	border: 1px solid var(--border);
	background: var(--surface-2);
	border-radius: 14px;
	padding: 8px 12px;
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 600;
	color: var(--text);
	box-shadow: var(--shadow-soft);
	min-width: 280px;
	max-width: 520px;
	transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
#document-menu summary:hover {
	border-color: rgba(31, 79, 153, 0.35);
	background: #e7edf5;
}
#document-menu summary:focus-visible {
	outline: 2px solid var(--accent-2);
	outline-offset: 2px;
}
#document-menu summary::-webkit-details-marker {
	display: none;
}
#document-menu summary::after {
	content: '';
	margin-left: auto;
	width: 8px;
	height: 8px;
	border-right: 2px solid var(--muted);
	border-bottom: 2px solid var(--muted);
	transform: rotate(45deg);
	transition: transform 0.2s ease, border-color 0.2s ease;
}
#document-menu[open] summary {
	border-color: rgba(31, 79, 153, 0.5);
	box-shadow: 0 14px 26px rgba(15, 23, 42, 0.14);
}
#document-menu[open] summary::after {
	transform: rotate(-135deg);
	border-color: var(--accent);
}
.document-summary-text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}
.document-summary-label {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	color: var(--muted);
	font-weight: 600;
}
.document-summary-name {
	font-size: 13px;
	font-weight: 600;
	color: var(--text);
	max-width: 460px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.document-dropdown {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 16px;
	box-shadow: var(--shadow);
	padding: 12px;
	min-width: 260px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	z-index: 10;
	opacity: 0;
	transform: translateY(-6px);
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
}
#document-menu[open] .document-dropdown {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}
.document-dropdown-header {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	color: var(--muted);
	font-weight: 600;
}
.document-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
button.document-menu-item {
	width: 100%;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	justify-content: flex-start;
	text-align: left;
	box-shadow: none;
	transform: none;
	background: transparent;
	border: 1px solid transparent;
	padding: 10px 12px;
	border-radius: 12px;
}
button.document-menu-item:hover:enabled {
	background: var(--surface-2);
	border-color: rgba(31, 79, 153, 0.18);
	transform: none;
	box-shadow: none;
}
button.document-menu-item:focus-visible {
	outline: 2px solid var(--accent-2);
	outline-offset: 2px;
}
button.document-menu-item:disabled {
	opacity: 0.55;
	box-shadow: none;
	transform: none;
}
.document-menu-item-danger {
	color: #9e3b2f;
}
button.document-menu-item-danger:hover:enabled {
	background: rgba(158, 59, 47, 0.08);
	border-color: rgba(158, 59, 47, 0.22);
}
.document-menu-icon {
	width: 18px;
	height: 18px;
	display: block;
	opacity: 0.85;
}
.document-menu-label {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.01em;
}

#user-card summary {
	list-style: none;
	cursor: pointer;
	border: 1px solid var(--border);
	background: var(--surface-2);
	border-radius: 14px;
	padding: 8px 12px;
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 600;
	color: var(--text);
	box-shadow: var(--shadow-soft);
	min-width: 220px;
	transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
#user-card summary:hover {
	border-color: rgba(31, 79, 153, 0.35);
	background: #e7edf5;
}
#user-card summary:focus-visible {
	outline: 2px solid var(--accent-2);
	outline-offset: 2px;
}
#user-card summary::-webkit-details-marker {
	display: none;
}
#user-card summary::after {
	content: '';
	margin-left: auto;
	width: 8px;
	height: 8px;
	border-right: 2px solid var(--muted);
	border-bottom: 2px solid var(--muted);
	transform: rotate(45deg);
	transition: transform 0.2s ease, border-color 0.2s ease;
}
#user-card[open] summary {
	border-color: rgba(31, 79, 153, 0.5);
	box-shadow: 0 14px 26px rgba(15, 23, 42, 0.14);
}
#user-card[open] summary::after {
	transform: rotate(-135deg);
	border-color: var(--accent);
}
.account-avatar {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: linear-gradient(135deg, #1f4f99 0%, #2f6fd6 100%);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	letter-spacing: 0.08em;
	font-size: 12px;
	box-shadow: 0 8px 16px rgba(31, 79, 153, 0.22);
}
.account-avatar.account-avatar-lg {
	width: 42px;
	height: 42px;
	font-size: 13px;
}
.org-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 6px;
	font-size: 12px;
	color: var(--muted);
}
.org-header-badge {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	padding: 2px;
	border-radius: 14px;
	border: 1px solid var(--border);
	background: var(--surface-2);
}
.org-header-logo {
	display: block;
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	object-fit: contain;
	object-position: center;
	padding: 4px;
	box-sizing: border-box;
	border: none;
	background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
@media (max-width: 640px) {
	.org-header-logo {
		width: 36px;
		height: 36px;
	}
}
.org-logo {
	width: 22px;
	height: 22px;
	border-radius: 6px;
	object-fit: contain;
	padding: 2px;
	box-sizing: border-box;
	border: 1px solid var(--border);
	background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.org-section {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.org-row {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}
.org-logo-preview {
	width: 46px;
	height: 46px;
	border-radius: 10px;
	object-fit: contain;
	padding: 4px;
	box-sizing: border-box;
	border: 1px solid var(--border);
	background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.org-logo-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}
.org-logo-upload {
	text-transform: none;
	letter-spacing: 0.06em;
}
.org-logo-remove {
	padding: 8px 14px;
	font-size: 13px;
	border-radius: 10px;
	box-shadow: 0 6px 12px rgba(158, 59, 47, 0.2);
	border: 1px solid rgba(158, 59, 47, 0.35);
}
.org-logo-remove:hover {
	background: #862f25;
}
.org-logo-remove:disabled {
	box-shadow: none;
}
.org-helper {
	font-size: 12px;
	color: var(--muted);
}
.org-hidden {
	display: none;
}
.account-hidden {
	display: none;
}
.account-summary-text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}
.account-summary-label {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	color: var(--muted);
	font-weight: 600;
}
.account-summary-email {
	font-size: 13px;
	font-weight: 600;
	color: var(--text);
	max-width: 160px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
#user-card .account-dropdown {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 16px;
	box-shadow: var(--shadow);
	padding: 14px;
	min-width: 260px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	z-index: 10;
	opacity: 0;
	transform: translateY(-6px);
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
}
#user-card[open] .account-dropdown {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}
.account-dropdown-header {
	display: flex;
	align-items: center;
	gap: 12px;
}
#user-card .user-meta {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	color: var(--muted);
	font-weight: 600;
}
#user-card .user-email {
	font-size: 14px;
	font-weight: 600;
	color: var(--text);
	word-break: break-word;
}
.account-divider {
	height: 1px;
	background: var(--border);
	opacity: 0.9;
}
.account-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.account-actions .account-action {
	width: 100%;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	justify-content: flex-start;
	text-align: left;
	box-shadow: none;
	padding: 10px 12px;
	border-radius: 10px;
}
.account-actions .account-action.ghost {
	background: var(--surface-2);
	border: 1px solid var(--border);
}
.account-actions .account-action.admin-hidden {
	display: none;
}
.account-actions .account-action.ghost:hover {
	background: #e1e9f0;
}
.account-actions .account-action.danger {
	box-shadow: none;
}
button.ghost {
	background: transparent;
	box-shadow: none;
}
button.ghost:hover {
	background: #eaeaea;
}
button.accent-button,
label.accent-button {
	background: #1f4f99;
	color: #fff;
	border: 1px solid rgba(31, 79, 153, 0.35);
	box-shadow: 0 6px 12px rgba(15, 23, 42, 0.2);
	padding: 10px 18px;
	border-radius: 10px;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	text-decoration: none;
	cursor: pointer;
	text-transform: none;
	transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
button.accent-button:hover,
label.accent-button:hover {
	background: #2a5b4f;
	transform: translateY(-1px);
	box-shadow: 0 8px 18px rgba(15, 23, 42, 0.25);
}
button.accent-button.compact,
label.accent-button.compact {
	padding: 8px 14px;
	font-size: 13px;
}
button.accent-button:focus-visible,
label.accent-button:focus-visible {
	outline: 2px solid rgba(216, 125, 75, 0.7);
	outline-offset: 3px;
}
.account-actions .account-action.accent-button {
	background: #1f4f99;
	color: #fff;
	border: 1px solid rgba(31, 79, 153, 0.3);
	box-shadow: 0 6px 12px rgba(15, 23, 42, 0.2);
}
.account-modal {
	width: min(1100px, 94vw);
	max-height: min(86vh, 900px);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
#account-overlay {
	align-items: center;
	justify-content: center;
	padding: 12px;
}
#account-overlay .account-modal {
	width: min(1100px, 94vw);
	max-height: min(86vh, 900px);
	border-radius: 18px;
}
.account-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
	overflow: auto;
}
#account-overlay .account-form {
	flex: 1;
}
.account-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
.modal-close {
	width: 34px;
	height: 34px;
	padding: 0;
	border-radius: 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	position: absolute;
	top: 4px;
	right: 8px;
	background: var(--surface-2);
	border: 1px solid var(--border);
}
.modal-close img {
	width: 16px;
	height: 16px;
	display: block;
}
.account-columns {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}
.account-column {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
}
.account-section {
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 10px;
	background: var(--surface);
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.account-section.account-hidden,
.account-section.org-hidden {
	display: none;
}
.account-email-section {
	gap: 6px;
}
.account-email-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
}
.account-email-row.account-hidden {
	display: none;
}
.account-email-info {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	min-width: 0;
}
.account-identity-line {
	display: flex;
	align-items: baseline;
	gap: 8px;
	min-width: 0;
}
.account-email-line {
	display: flex;
	align-items: baseline;
	gap: 6px;
	min-width: 0;
}
.account-inline-action {
	white-space: nowrap;
}
.account-section-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}
.account-identity-name {
	font-weight: 600;
	color: var(--text);
	min-width: 0;
}
.account-identity-name.is-empty {
	color: var(--muted);
	font-weight: 500;
}
.account-email-value {
	font-weight: 600;
	word-break: break-word;
	min-width: 0;
}
.account-email-pending {
	color: #dc2626;
}
.account-email-status-pending {
	color: #dc2626;
	cursor: help;
	text-decoration: underline dotted;
	text-underline-offset: 2px;
	position: relative;
}
.account-email-status-pending::after,
.account-email-status-pending::before {
	opacity: 0;
	pointer-events: none;
	transition: opacity 120ms ease;
}
.account-email-status-pending:hover::after,
.account-email-status-pending:focus-visible::after,
.account-email-status-pending:hover::before,
.account-email-status-pending:focus-visible::before {
	opacity: 1;
}
.account-email-status-pending::after {
	content: attr(data-tooltip);
	position: absolute;
	left: 50%;
	top: calc(100% + 8px);
	transform: translateX(-50%);
	background: rgba(15, 23, 42, 0.96);
	color: #fff;
	padding: 8px 10px;
	border-radius: 10px;
	font-size: 12px;
	line-height: 1.4;
	white-space: normal;
	width: max-content;
	max-width: 320px;
	z-index: 50;
	box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}
.account-email-status-pending::before {
	content: '';
	position: absolute;
	left: 50%;
	top: calc(100% + 2px);
	transform: translateX(-50%);
	border: 6px solid transparent;
	border-bottom-color: rgba(15, 23, 42, 0.96);
	z-index: 51;
}
.account-email-status {
	font-size: 0.85rem;
	color: var(--muted);
	white-space: nowrap;
	display: none;
}
.account-email-status:not(:empty) {
	display: inline;
}
.account-email-status-warning {
	color: #dc2626;
}
.account-email-actions {
	display: flex;
	align-items: center;
	gap: 6px;
}
.account-email-actions .compact {
	padding: 4px 12px;
	font-size: 0.8rem;
	line-height: 1;
}
.account-email-helper {
	font-size: 0.85rem;
	color: var(--muted);
}
.account-address-section {
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 12px;
	background: var(--surface);
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.account-address-summary {
	font-size: 13px;
	color: var(--muted);
	min-height: 20px;
	white-space: pre-line;
}
.account-address-edit {
	align-self: flex-start;
	font-size: 12px;
	padding: 4px 12px;
	letter-spacing: 0.01em;
}
.account-email-form {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 4px;
}
.account-email-form.account-hidden {
	display: none;
}
.account-email-input {
	flex: 1;
	min-width: 200px;
	border-radius: 10px;
	border: 1px solid var(--border);
	background: #fff;
	box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
	padding: 8px 12px;
	font-size: 0.95rem;
}
.account-email-submit {
	font-size: 0.85rem;
	padding: 8px 12px;
}
.account-email-actions .ghost {
	padding: 6px 10px;
	font-size: 0.8rem;
	line-height: 1;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.04);
	color: var(--text);
	border-color: transparent;
	box-shadow: none;
}
.account-email-actions .ghost:hover,
.account-email-actions .ghost:focus-visible {
	background: rgba(0, 0, 0, 0.08);
}
.account-section-title {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	color: var(--muted);
	font-weight: 600;
}
.account-section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
}
.account-history-summary {
	border: 1px dashed var(--border);
	border-radius: 12px;
	padding: 8px 10px;
	background: var(--surface-2);
	display: grid;
	gap: 6px;
	font-size: 13px;
}
.account-history-summary-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
.account-history-summary-label {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--muted);
	font-weight: 600;
}
.account-history-summary-value {
	font-weight: 600;
	color: var(--text);
	text-align: right;
}
.account-keys-list {
	border: 1px dashed var(--border);
	border-radius: 12px;
	background: var(--surface-2);
	padding: 8px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.account-keys-items {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.account-keys-item {
	border: 1px solid var(--border);
	border-radius: 10px;
	background: var(--surface);
	padding: 8px 10px;
	display: grid;
	gap: 6px;
}
.account-keys-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	font-size: 12px;
}
.account-keys-status {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 600;
	color: var(--muted);
}
.account-keys-details {
	font-size: 11px;
	color: var(--muted);
}
.account-audit-controls {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}
.account-audit-modal {
	width: min(1100px, 94vw);
	max-height: min(86vh, 900px);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
.account-audit-modal-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}
.account-audit-modal-subtitle {
	font-size: 12px;
	color: var(--muted);
	margin: 4px 0 0;
}
.account-audit-modal-body.modal-body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding-top: 4px;
}
.account-audit-overlay-controls {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 2px;
}
.account-audit-overlay-controls-title {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-weight: 600;
	color: var(--muted);
}
.account-audit-overlay-actions {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}
.account-audit-filter-label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--muted);
	font-weight: 600;
}
.account-audit-filter {
	min-width: 190px;
	width: min(280px, 100%);
	padding: 6px 10px;
	border-radius: 10px;
	border: 1px solid var(--border);
	background: var(--surface);
	color: var(--text);
	font-size: 13px;
}
.account-audit-list {
	border: 1px solid var(--border);
	border-radius: 14px;
	background: var(--surface);
	padding: 8px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	max-height: min(56vh, 480px);
	overflow: auto;
}
.account-audit-empty {
	font-size: 13px;
	color: var(--muted);
}
.account-audit-row {
	border: 1px solid var(--border);
	border-radius: 10px;
	background: var(--surface);
	padding: 8px 10px;
	display: grid;
	gap: 4px;
}
.account-audit-row-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}
.account-audit-row-event {
	font-size: 12px;
	font-weight: 600;
	color: var(--text);
}
.account-audit-row-date {
	font-size: 11px;
	color: var(--muted);
	white-space: nowrap;
}
.account-audit-row-meta {
	font-size: 11px;
	color: var(--muted);
}
.account-audit-row-meta:empty {
	display: none;
}
.account-audit-load-more-row {
	margin-top: 6px;
	padding-top: 8px;
	border-top: 1px solid rgba(0, 0, 0, 0.06);
	display: flex;
	justify-content: center;
}
.account-audit-load-more-row .account-audit-load-more {
	width: 100%;
	border-radius: 10px;
	text-align: center;
}
.org-summary {
	border: 1px dashed var(--border);
	border-radius: 12px;
	padding: 10px;
	background: var(--surface-2);
	display: flex;
	align-items: center;
	gap: 12px;
}
.org-summary-logo {
	width: 32px;
	height: 32px;
	border-radius: 8px;
	object-fit: contain;
	padding: 3px;
	box-sizing: border-box;
	border: none;
	background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.org-summary-name {
	font-weight: 600;
	color: var(--text);
	word-break: break-word;
}
.org-summary-name.is-empty {
	color: var(--muted);
	font-weight: 500;
}
.account-danger-zone {
	border-color: #dc3545;
	border: 1px solid #f8d7da;
	background-color: #fff5f7;
}
.account-danger-description {
	color: #721c24;
	font-size: 14px;
	margin: 0;
}
.account-danger-action {
	color: #dc3545;
	font-weight: 600;
}
.account-danger-action:hover {
	color: #c82333;
	text-decoration: underline;
}
.account-danger-details {
	border: none;
	padding: 0;
	margin: 0;
}
.account-danger-summary {
	cursor: pointer;
	list-style: none;
	padding: 12px 16px;
	margin: -12px -16px 0 -16px;
	border-radius: 4px 4px 0 0;
	font-weight: 600;
	font-size: 14px;
	color: #721c24;
	background-color: rgba(220, 53, 69, 0.05);
	user-select: none;
	transition: background-color 0.2s ease;
}
.account-danger-summary:hover {
	background-color: rgba(220, 53, 69, 0.1);
}
.account-danger-summary::before {
	content: '▶ ';
	display: inline-block;
	margin-right: 8px;
	transition: transform 0.2s ease;
}
.account-danger-details[open] > .account-danger-summary::before {
	transform: rotate(90deg);
}
.account-danger-content {
	padding: 12px 16px;
	margin-top: 0;
	border-top: 1px solid #f8d7da;
}
.account-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}
.account-full {
	grid-column: span 2;
}
.account-field {
	display: flex;
	flex-direction: column;
	gap: 3px;
}
.account-field label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--muted);
	font-weight: 600;
}
.account-field label.accent-button {
	text-transform: none;
	color: #fff;
	letter-spacing: 0.05em;
}
.account-field input,
.account-field select {
	padding: 8px 10px;
	border-radius: 10px;
	border: 1px solid var(--border);
	background: var(--surface);
	font-size: 13px;
	color: var(--text);
}
.account-notifications-section {
	gap: 10px;
}
.account-notifications-row {
	display: flex;
	flex-direction: column;
	gap: 6px;
	align-items: flex-start;
}
.account-notifications-label {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-weight: 500;
	color: var(--text);
}
.account-notifications-label input {
	cursor: pointer;
}
.account-notifications-hint {
	font-size: 0.85rem;
	color: var(--muted);
	margin-left: 24px;
	line-height: 1.4;
}
.seat-manager {
	margin-top: 12px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.seat-summary-row {
	display: flex;
	align-items: center;
	gap: 12px;
}
.seat-summary {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, max-content));
	gap: 10px;
	width: fit-content;
}
.seat-tile {
	border: 1px solid var(--border);
	border-radius: 12px;
	background: var(--surface);
	padding: 10px 12px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.seat-tile-label {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--muted);
	font-weight: 600;
}
.seat-tile-value {
	font-size: 18px;
	font-weight: 700;
}
.seat-tile-next {
	font-size: 12px;
	color: var(--muted);
}
.seat-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-left: auto;
}
.seat-note {
	font-size: 12px;
	color: var(--muted);
}
.plan-section {
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(211, 219, 231, 0.96));
	border-color: rgba(31, 79, 153, 0.25);
	box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}
.plan-summary {
	display: flex;
	align-items: stretch;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 10px 12px;
}
.plan-summary-main {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.plan-summary-meta {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: space-between;
	align-self: stretch;
	text-align: left;
	gap: 4px;
}
.plan-summary-meta .plan-details {
	color: var(--text);
	font-weight: 600;
}
#plan-current-dates {
	white-space: pre-line;
}
.plan-metrics {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}
.plan-metric {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 10px 12px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-height: 58px;
}
.plan-metric-label {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.16em;
	color: var(--muted);
	font-weight: 600;
}
.plan-metric .plan-details {
	color: var(--text);
	font-weight: 600;
}
.plan-name {
	font-size: 16px;
	font-weight: 700;
}
.plan-status {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--muted);
	font-weight: 600;
}
.plan-status.is-canceled {
	color: #9e3b2f;
}
.plan-status.is-error {
	color: #9e3b2f;
}
.plan-details {
	font-size: 13px;
	color: var(--muted);
}
.plan-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}
.plan-payment-actions {
	margin-top: 4px;
}
.plan-payment-link {
	border: none;
	background: none;
	color: var(--accent);
	font-weight: 600;
	font-size: 12px;
	padding: 0;
	margin: 0;
	text-decoration: underline;
	cursor: pointer;
}
.plan-payment-link.is-attention {
	color: #9e3b2f;
}
.plan-payment-link:focus-visible {
	outline: 2px solid rgba(21, 153, 102, 0.8);
	outline-offset: 3px;
}
.plan-section .seat-manager {
	background: rgba(255, 255, 255, 0.85);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 10px;
}
.plan-section .seat-summary-row {
	flex-wrap: wrap;
}
.plan-section .seat-actions button.ghost {
	background: var(--surface-2);
	border: 1px solid var(--border);
}
.plan-section .seat-actions button.ghost:hover {
	background: #e8ded0;
}
.plan-cancel {
	border: 1px dashed var(--border);
	border-radius: 12px;
	padding: 6px 8px;
	background: transparent;
}
.plan-cancel summary {
	list-style: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0.12em;
}
.plan-cancel summary::-webkit-details-marker {
	display: none;
}
.plan-cancel summary::after {
	content: '+';
	margin-left: auto;
	color: var(--muted);
}
.plan-cancel[open] summary::after {
	content: '-';
}
.plan-cancel-body {
	margin-top: 8px;
	display: flex;
	flex-direction: column;
}
.plan-cancel-warning {
	font-size: 12px;
	color: var(--muted);
	margin: 0;
}
.plan-note {
	font-size: 12px;
	color: var(--muted);
	margin: 0;
}
.plan-change-note {
	font-size: 12px;
	color: var(--muted);
	margin: 8px 0 0;
	display: none;
}
.billing-history-section {
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 10px;
	background: var(--surface);
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.billing-history-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
}
.billing-history-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}
.billing-history-description {
	font-size: 12px;
	color: var(--muted);
}
.billing-history-controls {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}
.billing-history-link {
	border: none;
	background: none;
	color: var(--accent);
	padding: 4px 12px;
	font-size: 12px;
	text-decoration: underline;
	cursor: pointer;
}
.billing-history-link.text-link {
	padding: 0;
	font-weight: 600;
}
.billing-history-link:hover,
.billing-history-link:focus-visible {
	text-decoration: none;
}
.billing-history-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.billing-history-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 6px 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.billing-history-row:last-child {
	border-bottom: none;
}
.billing-history-main {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.billing-history-label {
	font-weight: 600;
	color: var(--text);
}
.billing-history-detail {
	font-size: 12px;
	color: var(--muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.billing-history-row-actions {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}
.billing-history-invoice-button {
	padding: 4px 10px;
	font-size: 11px;
	border-radius: 999px;
	white-space: nowrap;
}
.billing-history-meta {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
	white-space: nowrap;
}
.billing-history-amount {
	font-weight: 600;
}
.billing-history-date {
	font-size: 11px;
	color: var(--muted);
}
.billing-history-empty {
	font-size: 13px;
	color: var(--muted);
	text-align: center;
	padding: 12px 0;
	width: 100%;
}
.billing-history-refresh {
	padding: 4px 12px;
	font-size: 12px;
}
.billing-history-modal-subtitle {
	font-size: 12px;
	color: var(--muted);
	margin: 4px 0 0;
}
.billing-history-highlight {
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 10px 12px;
	background: var(--surface);
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.billing-history-highlight-heading {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-weight: 600;
	color: var(--muted);
}
.billing-history-highlight-amount {
	font-size: 18px;
	font-weight: 700;
}
.billing-history-highlight-label {
	font-weight: 600;
}
.billing-history-highlight-meta {
	font-size: 12px;
	color: var(--muted);
}
.billing-history-highlight-date {
	font-size: 11px;
	color: var(--muted);
}
.billing-history-highlight-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 6px;
}
.billing-history-highlight-empty {
	font-size: 13px;
	color: var(--muted);
}
.billing-history-modal-body {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding-top: 4px;
}
.billing-history-overlay-controls {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 2px;
}
.billing-history-overlay-controls-title {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-weight: 600;
	color: var(--muted);
}
.billing-history-overlay-list-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 12px;
	padding: 0 12px;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-weight: 600;
	color: var(--muted);
}
.billing-history-overlay-list-header-meta {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
	white-space: nowrap;
}
.billing-history-overlay-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
	border: 1px solid var(--border);
	border-radius: 14px;
	background: var(--surface);
	padding: 6px 12px;
	max-height: 360px;
	overflow-y: auto;
}
.billing-history-overlay-list-events {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.billing-history-overlay-load-more {
	padding: 6px 14px;
	font-size: 12px;
}
.billing-history-overlay-load-more-row {
	margin-top: 6px;
	padding-top: 8px;
	border-top: 1px solid rgba(0, 0, 0, 0.06);
	display: flex;
	justify-content: center;
}
.billing-history-overlay-load-more-row .billing-history-overlay-load-more {
	width: 100%;
	border-radius: 10px;
	text-align: center;
}
.billing-history-overlay-actions {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}
@media (max-width: 480px) {
	.billing-history-controls {
		align-items: flex-start;
	}
}
@media (max-width: 640px) {
	.billing-history-overlay-list {
		max-height: 250px;
	}
	.billing-history-overlay-controls {
		flex-direction: column;
		align-items: stretch;
	}
	.billing-history-overlay-actions {
		flex-direction: column;
		align-items: stretch;
	}
	.billing-history-overlay-actions button {
		width: 100%;
		text-align: center;
	}
}
@media (max-width: 640px) {
	.account-audit-modal-body.modal-body {
		gap: 8px;
	}
	.account-audit-overlay-controls {
		flex-direction: column;
		align-items: stretch;
	}
	.account-audit-overlay-actions {
		flex-direction: column;
		align-items: stretch;
	}
	.account-audit-overlay-actions button {
		width: 100%;
		text-align: center;
	}
	.account-audit-controls {
		flex-direction: column;
		align-items: stretch;
	}
	.account-audit-filter {
		width: 100%;
		min-width: 0;
	}
	.account-audit-list {
		max-height: 250px;
	}
}
@media (max-width: 640px) {
	.billing-history-row {
		flex-direction: column;
		align-items: flex-start;
	}
	.billing-history-meta {
		align-items: flex-start;
	}
	.billing-history-row-actions {
		width: 100%;
	}
}
@media (max-width: 720px) {
	.plan-metrics {
		grid-template-columns: minmax(0, 1fr);
	}
	.plan-summary-meta {
		align-items: flex-start;
		text-align: left;
	}
}
.plan-change-modal {
	width: min(520px, 92vw);
}
#plan-change-overlay[data-plan-change-mode="payment-method"] .plan-change-cycle-field {
	display: none;
}
#plan-change-overlay[data-plan-change-mode="payment-method"] .plan-change-plan-field {
	display: none;
}
#plan-change-overlay[data-plan-change-mode="payment-method"] #plan-change-label {
	display: none;
}
.plan-change-form {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.plan-change-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.plan-change-cycle-field {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	column-gap: 10px;
	row-gap: 4px;
	align-items: center;
}
.plan-change-cycle-field .plan-change-label {
	grid-column: 1;
	grid-row: 1;
	margin: 0;
}
.plan-change-label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	color: var(--muted);
	font-weight: 600;
}
.plan-cycle-toggle {
	display: flex;
	gap: 6px;
	min-width: 0;
}
.plan-cycle-toggle-btn {
	flex: 1;
	border: 1px solid var(--border);
	border-radius: 999px;
	padding: 6px 10px;
	background: #fff;
	color: var(--text);
	font-weight: 700;
	font-size: 12px;
	line-height: 1.15;
	min-width: 0;
}
.plan-cycle-toggle-btn[aria-pressed="true"] {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}
.plan-cycle-note {
	grid-column: 1 / -1;
	font-size: 11px;
	line-height: 1.3;
	color: var(--muted);
}
.plan-change-options {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.plan-option {
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 10px 12px;
	background: #fff;
	display: flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
}
.plan-option:hover,
.plan-option:focus-within {
	border-color: rgba(0, 0, 0, 0.35);
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}
.plan-option input {
	accent-color: var(--brand);
}
.plan-option-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}
.plan-option-description {
	font-size: 12px;
	color: var(--muted);
}
.plan-option-name {
	font-weight: 600;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	min-width: 0;
}
.plan-option-status {
	font-size: 11px;
	font-weight: 600;
	color: var(--muted);
	letter-spacing: 0.1em;
	text-transform: uppercase;
}
.plan-option-status.is-renewal-target {
	color: var(--accent);
}
.plan-option-price {
	margin-left: auto;
	font-weight: 600;
	color: var(--text);
	white-space: nowrap;
}
.plan-change-summary {
	background: #fff;
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 10px 12px;
	font-size: 12px;
	color: var(--muted);
	line-height: 1.4;
	white-space: pre-line;
}
.plan-change-billing {
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 10px 12px;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 8px 12px;
	align-items: center;
	font-size: 13px;
	color: var(--text);
}
.plan-address-section {
	border: 1px solid var(--border);
	border-radius: 12px;
	background: var(--surface);
	padding: 8px 10px;
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 4px 10px;
	align-items: center;
}
.plan-address-section.is-required {
	border-color: rgba(158, 59, 47, 0.32);
	background: #fff7f5;
	box-shadow: inset 0 0 0 1px rgba(158, 59, 47, 0.06);
}
#account-billing-address-section {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
#account-billing-address-summary {
	align-self: stretch;
	text-align: left;
}
#account-billing-address-section.account-hidden {
	display: none;
}
.plan-address-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
}
.plan-address-summary {
	font-weight: 600;
	color: var(--text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	grid-column: 1 / 2;
	min-width: 0;
	line-height: 1.25;
}
.plan-address-summary.is-missing {
	color: #9e3b2f;
}
.plan-address-edit {
	justify-self: end;
	align-self: center;
	font-size: 11px;
	padding: 5px 10px;
	font-weight: 600;
	letter-spacing: 0.02em;
	border-radius: 10px;
	border: none;
	background: var(--accent);
	color: #fff;
	box-shadow: 0 6px 14px rgba(15, 23, 42, 0.22);
	transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.plan-address-edit:hover {
	background: #1b4585;
	transform: translateY(-1px);
	box-shadow: 0 8px 16px rgba(15, 23, 42, 0.28);
}
.plan-address-edit:focus-visible {
	outline: 2px solid rgba(255, 255, 255, 0.8);
	outline-offset: 3px;
}
.plan-address-link {
	background: none;
	border: none;
	color: var(--accent);
	font-weight: 600;
	text-decoration: underline;
	padding: 0;
	margin: 0;
	cursor: pointer;
	height: auto;
	font-size: 12px;
}
.plan-address-link:hover {
	background: transparent;
	color: var(--accent);
	text-decoration-color: rgba(31, 79, 153, 0.25);
}
.plan-address-link:focus-visible {
	outline: 2px solid rgba(31, 79, 153, 0.25);
	outline-offset: 2px;
}
.plan-address-note {
	font-size: 11px;
	color: var(--muted);
	margin: 0;
	line-height: 1.3;
	grid-column: 1 / -1;
}
.plan-address-note.is-required {
	color: #9e3b2f;
	font-weight: 600;
}
.plan-change-field-seats {
	padding-bottom: 2px;
}
.plan-seat-note {
	font-size: 12px;
	color: var(--muted);
	line-height: 1.4;
}
.plan-seat-total {
	display: flex;
	align-items: center;
	gap: 6px;
	min-height: 20px;
	font-size: 13px;
	font-weight: 600;
	color: var(--accent);
	letter-spacing: 0.01em;
}
.plan-card-status {
	font-weight: 600;
}
.plan-card-status.is-required {
	color: #9e3b2f;
}
.plan-card-actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
}
.plan-card-hidden {
	display: none !important;
}
.plan-card-form {
	display: flex;
	flex-direction: column;
	gap: 6px;
	grid-column: 1 / -1;
}
.plan-card-form-hidden {
	display: none;
}
.plan-card-element {
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 10px;
	background: #fff;
}
.plan-card-error {
	color: #9e3b2f;
	font-size: 12px;
	min-height: 18px;
}
.plan-card-note {
	font-size: 11px;
	color: var(--muted);
}
.welcome-modal {
	width: min(540px, 92vw);
}
.welcome-modal h2 {
	margin: 0 0 6px;
	font-size: 22px;
}
.welcome-modal p {
	margin: 0;
	color: var(--muted);
	line-height: 1.5;
}
.welcome-list {
	margin: 12px 0;
	padding-left: 18px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	color: var(--muted);
	font-size: 13px;
	line-height: 1.5;
}
.welcome-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	justify-content: flex-end;
	margin-top: 16px;
}
.users-modal {
	width: min(960px, 96vw);
	max-width: 960px;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
.users-body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
	min-height: 0;
	overflow: hidden;
}
.seat-confirm-modal {
	width: min(540px, 92vw);
	max-width: 540px;
	transform: translateY(10px) scale(0.98);
	transition: transform 0.2s ease;
}
.modal-overlay.show .seat-confirm-modal {
	transform: translateY(0) scale(1);
}
.seat-confirm-header {
	background: linear-gradient(135deg, rgba(31, 79, 153, 0.12), rgba(14, 165, 163, 0.12));
	border-bottom: 1px solid var(--border);
	padding-bottom: 12px;
}
.seat-confirm-eyebrow {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.18em;
	font-weight: 600;
	color: var(--muted);
}
.seat-confirm-header h2 {
	margin: 6px 0 6px;
}
.seat-confirm-header p {
	margin: 0;
	color: var(--muted);
	font-size: 13px;
	line-height: 1.5;
}
.seat-confirm-body {
	gap: 14px;
}
.seat-confirm-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 10px;
}
.seat-confirm-tile {
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 10px 12px;
	background: #fff;
}
.seat-confirm-tile.is-highlight {
	border-color: rgba(31, 79, 153, 0.35);
	background: rgba(31, 79, 153, 0.08);
	box-shadow: 0 10px 20px rgba(31, 79, 153, 0.12);
}
.seat-confirm-label {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--muted);
	font-weight: 600;
	margin-bottom: 4px;
}
.seat-confirm-value {
	font-size: 16px;
	font-weight: 700;
	color: var(--text);
}
.seat-confirm-bill {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 12px;
	border: 1px solid var(--border);
	border-radius: 14px;
	background: var(--surface-2);
}
.seat-confirm-note {
	font-size: 12px;
	color: var(--muted);
	margin: 0;
}
.seat-confirm-meta {
	font-size: 12px;
	color: var(--muted);
	margin: 0;
}
.users-seat-section {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	align-items: stretch;
}
.users-seat-panel {
	border: 1px solid var(--border);
	border-radius: 18px;
	padding: 14px;
	background: var(--surface);
	box-shadow: var(--shadow-soft);
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
}
.users-seat-panel-body {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 12px;
	align-items: start;
}
.users-seat-item {
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 10px 12px;
	background: #fff;
}
.users-seat-item.is-primary {
	border-color: rgba(31, 79, 153, 0.35);
	background: rgba(31, 79, 153, 0.08);
	box-shadow: 0 8px 18px rgba(31, 79, 153, 0.12);
}
.users-seat-label {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--muted);
	font-weight: 600;
	margin-bottom: 4px;
}
.users-seat-value {
	font-size: 14px;
	font-weight: 600;
	color: var(--text);
}
.users-seat-adjust {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 10px 12px;
	border: 1px solid rgba(31, 79, 153, 0.18);
	border-radius: 14px;
	background: var(--surface-2);
}
.users-seat-panel-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
}
.users-seat-panel-title {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--accent);
}
.users-seat-panel-subtitle {
	font-size: 12px;
	color: var(--muted);
}
.users-seat-adjust label {
	font-size: 12px;
	font-weight: 600;
	margin-bottom: 0;
}
.users-seat-current-value {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
	line-height: 1.3;
	margin: 0;
}
.users-seat-pill {
	display: inline-flex;
	align-items: center;
	padding: 2px 10px;
	border-radius: 999px;
	border: 1px solid rgba(15, 23, 42, 0.12);
	background: rgba(255, 255, 255, 0.8);
	font-size: 11px;
	font-weight: 600;
	color: var(--text);
}
.users-seat-pill.is-muted {
	color: var(--muted);
	background: rgba(255, 255, 255, 0.55);
}
.users-seat-pill.is-accent {
	border-color: rgba(31, 79, 153, 0.35);
	background: rgba(31, 79, 153, 0.1);
	color: var(--accent);
}
.users-seat-adjust-row {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}
.users-seat-stepper {
	flex: 0 0 auto;
	display: inline-grid;
	grid-template-columns: 32px minmax(4ch, 4.5ch) 32px;
	align-items: stretch;
	border: 1px solid var(--border);
	border-radius: 12px;
	background: var(--surface);
	overflow: hidden;
	width: max-content;
}
.users-seat-step {
	border: none;
	background: transparent;
	color: var(--text);
	font-size: 18px;
	font-weight: 600;
	width: 32px;
	height: 34px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}
.users-seat-step:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}
.users-seat-stepper input {
	border: none;
	background: transparent;
	text-align: center;
	font-size: 15px;
	padding: 0 6px;
	height: 34px;
	color: var(--text);
	width: 100%;
	min-width: 6ch;
}
#users-seat-input {
	margin: 0;
	width: 4ch;
	-moz-appearance: textfield;
}
#users-seat-input::-webkit-outer-spin-button,
#users-seat-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
#plan-change-seat-input {
	margin: 0;
	-moz-appearance: textfield;
	appearance: textfield;
}

#plan-change-seat-input::-webkit-outer-spin-button,
#plan-change-seat-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
#users-seat-update {
	min-width: 160px;
	padding: 8px 14px;
	flex: 0 0 auto;
}
#users-seat-cancel {
	min-width: 200px;
	padding: 8px 14px;
	flex: 0 0 auto;
	border: 1px solid rgba(14, 165, 163, 0.35);
	border-radius: 12px;
	color: var(--accent-2);
	background: rgba(14, 165, 163, 0.08);
}
#users-seat-cancel:hover {
	background: rgba(14, 165, 163, 0.14);
}
.users-seat-adjust-note {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	font-size: 11px;
	color: var(--muted);
	margin: 0;
}
.users-seat-adjust-note span {
	padding: 2px 8px;
	border-radius: 999px;
	border: 1px solid rgba(31, 79, 153, 0.2);
	background: rgba(31, 79, 153, 0.1);
	color: var(--accent);
}
.users-seat-difference {
	font-size: 12px;
	color: var(--muted);
	margin: 0;
	min-height: 18px;
	padding: 6px 10px;
	border-radius: 12px;
	border: 1px solid transparent;
	background: transparent;
}
.users-seat-difference[data-tone="increase"] {
	color: var(--accent);
	background: rgba(31, 79, 153, 0.08);
	border-color: rgba(31, 79, 153, 0.25);
}
.users-seat-difference[data-tone="decrease"] {
	color: var(--accent-2);
	background: rgba(14, 165, 163, 0.1);
	border-color: rgba(14, 165, 163, 0.25);
}
.users-seat-difference[data-tone="neutral"] {
	color: var(--muted);
	background: rgba(255, 255, 255, 0.55);
	border-color: rgba(15, 23, 42, 0.08);
}
.users-roster-panel {
	border: 1px solid var(--border);
	border-radius: 18px;
	background: var(--surface);
	box-shadow: var(--shadow-soft);
	padding: 10px 12px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-height: 0;
	overflow: hidden;
}
.users-roster-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}
.users-roster-heading {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--muted);
	font-weight: 700;
	white-space: nowrap;
}
.users-invite-panel {
	padding: 12px 14px;
	border: 1px solid rgba(15, 23, 42, 0.08);
	border-radius: 14px;
	background: #fff;
	flex: 1 1 320px;
	max-width: 420px;
	box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}
.users-invite-form {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.users-invite-row {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: nowrap;
}
.users-invite-row input {
	flex: 1;
	min-width: 0;
	border-radius: 999px;
	padding: 8px 14px;
	border: 1px solid var(--border);
	background: var(--surface-2);
}
.users-invite-row button {
	padding: 8px 18px;
	border-radius: 999px;
	font-size: 14px;
	white-space: nowrap;
}
.users-search {
	flex: 1 1 240px;
	min-width: 200px;
	max-width: 340px;
	width: 100%;
	margin-left: auto;
}
.users-search input {
	width: 100%;
	border-radius: 999px;
	padding: 8px 14px;
	border: 1px solid var(--border);
	background: var(--surface);
	box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.users-search input:focus {
	border-color: var(--accent);
	box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
	outline: none;
}
@media (max-width: 720px) {
	.users-search {
		max-width: none;
	}
}
.user-tier-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 12px;
	overflow: hidden;
}
.users-roster-panel .user-tier-grid {
	overflow: visible;
}
.user-tier-column {
	border: 1px solid var(--border);
	border-radius: 16px;
	background: var(--surface-2);
	padding: 10px 12px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-height: 220px;
	min-width: 0;
	overflow: hidden;
}
.user-tier-header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 6px;
}
.user-tier-title {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.16em;
	color: var(--muted);
	font-weight: 600;
}
.user-tier-count {
	font-size: 12px;
	color: var(--muted);
}
.user-tier-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1;
	min-height: 0;
	max-height: min(420px, 60vh);
	overflow-y: auto;
	padding: 4px 0;
}
.user-card {
	border: 1px solid var(--border);
	border-radius: 14px;
	background: var(--surface);
	padding: 10px 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
	width: 100%;
	min-width: 0;
}
.user-card.invite {
	border-style: dashed;
	background: #f2f6fb;
	box-shadow: none;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 8px 12px;
}
.user-card-top {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	align-items: center;
}
.user-card.invite .user-card-top {
	flex: 1;
	margin-right: 8px;
	flex-wrap: nowrap;
}
.user-email {
	font-size: 13px;
	font-weight: 600;
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.user-tags {
	display: flex;
	flex-wrap: nowrap;
	gap: 6px;
	justify-content: flex-end;
	align-items: center;
}
.user-tag {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	padding: 3px 6px;
	border-radius: 999px;
	border: 1px solid var(--border);
	background: var(--surface-2);
	color: var(--muted);
}
.user-tag.admin {
	border-color: rgba(31, 79, 153, 0.4);
	color: var(--accent);
	background: rgba(31, 79, 153, 0.08);
}
.user-tag.pending {
	border-style: dashed;
}
.user-tag.invite {
	border-color: rgba(31, 79, 153, 0.35);
	color: #1f4f99;
	background: rgba(31, 79, 153, 0.06);
}
.invite-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: nowrap;
}
.user-card-actions {
	display: flex;
	flex-wrap: nowrap;
	gap: 6px;
	align-items: center;
	justify-content: flex-end;
}
.user-card-actions button {
	padding: 3px 8px;
	font-size: 11px;
	border-radius: 999px;
	white-space: nowrap;
}
.invite-icon-button {
	width: 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	border: 1px solid rgba(15, 23, 42, 0.2);
	background: #fff;
}
.invite-icon-button img {
	width: 16px;
	height: 16px;
}
.admin-toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	color: var(--muted);
}
.admin-toggle input {
	accent-color: var(--accent);
}
.user-empty {
	border: 1px dashed var(--border);
	border-radius: 10px;
	background: var(--surface);
	padding: 8px;
	font-size: 12px;
	color: var(--muted);
	text-align: center;
}
.users-actions {
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
}
.users-note {
	margin-right: auto;
	font-size: 12px;
	color: var(--muted);
}
#history-open {
	background: var(--accent);
	color: #fff;
	border-color: var(--accent);
}
#history-open:hover {
	background: #1b4585;
}
.crosshair-cursor-wrapper {
	position: fixed;
	top: 0;
	left: 0;
	width: 16px;
	height: 16px;
	display: none;
	pointer-events: none; /* clicks must pass through to the canvas */
	z-index: 9999;
	will-change: transform;
}
.crosshair-cursor-wrapper img {
	width: 16px;
	height: 16px;
	display: block;
	filter: none;
}

/* Folder system styles */
.history-modal-body {
	display: flex;
	flex-direction: column;
}
.history-modal-body.has-folders {
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: 0;
}
.history-folders-nav {
	border-right: 1px solid var(--border);
	display: flex;
	flex-direction: column;
	min-height: 300px;
	background: var(--surface-2);
}
.history-folders-header {
	padding: 12px;
	border-bottom: 1px solid var(--border);
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-weight: 600;
	font-size: 13px;
}
.history-folder-list {
	list-style: none;
	margin: 0;
	padding: 0;
	overflow-y: auto;
	flex: 1;
}
.history-folder-item {
	padding: 10px 12px;
	cursor: pointer;
	border-left: 3px solid transparent;
	transition: background-color 0.2s, border-color 0.2s;
	font-size: 13px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	color: var(--muted);
}
.history-folder-item:hover {
	background: var(--surface);
	color: var(--text);
}
.history-folder-item.is-selected {
	border-left-color: var(--accent);
	background: var(--surface);
	color: var(--accent);
	font-weight: 500;
}
.history-folder-count {
	font-size: 11px;
	background: var(--border);
	color: var(--muted);
	padding: 2px 6px;
	border-radius: 4px;
	margin-left: 8px;
}
.history-docs-panel {
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
.history-list {
	flex: 1;
	overflow-y: auto;
	padding: 12px;
}
.history-item-folder-btn {
	font-size: 11px;
	padding: 4px 8px;
	margin-top: 4px;
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.2s;
	color: var(--text);
}
.history-item-folder-btn:hover {
	background: var(--border);
}

/* Folders management overlay */
.folders-modal {
	width: 420px;
	max-height: 600px;
}
.folders-modal-body {
	display: flex;
	flex-direction: column;
	gap: 16px;
	overflow-y: auto;
	max-height: calc(600px - 100px);
}
.folders-section {
	border-top: 1px solid var(--border);
	padding-top: 12px;
}
.folders-section h3 {
	margin: 0 0 12px 0;
	font-size: 14px;
	font-weight: 600;
}
.folders-members-list {
	list-style: none;
	margin: 0 0 12px 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-height: 200px;
	overflow-y: auto;
}
.folders-member-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 10px;
	background: var(--surface-2);
	border-radius: 4px;
	font-size: 13px;
}
.folders-member-email {
	flex: 1;
	font-weight: 500;
	color: var(--text);
}
.folders-member-granted {
	font-size: 11px;
	color: var(--muted);
	margin: 0 8px;
}
.folders-member-remove-btn {
	padding: 4px 8px;
	font-size: 12px;
	background: transparent;
	border: 1px solid var(--border);
	border-radius: 3px;
	cursor: pointer;
	color: var(--muted);
	transition: color 0.2s, border-color 0.2s;
}
.folders-member-remove-btn:hover {
	color: #d32f2f;
	border-color: #d32f2f;
}
.folders-member-add {
	display: flex;
	gap: 8px;
}
.folders-member-add input {
	flex: 1;
	padding: 6px 8px;
	border: 1px solid var(--border);
	border-radius: 4px;
	font-size: 13px;
}
.folders-danger-section {
	border-top: 2px solid #d32f2f;
	color: var(--muted);
	font-size: 12px;
}
.folders-danger-section p {
	margin: 0 0 8px 0;
}
.danger {
	background: #d32f2f;
	color: white;
	border-color: #d32f2f;
}
.danger:hover {
	background: #b71c1c;
	border-color: #b71c1c;
}


/* Spinner animation */
@keyframes spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

/* Tab badges */
.admin-tab-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	margin-left: 6px;
	background: #ef4444;
	color: white;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 700;
}

/* Recently viewed dropdown */
.admin-recently-viewed {
	position: relative;
}

.admin-recent-toggle {
	padding: 4px 8px;
	font-size: 11px;
	background: transparent;
	border: 1px solid var(--border);
	border-radius: 4px;
	cursor: pointer;
	color: var(--muted);
	transition: background 0.2s, border-color 0.2s;
}

.admin-recent-toggle:hover {
	background: rgba(0, 0, 0, 0.02);
	border-color: var(--accent);
}

.admin-recent-dropdown {
	position: absolute;
	top: 100%;
	right: 0;
	margin-top: 4px;
	background: white;
	border: 1px solid var(--border);
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
	min-width: 200px;
	max-height: 300px;
	overflow-y: auto;
	z-index: 1000;
	display: none;
}

.admin-recent-dropdown.is-open {
	display: flex;
	flex-direction: column;
}

.admin-recent-item {
	padding: 8px 12px;
	font-size: 12px;
	color: var(--text);
	border-bottom: 1px solid rgba(0, 0, 0, 0.04);
	cursor: pointer;
	transition: background 0.15s;
}

.admin-recent-item:hover {
	background: rgba(31, 79, 153, 0.08);
}

.admin-recent-item:last-child {
	border-bottom: none;
}

/* Hotkey help overlay */
.admin-hotkey-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10000;
}

.admin-hotkey-modal {
	background: white;
	border-radius: 12px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
	max-width: 500px;
	width: 90vw;
	max-height: 80vh;
	overflow-y: auto;
}

.admin-hotkey-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px;
	border-bottom: 1px solid var(--border);
}

.admin-hotkey-header h2 {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: var(--text);
}

.admin-hotkey-close {
	background: transparent;
	border: none;
	font-size: 24px;
	cursor: pointer;
	color: var(--muted);
	padding: 0;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	transition: background 0.2s;
}

.admin-hotkey-close:hover {
	background: rgba(0, 0, 0, 0.05);
	color: var(--text);
}

.admin-hotkey-body {
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.admin-hotkey-section h3 {
	margin: 0 0 10px 0;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	font-weight: 700;
	color: var(--muted);
}

.admin-hotkey-row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 6px 0;
	font-size: 13px;
	color: var(--text);
}

.admin-hotkey-row kbd {
	background: #f3f4f6;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	padding: 4px 8px;
	font-family: monospace;
	font-size: 11px;
	font-weight: 600;
	color: #374151;
	min-width: 50px;
	text-align: center;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.admin-hotkey-row span {
	flex: 1;
	color: var(--muted);
}


/* Keyboard navigation */
.admin-account-card.is-keyboard-focused {
	outline: 3px solid var(--accent);
	outline-offset: -1px;
	box-shadow: 0 0 0 4px rgba(31, 79, 153, 0.1);
}

/* Sort controls */
.admin-sort-controls {
	display: flex;
	gap: 4px;
	align-items: center;
}

.admin-sort-btn {
	padding: 4px 8px;
	font-size: 11px;
	background: transparent;
	border: 1px solid var(--border);
	border-radius: 4px;
	cursor: pointer;
	color: var(--muted);
	transition: background 0.2s, border-color 0.2s, color 0.2s;
	position: relative;
}

.admin-sort-btn:hover {
	background: rgba(0, 0, 0, 0.02);
	border-color: var(--accent);
	color: var(--text);
}

.admin-sort-btn.is-active {
	background: rgba(31, 79, 153, 0.1);
	border-color: var(--accent);
	color: var(--accent);
	font-weight: 600;
}

.admin-sort-btn.is-active::after {
	content: attr(data-direction);
	font-size: 8px;
	margin-left: 4px;
}

.admin-sort-btn[data-direction="asc"]::after {
	content: "↑";
}

.admin-sort-btn[data-direction="desc"]::after {
	content: "↓";
}
.loading-overlay {
	z-index: 2147483647;
	pointer-events: auto;
}
.loading-overlay {
	z-index: 2147483647 !important;
	pointer-events: auto !important;
}

#plan-change-overlay.is-processing button,
#plan-change-overlay.is-processing input,
#plan-change-overlay.is-processing select,
#plan-change-overlay.is-processing textarea,
#plan-change-overlay.is-processing label,
#plan-change-overlay.is-processing a {
	pointer-events: none !important;
	cursor: progress !important;
}
/* Billing promo labels */
.plan-option .plan-option-price {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
	text-align: right;
}

.plan-option .plan-option-price-amount {
	display: block;
}

.plan-option .plan-option-promo {
	display: block;
	font-size: 11px;
	line-height: 1.2;
	font-weight: 600;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
