/* =====================================================
   Expo Nerd Core — Staff Check-in
   ===================================================== */

:root {
	--ci-dark:    #111111;
	--ci-card:    #1A1A1A;
	--ci-lime:    #A3D900;
	--ci-red:     #f87171;
	--ci-yellow:  #facc15;
	--ci-white:   #FFFFFF;
	--ci-muted:   rgba(255,255,255,.40);
	--ci-border:  rgba(255,255,255,.10);
}

/* ── App container ── */
.en-ci-app {
	position: relative;
	min-height: 100vh;
	background: var(--ci-dark);
	font-family: 'Outfit', -apple-system, sans-serif;
	color: var(--ci-white);
	overflow-x: hidden;
}

/* ── Screens ── */
.en-ci-screen {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.en-ci-screen[hidden] { display: none !important; }

/* ──────────────────────────────────────────────
   PIN SCREEN
────────────────────────────────────────────── */

#en-ci-pin {
	align-items: center;
	justify-content: center;
}

.en-ci-pin-wrap {
	width: 100%;
	max-width: 360px;
	padding: 40px 28px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.en-ci-pin-logo { margin-bottom: 32px; }

.en-ci-pin-title {
	font-family: 'Bangers', cursive;
	font-size: 34px;
	letter-spacing: 3px;
	margin: 0 0 8px;
	line-height: 1;
}

.en-ci-pin-sub {
	font-size: 14px;
	color: var(--ci-muted);
	line-height: 1.55;
	margin: 0 0 32px;
}

.en-ci-pin-field {
	width: 100%;
	margin-bottom: 16px;
}

#en-ci-pin-input {
	width: 100%;
	background: var(--ci-card);
	border: 1px solid var(--ci-border);
	border-radius: 14px;
	padding: 16px 20px;
	font-size: 28px;
	color: var(--ci-white);
	text-align: center;
	letter-spacing: 10px;
	outline: none;
	transition: border-color .2s;
	box-sizing: border-box;
	-webkit-appearance: none;
}

#en-ci-pin-input:focus { border-color: var(--ci-lime); }

.en-ci-pin-error {
	color: var(--ci-red);
	font-size: 13px;
	margin-top: 14px;
	padding: 10px 16px;
	background: rgba(248,113,113,.1);
	border: 1px solid rgba(248,113,113,.2);
	border-radius: 8px;
	width: 100%;
	box-sizing: border-box;
}

/* ──────────────────────────────────────────────
   COMMON: Header + Buttons
────────────────────────────────────────────── */

.en-ci-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	background: var(--ci-card);
	border-bottom: 1px solid var(--ci-border);
	flex-shrink: 0;
	gap: 8px;
}

.en-ci-header-title {
	font-family: 'Bangers', cursive;
	font-size: 22px;
	letter-spacing: 4px;
	color: var(--ci-lime);
}

.en-ci-icon-btn {
	background: none;
	border: none;
	color: var(--ci-muted);
	cursor: pointer;
	padding: 8px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color .2s;
	width: 40px;
	height: 40px;
	flex-shrink: 0;
}

.en-ci-icon-btn:hover { color: var(--ci-white); }

.en-ci-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 28px;
	border-radius: 50px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	border: none;
	transition: opacity .15s, transform .15s;
	letter-spacing: .3px;
	width: 100%;
	box-sizing: border-box;
}

.en-ci-btn-primary {
	background: var(--ci-lime);
	color: var(--ci-dark);
}

.en-ci-btn-primary:hover  { opacity: .88; transform: translateY(-1px); }
.en-ci-btn-primary:active { transform: translateY(0); }

.en-ci-btn-sm {
	width: auto;
	padding: 12px 22px;
	font-size: 14px;
	border-radius: 10px;
	flex-shrink: 0;
}

/* ──────────────────────────────────────────────
   SCAN SCREEN
────────────────────────────────────────────── */

.en-ci-scan-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	overflow-y: auto;
}

/* Camera */
.en-ci-camera-section { flex-shrink: 0; }

.en-ci-camera-wrap {
	position: relative;
	width: 100%;
	background: #000;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	max-height: 52vh;
}

