/* Fake admin login: the bait, the blurred dashboard and the reveal. Self-contained, no external request. */
:root {
	--ink: #0f172a;
	--muted: #64748b;
	--line: #e2e8f0;
	--brand: #2563eb;
	--danger: #b91c1c;
	--warn-bg: #fef3c7;
	--warn-ink: #92400e;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { margin: 0; min-height: 100%; }

body {
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.45;
	color: var(--ink);
	background: #0b1220;
}

/* ---- 1. login ---------------------------------------------------------------- */
.login {
	min-height: 100vh;
	display: grid;
	place-items: center;
	padding: 24px 16px;
	background: radial-gradient(1000px 500px at 50% -10%, #1e3a8a 0%, #0b1220 70%);
}

.login__card {
	width: min(400px, 100%);
	padding: 32px;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.login__card.is-shaking { animation: shake 0.4s; }

@keyframes shake {
	20%, 60% { transform: translateX(-8px); }
	40%, 80% { transform: translateX(8px); }
}

.login__logo {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 20px;
	color: var(--brand);
	font-weight: 700;
	font-size: 1.05rem;
}

.login h1 { margin: 0 0 20px; font-size: 1.5rem; }

.field { display: block; margin-bottom: 14px; }
.field span { display: block; margin-bottom: 6px; font-size: 0.85rem; font-weight: 600; }

.field input {
	width: 100%;
	padding: 11px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font: inherit;
	color: inherit;
	background: #fff;
}

.field input:focus {
	outline: 2px solid var(--brand);
	outline-offset: 1px;
	border-color: var(--brand);
}

.error { margin: 0 0 12px; color: var(--danger); font-size: 0.9rem; }

.btn {
	display: inline-block;
	width: 100%;
	padding: 12px 16px;
	border: 0;
	border-radius: 8px;
	background: var(--brand);
	color: #fff;
	font: inherit;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}

.btn:hover { background: #1d4ed8; }
.btn:disabled { opacity: 0.6; cursor: wait; }

.notice {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	margin: 0 0 22px;
	padding: 10px 12px;
	border-radius: 8px;
	background: var(--warn-bg);
	color: var(--warn-ink);
	font-size: 0.85rem;
}

.notice svg { flex: 0 0 auto; margin-top: 1px; }

.dev {
	margin: 18px 0 0;
	padding-top: 16px;
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: 0.85rem;
	text-align: center;
}

.dev a { color: var(--brand); font-weight: 600; }

/* ---- 2. blurred dashboard and loader ----------------------------------------- */
.dash {
	position: relative;
	display: grid;
	grid-template-columns: 220px 1fr;
	min-height: 100vh;
	background: #f4f6fa;
}

.dash__side { padding: 20px 0; background: #0f172a; color: #cbd5e1; }
.dash__brand { padding: 0 20px 20px; color: #fff; font-weight: 700; }
.dash__side ul { margin: 0; padding: 0; list-style: none; }
.dash__side li { padding: 10px 20px; }
.dash__side li.is-on { background: #1e293b; color: #fff; }

.dash__main { min-width: 0; filter: blur(7px); user-select: none; pointer-events: none; }

.dash__top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 14px 24px;
	background: #fff;
	border-bottom: 1px solid var(--line);
}

.dash__search { color: var(--muted); }
.dash__me { padding: 4px 12px; border-radius: 999px; background: var(--line); font-weight: 600; }

.dash__content { padding: 24px; }
.dash__content h2 { margin: 0 0 16px; }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }

.card { padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.card span { display: block; color: var(--muted); font-size: 0.85rem; }
.card strong { display: block; margin: 4px 0; font-size: 1.5rem; }
.card em { color: #15803d; font-style: normal; font-size: 0.85rem; }

.panel { margin-bottom: 16px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.panel h3 { margin: 0 0 12px; font-size: 1rem; }
.chart { display: block; width: 100%; height: 180px; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-size: 0.8rem; font-weight: 600; }

.loader {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	background: rgba(244, 246, 250, 0.35);
}

.loader__card {
	width: min(340px, calc(100% - 32px));
	padding: 28px;
	background: #fff;
	border-radius: 14px;
	text-align: center;
	box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}

.spinner {
	width: 38px;
	height: 38px;
	margin: 0 auto 14px;
	border: 4px solid var(--line);
	border-top-color: var(--brand);
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

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

.loader__msg { margin: 0 0 14px; font-weight: 600; }
.bar { height: 8px; overflow: hidden; border-radius: 999px; background: var(--line); }
.bar i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--brand); transition: width 0.25s ease-out; }
.loader__pct { margin: 8px 0 0; color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }

/* ---- 3. reveal ---------------------------------------------------------------- */
.reveal {
	position: fixed;
	inset: 0;
	z-index: 10;
	display: grid;
	place-items: center;
	padding: 16px;
	overflow-y: auto;
	background: rgba(11, 18, 32, 0.78);
	backdrop-filter: blur(6px);
	animation: fade 0.35s ease-out;
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.reveal__card {
	width: min(520px, 100%);
	padding: 28px;
	background: #fff;
	border-radius: 16px;
	text-align: center;
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
	animation: pop 0.4s cubic-bezier(0.2, 1.2, 0.4, 1);
}

@keyframes pop { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.reveal__card h2 { margin: 0 0 16px; font-size: clamp(1.4rem, 4vw, 1.9rem); line-height: 1.2; }
.reveal__card img { display: block; width: 100%; height: auto; margin: 0 auto 16px; border-radius: 10px; }
.reveal__card p { margin: 0 0 20px; color: var(--muted); }

.reveal__dev {
	margin: 0 0 12px;
	padding: 16px;
	border-radius: 12px;
	background: #eff6ff;
	border: 1px solid #bfdbfe;
}

.reveal__dev p { margin: 0 0 12px; color: var(--ink); font-weight: 600; }

.btn--ghost { background: transparent; color: var(--brand); border: 1px solid #cbd5e1; }
.btn--ghost:hover { background: #f1f5f9; }

@media (max-width: 860px) {
	.dash { grid-template-columns: 1fr; }
	.dash__side { display: none; }
	.cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
	.cards { grid-template-columns: 1fr; }
	.login__card { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
	.login__card.is-shaking, .reveal, .reveal__card { animation: none; }
	.spinner { animation-duration: 2.4s; }
}
