:root {
	--pc-bg: #0b0e14;
	--pc-surface: #131826;
	--pc-surface-alt: #1a2133;
	--pc-border: #262f45;
	--pc-text: #e7ebf5;
	--pc-text-muted: #8a93ab;
	--pc-accent: #5b8def;
	--pc-up: #2fbf71;
	--pc-down: #ef5b5b;
	--pc-radius: 12px;
}

.predcrypto-body {
	background: var(--pc-bg);
	color: var(--pc-text);
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	margin: 0;
	min-height: 100vh;
}

/* ---------- Login ---------- */

.predcrypto-login-wrap {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.predcrypto-login-card {
	background: var(--pc-surface);
	border: 1px solid var(--pc-border);
	border-radius: var(--pc-radius);
	padding: 40px 36px;
	width: 100%;
	max-width: 380px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.predcrypto-login-title {
	margin: 0 0 4px;
	font-size: 24px;
}

.predcrypto-login-subtitle {
	margin: 0 0 24px;
	color: var(--pc-text-muted);
	font-size: 14px;
}

.predcrypto-login-error {
	background: rgba(239, 91, 91, 0.15);
	border: 1px solid rgba(239, 91, 91, 0.4);
	color: #ffb3b3;
	border-radius: 8px;
	padding: 10px 14px;
	font-size: 14px;
	margin-bottom: 18px;
}

.predcrypto-login-form {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.predcrypto-login-form label {
	font-size: 13px;
	color: var(--pc-text-muted);
	margin-top: 10px;
}

.predcrypto-login-form input[type='text'],
.predcrypto-login-form input[type='password'] {
	background: var(--pc-surface-alt);
	border: 1px solid var(--pc-border);
	border-radius: 8px;
	padding: 10px 12px;
	color: var(--pc-text);
	font-size: 15px;
}

.predcrypto-login-form input:focus {
	outline: none;
	border-color: var(--pc-accent);
}

.predcrypto-remember {
	flex-direction: row !important;
	align-items: center;
	gap: 8px !important;
	margin-top: 14px !important;
}

.predcrypto-btn-primary {
	margin-top: 20px;
	background: var(--pc-accent);
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 12px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}

.predcrypto-btn-primary:hover {
	filter: brightness(1.1);
}

.predcrypto-login-footer {
	margin: 18px 0 0;
	text-align: center;
	font-size: 13px;
}

.predcrypto-login-footer a {
	color: var(--pc-text-muted);
}

/* ---------- Dashboard ---------- */

.predcrypto-dashboard {
	max-width: 960px;
	margin: 0 auto;
	padding: 32px 20px 60px;
}

.predcrypto-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 28px;
}

.predcrypto-header h1 {
	margin: 0;
	font-size: 22px;
}

.predcrypto-header-sub {
	margin: 4px 0 0;
	color: var(--pc-text-muted);
	font-size: 13px;
}

.predcrypto-header-user {
	display: flex;
	align-items: center;
	gap: 14px;
	font-size: 14px;
	color: var(--pc-text-muted);
}

.predcrypto-header-user a {
	color: var(--pc-accent);
	text-decoration: none;
}

.predcrypto-empty {
	color: var(--pc-text-muted);
}

.predcrypto-date-filter {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	background: var(--pc-surface);
	border: 1px solid var(--pc-border);
	border-radius: var(--pc-radius);
	padding: 12px 16px;
	margin-bottom: 20px;
	font-size: 13px;
}

.predcrypto-date-filter label {
	display: flex;
	align-items: center;
	gap: 6px;
	color: var(--pc-text-muted);
}

.predcrypto-date-filter input[type='date'] {
	background: var(--pc-surface-alt);
	border: 1px solid var(--pc-border);
	border-radius: 6px;
	padding: 6px 8px;
	color: var(--pc-text);
	font-size: 13px;
}

.predcrypto-filter-submit {
	background: var(--pc-accent);
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 7px 14px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.predcrypto-filter-clear {
	color: var(--pc-text-muted);
	text-decoration: underline;
}

.predcrypto-filter-note {
	color: var(--pc-text-muted);
	margin-left: auto;
}

.predcrypto-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.predcrypto-card {
	background: var(--pc-surface);
	border: 1px solid var(--pc-border);
	border-radius: var(--pc-radius);
	overflow: hidden;
}

.predcrypto-row {
	width: 100%;
	background: none;
	border: none;
	color: var(--pc-text);
	display: grid;
	grid-template-columns: 40px 1.4fr 1fr 1.4fr 24px;
	align-items: center;
	gap: 14px;
	padding: 14px 18px;
	cursor: pointer;
	text-align: left;
	font: inherit;
}

.predcrypto-row:hover {
	background: var(--pc-surface-alt);
}

.pc-rank {
	color: var(--pc-text-muted);
	font-size: 13px;
}

.pc-symbol {
	display: flex;
	flex-direction: column;
}

.pc-symbol strong {
	font-size: 15px;
}

.pc-symbol small,
.pc-accuracy small,
.pc-prediction small {
	color: var(--pc-text-muted);
	font-size: 12px;
}

.pc-accuracy {
	display: flex;
	flex-direction: column;
}

.pc-accuracy-value {
	font-size: 15px;
	font-weight: 600;
}

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

.pc-prediction {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.pc-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 999px;
	width: fit-content;
}

.pc-badge-up {
	background: rgba(47, 191, 113, 0.15);
	color: var(--pc-up);
}

.pc-badge-down {
	background: rgba(239, 91, 91, 0.15);
	color: var(--pc-down);
}

.pc-chevron {
	color: var(--pc-text-muted);
	transition: transform 0.15s ease;
	justify-self: end;
}

.predcrypto-row[aria-expanded='true'] .pc-chevron {
	transform: rotate(180deg);
}

.predcrypto-panel {
	border-top: 1px solid var(--pc-border);
	padding: 18px;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 16px;
	background: var(--pc-surface-alt);
}

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

.pc-stat-value {
	font-size: 20px;
	font-weight: 700;
}

.pc-stat-value small {
	font-size: 12px;
	font-weight: 500;
	color: var(--pc-text-muted);
}

.pc-stat-good {
	color: var(--pc-up);
}

.pc-stat-bad {
	color: var(--pc-down);
}

.pc-stat-label {
	font-size: 12px;
	color: var(--pc-text-muted);
}

.pc-rationale {
	grid-column: 1 / -1;
	font-size: 13px;
	color: var(--pc-text-muted);
	border-top: 1px solid var(--pc-border);
	padding-top: 12px;
}

.pc-rationale strong {
	color: var(--pc-text);
	display: block;
	margin-bottom: 4px;
}

.pc-rationale em {
	display: block;
	margin-top: 6px;
	font-style: normal;
	color: var(--pc-text-muted);
}

@media (max-width: 640px) {
	.predcrypto-row {
		grid-template-columns: 1fr auto;
		grid-template-areas:
			'symbol chevron'
			'accuracy accuracy'
			'prediction prediction';
		row-gap: 8px;
	}
	.pc-rank {
		display: none;
	}
	.pc-symbol {
		grid-area: symbol;
	}
	.pc-chevron {
		grid-area: chevron;
	}
	.pc-accuracy {
		grid-area: accuracy;
		flex-direction: row;
		gap: 8px;
		align-items: baseline;
	}
	.pc-prediction {
		grid-area: prediction;
	}
}