#en-ci-video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.en-ci-scan-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,.45);
	display: flex;
	align-items: center;
	justify-content: center;
}

.en-ci-scan-frame {
	position: relative;
	width: 200px;
	height: 200px;
}

/* Corner brackets */
.en-ci-corner {
	position: absolute;
	width: 26px;
	height: 26px;
	border-color: var(--ci-lime);
	border-style: solid;
	border-width: 0;
}

.en-ci-corner.tl { top:  0; left:  0; border-top-width:    3px; border-left-width:  3px; border-radius: 5px 0 0 0; }
.en-ci-corner.tr { top:  0; right: 0; border-top-width:    3px; border-right-width: 3px; border-radius: 0 5px 0 0; }
.en-ci-corner.bl { bottom: 0; left:  0; border-bottom-width: 3px; border-left-width:  3px; border-radius: 0 0 0 5px; }
.en-ci-corner.br { bottom: 0; right: 0; border-bottom-width: 3px; border-right-width: 3px; border-radius: 0 0 5px 0; }

/* Scan line */
.en-ci-scan-line {
	position: absolute;
	left: 6px;
	right: 6px;
	height: 2px;
	background: linear-gradient(90deg, transparent, var(--ci-lime), transparent);
	box-shadow: 0 0 8px var(--ci-lime), 0 0 16px rgba(163,217,0,.4);
	animation: en-ci-scanline 2.2s ease-in-out infinite;
}

@keyframes en-ci-scanline {
	0%   { top: 8px;   opacity: 0; }
	8%   { opacity: 1; }
	90%  { opacity: 1; }
	100% { top: 186px; opacity: 0; }
}

.en-ci-camera-hint {
	font-size: 12px;
	color: var(--ci-muted);
	text-align: center;
	padding: 10px 16px 6px;
	margin: 0;
}

/* Divider */
.en-ci-divider {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 18px 20px;
	color: rgba(255,255,255,.25);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .5px;
}

.en-ci-divider::before,
.en-ci-divider::after {
	content: '';
	flex: 1;
	height: 1px;
	background: var(--ci-border);
}

/* Manual input */
.en-ci-manual { padding: 0 16px 32px; }

.en-ci-manual-label {
	display: block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: rgba(255,255,255,.35);
	margin-bottom: 8px;
}

.en-ci-manual-row {
	display: flex;
	gap: 10px;
	align-items: stretch;
}

#en-ci-code-input {
	flex: 1;
	min-width: 0;
	background: var(--ci-card);
	border: 1px solid var(--ci-border);
	border-radius: 10px;
	padding: 13px 16px;
	font-size: 14px;
	color: var(--ci-white);
	font-family: 'Courier New', monospace;
	letter-spacing: 1px;
	outline: none;
	transition: border-color .2s;
	-webkit-appearance: none;
}

#en-ci-code-input:focus { border-color: var(--ci-lime); }

.en-ci-scan-error {
	margin-top: 10px;
	padding: 10px 14px;
	background: rgba(248,113,113,.1);
	border: 1px solid rgba(248,113,113,.2);
	border-radius: 8px;
	color: var(--ci-red);
	font-size: 13px;
}

/* ──────────────────────────────────────────────
   RESULT SCREEN
────────────────────────────────────────────── */

.en-ci-result-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 32px 20px 40px;
	max-width: 480px;
	width: 100%;
	margin: 0 auto;
	box-sizing: border-box;
	text-align: center;
}

/* Status badge */
.en-ci-res-badge {
	display: inline-block;
	padding: 6px 18px;
	border-radius: 50px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	margin-bottom: 24px;
}

.en-ci-res-badge.paid      { background: rgba(163,217,0,.15); color: var(--ci-lime);   border: 1px solid rgba(163,217,0,.3);  }
.en-ci-res-badge.pending   { background: rgba(250,204,21,.12); color: var(--ci-yellow); border: 1px solid rgba(250,204,21,.3); }
.en-ci-res-badge.used      { background: rgba(248,113,113,.12); color: var(--ci-red);   border: 1px solid rgba(248,113,113,.3);}
.en-ci-res-badge.cancelled { background: rgba(255,255,255,.06); color: var(--ci-muted); border: 1px solid var(--ci-border);   }

