/*!
 * BitForgeNet Guest Tickets — door station.
 *
 * Self-contained on purpose: this stylesheet is inlined into a page that loads no
 * theme and no admin CSS, so nothing here can be overridden and nothing outside
 * can collapse the preview.
 */

* { box-sizing: border-box; }

/* The overlays below are laid out with flex, which outranks the browser's own
   rule for [hidden] and would leave an invisible sheet swallowing every tap.
   State this once, loudly, so a hidden element is genuinely gone. */
[hidden] { display: none !important; }

html, body {
	margin: 0;
	min-height: 100%;
	background: #0e1014;
	color: #f2f2f4;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	-webkit-text-size-adjust: 100%;
}

body.bfnet-door {
	padding-bottom: env(safe-area-inset-bottom);
}

/* ---------- Top bar ---------- */

.d-bar {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
	background: linear-gradient(120deg, #12141a, #23262f 70%, #3a3320 150%);
	border-bottom: 1px solid rgba(255, 255, 255, .09);
	position: sticky;
	top: 0;
	z-index: 30;
}
.d-bar__id { flex: 1; min-width: 0; line-height: 1.3; }
.d-bar__id strong { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-bar__id span { font-size: 12px; opacity: .55; }
.d-bar__count { text-align: right; line-height: 1.15; white-space: nowrap; }
.d-bar__count b { display: block; font-size: 21px; color: #d8b53f; font-variant-numeric: tabular-nums; }
.d-bar__count span { font-size: 11px; opacity: .6; }
.d-bar__count i { font-style: normal; }

.d-gate {
	background: rgba(255, 255, 255, .08);
	border: 1px solid rgba(255, 255, 255, .16);
	color: #fff;
	border-radius: 9px;
	padding: 8px 9px;
	font-size: 13px;
	max-width: 118px;
}
.d-icon {
	background: rgba(255, 255, 255, .08);
	border: 1px solid rgba(255, 255, 255, .16);
	color: #fff;
	border-radius: 9px;
	width: 38px; height: 38px;
	font-size: 19px; line-height: 1;
	cursor: pointer;
}

/* ---------- Mode tabs ---------- */

.d-modes {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 6px;
	padding: 10px 14px 0;
	max-width: 620px;
	margin: 0 auto;
}
.d-mode {
	padding: 11px 6px;
	border: 1px solid rgba(255, 255, 255, .14);
	background: rgba(255, 255, 255, .05);
	color: rgba(255, 255, 255, .66);
	border-radius: 10px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}
.d-mode.is-on { background: #c9a227; border-color: #c9a227; color: #ffffff; }

/* ---------- Panes ---------- */

.d-main { max-width: 620px; margin: 0 auto; padding: 12px 14px 28px; }
.d-pane { display: none; }
.d-pane.is-on { display: block; }

.d-stage {
	position: relative;
	border-radius: 14px;
	overflow: hidden;
	background: #000;
	aspect-ratio: 3 / 4;
}
.d-view { width: 100%; height: 100%; display: block; object-fit: cover; background: #000; }

/* The element is present only as a decoding source of last resort. It is never
   what the agent looks at, so it cannot be what fails to paint. */
.d-hidden-video {
	position: absolute;
	width: 2px; height: 2px;
	opacity: .01;
	pointer-events: none;
	left: 0; top: 0;
}

.d-reticle {
	position: absolute;
	inset: 14%;
	border: 3px solid rgba(255, 255, 255, .7);
	border-radius: 18px;
	pointer-events: none;
	box-shadow: 0 0 0 9999px rgba(0, 0, 0, .3);
}
.d-status {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	margin: 0;
	padding: 12px 14px;
	background: linear-gradient(transparent, rgba(0, 0, 0, .82));
	font-size: 13.5px;
	text-align: center;
}

.d-actions { display: flex; gap: 8px; margin-top: 12px; }

.d-btn {
	flex: 1;
	display: block;
	padding: 14px 16px;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, .18);
	background: rgba(255, 255, 255, .07);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	font-family: inherit;
}
.d-btn--primary { background: #c9a227; border-color: #c9a227; color: #ffffff; }
.d-btn--big { width: 100%; padding: 17px; font-size: 16.5px; margin-top: 14px; }
.d-btn--ghost { background: rgba(255, 255, 255, .14); }
.d-btn--quiet { color: #ff9f9b; border-color: rgba(255, 120, 115, .35); }

.d-note { margin: 10px 0 0; font-size: 12.5px; line-height: 1.5; color: rgba(255, 255, 255, .5); }

/* ---------- Photo ---------- */

.d-photo { text-align: center; padding: 8px 0; }
.d-photo p { margin: 0 0 8px; font-size: 14.5px; line-height: 1.5; }
.d-photo__view { width: 100%; border-radius: 14px; margin-top: 14px; display: block; }

/* ---------- Keypad ---------- */

.d-keypad label { display: block; font-size: 13px; font-weight: 600; margin: 6px 0 6px; }
.d-keypad input {
	width: 100%;
	padding: 16px;
	font-size: 25px;
	letter-spacing: .06em;
	text-align: center;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, .2);
	background: rgba(255, 255, 255, .07);
	color: #fff;
	font-weight: 600;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.d-keypad input:focus { outline: 2px solid #c9a227; border-color: transparent; }

.d-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.d-key {
	padding: 16px 0;
	font-size: 21px;
	font-weight: 600;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, .15);
	background: rgba(255, 255, 255, .07);
	color: #fff;
	cursor: pointer;
	font-family: inherit;
}
.d-key:active { background: rgba(255, 255, 255, .2); }

/* ---------- Feed ---------- */

.d-feed { margin-top: 26px; }
.d-feed h2 { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .42); margin: 0 0 8px; }
.d-feed ul { list-style: none; margin: 0; padding: 0; }
.d-feed li {
	display: flex; justify-content: space-between; align-items: center; gap: 12px;
	padding: 11px 13px; margin-bottom: 6px;
	border-radius: 10px;
	background: rgba(255, 255, 255, .05);
	border-left: 3px solid #5f6368;
	font-size: 14px;
}
.d-feed li.is-ok { border-left-color: #12a050; }
.d-feed li.is-warn { border-left-color: #c58a12; }
.d-feed li.is-bad { border-left-color: #c5221f; }
.d-feed li span { opacity: .5; font-size: 12px; white-space: nowrap; }

/* ---------- Verdict ---------- */

.d-verdict {
	position: fixed; inset: 0; z-index: 60;
	display: flex; align-items: center; justify-content: center;
	padding: 26px; text-align: center;
	background: #5f6368;
	animation: d-in .12s ease-out;
}
@keyframes d-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.d-verdict.is-ok { background: linear-gradient(150deg, #0f7b3f, #12a050); }
.d-verdict.is-warn { background: linear-gradient(150deg, #8a5a00, #c58a12); }
.d-verdict.is-bad { background: linear-gradient(150deg, #8c1d18, #c5221f); }
.d-verdict__inner { width: 100%; max-width: 400px; }
.d-verdict__mark {
	width: 108px; height: 108px; margin: 0 auto 18px;
	border-radius: 50%; background: rgba(255, 255, 255, .17);
	display: flex; align-items: center; justify-content: center;
	font-size: 55px; line-height: 1;
}
.d-verdict__title { margin: 0 0 8px; font-size: 32px; font-weight: 700; line-height: 1.1; }
.d-verdict__name { margin: 0 0 6px; font-size: 21px; font-weight: 600; }
.d-verdict__meta { margin: 0 0 24px; font-size: 14.5px; opacity: .86; line-height: 1.5; }

/* ---------- Sheet ---------- */

.d-sheet {
	position: fixed; inset: 0; z-index: 70;
	background: rgba(0, 0, 0, .72);
	display: flex; align-items: flex-end; justify-content: center;
}
.d-sheet__inner {
	width: 100%; max-width: 560px;
	background: #171a20;
	border-radius: 18px 18px 0 0;
	padding: 20px 18px calc(22px + env(safe-area-inset-bottom));
	display: grid; gap: 9px;
	max-height: 88vh; overflow: auto;
}
.d-sheet h2 { margin: 0 0 6px; font-size: 16px; }
.d-report {
	margin: 6px 0 0;
	padding: 13px;
	background: #0b0d11;
	border: 1px solid rgba(255, 255, 255, .12);
	border-radius: 10px;
	font-size: 11.5px;
	line-height: 1.6;
	white-space: pre-wrap;
	word-break: break-word;
	color: #cfd3da;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	-webkit-user-select: all;
	user-select: all;
}

/* ---------- Offline ---------- */

.d-offline {
	position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
	z-index: 50;
	background: #8a5a00;
	border-radius: 12px;
	padding: 12px 15px;
	font-size: 13.5px;
	display: flex; justify-content: space-between; gap: 12px; align-items: center;
}

@media (min-width: 720px) {
	.d-stage { aspect-ratio: 4 / 3; }
}

.d-picker {
	width: 100%; margin-top: 10px; padding: 12px 13px;
	border-radius: 12px; border: 1px solid rgba(255, 255, 255, .18);
	background: rgba(255, 255, 255, .07); color: #fff;
	font-size: 14.5px; font-family: inherit;
}
.d-verdict .d-btn { margin-bottom: 9px; }

.d-pad--wide { grid-template-columns: repeat(6, 1fr); gap: 6px; }
.d-pad--wide .d-key { padding: 13px 0; font-size: 17px; }
.d-key--wide { grid-column: span 6; }
