/* Coupon Rank Engine Portal CSS */
*,
*::before,
*::after {
	box-sizing: border-box;
}

:root {
	--cre-bg: #0b0f19;
	--cre-surface: #111827;
	--cre-surface-border: #1f2937;
	--cre-card-bg: rgba(17, 24, 39, 0.8);
	--cre-primary: #6366f1;
	--cre-primary-hover: #4f46e5;
	--cre-accent: #10b981;
	--cre-warning: #f59e0b;
	--cre-danger: #ef4444;
	--cre-text-main: #f9fafb;
	--cre-text-muted: #9ca3af;
	--cre-radius: 5px;
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: 85px;
	margin-top: 0 !important;
	overflow-x: clip;
	width: 100%;
	max-width: 100vw;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

body {
	margin: 0;
	padding: 0;
	font-family: 'Inter', system-ui, -apple-system, sans-serif;
	background-color: var(--cre-bg);
	color: var(--cre-text-main);
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	overflow-x: clip;
	width: 100%;
	max-width: 100vw;
}

.cre-container {
	width: 100%;
	max-width: 1140px;
	margin: 0 auto;
	padding: 0 20px;
	box-sizing: border-box;
}

/* Header */
.cre-navbar {
	background: rgba(17, 24, 39, 0.9);
	backdrop-filter: blur(4px);
	border-bottom: 1px solid var(--cre-surface-border);
	position: sticky;
	top: 0;
	z-index: 100;
}

.cre-navbar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 70px;
	position: relative;
}

.cre-nav-toggle {
	display: none;
	background: transparent;
	border: 1px solid var(--cre-surface-border);
	color: var(--cre-text-main);
	font-size: 1.25rem;
	padding: 6px 12px;
	border-radius: 8px;
	cursor: pointer;
	line-height: 1;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.cre-nav-toggle:hover {
	background: rgba(255, 255, 255, 0.05);
	border-color: var(--cre-text-muted);
}

.cre-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: var(--cre-text-main);
	font-weight: 700;
	font-size: 1.15rem;
}

.cre-brand-icon {
	font-size: 1.4rem;
}

.cre-badge-pro {
	background: linear-gradient(135deg, var(--cre-primary), #a855f7);
	color: #fff;
	font-size: 0.7rem;
	padding: 5px 10px;
	border-radius: 5px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.cre-nav-links {
	display: flex;
	align-items: center;
	gap: 20px;
}

.cre-nav-link {
	color: var(--cre-text-muted);
	text-decoration: none;
	font-weight: 500;
	transition: color 0.2s ease;
}

.cre-nav-link:hover,
.cre-nav-link.active {
	color: var(--cre-text-main);
}

.cre-user-pill {
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--cre-surface-border);
	padding: 4px 12px 4px 6px;
	border-radius: 20px;
	font-size: 0.85rem;
}

.cre-user-avatar {
	width: 24px;
	height: 24px;
	background: var(--cre-primary);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 0.75rem;
}

/* Buttons */
.cre-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 20px;
	border-radius: var(--cre-radius);
	font-weight: 600;
	font-size: 0.95rem;
	cursor: pointer;
	border: none;
	transition: all 0.2s ease;
	text-decoration: none;
}

.cre-btn-primary {
	background: var(--cre-primary);
	color: #fff;
}

.cre-btn-primary:hover {
	background: var(--cre-primary-hover);
	transform: translateY(-1px);
}

.cre-btn-primary-sm {
	padding: 8px 16px;
	font-size: 0.85rem;
	background: var(--cre-primary);
	color: #fff;
}

.cre-btn-outline-sm {
	padding: 8px 16px;
	font-size: 0.85rem;
	background: transparent;
	border: 1px solid var(--cre-surface-border);
	color: var(--cre-text-muted);
}

.cre-btn-outline-sm:hover {
	border-color: var(--cre-text-muted);
	color: var(--cre-text-main);
}

.cre-btn-secondary {
	background: var(--cre-surface-border);
	color: var(--cre-text-main);
}

.cre-btn-secondary:hover {
	background: #374151;
}

/* Main Content */
.cre-main-content {
	flex: 1;
	padding: 40px 0;
}

/* Auth Cards */
.cre-auth-wrapper {
	max-width: 440px;
	margin: 40px auto;
}

.cre-card {
	background: var(--cre-card-bg);
	border: 1px solid var(--cre-surface-border);
	border-radius: var(--cre-radius);
	padding: 20px;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.cre-auth-header {
	text-align: center;
	margin-bottom: 28px;
}

.cre-auth-header h1 {
	margin: 0 0 8px 0;
	font-size: 1.75rem;
	font-weight: 800;
}

.cre-auth-header p {
	margin: 0;
	color: var(--cre-text-muted);
	font-size: 0.9rem;
}

.cre-form-group {
	margin-bottom: 20px;
}

.cre-label {
	display: block;
	margin-bottom: 8px;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--cre-text-muted);
}

.cre-input {
	width: 100%;
	padding: 12px 16px;
	background: #0d1117;
	border: 1px solid var(--cre-surface-border);
	border-radius: 8px;
	color: var(--cre-text-main);
	font-size: 0.95rem;
	box-sizing: border-box;
	transition: border-color 0.2s ease;
}

.cre-input:focus {
	outline: none;
	border-color: var(--cre-primary);
}

.cre-alert {
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 0.85rem;
	margin-bottom: 20px;
	display: none;
}

.cre-alert-error {
	background: rgba(239, 68, 68, 0.15);
	border: 1px solid var(--cre-danger);
	color: #fca5a5;
}

.cre-alert-success {
	background: rgba(16, 185, 129, 0.15);
	border: 1px solid var(--cre-accent);
	color: #6ee7b7;
}

.cre-alert-info {
	background: rgba(99, 102, 241, 0.15);
	border: 1px solid #6366f1;
	color: #a5b4fc;
}

/* Dashboard UI */
.cre-dashboard-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 30px;
}

.cre-dashboard-title {
	margin: 0;
	font-size: 1.8rem;
	font-weight: 800;
}

.cre-dashboard-subtitle {
	color: var(--cre-text-muted);
	margin-top: 4px;
	font-size: 0.9rem;
}

.cre-grid-2 {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 24px;
}

@media (max-width: 850px) {
	.cre-grid-2 {
		grid-template-columns: 1fr;
	}
}

