/**
 * ZenitLab Finance Dashboard - Elite UX
 * Professional financial data presentation
 */

/* ==========================================
   IMPORTS
   ========================================== */
@import url('tooltips.css');
@import url('info-tooltips.css');
@import url('select-dropdown.css');
@import url('chart-improvements.css');
@import url('advanced-effects.css');
@import url('elite-filters.css');
@import url('custom-select.css');
@import url('clock-elite.css');
@import url('clock-tooltip.css');
@import url('elite-metrics.css');
@import url('table-overflow.css');
@import url('maps.css');
@import url('reports.css');
@import url('reports-hero.css');
@import url('indices.css');

/* ==========================================
   CORE VARIABLES - Finance Grade Palette
   ========================================== */
:root {
	/* Backgrounds - Deep professional palette */
	--bg-primary: #0B0F19;
	--bg-secondary: #111725;
	--bg-tertiary: #1A1F2E;
	--bg-elevated: #1F2937;
	--bg-hover: rgba(59, 130, 246, 0.06);
	
	/* Text - Precise hierarchy */
	--text-primary: #F9FAFB;
	--text-secondary: #D1D5DB;
	--text-tertiary: #9CA3AF;
	--text-quaternary: #6B7280;
	--text-muted: #4B5563;
	
	/* Borders - Ultra subtle */
	--border-primary: rgba(75, 85, 99, 0.4);
	--border-secondary: rgba(75, 85, 99, 0.25);
	--border-accent: rgba(59, 130, 246, 0.5);
	
	/* Status - Professional spectrum */
	--gain: #10B981;
	--gain-bright: #34D399;
	--gain-subtle: rgba(16, 185, 129, 0.1);
	--gain-glow: rgba(16, 185, 129, 0.25);
	
	--loss: #EF4444;
	--loss-bright: #F87171;
	--loss-subtle: rgba(239, 68, 68, 0.1);
	--loss-glow: rgba(239, 68, 68, 0.25);
	
	/* Signals */
	--signal-long: #10B981;
	--signal-buy: #34D399;
	--signal-sell: #EF4444;
	--signal-hold: #F59E0B;
	--signal-neutral: #6B7280;
	
	/* Accent */
	--accent-primary: #3B82F6;
	--accent-secondary: #6366F1;
	--accent-hover: #2563EB;
	--accent-glow: rgba(59, 130, 246, 0.15);
	
	/* Warning & Info */
	--warning: #F59E0B;
	--warning-glow: rgba(245, 158, 11, 0.15);
	--info: #06B6D4;
	--info-glow: rgba(6, 182, 212, 0.15);
	
	/* Spacing - 4px grid */
	--space-xs: 0.25rem;
	--space-sm: 0.5rem;
	--space-md: 0.75rem;
	--space-lg: 1rem;
	--space-xl: 1.5rem;
	--space-2xl: 2rem;
	--space-3xl: 3rem;
	
	/* Transitions - Professional easing */
	--transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
	--transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
	--transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
	
	/* Shadows - Depth */
	--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
	--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
	--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
	--shadow-glow: 0 0 20px rgba(59, 130, 246, 0.1);
}

/* ==========================================
   GLOBAL RESETS & BASE
   ========================================== */
* {
	font-variant-numeric: tabular-nums;
}

body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	background: var(--bg-primary);
	color: var(--text-primary);
	font-size: 14px;
	line-height: 1.5;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

#page {
	flex: 1 0 auto;
	display: flex;
	flex-direction: column;
}

main {
	flex: 1 0 auto;
}

footer {
	flex-shrink: 0;
}

/* ==========================================
   TYPOGRAPHY - Finance Centric
   ========================================== */
.font-mono,
.number,
[data-type="number"] {
	font-family: 'JetBrains Mono', 'SF Mono', 'Courier New', monospace;
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.02em;
}

.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 0.9375rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* ==========================================
   HEADER - Glassmorphism Pro
   ========================================== */