/* Name + type */
.en-ci-res-name {
	font-family: 'Bangers', cursive;
	font-size: 38px;
	letter-spacing: 2px;
	color: var(--ci-white);
	line-height: 1.1;
	margin-bottom: 8px;
}

.en-ci-res-type {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--ci-lime);
	margin-bottom: 28px;
}

/* Meta table */
.en-ci-res-meta {
	width: 100%;
	background: var(--ci-card);
	border-radius: 12px;
	overflow: hidden;
	margin-bottom: 28px;
}

.en-ci-meta-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 13px 18px;
	border-bottom: 1px solid rgba(255,255,255,.06);
	gap: 12px;
}

.en-ci-meta-row:last-child { border-bottom: none; }

.en-ci-meta-label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: rgba(255,255,255,.3);
	flex-shrink: 0;
}

.en-ci-meta-value {
	font-size: 13px;
	font-weight: 600;
	color: rgba(255,255,255,.8);
	text-align: right;
	word-break: break-all;
}

/* Confirm button */
.en-ci-btn-confirm {
	background: var(--ci-lime);
	color: var(--ci-dark);
	border-radius: 14px;
	font-size: 16px;
	padding: 17px 32px;
	margin-bottom: 12px;
}

.en-ci-btn-confirm:hover  { opacity: .88; }
.en-ci-btn-confirm[hidden] { display: none !important; }

/* Warning */
.en-ci-res-warning {
	width: 100%;
	padding: 12px 16px;
	background: rgba(248,113,113,.1);
	border: 1px solid rgba(248,113,113,.2);
	border-radius: 8px;
	color: var(--ci-red);
	font-size: 14px;
	line-height: 1.5;
	box-sizing: border-box;
	margin-top: 4px;
}

/* ──────────────────────────────────────────────
   SUCCESS SCREEN
────────────────────────────────────────────── */

#en-ci-success {
	align-items: center;
	justify-content: center;
}

.en-ci-success-body {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 48px 28px;
	text-align: center;
	max-width: 360px;
}

.en-ci-success-icon {
	width: 108px;
	height: 108px;
	border-radius: 50%;
	background: var(--ci-lime);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 28px;
	animation: en-ci-popin .45s cubic-bezier(.34,1.56,.64,1) both;
}

.en-ci-success-icon svg {
	width: 56px;
	height: 56px;
	stroke: var(--ci-dark);
}

@keyframes en-ci-popin {
	0%   { transform: scale(0); opacity: 0; }
	100% { transform: scale(1); opacity: 1; }
}

.en-ci-success-title {
	font-family: 'Bangers', cursive;
	font-size: 52px;
	letter-spacing: 4px;
	color: var(--ci-lime);
	margin: 0 0 14px;
	line-height: 1;
}

.en-ci-success-name {
	font-size: 22px;
	font-weight: 700;
	color: var(--ci-white);
	margin-bottom: 6px;
}

.en-ci-success-type {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--ci-muted);
	margin-bottom: 40px;
}

.en-ci-btn-next { max-width: 280px; }

/* ──────────────────────────────────────────────
   LOADING OVERLAY
────────────────────────────────────────────── */

.en-ci-loading {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.65);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
}

.en-ci-loading[hidden] { display: none !important; }

.en-ci-spinner {
	width: 44px;
	height: 44px;
	border: 3px solid rgba(163,217,0,.2);
	border-top-color: var(--ci-lime);
	border-radius: 50%;
	animation: en-ci-spin .65s linear infinite;
}

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

/* ──────────────────────────────────────────────
   RESPONSIVO
────────────────────────────────────────────── */

@media (min-width: 480px) {
	.en-ci-camera-wrap { max-height: 60vh; }
	.en-ci-scan-frame  { width: 240px; height: 240px; }

	@keyframes en-ci-scanline {
		0%   { top: 8px;   opacity: 0; }
		8%   { opacity: 1; }
		90%  { opacity: 1; }
		100% { top: 226px; opacity: 0; }
	}
}