.cre-card-title {
	font-size: 1.1rem;
	font-weight: 700;
	margin: 0 0 16px 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

/* Meter / Usage Bar */
.cre-usage-wrapper {
	margin-top: 12px;
}

.cre-usage-labels {
	display: flex;
	justify-content: space-between;
	font-size: 0.85rem;
	margin-bottom: 8px;
}

.cre-usage-text {
	color: var(--cre-text-muted);
}

.cre-usage-pct {
	font-weight: 700;
	color: var(--cre-accent);
}

.cre-progress-bar {
	width: 100%;
	height: 10px;
	background: #1f2937;
	border-radius: 10px;
	overflow: hidden;
}

.cre-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, var(--cre-primary), #a855f7);
	width: 0%;
	transition: width 0.4s ease;
}

/* Key Snippet Box */
.cre-key-box {
	background: #0d1117;
	border: 1px solid var(--cre-surface-border);
	padding: 12px 16px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-family: monospace;
	font-size: 0.9rem;
	margin: 12px 0;
}

.cre-key-code {
	color: #a7f3d0;
	letter-spacing: 0.5px;
	word-break: break-all;
	overflow-wrap: anywhere;
	font-size: 0.85rem;
	display: block;
}

/* Responsive Footer */
.cre-footer {
	border-top: 1px solid var(--cre-surface-border);
	padding: 32px 0 28px 0;
	margin-top: auto;
	font-size: 0.875rem;
	color: var(--cre-text-muted);
	background: rgba(11, 15, 25, 0.95);
}

.cre-footer-inner {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.cre-footer-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
}

.cre-footer-brand {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	color: var(--cre-text-main);
	font-size: 0.95rem;
}

.cre-footer-tagline {
	color: var(--cre-text-muted);
	font-size: 0.85rem;
	opacity: 0.85;
}

.cre-footer-nav {
	display: flex;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
}

.cre-footer-link {
	color: var(--cre-text-muted);
	text-decoration: none;
	font-size: 0.875rem;
	transition: color 0.2s ease;
}

.cre-footer-link:hover {
	color: var(--cre-primary);
}

.cre-footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.06);
	padding-top: 18px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	font-size: 0.8rem;
	color: var(--cre-text-muted);
}

.cre-footer-status {
	display: flex;
	align-items: center;
	font-size: 0.8rem;
	color: #10b981;
	font-weight: 500;
}

@media (max-width: 768px) {
	.cre-footer {
		padding: 24px 0 28px 0;
	}
	.cre-footer-top {
		flex-direction: column;
		align-items: flex-start;
		gap: 14px;
	}
	.cre-footer-brand {
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
	}
	.cre-footer-nav {
		gap: 12px 18px;
		width: 100%;
	}
	.cre-footer-bottom {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}
}

/* Modals & Toasts */
.cre-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.75);
	backdrop-filter: blur(8px);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 1000;
}

.cre-modal-card {
	background: var(--cre-surface);
	border: 1px solid var(--cre-surface-border);
	border-radius: var(--cre-radius);
	padding: 28px;
	width: 100%;
	max-width: 480px;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
	position: relative;
	box-sizing: border-box;
}

.cre-modal-title {
	margin: 0 0 12px 0;
	font-size: 1.3rem;
	font-weight: 700;
	color: var(--cre-text-main);
}

.cre-modal-body {
	color: var(--cre-text-muted);
	font-size: 0.9rem;
	margin-bottom: 20px;
	line-height: 1.5;
}

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

/* Toast Container */
.cre-toast-container {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 1100;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.cre-toast {
	background: var(--cre-surface);
	border: 1px solid var(--cre-surface-border);
	border-left: 4px solid var(--cre-primary);
	padding: 12px 20px;
	border-radius: 8px;
	color: var(--cre-text-main);
	font-size: 0.9rem;
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	gap: 10px;
	animation: slideInRight 0.3s ease;
}

.cre-toast-success {
	border-left-color: var(--cre-accent);
}

.cre-toast-error {
	border-left-color: var(--cre-danger);
}

@keyframes slideInRight {
	from {
		transform: translateX(100%);
		opacity: 0;
	}

	to {
		transform: translateX(0);
		opacity: 1;
	}
}

/* SaaS Data Table Listing */
.cre-table-responsive {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border-radius: 8px;
	border: 1px solid var(--cre-surface-border);
	background: #0d1117;
}

.cre-table {
	width: 100%;
	border-collapse: collapse;
	text-align: left;
	font-size: 0.875rem;
}

.cre-table th {
	padding: 14px 16px;
	background: rgba(255, 255, 255, 0.03);
	color: var(--cre-text-muted);
	font-weight: 600;
	text-transform: uppercase;
	font-size: 0.725rem;
	letter-spacing: 0.5px;
	border-bottom: 1px solid var(--cre-surface-border);
	white-space: nowrap;
}

.cre-table td {
	padding: 14px 16px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.04);
	color: var(--cre-text-main);
	vertical-align: middle;
	white-space: nowrap;
}

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

.cre-table tbody tr:hover {
	background: rgba(255, 255, 255, 0.02);
}

.cre-table .cre-domain-col {
	font-weight: 600;
	color: var(--cre-text-main);
}

.cre-table .cre-actions-cell {
	display: flex;
	gap: 8px;
	align-items: center;
}

/* Mobile Responsiveness for Data Table & Dashboard Components */
@media (max-width: 768px) {
	.cre-grid-2 {
		grid-template-columns: 1fr;
	}

	.cre-dashboard-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
		margin-bottom: 24px;
	}

	.cre-dashboard-header>div {
		width: 100%;
	}

	.cre-dashboard-header .cre-btn {
		width: 100%;
		justify-content: center;
		box-sizing: border-box;
	}

	.cre-dashboard-title {
		font-size: 1.5rem;
	}

	.cre-card-title {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}

	.cre-table-responsive {
		border: none;
		background: transparent;
		overflow-x: visible;
	}

	.cre-table,
	.cre-table tbody,
	.cre-table tr,
	.cre-table td {
		display: block;
		width: 100%;
		box-sizing: border-box;
	}

	.cre-table thead {
		display: none;
	}

	.cre-table tr {
		background: rgba(15, 23, 42, 0.7);
		border: 1px solid var(--cre-surface-border);
		border-radius: 12px;
		margin-bottom: 16px;
		padding: 16px;
		box-sizing: border-box;
	}

	.cre-table td {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 6px;
		padding: 10px 0;
		border-bottom: 1px solid rgba(255, 255, 255, 0.06);
		word-break: break-word;
		white-space: normal;
		width: 100%;
		box-sizing: border-box;
	}

	.cre-table td:last-child {
		border-bottom: none;
		padding-bottom: 0;
	}

	.cre-table td::before {
		content: attr(data-label);
		font-weight: 700;
		font-size: 0.725rem;
		text-transform: uppercase;
		letter-spacing: 0.5px;
		color: var(--cre-text-muted);
	}

	.cre-table td[data-label="Monthly Quota"]>div {
		width: 100% !important;
		min-width: 100% !important;
		box-sizing: border-box;
	}

	.cre-table .cre-actions-cell {
		justify-content: flex-start;
		width: 100%;
		flex-wrap: wrap;
		gap: 10px;
		margin-top: 4px;
	}

	.cre-table .cre-actions-cell .cre-btn {
		flex: 1;
		min-width: 110px;
		text-align: center;
		justify-content: center;
		box-sizing: border-box;
	}
}

