/* === JIFU Dashboard v2 — matches Figma design === */

.jifu-dashboard {
	position: relative;
	max-width: 480px;
	margin: 0 auto;
	padding: 20px 16px 4px;
	background: #00000000;
	border-radius: 20px 20px 0 0;
	color: #fff;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
	overflow: hidden;
	box-sizing: border-box;
}

/* Glass edge effect */
.jifu-dashboard::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	pointer-events: none;
	z-index: 10;
	background: url(https://dev.jifu.com/wp-content/uploads/2026/06/Frame-1984078182ssa.png);
	background-size: inherit;
	background-repeat: no-repeat;
}

/* ── Top Tabs ── */
.jifu-top-tabs {
	display: flex;
	gap: 10px;
	margin-bottom: 18px;
}

.jifu-tab {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 8px 14px;
	border: 1px solid transparent;
	border-radius: 8px;
	background: linear-gradient(to right, #333333, #1A1A1A);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s;
	white-space: nowrap;
	flex: 1;
}

.jifu-tab:last-child {
	flex: 1.7;
	border-color: #333;
}

.jifu-tab.active {
	background: linear-gradient(90deg, #9F3DC9 0%, #4E1E63 100%);
	border-color: transparent;
}

.tab-icon {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

/* ── Panels ── */
.jifu-panel {
	display: none;
	width: 80%;
	margin: auto;
}

.jifu-panel.active {
	display: block;
}

/* ── Category Grid (2 × 2) ── */
.jifu-cat-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-bottom: 12px;
}

.jifu-cat-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 11px 8px;
	border: 0px solid #242424;
	border-radius: 8px;
	background: #0d0d0d;
	color: #888;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.jifu-cat-btn.active {
	/* border-color: #9F3DC9; */
	color: #c471ed;
	position: relative;
	background: transparent;
	/* box-shadow: inset 0 0 0 1px rgba(159, 61, 201, 0.35), 0 0 8px rgba(159, 61, 201, 0.15); */
}

.jifu-cat-btn.active .unact {
	display: none;
}

.jifu-cat-btn.active .act {
	display: block;
}

.jifu-cat-btn .unact {
	display: block;
}

.jifu-cat-btn .act {
	display: none;
}

.jifu-cat-btn.active::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	pointer-events: none;
	z-index: 10;
	background: linear-gradient(#9F3DC9, #9F3DC9) bottom / 100% 1px no-repeat, linear-gradient(to top, rgba(159, 61, 201, .65), rgba(159, 61, 201, .12), transparent) left / 1px 100% no-repeat, linear-gradient(to top, rgba(159, 61, 201, .65), rgba(159, 61, 201, .12), #00000000) right / 1px 100% no-repeat;
}

.cat-icon {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
}

/* ── Filter Row ── */
.jifu-filter-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-bottom: 12px;
	background: linear-gradient(to right, #333333, #1A1A1A);
	padding: 3px;
	border-radius: 5px;
}

.jifu-filter-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px;
	border: 0px solid #242424;
	border-radius: 8px;
	background: #0d0d0d00;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.6px;
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.jifu-filter-btn.active {
	background: linear-gradient(90deg, #9F3DC9 0%, #4E1E63 100%);
	border-color: transparent;
	color: #fff;
}

.filter-icon {
	width: 13px;
	height: 13px;
	flex-shrink: 0;
}

/* ── Search ── */
.jifu-search-wrap {
	position: relative;
	margin-bottom: 6px;
}

.jifu-search-input {
	width: 100%;
	padding: 12px 44px 12px 16px;
	border: 1px solid #222;
	border-radius: 8px;
	background: #0d0d0d;
	color: #fff;
	font-size: 14px;
	box-sizing: border-box;
	outline: none;
	transition: border-color 0.2s;
}

.jifu-search-input:focus {
	border-color: #444;
}

.jifu-search-input::placeholder {
	color: #444;
}

.jifu-search-btn {
	position: absolute;
	right: 0;
	top: 0;
	bottom: 0;
	width: 44px;
	background: none;
	border: none;
	cursor: pointer;
	color: #555;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.jifu-search-btn svg {
	width: 16px;
	height: 16px;
}

/* ── Scrollable Lists ── */
.jifu-asset-list,
.jifu-alert-list {
	max-height: 400px;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: #222 transparent;
}

.jifu-asset-list::-webkit-scrollbar,
.jifu-alert-list::-webkit-scrollbar {
	width: 3px;
}

.jifu-asset-list::-webkit-scrollbar-track,
.jifu-alert-list::-webkit-scrollbar-track {
	background: transparent;
}

.jifu-asset-list::-webkit-scrollbar-thumb,
.jifu-alert-list::-webkit-scrollbar-thumb {
	background: #222;
	border-radius: 2px;
}

/* ── Asset Item — ALL (flat row) ── */
.jifu-asset-item {
	cursor: default;
	box-sizing: border-box;
}

.jifu-asset-row {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	flex-wrap: nowrap !important;
	gap: 12px;
	padding: 11px 2px;
	background: none !important;
	border: none !important;
	border-radius: 0 !important;
	border-bottom: 1px solid #141420 !important;
	margin-bottom: 0 !important;
	overflow: visible !important;
}

.jifu-asset-row:last-child {
	border-bottom: none !important;
}

/* ── Asset Item — FAVORITES (card with sparkline) ── */
.jifu-asset-card {
	background: linear-gradient(160deg, #0e0e1e 0%, #080813 100%);
	border: 1px solid #1c1c30 !important;
	border-radius: 14px;
	margin-bottom: 8px;
	overflow: hidden;
}

.asset-item-top {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 10px;
	padding: 11px 12px 10px;
}

/* Dual overlapping flag icons */
.asset-icon-duo {
	position: relative;
	width: 46px;
	height: 32px;
	flex-shrink: 0;
}

.asset-icon-duo .icon-a {
	position: absolute;
	left: 0;
	top: 0;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 700;
	color: #fff;
	z-index: 1;
	border: 1.5px solid #080813;
	letter-spacing: -0.5px;
}

.asset-icon-duo .icon-b {
	position: absolute;
	left: 18px;
	top: 6px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 9px;
	font-weight: 700;
	color: #fff;
	z-index: 2;
	border: 1.5px solid #080813;
}

/* Single icon (flat rows and card fallback) */
.asset-icon {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
	font-weight: 700;
	color: #fff;
	flex-shrink: 0;
	letter-spacing: -1px;
}

.asset-info {
	flex: 1;
	min-width: 0;
}

.asset-name {
	font-size: 13px;
	font-weight: 600;
	color: #fff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.3;
}

.asset-symbol {
	font-size: 11px;
	color: #555;
	margin-top: 2px;
	line-height: 1.2;
}

.asset-right {
	text-align: right;
	flex-shrink: 0;
}

.asset-price {
	font-size: 13px;
	font-weight: 600;
	color: #e8e8f0;
	line-height: 1.3;
}

.asset-change {
	font-size: 12px;
	font-weight: 600;
	margin-top: 2px;
	flex-shrink: 0;
	min-width: 58px;
	text-align: right;
}

/* inside a card (.asset-right), reset min-width so it flows naturally */
.asset-right .asset-change {
	min-width: 0;
	text-align: right;
}

.asset-change.positive {
	color: #22c55e;
}

.asset-change.negative {
	color: #ef4444;
}

.asset-star {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: none;
	background: #16162a;
	color: #4a4a6a;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex-shrink: 0;
	transition: background 0.2s, box-shadow 0.2s;
	padding: 0;
	margin-left: 6px;
}

.asset-star:hover {
	background: #1e1e3a;
}

.asset-star.active {
	color: #ffc107;
	background: #1a1400;
	box-shadow: 0 0 10px rgba(255, 193, 7, 0.3);
}

.asset-star svg {
	width: 13px;
	height: 13px;
}

/* Sparkline chart area */
.asset-sparkline {
	width: 100%;
	height: 52px;
	display: block;
	margin-top: -2px;
}

.asset-sparkline svg {
	width: 100%;
	height: 100%;
	display: block;
}

/* ── Empty State ── */
.jifu-empty {
	text-align: center;
	color: #444;
	padding: 40px 0;
	font-size: 13px;
}

/* ── Alert Notifications tab — gold active ── */
.jifu-tab--alerts.active {
	background: linear-gradient(90deg, #C8921A 0%, #7B4D0E 100%);
	border-color: transparent;
}

/* ── Educator / Scanner mega-tabs ── */
.jifu-idea-tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-bottom: 12px;
}

.jifu-idea-btn {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 7px;
	padding: 14px 8px;
	border: 1px solid #242424;
	border-radius: 8px;
	background: #0d0d0d;
	color: #888;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.5px;
	cursor: pointer;
	text-align: center;
	line-height: 1.35;
	transition: all 0.2s;
}

.jifu-idea-btn .idea-icon {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

.jifu-idea-btn.active {
	background: linear-gradient(90deg, #9F3DC9 0%, #4E1E63 100%);
	border-color: transparent;
	color: #fff;
}

/* ── Sub-panels (educator / scanner) ── */
.jifu-sub-panel {
	display: none;
}

.jifu-sub-panel.active {
	display: block;
}

/* ── Scanner selector row ── */
.jifu-scanner-row {
	display: flex;
	gap: 8px;
	margin-bottom: 10px;
	align-items: flex-start;
}

.jifu-basic-btn {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 9px 14px;
	border-radius: 20px;
	border: none;
	background: #1565C0;
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	flex-shrink: 0;
}

.basic-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #fff;
	flex-shrink: 0;
}

.jifu-scanner-wrap {
	flex: 1;
	position: relative;
}

.jifu-scanner-toggle {
	display: flex;
	align-items: center;
	gap: 6px;
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #2a2a2a;
	border-radius: 8px;
	background: #111;
	color: #aaa;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.4px;
	cursor: pointer;
	text-align: left;
	line-height: 1.25;
	box-sizing: border-box;
}

.scanner-picker-icon {
	width: 15px;
	height: 15px;
	flex-shrink: 0;
	color: #4A9EFF;
}

.scanner-toggle-img {
	width: 20px;
	height: 20px;
	object-fit: contain;
	flex-shrink: 0;
}

.scanner-opt-icon img {
	width: 20px;
	height: 20px;
	object-fit: contain;
}

.chevron-down {
	width: 22px;
	height: 22px;
	flex-shrink: 0;
	margin-left: auto;
	transition: transform 0.2s;
	color: #fff;
}

.jifu-scanner-toggle.open .chevron-down {
	transform: rotate(180deg);
}

.jifu-scanner-dropdown {
	display: none;
	/* position: absolute; */
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	background: #0d0d0d;
	border: 1px solid #2a2a2a;
	border-radius: 8px;
	z-index: 200;
	overflow: hidden;
}

.jifu-scanner-dropdown.open {
	display: block;
}

.scanner-opt {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 5px 12px;
	cursor: pointer;
	border-bottom: 0px solid #1a1a1a;
	transition: background 0.15s;
}

.scanner-opt:last-child {
	border-bottom: none;
}

.scanner-opt:hover {
	background: #1c1c1c;
}

.scanner-opt.active {
	background: #181818;
}

.scanner-opt-icon {
	width: 30px;
	height: 30px;
	border-radius: 7px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	background: transparent !important;
}

.scanner-opt-icon svg {
	width: 15px;
	height: 15px;
}

.scanner-opt-text {
	display: flex;
	flex-direction: column;
	gap: 1px;
}

.scanner-opt-name {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.5px;
	line-height: 1.2;
}

.scanner-opt small {
	display: block;
	color: #fff;
	font-weight: 500;
	font-size: 9px;
	letter-spacing: 0.4px;
}

/* ── Timeframe row ── */
.jifu-tf-row {
	display: flex;
	gap: 5px;
	margin-bottom: 12px;
}

.jifu-tf-btn {
	flex: 1;
	padding: 7px 2px;
	border: 1px solid #242424;
	border-radius: 6px;
	background: #0d0d0d;
	color: #555;
	font-size: 11px;
	font-weight: 500;
	cursor: pointer;
	text-align: center;
	transition: all 0.2s;
}

.jifu-tf-btn.active {
	background: #1e1e1e;
	border-color: #3a3a3a;
	color: #fff;
}

/* ── Alert Cards (new design) ── */
.jifu-alert-card {
	border-radius: 10px;
	background: #0E1117;
	border: 1px solid #1e1e1e;
	margin-bottom: 10px;
	overflow: hidden;
}

.jifu-alert-card.card-active {
	border-top: 2px solid #2979FF;
}

.jifu-alert-card.card-pending {
	border-top: 2px solid #FFC107;
}

.alert-card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 14px 4px;
}

.alert-status-label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1px;
}

.alert-status-label.active-lbl {
	color: #2979FF;
}

.alert-status-label.pending-lbl {
	color: #FFC107;
}

.alert-card-time {
	font-size: 10px;
	color: #444;
}

.alert-card-body {
	padding: 8px 14px 14px;
}

.alert-asset-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}

.alert-asset-icon-sm {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 700;
	color: #fff;
	flex-shrink: 0;
}

.alert-asset-name-col {
	flex: 1;
}

.alert-asset-name-txt {
	font-size: 14px;
	font-weight: 700;
	color: #fff;
	line-height: 1.2;
}

.alert-type-col {
	text-align: right;
}

.alert-tf-pill {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	background: #1a1a1a;
	border: 1px solid #2a2a2a;
	border-radius: 4px;
	padding: 2px 7px;
	font-size: 10px;
	color: #aaa;
	margin-bottom: 3px;
}

.alert-trade-type {
	display: block;
	font-size: 11px;
	color: #888;
}

.alert-levels {
	background: #080a0e;
	border-radius: 7px;
	overflow: hidden;
}

.alert-level-row {
	display: flex;
	align-items: center;
	padding: 8px 10px;
	border-bottom: 1px solid #111;
	gap: 8px;
}

.alert-level-row:last-child {
	border-bottom: none;
}

.level-name {
	flex: 1;
	font-size: 11px;
	color: #666;
}

.level-val {
	font-size: 12px;
	font-weight: 600;
	color: #bbb;
	min-width: 68px;
	text-align: right;
}

.alert-level-row.lv-inv .level-name,
.alert-level-row.lv-inv .level-val {
	color: #F44336;
}

.alert-level-row.lv-exit .level-name,
.alert-level-row.lv-exit .level-val {
	color: #4CAF50;
}

.copy-btn {
	background: none;
	border: none;
	padding: 3px;
	cursor: pointer;
	color: #333;
	display: flex;
	align-items: center;
	flex-shrink: 0;
	border-radius: 3px;
	transition: color 0.15s, background 0.15s;
}

.copy-btn:hover {
	color: #888;
	background: #1a1a1a;
}

.copy-btn svg {
	width: 12px;
	height: 12px;
}