:root {
	--bg: #0b0f14;
	--panel: #121a24;
	--text: #e6edf3;
	--muted: #9fb0c0;
	--good: #2bd576;
	--warn: #ffcc66;
	--bad: #ff5c5c;
	--btn: #1b2633;
	--btn2: #223246;
	--border: rgba(255,255,255,0.08);

	--status-idle: #6b7280;

	--status-online-day: #22d3ee;
	--status-online-night: #38bdf8;

	--status-tx-day: #ff3030;
	--status-tx-night: #ef4444;

	--status-rx-day: #22c55e;
	--status-rx-night: #30ff30;

	--status-warning-day: #fbbf24;
	--status-warning-night: #ffb020;

	--status-online-ring: rgba(34,211,238,0.12);
	--status-tx-ring: rgba(255,92,92,0.12);
	--status-rx-ring: rgba(34,197,94,0.12);
	--status-warning-ring: rgba(251,191,36,0.12);

	--status-online: var(--status-online-day);
	--status-tx: var(--status-tx-day);
	--status-rx: var(--status-rx-day);
	--status-warning: var(--status-warning-day);

	--ptt-bg-day: rgba(255,184,28,0.30);
	--ptt-border-day: rgba(255,184,28,0.70);
	--ptt-ring-day: rgba(255,184,28,0.16);

	--ptt-bg-night: rgba(251,191,36,0.28);
	--ptt-border-night: rgba(251,191,36,0.65);
	--ptt-ring-night: rgba(251,191,36,0.14);

	--ptt-bg: var(--ptt-bg-day);
	--ptt-border: var(--ptt-border-day);
	--ptt-ring: var(--ptt-ring-day)
}

.saveme {
	/*background: #6b7280; /* idle gray */

	/*background: #22d3ee; /* online cyan (day mode) */
	/*background: #38bdf8; /* online network blue (night mode) */
	
	/*background: #ff3030; /* TX radio red (day mode) */
	/*background: #ef4444; /* TX softer red (night mode) */

	/*background: #22c55e; /* RX bright radio green (day mode) */
	/*background: #30ff30; /* RX softer green (night mode) */

	/*background: #fbbf24; /* warning bright amber (day mode) */
	/*background: #ffb020; /* warning radio-style amber (night mode) */

	/*box-shadow: 0 0 0 4px rgba(34,211,238,0.12); /* ONLINE cyan */
	/*box-shadow: 0 0 0 4px rgba(255,92,92,0.12); /* TX red */
	/*box-shadow: 0 0 0 4px rgba(34,197,94,0.12); /* RX green */
	/*box-shadow: 0 0 0 4px rgba(251,191,36,0.12); /* WARNING amber */
	
	/* Bright amber (day mode) */
	/*
	background: rgba(255,184,28,0.30);
	border: solid 2px;
	border-color: rgba(255,184,28,0.70);
	box-shadow: 0 0 0 3px rgba(255,184,28,0.16);
	*/

	/* Aviation amber (night mode) */
	/*
	background: rgba(251,191,36,0.28);
	border: solid 2px;
	border-color: rgba(251,191,36,0.65);
	box-shadow: 0 0 0 3px rgba(251,191,36,0.14);
	*/

/* accent candidates
#fbbf24
#ffb020
#f59e0b
#ff9f1c
*/

}

body {
	margin: 16px;
	font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
	background: var(--bg);
	color: var(--text);
}

.app {
	max-width: 980px;
	margin: 0 auto;
}

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

.title {
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0.2px;
}

.statusline {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--muted);
	font-size: 13px;
}

.pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 6px 10px;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: rgba(255,255,255,0.03);
}

#statusPill {
	min-width: 180px;
}

.grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}

.card {
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 12px;
}

.row {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}


#operatorIdInput {
	width: 180px !important;
	background: var(--btn);
	color: var(--text);
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 10px 12px;
	font-weight: 650;
	width: 140px;
	margin-right: 8px;
}


button {
	border: 1px solid var(--border);
	background: var(--btn);
	color: var(--text);
	border-radius: 10px;
	padding: 10px 12px;
	font-weight: 650;
	cursor: pointer;
	transition: transform 0.03s ease, background 0.15s ease, opacity 0.15s ease;
	user-select: none;
	-webkit-user-select: none;
	touch-action: manipulation;
}

button:hover { background: var(--btn2); }
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

button.online {
	border: solid 1px var(--status-online);
	box-shadow: 0 0 0 2px var(--status-online);
}

.btn-connect {
	width: 200px;
}

.btn-disconnect {
	width: 200px;
	display: none;
}

.ptt {
	/*width: 200px;*/
	width: 100%;
	height: 70px;
}

.ptt.ready {
	border: solid 2px var(--status-online-day);
}

.ptt.live {
	background: var(--ptt-bg);
	border: solid 2px var(--ptt-border);
	box-shadow: 0 0 0 3px var(--ptt-ring);
}

.small {
	font-size: 12px;
	color: var(--muted);
}

.kbd {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	border: 1px solid var(--border);
	border-bottom-width: 2px;
	padding: 1px 6px;
	border-radius: 6px;
	background: rgba(255,255,255,0.04);
	color: var(--text);
}

#transcript {
	white-space: pre-wrap;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 12px;
	line-height: 1.45;
	background: rgba(0,0,0,0.35);
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 12px;
	min-height: 200px;
	max-height: 200px;
	height: 200px;
	overflow: auto;
}

#eventLogCard {
	/*display: none;*/
}

#log {
	white-space: pre-wrap;
	word-break: break-word;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 12px;
	line-height: 1.45;
	background: rgba(0,0,0,0.35);
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 12px;
	max-width: 100%;
	min-height: 220px;
	max-height: 420px;
	overflow: auto;
	overflow-wrap: anywhere;
}

.card {
	min-width: 0;
}

.divider {
	height: 1px;
	background: var(--border);
	margin: 10px 0;
}

label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--muted);
	font-size: 13px;
}

input[type="checkbox"] {
	transform: translateY(1px);
}


#selVoice {
	background: var(--btn);
	color: var(--text);
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 10px 12px;
	font-weight: 650;
}



.dot {
	width: 10px;
	height: 10px;
	border-radius: 999px;
	background: var(--status-idle);
}

.dot.connected {
	/*
	background: var(--good);
	box-shadow: 0 0 0 3px rgba(43,213,118,0.14);
	*/
}

.dot.talking {
	/*
	background: var(--warn);
	box-shadow: 0 0 0 3px rgba(255,204,102,0.16);
	*/
}


.mobile-status-dot {
	display: none;
	width: 16px;
	height: 16px;
	border-radius: 999px;
	flex: 0 0 auto;
	margin-left: auto;
	margin-right: 5px;
	background: var(--status-idle);
}

.mobile-status-dot.connected {
	/*
	background: var(--good);
	box-shadow: 0 0 0 4px rgba(43,213,118,0.14);
	*/
}

.mobile-status-dot.talking {
	/*
	background: var(--warn);
	box-shadow: 0 0 0 4px rgba(255,204,102,0.16);
	*/
}



#version_span {
	margin-left: 10px;
}


@media (max-width: 600px) {
	#voiceWrap,
	#statusLine,
	#eventLogCard,
	.hotkey-btn {
		display: none !important;
	}

	.mobile-status-dot {
		display: block;
	}

	.header {
		align-items: center;
	}

	.row {
		gap: 8px;
	}

	#btnPTT {
		flex: 1 1 100%;
		width: 100%;
		height: 120px;
	}

	#hint {
		display: none;
	}

	.btn-connect,
	.btn-disconnect {
		height: 75px;
	}

}