/* Dedicated Pricing Page Styling & Layout */
.cre-pricing-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 28px;
	max-width: 1050px;
	margin: 0 auto 60px auto;
	align-items: stretch;
}

.cre-pricing-card {
	padding: 32px 28px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	background: rgba(15, 23, 42, 0.6);
	backdrop-filter: blur(12px);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: var(--cre-radius);
	box-sizing: border-box;
	transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
	position: relative;
}

.cre-pricing-card:hover {
	transform: translateY(-4px);
	border-color: rgba(99, 102, 241, 0.5);
	box-shadow: 0 12px 30px -10px rgba(99, 102, 241, 0.3);
}

.cre-pricing-card-featured {
	border-color: var(--cre-accent);
	background: rgba(30, 41, 59, 0.75);
	backdrop-filter: blur(16px);
	box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.35);
}

.cre-pricing-badge {
	position: absolute;
	top: -14px;
	left: 50%;
	transform: translateX(-50%);
	background: linear-gradient(135deg, #6366f1, #8b5cf6);
	color: #fff;
	font-size: 0.75rem;
	padding: 4px 14px;
	border-radius: 12px;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	white-space: nowrap;
	box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.cre-pricing-btn {
	width: 100%;
	padding: 14px 20px;
	font-size: 0.95rem;
	font-weight: 700;
	box-sizing: border-box !important;
	text-decoration: none !important;
	text-align: center;
	margin-top: 24px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
	line-height: 1.4;
	transition: all 0.2s ease;
}

.cre-pricing-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

@media (max-width: 900px) {
	.cre-pricing-grid {
		grid-template-columns: 1fr;
		max-width: 480px;
		gap: 32px;
	}

	.cre-pricing-card {
		padding: 28px 20px;
	}
}

/* Header Mobile Breakpoint & Dropdown Styles */
@media (max-width: 768px) {
	.cre-nav-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}

	.cre-user-email {
		max-width: 120px;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		display: inline-block;
	}

	.cre-nav-links {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		width: 100%;
		box-sizing: border-box;
		background: rgba(17, 24, 39, 0.98);
		backdrop-filter: blur(20px);
		-webkit-backdrop-filter: blur(20px);
		border-bottom: 1px solid var(--cre-surface-border);
		box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.7);
		padding: 20px 24px;
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
		z-index: 999;
	}

	.cre-nav-links.open {
		display: flex;
	}

	.cre-nav-link {
		padding: 10px 14px;
		border-radius: 8px;
		width: 100%;
		box-sizing: border-box;
		font-size: 0.95rem;
	}

	.cre-nav-link:hover,
	.cre-nav-link.active {
		background: rgba(255, 255, 255, 0.05);
	}

	.cre-user-pill {
		margin: 6px 0;
		width: fit-content;
	}

	.cre-nav-links .cre-btn {
		width: 100%;
		justify-content: center;
		box-sizing: border-box;
	}
}

@media (max-width: 480px) {
	.cre-brand-text {
		font-size: 0.95rem;
	}
}

/* Clean Component Utilities for Portal Templates */
.cre-alert-topup-card {
	border-color: #10b981;
	margin-bottom: 24px;
	background: rgba(16, 185, 129, 0.1);
}

.cre-alert-topup-title {
	margin: 0 0 4px 0;
	color: #34d399;
}

.cre-alert-topup-text {
	margin: 0;
	font-size: 0.9rem;
	color: #e5e7eb;
}

.cre-alert-key-card {
	border-color: var(--cre-accent);
	margin-bottom: 24px;
}

.cre-alert-key-title {
	margin: 0 0 8px 0;
	color: #a7f3d0;
}

.cre-alert-key-text {
	margin: 0 0 12px 0;
	font-size: 0.9rem;
	color: var(--cre-text-muted);
}

.cre-alert-key-help {
	margin: 8px 0 0 0;
	font-size: 0.8rem;
	color: var(--cre-text-muted);
}

.cre-empty-state {
	text-align: center;
	padding: 40px 20px;
}

.cre-empty-icon {
	font-size: 2.5rem;
	margin-bottom: 12px;
}

.cre-empty-title {
	margin: 0 0 8px 0;
	color: var(--cre-text-main);
}

.cre-empty-text {
	margin: 0 0 20px 0;
	color: var(--cre-text-muted);
	font-size: 0.9rem;
}

.cre-table-actions-th {
	text-align: right;
}

.cre-domain-pending {
	color: var(--cre-text-muted);
}

.cre-status-badge {
	font-size: 0.75rem;
	padding: 3px 8px;
	border-radius: 12px;
	display: inline-block;
}

.cre-quota-box {
	min-width: 100px;
}

.cre-quota-header {
	display: flex;
	justify-content: space-between;
	font-size: 0.75rem;
	margin-bottom: 4px;
	color: var(--cre-text-muted);
}

.cre-progress-bar-sm {
	height: 4px;
}

.cre-cell-date {
	font-size: 0.8rem;
	color: var(--cre-text-muted);
}

.cre-btn-topup {
	border-color: rgba(16, 185, 129, 0.5);
	color: #10b981;
	padding: 4px 8px;
	font-size: 0.75rem;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
}

.cre-btn-regenerate {
	padding: 4px 8px;
	font-size: 0.75rem;
}

/* Admin Console Component Utilities */
.cre-admin-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
	margin-bottom: 32px;
}