header {
	background: rgba(17, 23, 37, 0.8);
	border-bottom: 1px solid var(--border-primary);
	backdrop-filter: blur(12px) saturate(180%);
	-webkit-backdrop-filter: blur(12px) saturate(180%);
	position: sticky;
	top: 0;
	z-index: 50;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

/* When mobile menu is open, reduce header z-index to prevent overlay issues */
@media (max-width: 767px) {
	header {
		z-index: 10;
	}
	
	/* Force header below menu when menu is open */
	body.mobile-menu-open header {
		z-index: 1 !important;
		position: sticky !important;
	}
}

header nav a {
	color: var(--text-tertiary);
	font-size: 0.875rem;
	font-weight: 500;
	padding: 0.5rem 1rem;
	transition: var(--transition-base);
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

header nav a:hover {
	color: var(--text-primary);
	background: rgba(59, 130, 246, 0.05);
	border-radius: 6px;
}

/* Active link indicator - refined */
header nav a.active {
	color: var(--text-primary);
	background: rgba(59, 130, 246, 0.08);
	border-radius: 6px;
}

header nav a.active::before {
	content: '';
	position: absolute;
	left: 0.5rem;
	top: 50%;
	transform: translateY(-50%);
	width: 3px;
	height: 16px;
	background: var(--accent-primary);
	border-radius: 2px;
	box-shadow: 0 0 8px var(--accent-glow);
}

/* Logo brand */
.site-brand {
	font-weight: 600;
	font-size: 1.125rem;
	letter-spacing: -0.02em;
	background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

/* ==========================================
   DASHBOARD LAYOUT
   ========================================== */
.dashboard-header {
	margin-bottom: var(--space-2xl);
}

.dashboard-title {
	font-size: 1.5rem;
	font-weight: 600;
	letter-spacing: -0.02em;
	margin-bottom: var(--space-xs);
}

.dashboard-subtitle {
	font-size: 0.875rem;
	color: var(--text-secondary);
}

/* Update badge with pulse */
.update-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	color: var(--text-tertiary);
	padding: 0.5rem 1rem;
	background: var(--bg-secondary);
	border: 1px solid var(--border-primary);
	border-radius: 6px;
}

.update-badge svg {
	animation: spin 2s linear infinite;
}

@keyframes spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

/* ==========================================
   FILTER BAR - Glassmorphism + Glow
   ========================================== */
.filter-bar {
	background: rgba(26, 31, 46, 0.6);
	border: 1px solid var(--border-primary);
	border-radius: 12px;
	padding: var(--space-lg);
	margin-bottom: var(--space-xl);
	backdrop-filter: blur(10px) saturate(150%);
	-webkit-backdrop-filter: blur(10px) saturate(150%);
	box-shadow: 
		0 4px 16px rgba(0, 0, 0, 0.2),
		inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.filter-bar input,
.filter-bar select {
	background: var(--bg-primary);
	border: 1px solid var(--border-secondary);
	border-radius: 6px;
	color: var(--text-primary);
	font-size: 0.875rem;
	padding: 0.5rem 0.75rem;
	transition: all 150ms ease;
	position: relative;
	z-index: 1;
}

.filter-bar input[type="search"] {
	padding-left: 2.5rem;
}

.filter-bar input:focus,
.filter-bar select:focus {
	outline: none;
	border-color: var(--accent-primary);
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
	background: var(--bg-secondary);
}

.filter-bar input::placeholder {
	color: var(--text-quaternary);
}

/* Search icon fix */
.search-icon {
	position: absolute;
	left: 0.75rem;
	top: 50%;
	transform: translateY(-50%);
	width: 1rem;
	height: 1rem;
	color: var(--text-quaternary);
	pointer-events: none;
	z-index: 2;
}

.filter-clear {
	color: var(--text-tertiary);
	font-size: 0.875rem;
	text-decoration: underline;
	cursor: pointer;
	transition: color 150ms ease;
}

.filter-clear:hover {
	color: var(--text-primary);
}

.results-count {
	color: var(--text-tertiary);
	font-size: 0.875rem;
}

/* ==========================================
   TABLE - Data-Dense Bloomberg Style + Glassmorphism
   ========================================== */
.table-container {
	background: rgba(17, 23, 37, 0.8);
	border: 1px solid var(--border-primary);
	border-radius: 12px;
	overflow: hidden;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	box-shadow: 
		0 8px 32px rgba(0, 0, 0, 0.3),
		inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Light mode overrides */
:root:not(.dark) .table-container {
	background: rgba(255, 255, 255, 0.95);
	box-shadow: 
		0 8px 32px rgba(0, 0, 0, 0.08),
		inset 0 1px 0 rgba(0, 0, 0, 0.02);
}

/* Light mode: Fix white text on white backgrounds */
:root:not(.dark) .data-table thead th {
	color: var(--text-secondary);
}

:root:not(.dark) .data-table tbody td {
	color: var(--text-primary);
}

:root:not(.dark) .data-table tbody tr {
	background: var(--bg-primary);
}

:root:not(.dark) .data-table tbody tr:hover {
	background: var(--bg-secondary);
}

.data-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	font-size: 0.875rem;
}

.data-table thead {
	background: var(--bg-tertiary);
	position: sticky;
	top: 0;
	z-index: 10;
}

.data-table thead th {
	color: var(--text-tertiary);
	font-weight: 600;
	font-size: 0.6875rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	padding: 0.875rem 1rem;
	text-align: left;
	border-bottom: 1px solid var(--border-primary);
	white-space: nowrap;
	user-select: none;
	position: relative;
	background: var(--bg-tertiary);
}

.data-table thead th[data-sortable] {
	cursor: pointer;
	transition: var(--transition-base);
}

.data-table thead th[data-sortable]:hover {
	color: var(--text-secondary);
	background: rgba(59, 130, 246, 0.04);
}

/* Sort indicator */
.data-table thead th[data-sortable]::after {
	content: '⇅';
	position: absolute;
	right: 0.5rem;
	opacity: 0;
	font-size: 0.75rem;
	transition: var(--transition-fast);
}

.data-table thead th[data-sortable]:hover::after {
	opacity: 0.5;
}

.data-table thead th.text-right {
	text-align: right;
	padding-right: 1.5rem;
}

.data-table tbody tr {
	border-bottom: 1px solid var(--border-secondary);
	transition: var(--transition-base);
	cursor: pointer;
	position: relative;
	background: var(--bg-secondary);
}

/* Multi-layer hover effect - NO TRANSFORM (prevents flicker) */
.data-table tbody tr:hover {
	background: var(--bg-hover);
	/* REMOVED: transform: translateX(3px); - causes table flicker */
	box-shadow: 
		-3px 0 0 0 var(--accent-primary),
		inset 0 0 30px rgba(59, 130, 246, 0.04),
		0 4px 12px rgba(0, 0, 0, 0.15);
	z-index: 1;
	/* Subtle left indicator WITHOUT layout shift */
	border-left: 3px solid transparent;
}

.data-table tbody tr {
	border-left: 3px solid transparent;
	transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
	height: 72px;
}

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

/* Smooth entrance animation (disabled when Alpine.js x-transition is active) */
.data-table tbody tr:not([x-transition-enter]):not([x-transition-leave]) {
	animation: fadeInRow var(--transition-slow) ease backwards;
}

/* Alpine.js transition support - smooth fade & slide */
.data-table tbody tr {
	transition: opacity 300ms cubic-bezier(0.4, 0, 0.2, 1), 
	            transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInRow {
	from {
		opacity: 0;
		transform: translateY(-8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Stagger animation delay */
.data-table tbody tr:nth-child(1) { animation-delay: 0ms; }
.data-table tbody tr:nth-child(2) { animation-delay: 30ms; }
.data-table tbody tr:nth-child(3) { animation-delay: 60ms; }
.data-table tbody tr:nth-child(4) { animation-delay: 90ms; }
.data-table tbody tr:nth-child(5) { animation-delay: 120ms; }

.data-table tbody td {
	padding: 0.625rem 0.875rem;
	color: var(--text-primary);
	vertical-align: middle;
}

/* CRITICAL: Kill ::before/::after that create phantom columns */
.data-table tbody tr::before,
.data-table tbody tr::after {
	content: none !important;
	display: none !important;
}

.data-table tbody td:first-child {
	padding: 0.5rem 0.875rem;
}

.data-table tbody td.text-right {
	text-align: right;
}

/* Asset Column */
.asset-info {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	max-width: 280px;
	min-width: 200px;
}

.asset-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0; /* Allow text truncation */
}

.asset-logo {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-tertiary) 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 0.8125rem;
	color: var(--text-primary);
	flex-shrink: 0;
	border: 2px solid var(--border-primary);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	transition: var(--transition-base);
}

tr:hover .asset-logo {
	transform: scale(1.1) rotate(5deg);
	border-color: var(--accent-primary);
	box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Asset logo crypto (real SVG/PNG) - With animation like initials */
.asset-logo-crypto {
	position: relative;
	width: 48px;
	height: 48px;
	min-width: 48px;
	border-radius: 12px;
	background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 3px;
	border: 2px solid rgba(59, 130, 246, 0.25);
	box-shadow: 
		0 2px 4px rgba(0, 0, 0, 0.1),
		inset 0 1px 0 rgba(255, 255, 255, 0.1);
	transition: all 250ms ease;
}

/* Same animation as initials */
.asset-logo-crypto::after {
	content: '';
	position: absolute;
	inset: -2px;
	border-radius: 14px;
	background: linear-gradient(135deg, rgba(59, 130, 246, 0.4), transparent);
	opacity: 0;
	transition: opacity 250ms ease;
	z-index: -1;
}

tr:hover .asset-logo-crypto,
.asset-card:hover .asset-logo-crypto {
	border-color: rgba(59, 130, 246, 0.6);
	transform: scale(1.1) rotate(5deg);
	box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

tr:hover .asset-logo-crypto::after,
.asset-card:hover .asset-logo-crypto::after {
	opacity: 1;
}

.asset-logo-crypto img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform 250ms ease;
}

/* Asset logo crypto XL (detail page) - With animation */
.asset-logo-crypto-xl {
	position: relative;
	width: 80px;
	height: 80px;
	border-radius: 16px;
	background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(147, 51, 234, 0.15) 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 6px;
	border: 2px solid rgba(59, 130, 246, 0.3);
	box-shadow: 
		0 4px 8px rgba(0, 0, 0, 0.15),
		inset 0 1px 0 rgba(255, 255, 255, 0.15);
	transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.asset-logo-crypto-xl::after {
	content: '';
	position: absolute;
	inset: -2px;
	border-radius: 18px;
	background: linear-gradient(135deg, rgba(59, 130, 246, 0.4), transparent);
	opacity: 0;
	transition: opacity 250ms ease;
	z-index: -1;
}

.asset-logo-crypto-xl:hover {
	transform: translateY(-2px) scale(1.05) rotate(3deg);
	border-color: rgba(59, 130, 246, 0.6);
	box-shadow: 
		0 8px 16px rgba(0, 0, 0, 0.2),
		0 0 0 4px rgba(59, 130, 246, 0.15),
		inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.asset-logo-crypto-xl:hover::after {
	opacity: 1;
}

.asset-logo-crypto-xl img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform 250ms ease;
}

/* ==========================================================================
   SVG Dark Mode Adaptive - Bloomberg Best Practice
   ========================================================================== */

/* Dark mode: Subtle filter for better visibility (NO background, NO padding) */
html.dark .asset-logo-crypto img,
html.dark .asset-logo-crypto-xl img,
html.dark .holdings-asset-logo-img,
html.dark .report-asset-icon img,
html.dark .report-asset-icon-large img {
	/* Subtle brightness boost without distorting colors */
	filter: brightness(1.1) contrast(0.95);
	/* Optional: uncomment if still illegible */
	/* mix-blend-mode: screen; */
}

/* Asset logo - Detail Page Style (QUADRATO ARROTONDATO con INIZIALI) */
.asset-logo-initials {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-tertiary) 50%, var(--bg-secondary) 100%);
	border: 2px solid var(--border-primary);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	font-weight: 700;
	font-size: 0.9375rem;
	color: var(--text-primary);
	letter-spacing: -0.02em;
	text-transform: uppercase;
	transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	position: relative;
}

.asset-logo-initials::after {
	content: '';
	position: absolute;
	inset: -2px;
	border-radius: 14px;
	background: linear-gradient(135deg, rgba(59, 130, 246, 0.4), transparent);
	opacity: 0;
	transition: opacity 250ms ease;
	z-index: -1;
}

tr:hover .asset-logo-initials,
.asset-card:hover .asset-logo-initials {
	border-color: var(--accent-primary);
	transform: scale(1.1) rotate(5deg);
	box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

tr:hover .asset-logo-initials::after,
.asset-card:hover .asset-logo-initials::after {
	opacity: 1;
}

.asset-name {
	font-weight: 500;
	color: var(--text-primary);
	margin-bottom: 2px;
	font-size: 0.875rem;
	line-height: 1.3;
	max-width: 220px;
	overflow-wrap: break-word;
	word-break: break-word;
}

.asset-ticker {
	font-size: 0.6875rem;
	color: var(--text-tertiary);
	font-family: 'JetBrains Mono', monospace;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 220px;
}

/* ==========================================
   SIGNALS - Minimal Dot Indicator + WOW
   ========================================== */
.signal-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	transition: all 200ms ease;
}

.signal-badge::before {
	content: '';
	display: block;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	flex-shrink: 0;
	transition: all 200ms ease;
}

/* Trader nerd WOW: hover glow on signals */
tr:hover .signal-badge::before {
	transform: scale(1.3);
}

.signal-long { color: var(--signal-long); }
.signal-long::before { 
	background: var(--signal-long); 
	box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
	animation: pulse-green 2s infinite;
}

.signal-buy { color: var(--signal-buy); }
.signal-buy::before { 
	background: var(--signal-buy); 
	box-shadow: 0 0 8px rgba(52, 211, 153, 0.6);
	animation: pulse-green 2s infinite;
}

.signal-sell { color: var(--signal-sell); }
.signal-sell::before { 
	background: var(--signal-sell); 
	box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
	animation: pulse-red 2s infinite;
}

.signal-hold { color: var(--signal-hold); }
.signal-hold::before { 
	background: var(--signal-hold); 
	box-shadow: 0 0 4px rgba(245, 158, 11, 0.4);
}

.signal-neutral { color: var(--signal-neutral); }
.signal-neutral::before { 
	background: var(--signal-neutral); 
}

.signal-out { color: var(--signal-neutral); }
.signal-out::before { 
	background: var(--signal-neutral); 
	opacity: 0.7; /* Slightly dimmed for "inactive" state */
}

/* Pulse animations for active signals */
@keyframes pulse-green {
	0%, 100% { 
		box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
		opacity: 1;
	}
	50% { 
		box-shadow: 0 0 12px rgba(16, 185, 129, 0.8);
		opacity: 0.9;
	}
}

@keyframes pulse-red {
	0%, 100% { 
		box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
		opacity: 1;
	}
	50% { 
		box-shadow: 0 0 12px rgba(239, 68, 68, 0.8);
		opacity: 0.9;
	}
}

/* ==========================================
   NUMBERS - Perfect Alignment + Trader WOW
   ========================================== */
.number,
[data-format="number"],
[data-format="currency"],
[data-format="percentage"] {
	font-family: 'JetBrains Mono', monospace;
	font-variant-numeric: tabular-nums;
	font-weight: 500;
	letter-spacing: -0.01em;
	transition: all 200ms ease;
}

.gain {
	color: var(--gain-bright);
	text-shadow: 0 0 12px var(--gain-glow);
	font-weight: 600;
	position: relative;
}

.loss {
	color: var(--loss-bright);
	text-shadow: 0 0 12px var(--loss-glow);
	font-weight: 600;
	position: relative;
}

.neutral {
	color: var(--text-tertiary);
}

/* Elite hover with backdrop glow */
tr:hover .gain {
	color: var(--gain);
	text-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
	transform: scale(1.02);
}

tr:hover .loss {
	color: var(--loss);
	text-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
	transform: scale(1.02);
}

/* Badge for extreme values */
.gain.extreme::before,
.loss.extreme::before {
	content: '';
	position: absolute;
	left: -0.5rem;
	top: 50%;
	transform: translateY(-50%);
	width: 3px;
	height: 12px;
	border-radius: 2px;
}

.gain.extreme::before {
	background: var(--gain);
	box-shadow: 0 0 8px var(--gain-glow);
}

.loss.extreme::before {
	background: var(--loss);
	box-shadow: 0 0 8px var(--loss-glow);
}

/* ==========================================
   TIME - Subtle & Minimal
   ========================================== */
.time-cell {
	color: var(--text-tertiary);
	font-size: 0.8125rem;
}

/* ==========================================
   CLOCK PHASE - AI Cycle 1-12 (WOW!)
   Moved to clock-elite.css for better organization
   ========================================== */

/* ==========================================
   LOADING STATES - Skeleton
   ========================================== */
.skeleton {
	background: linear-gradient(
		90deg,
		var(--bg-tertiary) 0%,
		var(--bg-elevated) 50%,
		var(--bg-tertiary) 100%
	);
	background-size: 200% 100%;
	animation: shimmer 1.5s infinite;
	border-radius: 4px;
}

@keyframes shimmer {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

/* ==========================================
   EMPTY STATE - Bloomberg Professional
   ========================================== */
.empty-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 4rem 2rem;
	min-height: 400px;
	text-align: center;
}

.empty-state svg {
	width: 64px;
	height: 64px;
	margin-bottom: 1.5rem;
	opacity: 0.3;
	color: var(--text-tertiary);
	transition: all 300ms ease;
	animation: emptyStatePulse 3s ease-in-out infinite;
}

@keyframes emptyStatePulse {
	0%, 100% { opacity: 0.3; transform: scale(1); }
	50% { opacity: 0.5; transform: scale(1.05); }
}

.empty-state p {
	margin: 0;
	line-height: 1.6;
}

.empty-state p:first-of-type {
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--text-primary);
	margin-bottom: 0.5rem;
}

.empty-state p:last-of-type {
	font-size: 0.875rem;
	color: var(--text-secondary);
}

/* Dark Mode Enhancement */
html.dark .empty-state svg {
	opacity: 0.2;
}

/* Light Mode Enhancement */
html:not(.dark) .empty-state svg {
	opacity: 0.25;
	color: #64748b;
}

/* ==========================================
   PAGINATION - Bloomberg Enhanced
   ========================================== */
.pagination {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-lg);
	margin-bottom: var(--space-lg);
}

.pagination-top {
	padding: var(--space-md) 0;
	border-bottom: 1px solid var(--border-primary);
}

.pagination-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background: var(--bg-secondary);
	border: 1px solid var(--border-primary);
	color: var(--text-primary);
	padding: 0.625rem 1.25rem;
	border-radius: 8px;
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pagination-btn:hover:not(:disabled) {
	background: var(--bg-tertiary);
	border-color: var(--accent-primary);
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.pagination-btn:active:not(:disabled) {
	transform: translateY(0);
}

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

.pagination-btn svg {
	width: 16px;
	height: 16px;
	stroke: currentColor;
	stroke-width: 2.5;
	fill: none;
}

/* Pagination Info - Bloomberg Style */
.pagination-info-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.25rem;
	min-width: 200px;
}

.pagination-info {
	font-family: 'JetBrains Mono', monospace;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--text-primary);
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.01em;
}

.pagination-subinfo {
	font-size: 0.75rem;
	color: var(--text-tertiary);
	font-weight: 400;
}

/* ==========================================
   MOBILE - Progressive Disclosure
   ========================================== */
@media (max-width: 1024px) {
	.asset-card {
		background: var(--bg-secondary);
		border: 1px solid var(--border-primary);
		border-radius: 8px;
		padding: var(--space-lg);
		cursor: pointer;
		transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
		/* Support Alpine.js x-transition */
		opacity: 1;
		transform: scale(1) translateY(0);
	}
	
	.asset-card:hover {
		border-color: var(--accent-primary);
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	}
	
	.asset-card-header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin-bottom: var(--space-md);
	}
	
	.asset-card-metrics {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: var(--space-md);
	}
	
	.metric {
		display: flex;
		flex-direction: column;
		gap: var(--space-xs);
	}
	
	.metric-label {
		font-size: 0.75rem;
		color: var(--text-tertiary);
		text-transform: uppercase;
		letter-spacing: 0.05em;
	}
	
	.metric-value {
		font-family: 'JetBrains Mono', monospace;
		font-size: 0.875rem;
		font-weight: 600;
	}
}

/* ==========================================
   UTILITIES
   ========================================== */
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-left { text-align: left; }

.truncate {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}
/* Cache test: Fri Dec 12 08:19:54 CET 2025 */
