* { box-sizing: border-box; }
body {
	margin: 0;
	font-family: 'Segoe UI', Arial, sans-serif;
	background: #1e2430;
	color: #222;
}
.app-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 20px;
	background: #12161f;
	color: #fff;
}
.app-header h1 { font-size: 18px; margin: 0; }
.status-pill {
	padding: 4px 12px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: bold;
	background: #555;
}
.status-pill.NotRegistered { background: #b93a3a; }
.status-pill.AwaitingAuthorisation { background: #b98a3a; }
.status-pill.PartiallyRegistered { background: #b9a53a; }
.status-pill.Registered { background: #3ab95a; }
.status-pill.EftDisabled { background: #7a3ab9; }

.layout {
	display: flex;
	gap: 16px;
	padding: 16px;
}

.hidden { display: none !important; }

button {
	cursor: pointer;
	border: none;
	border-radius: 6px;
	padding: 8px 14px;
	background: #d32f2f;
	color: #fff;
	font-weight: bold;
}
button.secondary { background: #555; }
button.danger { background: #8a1f1f; }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.overlay {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,0.55);
	display: flex;
	align-items: center;
	justify-content: center;
}
.overlay.hidden { display: none; }
.message-box {
	background: #24304a;
	color: #fff;
	border-radius: 10px;
	padding: 20px;
	width: 85%;
	text-align: center;
}
.eft-badge {
	display: inline-block;
	background: #d32f2f;
	padding: 2px 10px;
	border-radius: 4px;
	font-weight: bold;
	margin-bottom: 10px;
}
.message-box img { width: 160px; height: 160px; background: #fff; padding: 6px; border-radius: 6px; }
.message-text { margin: 10px 0; font-size: 14px; }
.pairing-code { font-family: monospace; font-size: 12px; opacity: 0.8; margin-bottom: 10px; word-break: break-all; }
.button-row { display: flex; gap: 10px; justify-content: center; margin-top: 10px; }

.side-panel { width: 380px; display: flex; flex-direction: column; gap: 10px; }
.panel { background: #fff; border-radius: 8px; padding: 10px 14px; }
.panel summary { cursor: pointer; font-weight: bold; }
.panel-body { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.panel-body label { display: flex; flex-direction: column; font-size: 12px; color: #444; gap: 3px; }
.panel-body input, .panel-body select { padding: 6px; font-size: 13px; }
.hint { font-size: 12px; color: #a33; min-height: 16px; }

#stateJson { max-height: 300px; overflow: auto; font-size: 11px; background: #f4f4f4; padding: 8px; }
.activity-log { max-height: 320px; overflow: auto; font-size: 11px; }
.activity-log .entry { border-bottom: 1px solid #eee; padding: 6px 0; }
.activity-log .entry pre { white-space: pre-wrap; word-break: break-all; max-height: 120px; overflow: auto; background: #f8f8f8; }

/* Static demo build: just the machine, centred, with no side panel. */
.demo .layout { justify-content: center; }