.cre-stat-card {
	padding: 20px;
}

.cre-stat-label {
	font-size: 0.75rem;
	color: var(--cre-text-muted);
	text-transform: uppercase;
	font-weight: 600;
	letter-spacing: 0.5px;
}

.cre-stat-value {
	font-size: 1.8rem;
	font-weight: 800;
	color: #fff;
	margin-top: 6px;
}

.cre-stat-value-active {
	color: #34d399;
}

.cre-stat-value-pending {
	color: #fbbf24;
}

.cre-stat-value-tokens {
	color: #818cf8;
}

.cre-badge-pending {
	font-size: 0.75rem;
	padding: 3px 8px;
	border-radius: 12px;
	display: inline-block;
	background: rgba(245, 158, 11, 0.15);
	color: var(--cre-warning);
	border: 1px solid var(--cre-warning);
}

.cre-btn-revoke {
	border-color: rgba(239, 68, 68, 0.4);
	color: #f87171;
	padding: 4px 8px;
	font-size: 0.75rem;
}

/* Core Vector Icon Utilities */
.cre-icon {
	display: inline-block;
	vertical-align: middle;
	flex-shrink: 0;
	transition: color 0.2s ease, transform 0.2s ease, stroke 0.2s ease;
}

.cre-icon-lightning {
	color: #f59e0b;
}

.cre-icon-sparkles {
	color: #34d399;
}

.cre-icon-key {
	color: var(--cre-primary);
}

.cre-icon-check {
	color: var(--cre-accent);
}

/* Minimal Aesthetic Custom Scrollbar */
::-webkit-scrollbar {
	width: 6px;
	height: 6px;
}

::-webkit-scrollbar-track {
	background: rgba(15, 23, 42, 0.7);
	border-radius: 4px;
}

::-webkit-scrollbar-thumb {
	background: rgba(99, 102, 241, 0.4);
	border-radius: 4px;
	transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
	background: rgba(99, 102, 241, 0.8);
}

* {
	scrollbar-width: thin;
	scrollbar-color: rgba(99, 102, 241, 0.4) rgba(15, 23, 42, 0.7);
}

/* Icon-only Action Button Styles */
.cre-btn-icon-only {
	padding: 6px 9px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	min-width: 32px;
	height: 30px;
}

.cre-btn-unbind.cre-btn-icon-only {
	color: #f87171;
	border-color: rgba(248, 113, 113, 0.3);
}

.cre-btn-unbind.cre-btn-icon-only:hover {
	background: rgba(239, 68, 68, 0.15);
	border-color: #f87171;
	color: #ef4444;
}

.cre-btn-regenerate.cre-btn-icon-only {
	color: #94a3b8;
	border-color: rgba(148, 163, 184, 0.3);
}

.cre-btn-regenerate.cre-btn-icon-only:hover {
	background: rgba(99, 102, 241, 0.15);
	border-color: var(--cre-primary);
	color: #fff;
}

/* Aesthetic Custom Dark CSS Tooltips */
[data-tooltip] {
	position: relative;
}

[data-tooltip]::before {
	content: attr(data-tooltip);
	position: absolute;
	bottom: 125%;
	left: 50%;
	transform: translateX(-50%) translateY(4px);
	padding: 5px 10px;
	background: #0f172a;
	color: #f3f4f6;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.2px;
	white-space: nowrap;
	border-radius: 6px;
	border: 1px solid rgba(255, 255, 255, 0.15);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
	z-index: 1000;
}

[data-tooltip]::after {
	content: '';
	position: absolute;
	bottom: 108%;
	left: 50%;
	transform: translateX(-50%);
	border-width: 5px;
	border-style: solid;
	border-color: #0f172a transparent transparent transparent;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
	z-index: 1000;
}

[data-tooltip]:hover::before {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

[data-tooltip]:hover::after {
	opacity: 1;
}

/* Positional Tooltip Modifiers (Prevent Right Edge Overflow) */
[data-tooltip-pos="left"]::before {
	left: auto;
	right: 0;
	transform: translateY(4px);
}

[data-tooltip-pos="left"]::after {
	left: auto;
	right: 12px;
	transform: none;
}

[data-tooltip-pos="left"]:hover::before {
	transform: translateY(0);
}

/* ==========================================================================
   Server Backend Landing Page Styles
   ========================================================================== */

.cre-landing-wrapper {
	width: 100%;
}

.cre-landing-hero {
	padding: 60px 0 50px 0;
	position: relative;
}

.cre-hero-grid {
	display: grid;
	grid-template-columns: 1.15fr 0.85fr;
	gap: 40px;
	align-items: center;
}

.cre-hero-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px;
	border-radius: 20px;
	background: rgba(99, 102, 241, 0.12);
	border: 1px solid rgba(99, 102, 241, 0.3);
	color: #a5b4fc;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	margin-bottom: 20px;
}

.cre-hero-badge .cre-icon {
	color: #fbbf24;
}

.cre-hero-title {
	font-size: 2.75rem;
	font-weight: 800;
	line-height: 1.15;
	margin: 0 0 20px 0;
	color: var(--cre-text-main);
	letter-spacing: -0.5px;
}

.cre-hero-title-gradient {
	background: linear-gradient(135deg, #fff 30%, #a5b4fc 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.cre-hero-desc {
	font-size: 1.1rem;
	line-height: 1.65;
	color: var(--cre-text-muted);
	margin: 0 0 32px 0;
	max-width: 580px;
}

.cre-hero-actions {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 24px;
}

.cre-hero-meta {
	display: flex;
	align-items: center;
	gap: 20px;
	font-size: 0.85rem;
	color: var(--cre-text-muted);
}

.cre-hero-meta-item {
	display: flex;
	align-items: center;
	gap: 6px;
}

/* Live Evaluation Preview Card (Customer-Friendly UI) */
.cre-preview-card {
	background: #0d1117;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
	padding: 24px;
}

.cre-preview-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 16px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	margin-bottom: 20px;
}

.cre-preview-title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.95rem;
	font-weight: 700;
	color: #fff;
}

.cre-preview-badge {
	font-size: 0.72rem;
	padding: 3px 10px;
	border-radius: 20px;
	background: rgba(16, 185, 129, 0.15);
	color: #34d399;
	font-weight: 700;
	letter-spacing: 0.3px;
}

.cre-preview-rows {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.cre-preview-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	background: rgba(17, 24, 39, 0.7);
	border: 1px solid var(--cre-surface-border);
	border-radius: 8px;
	font-size: 0.88rem;
}

.cre-preview-label {
	color: var(--cre-text-muted);
	display: flex;
	align-items: center;
	gap: 8px;
}

.cre-preview-val {
	font-weight: 600;
	color: #fff;
}

.cre-preview-winner {
	background: rgba(16, 185, 129, 0.08);
	border-color: rgba(16, 185, 129, 0.3);
}

.cre-preview-winner .cre-preview-val {
	color: #34d399;
	font-weight: 700;
}

/* Terminal Mockup Window */
.cre-terminal-card {
	background: #0d1117;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}

.cre-terminal-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 16px;
	background: #161b22;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cre-terminal-dots {
	display: flex;
	gap: 6px;
}

.cre-terminal-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
}

.cre-dot-red { background: #ef4444; }
.cre-dot-yellow { background: #f59e0b; }
.cre-dot-green { background: #10b981; }

.cre-terminal-title {
	font-family: monospace;
	font-size: 0.75rem;
	color: var(--cre-text-muted);
	letter-spacing: 0.3px;
}

.cre-terminal-badge {
	font-size: 0.7rem;
	font-family: monospace;
	padding: 2px 8px;
	border-radius: 4px;
	background: rgba(16, 185, 129, 0.2);
	color: #34d399;
	font-weight: 700;
}

.cre-terminal-code {
	padding: 18px 20px;
	margin: 0;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 0.82rem;
	line-height: 1.6;
	color: #e6edf3;
	overflow-x: auto;
	white-space: pre;
}

/* Syntax Token Colors */
.cre-t-kw { color: #ff7b72; font-weight: 600; }
.cre-t-key { color: #79c0ff; }
.cre-t-str { color: #a5d6ff; }
.cre-t-num { color: #d2a8ff; }
.cre-t-bool { color: #79c0ff; font-weight: 600; }
.cre-t-comment { color: #8b949e; font-style: italic; }
.cre-t-green { color: #7ee787; font-weight: 600; }

/* Stats Strip */
.cre-stats-strip {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
	background: rgba(17, 24, 39, 0.6);
	border: 1px solid var(--cre-surface-border);
	border-radius: var(--cre-radius);
	padding: 24px 30px;
	margin: 40px 0 60px 0;
}

.cre-stat-box {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.cre-stat-num {
	font-size: 1.7rem;
	font-weight: 800;
	color: #fff;
	display: flex;
	align-items: center;
	gap: 6px;
}

.cre-stat-desc {
	font-size: 0.82rem;
	color: var(--cre-text-muted);
	line-height: 1.4;
}

/* Sections */
.cre-section-block {
	padding: 55px 0;
	border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.cre-section-header {
	text-align: center;
	max-width: 760px;
	margin: 0 auto 45px auto;
}

.cre-section-tag {
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--cre-primary);
	margin-bottom: 8px;
}

.cre-section-title {
	font-size: 2rem;
	font-weight: 800;
	color: var(--cre-text-main);
	margin: 0 0 14px 0;
	letter-spacing: -0.3px;
}

.cre-section-desc {
	font-size: 1rem;
	color: var(--cre-text-muted);
	line-height: 1.6;
	margin: 0;
}

/* Problem vs Solution */
.cre-comparison-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
}

.cre-comparison-card {
	padding: 30px 28px;
	border-radius: var(--cre-radius);
	box-sizing: border-box;
}

.cre-card-problem {
	background: rgba(239, 68, 68, 0.04);
	border: 1px solid rgba(239, 68, 68, 0.2);
}

.cre-card-solution {
	background: rgba(16, 185, 129, 0.05);
	border: 1px solid rgba(16, 185, 129, 0.3);
}

.cre-comparison-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 20px;
}

.cre-comparison-badge {
	font-size: 0.72rem;
	font-weight: 800;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: 4px;
	letter-spacing: 0.5px;
}

.cre-badge-problem {
	background: rgba(239, 68, 68, 0.2);
	color: #fca5a5;
}

.cre-badge-solution {
	background: rgba(16, 185, 129, 0.2);
	color: #6ee7b7;
}

.cre-comparison-title {
	font-size: 1.25rem;
	font-weight: 700;
	color: #fff;
	margin: 0;
}

.cre-comparison-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.cre-comparison-list li {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-bottom: 16px;
	font-size: 0.92rem;
	color: var(--cre-text-muted);
	line-height: 1.5;
}

.cre-comparison-list li strong {
	color: var(--cre-text-main);
}

.cre-icon-bullet-bad {
	color: #ef4444;
	margin-top: 2px;
	flex-shrink: 0;
}

.cre-icon-bullet-good {
	color: #10b981;
	margin-top: 2px;
	flex-shrink: 0;
}

/* Capabilities Grid */
.cre-capabilities-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 22px;
}

.cre-cap-card {
	background: rgba(17, 24, 39, 0.7);
	border: 1px solid var(--cre-surface-border);
	border-radius: var(--cre-radius);
	padding: 26px 22px;
	transition: border-color 0.2s ease, transform 0.2s ease;
	display: flex;
	flex-direction: column;
}

.cre-cap-card:hover {
	border-color: rgba(99, 102, 241, 0.4);
	transform: translateY(-2px);
}

.cre-cap-icon-box {
	width: 42px;
	height: 42px;
	border-radius: 8px;
	background: rgba(99, 102, 241, 0.12);
	border: 1px solid rgba(99, 102, 241, 0.25);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--cre-primary);
	margin-bottom: 18px;
}

.cre-cap-title {
	font-size: 1.1rem;
	font-weight: 700;
	color: #fff;
	margin: 0 0 10px 0;
}

.cre-cap-desc {
	font-size: 0.88rem;
	color: var(--cre-text-muted);
	line-height: 1.55;
	margin: 0;
}

/* Architecture Workflow */
.cre-workflow-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
	position: relative;
}

.cre-workflow-step {
	background: #0d1117;
	border: 1px solid var(--cre-surface-border);
	border-radius: var(--cre-radius);
	padding: 24px 20px;
	display: flex;
	flex-direction: column;
}

.cre-step-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 16px;
}

.cre-step-num {
	font-family: monospace;
	font-size: 0.75rem;
	font-weight: 800;
	color: var(--cre-primary);
	background: rgba(99, 102, 241, 0.15);
	padding: 2px 8px;
	border-radius: 4px;
}

.cre-step-title {
	font-size: 1.05rem;
	font-weight: 700;
	color: #fff;
	margin: 0 0 8px 0;
}

.cre-step-desc {
	font-size: 0.85rem;
	color: var(--cre-text-muted);
	line-height: 1.5;
	margin: 0;
}

/* Live Contract Schema Viewer */
.cre-contract-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
}

.cre-contract-col {
	display: flex;
	flex-direction: column;
}

.cre-contract-label {
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--cre-text-muted);
	margin-bottom: 10px;
	display: flex;
	align-items: center;
	gap: 8px;
}

/* Security Callout Grid */
.cre-security-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

.cre-sec-card {
	background: rgba(17, 24, 39, 0.6);
	border: 1px solid var(--cre-surface-border);
	border-radius: var(--cre-radius);
	padding: 22px 20px;
}

.cre-sec-title {
	font-size: 1rem;
	font-weight: 700;
	color: #fff;
	margin: 0 0 8px 0;
	display: flex;
	align-items: center;
	gap: 8px;
}

.cre-sec-desc {
	font-size: 0.85rem;
	color: var(--cre-text-muted);
	line-height: 1.5;
	margin: 0;
}

/* Use Cases */
.cre-usecase-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 22px;
}

.cre-usecase-card {
	background: rgba(17, 24, 39, 0.6);
	border: 1px solid var(--cre-surface-border);
	border-radius: var(--cre-radius);
	padding: 26px 24px;
	display: flex;
	gap: 18px;
}

.cre-usecase-icon-box {
	width: 40px;
	height: 40px;
	border-radius: 8px;
	background: rgba(16, 185, 129, 0.12);
	border: 1px solid rgba(16, 185, 129, 0.25);
	color: #10b981;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.cre-usecase-content h3 {
	font-size: 1.1rem;
	font-weight: 700;
	color: #fff;
	margin: 0 0 6px 0;
}

.cre-usecase-content p {
	font-size: 0.88rem;
	color: var(--cre-text-muted);
	line-height: 1.55;
	margin: 0;
}

/* FAQ Grid */
.cre-faq-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	max-width: 980px;
	margin: 0 auto;
}

.cre-faq-card {
	background: rgba(17, 24, 39, 0.6);
	border: 1px solid var(--cre-surface-border);
	border-radius: var(--cre-radius);
	padding: 22px;
}

.cre-faq-q {
	font-size: 1rem;
	font-weight: 700;
	color: #fff;
	margin: 0 0 8px 0;
}

.cre-faq-a {
	font-size: 0.88rem;
	color: var(--cre-text-muted);
	line-height: 1.55;
	margin: 0;
}

/* Final CTA Banner */
.cre-cta-card {
	background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
	border: 1px solid rgba(99, 102, 241, 0.35);
	border-radius: 12px;
	padding: 50px 40px;
	text-align: center;
	margin-top: 40px;
	box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
}

.cre-cta-title {
	font-size: 2.2rem;
	font-weight: 800;
	color: #fff;
	margin: 0 0 12px 0;
	letter-spacing: -0.5px;
}

.cre-cta-desc {
	font-size: 1.05rem;
	color: var(--cre-text-muted);
	max-width: 620px;
	margin: 0 auto 30px auto;
	line-height: 1.6;
}

.cre-cta-buttons {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

/* Responsive Media Queries for Landing Page */
@media (max-width: 992px) {
	.cre-hero-grid {
		grid-template-columns: 1fr;
		gap: 36px;
	}

	.cre-hero-title {
		font-size: 2.3rem;
	}

	.cre-stats-strip {
		grid-template-columns: repeat(2, 1fr);
		gap: 24px;
	}

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

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

	.cre-contract-grid {
		grid-template-columns: 1fr;
	}

	.cre-security-grid {
		grid-template-columns: 1fr;
	}

	.cre-usecase-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 768px) {
	.cre-landing-hero {
		padding: 40px 0 30px 0;
	}

	.cre-hero-title {
		font-size: 1.85rem;
		word-break: break-word;
	}

	.cre-hero-meta {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}

	.cre-section-title {
		font-size: 1.55rem;
		word-break: break-word;
	}

	.cre-comparison-grid {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	.cre-comparison-card {
		padding: 24px 20px;
	}

	.cre-comparison-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}

	.cre-comparison-badge {
		white-space: normal;
		line-height: 1.3;
	}

	.cre-comparison-title {
		font-size: 1.15rem;
		word-break: break-word;
	}

	.cre-capabilities-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.cre-workflow-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.cre-security-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.cre-usecase-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.cre-faq-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.cre-cta-card {
		padding: 36px 20px;
	}

	.cre-cta-title {
		font-size: 1.6rem;
		word-break: break-word;
	}

	.cre-stats-strip {
		padding: 20px 16px;
		gap: 16px;
	}

	.cre-stat-num {
		font-size: 1.45rem;
	}
}

@media (max-width: 480px) {
	.cre-container {
		padding: 0 16px;
	}

	.cre-brand-text {
		font-size: 1rem;
	}

	.cre-hero-title {
		font-size: 1.55rem;
		line-height: 1.2;
	}

	.cre-hero-desc {
		font-size: 0.95rem;
		margin-bottom: 24px;
	}

	.cre-hero-actions {
		flex-direction: column;
		width: 100%;
	}

	.cre-hero-actions .cre-btn {
		width: 100%;
		justify-content: center;
		box-sizing: border-box;
	}

	.cre-preview-card {
		padding: 16px 12px;
	}

	.cre-preview-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.cre-preview-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
		padding: 10px 12px;
	}

	.cre-preview-label,
	.cre-preview-val {
		width: 100%;
		word-break: break-word;
	}

	.cre-stats-strip {
		grid-template-columns: 1fr;
		padding: 16px 12px;
	}

	.cre-comparison-card {
		padding: 20px 14px;
	}

	.cre-cap-card,
	.cre-workflow-step,
	.cre-sec-card,
	.cre-faq-card {
		padding: 18px 14px;
	}

	.cre-usecase-card {
		padding: 18px 14px;
		flex-direction: column;
		gap: 12px;
	}

	.cre-section-header {
		margin-bottom: 30px;
	}

	.cre-section-title {
		font-size: 1.35rem;
	}

	.cre-section-desc {
		font-size: 0.9rem;
	}

	.cre-cta-buttons {
		flex-direction: column;
		width: 100%;
	}

	.cre-cta-buttons .cre-btn {
		width: 100%;
		justify-content: center;
		box-sizing: border-box;
	}
}

/* ==========================================================================
   Legal Document Template Styles (Terms of Service & Privacy Policy)
   ========================================================================== */
.cre-legal-hero {
	background: linear-gradient(180deg, rgba(99, 102, 241, 0.08) 0%, transparent 100%);
	border-bottom: 1px solid var(--cre-surface-border);
	padding: 48px 0 36px 0;
}

.cre-legal-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(99, 102, 241, 0.15);
	color: #a5b4fc;
	border: 1px solid rgba(99, 102, 241, 0.3);
	padding: 4px 12px;
	border-radius: 9999px;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 12px;
}

.cre-legal-title {
	font-size: 2.25rem;
	font-weight: 800;
	color: #ffffff;
	margin: 0 0 10px 0;
	letter-spacing: -0.02em;
	line-height: 1.2;
}

.cre-legal-meta {
	color: var(--cre-text-muted);
	font-size: 0.9rem;
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.cre-legal-grid {
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr);
	gap: 36px;
	margin: 36px auto 60px auto;
	align-items: start;
	position: relative;
}

.cre-doc-grid {
	display: grid;
	grid-template-columns: 270px minmax(0, 1fr);
	gap: 36px;
	margin: 36px auto 60px auto;
	align-items: start;
	position: relative;
}

/* Mobile Document Switcher Pills (Visible on Mobile & Tablet) */
.cre-mobile-doc-switcher {
	display: none;
	gap: 8px;
	flex-wrap: wrap;
	padding: 0 0 16px 0;
	margin-bottom: 20px;
	width: 100%;
}

.cre-doc-pill {
	display: inline-flex;
	align-items: center;
	padding: 6px 13px;
	border-radius: 9999px;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid var(--cre-surface-border);
	color: var(--cre-text-muted);
	font-size: 0.82rem;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
	transition: all 0.2s ease;
}

.cre-doc-pill:hover {
	color: #ffffff;
	border-color: rgba(99, 102, 241, 0.4);
	background: rgba(99, 102, 241, 0.1);
}

.cre-doc-pill.active {
	background: rgba(99, 102, 241, 0.18);
	color: #ffffff;
	border-color: var(--cre-primary);
	font-weight: 600;
	box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
}

/* Sticky Desktop Sidebars */
.cre-legal-sidebar,
.cre-doc-sidebar {
	position: -webkit-sticky;
	position: sticky;
	top: 85px;
	align-self: start;
	background: var(--cre-surface);
	border: 1px solid var(--cre-surface-border);
	border-radius: 12px;
	padding: 24px 20px;
	max-height: calc(100vh - 105px);
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	scrollbar-color: rgba(99, 102, 241, 0.3) transparent;
	box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.3);
	z-index: 20;
}

.cre-legal-sidebar::-webkit-scrollbar,
.cre-doc-sidebar::-webkit-scrollbar {
	width: 5px;
}

.cre-legal-sidebar::-webkit-scrollbar-track,
.cre-doc-sidebar::-webkit-scrollbar-track {
	background: transparent;
}

.cre-legal-sidebar::-webkit-scrollbar-thumb,
.cre-doc-sidebar::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.15);
	border-radius: 4px;
}

.cre-legal-sidebar::-webkit-scrollbar-thumb:hover,
.cre-doc-sidebar::-webkit-scrollbar-thumb:hover {
	background: rgba(99, 102, 241, 0.5);
}

.cre-sidebar-section {
	margin-bottom: 20px;
}

.cre-sidebar-section:last-child {
	margin-bottom: 0;
}

.cre-legal-sidebar-title,
.cre-doc-nav-heading {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #818cf8;
	margin: 0 0 10px 0;
	font-weight: 700;
}

.cre-legal-nav {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.cre-legal-nav-item,
.cre-doc-nav-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 12px;
	border-radius: 6px;
	color: var(--cre-text-muted);
	text-decoration: none;
	font-size: 0.875rem;
	font-weight: 500;
	transition: all 0.2s ease;
}

.cre-legal-nav-item:hover,
.cre-doc-nav-link:hover {
	background: rgba(255, 255, 255, 0.04);
	color: #ffffff;
	padding-left: 14px;
}

.cre-legal-nav-item.active {
	background: rgba(99, 102, 241, 0.14);
	color: #ffffff;
	border-left: 3px solid var(--cre-primary);
	font-weight: 600;
}

/* In-Page TOC Nav */
.cre-toc-nav {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.cre-toc-link {
	display: block;
	padding: 7px 12px;
	border-radius: 6px;
	color: var(--cre-text-muted);
	text-decoration: none;
	font-size: 0.84rem;
	line-height: 1.4;
	transition: all 0.2s ease;
	border-left: 2px solid transparent;
}

.cre-toc-link:hover {
	color: #ffffff;
	background: rgba(255, 255, 255, 0.04);
	padding-left: 14px;
}

.cre-toc-link.active {
	color: #818cf8;
	background: rgba(99, 102, 241, 0.12);
	border-left-color: var(--cre-primary);
	font-weight: 600;
}

/* Content Cards */
.cre-legal-card,
.cre-doc-card {
	background: var(--cre-surface);
	border: 1px solid var(--cre-surface-border);
	border-radius: 12px;
	padding: 44px 48px;
	color: #cbd5e1;
	line-height: 1.8;
	min-width: 0;
	box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.25);
}

.cre-legal-content h2,
.cre-doc-card h2 {
	font-size: 1.75rem;
	font-weight: 800;
	color: #ffffff;
	margin: 0 0 14px 0;
	line-height: 1.3;
}

.cre-legal-content h3,
.cre-doc-card h3 {
	font-size: 1.35rem;
	font-weight: 700;
	color: #ffffff;
	margin: 40px 0 16px 0;
	padding-top: 16px;
	border-top: 1px solid rgba(255, 255, 255, 0.07);
	scroll-margin-top: 90px;
}

.cre-legal-content h3:first-of-type,
.cre-doc-card h3:first-of-type {
	margin-top: 16px;
	padding-top: 0;
	border-top: none;
}

.cre-legal-content p,
.cre-doc-card p {
	margin: 0 0 18px 0;
	color: #cbd5e1;
	font-size: 0.96rem;
}

.cre-legal-content ul,
.cre-legal-content ol,
.cre-doc-card ul,
.cre-doc-card ol {
	margin: 0 0 22px 0;
	padding-left: 24px;
	color: #cbd5e1;
}

.cre-legal-content li,
.cre-doc-card li {
	margin-bottom: 8px;
	line-height: 1.65;
}

.cre-legal-content code,
.cre-doc-card code {
	background: #030712;
	color: #38bdf8;
	padding: 2px 7px;
	border-radius: 4px;
	font-size: 0.88em;
	border: 1px solid rgba(255, 255, 255, 0.08);
	font-family: ui-monospace, SFMono-Regular, monospace;
	word-break: break-word;
}

.cre-legal-content a,
.cre-doc-card a {
	color: #818cf8;
	text-decoration: underline;
	transition: color 0.15s ease;
}

.cre-legal-content a:hover,
.cre-doc-card a:hover {
	color: #a5b4fc;
}

.cre-legal-content .lead,
.cre-doc-content .lead {
	font-size: 1.08rem;
	color: #94a3b8;
	font-style: italic;
	margin-bottom: 24px;
	line-height: 1.65;
}

/* Callout Box for Cross-Referencing */
.cre-callout-box {
	background: rgba(99, 102, 241, 0.08);
	border: 1px solid rgba(99, 102, 241, 0.3);
	border-left: 4px solid var(--cre-primary);
	border-radius: 8px;
	padding: 16px 20px;
	margin: 24px 0;
	font-size: 0.92rem;
	color: #cbd5e1;
	line-height: 1.6;
}

.cre-callout-box strong {
	color: #ffffff;
}

.cre-callout-box a {
	color: #a5b4fc;
	font-weight: 600;
}

/* Cross-Reference Cards (Bottom of Document) */
.cre-legal-crossref-card {
	margin-top: 48px;
	padding-top: 32px;
	border-top: 1px solid var(--cre-surface-border);
}

.cre-legal-crossref-card h4 {
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #818cf8;
	margin: 0 0 16px 0;
	font-weight: 700;
}

.cre-crossref-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 16px;
}

.cre-crossref-item {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 18px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.02);
	border: 1px solid var(--cre-surface-border);
	text-decoration: none !important;
	transition: all 0.2s ease;
}

.cre-crossref-item:hover {
	background: rgba(99, 102, 241, 0.08);
	border-color: rgba(99, 102, 241, 0.4);
	transform: translateY(-2px);
}

.cre-crossref-badge {
	font-size: 0.725rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #94a3b8;
	font-weight: 600;
}

.cre-crossref-item strong {
	font-size: 1rem;
	color: #ffffff;
	font-weight: 600;
}

.cre-crossref-item p {
	font-size: 0.84rem;
	color: var(--cre-text-muted);
	margin: 0;
	line-height: 1.5;
}

/* Documentation specific styles */
.cre-doc-hero {
	background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
	border-bottom: 1px solid var(--cre-surface-border);
	padding: 48px 0 36px 0;
}

.cre-doc-nav-group {
	margin-bottom: 20px;
}

.cre-doc-nav-group:last-child {
	margin-bottom: 0;
}

.cre-badge-method {
	display: inline-block;
	padding: 2px 8px;
	background: #4338ca;
	color: #ffffff;
	border-radius: 4px;
	font-weight: 700;
	font-size: 0.75rem;
	letter-spacing: 0.5px;
}

/* Mobile Sticky TOC Bar */
.cre-mobile-toc-bar {
	display: none;
	background: rgba(17, 24, 39, 0.96);
	border-bottom: 1px solid var(--cre-surface-border);
	position: -webkit-sticky;
	position: sticky;
	top: 70px;
	z-index: 95;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.cre-mobile-toc-toggle {
	width: 100%;
	background: transparent;
	border: none;
	color: var(--cre-text-main);
	padding: 13px 0;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 0.88rem;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
	text-align: left;
}

.cre-mobile-toc-toggle-inner {
	display: flex;
	align-items: center;
	gap: 8px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cre-mobile-toc-indicator {
	font-size: 0.75rem;
	background: rgba(99, 102, 241, 0.2);
	color: #a5b4fc;
	padding: 2px 7px;
	border-radius: 4px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	flex-shrink: 0;
}

.cre-mobile-toc-label {
	color: var(--cre-text-main);
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cre-mobile-toc-chevron {
	transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	color: var(--cre-primary);
	font-size: 0.95rem;
	padding-left: 10px;
	flex-shrink: 0;
}

.cre-mobile-toc-toggle.open .cre-mobile-toc-chevron {
	transform: rotate(180deg);
}

.cre-mobile-toc-drawer {
	display: none;
	padding: 12px 0 18px 0;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	max-height: 55vh;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.cre-mobile-toc-drawer .cre-toc-link {
	padding: 9px 12px;
	font-size: 0.88rem;
	border-radius: 6px;
}

.cre-mobile-toc-drawer .cre-toc-link:hover,
.cre-mobile-toc-drawer .cre-toc-link.active {
	background: rgba(99, 102, 241, 0.15);
	color: #ffffff;
}

/* Responsive Breakpoints */
@media (max-width: 991px) {
	.cre-mobile-toc-bar {
		display: block;
	}

	.cre-mobile-doc-switcher {
		display: flex;
	}

	.cre-legal-sidebar,
	.cre-doc-sidebar {
		display: none !important;
	}

	.cre-legal-grid,
	.cre-doc-grid {
		grid-template-columns: 1fr !important;
		gap: 20px;
		margin: 24px auto 48px auto;
	}

	.cre-legal-card,
	.cre-doc-card {
		padding: 32px 24px;
	}

	.cre-legal-title {
		font-size: 2rem;
	}
}

@media (max-width: 640px) {
	.cre-legal-card,
	.cre-doc-card {
		padding: 24px 16px;
		border-radius: 8px;
	}

	.cre-legal-title {
		font-size: 1.6rem;
	}

	.cre-legal-content h2,
	.cre-doc-card h2 {
		font-size: 1.4rem;
	}

	.cre-legal-content h3,
	.cre-doc-card h3 {
		font-size: 1.15rem;
		margin: 28px 0 12px 0;
	}

	.cre-crossref-grid {
		grid-template-columns: 1fr;
	}

	.cre-legal-meta {
		flex-direction: column;
		align-items: flex-start;
		gap: 6px;
	}
}
