:root {
	--bg-dark: #121212;
	--bg-panel: #1e1e1e;
	--bg-header: #2c2c2c;
	--text-main: #e0e0e0;
	--text-muted: #888888;
	--accent: #3a86ff;
	--accent-hover: #5396ff;
	--border: #333333;
	--btn-bg: #2a2a2a;
	--btn-hover: #3a3a3a;
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	scrollbar-width: thin;
	scrollbar-color: #444 #1a1a1a;
}

*::-webkit-scrollbar {
	width: 6px;
	height: 6px;
}
*::-webkit-scrollbar-track {
	background: #1a1a1a;
}
*::-webkit-scrollbar-thumb {
	background-color: #444;
	border-radius: 3px;
}
*::-webkit-scrollbar-thumb:hover {
	background-color: #666;
}
*::-webkit-scrollbar-corner {
	background: #1a1a1a;
}

[v-cloak] {
	display: none;
}

body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	background-color: var(--bg-dark);
	color: var(--text-main);
	overflow: hidden;
	height: 100vh;
	display: flex;
}

#app {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
}

.top-bar {
	display: flex;
	align-items: center;
	height: 60px;
	background-color: var(--bg-header);
	border-bottom: 1px solid var(--border);
	padding: 0 16px;
	flex-shrink: 0;
}

.brand {
	font-weight: 600;
	font-size: 16px;
	margin-right: 32px;
	color: #fff;
}

.vfo-displays {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-right: auto;
	overflow-x: auto;
	flex-shrink: 1;
	min-width: 0;
	padding-top: 14px;
	padding-bottom: 14px;
}

.vfo-display {
	position: relative;
	display: flex;
	align-items: baseline;
	background: #000;
	padding: 4px 12px;
	border-radius: 4px;
	border: 2px solid #444;
	cursor: pointer;
	transition: border-color 0.15s;
	flex-shrink: 0;
}

.vfo-bookmark-label {
	position: absolute;
	top: calc(100% + 2px);
	left: 0;
	right: 0;
	font-size: 8px;
	font-weight: 400;
	color: #aaa;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	letter-spacing: 0.2px;
	pointer-events: none;
}

.vfo-display.vfo-active {
	border-color: #aaa;
}

@keyframes vfo-squelch-pulse {
	0%   { box-shadow: 0 0 4px 1px var(--sq-color, #4488ff); }
	50%  { box-shadow: 0 0 10px 4px var(--sq-color, #4488ff); }
	100% { box-shadow: 0 0 4px 1px var(--sq-color, #4488ff); }
}

.vfo-display.vfo-squelch-open {
	animation: vfo-squelch-pulse 0.8s ease-in-out infinite;
}

.vfo-display.vfo-audio-off .vfo-freq-input,
.vfo-display.vfo-audio-off .vfo-unit {
	opacity: 0.35;
}

.vfo-mute-badge {
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.5px;
	color: #fff;
	background: #666;
	padding: 1px 4px;
	border-radius: 3px;
	align-self: center;
	margin-left: 5px;
	opacity: 0.85;
}

.vfo-rx-badge {
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.5px;
	color: #fff;
	padding: 1px 4px;
	border-radius: 3px;
	align-self: center;
	margin-left: 5px;
	opacity: 0.95;
	animation: vfo-rx-blink 0.8s ease-in-out infinite;
}

@keyframes vfo-rx-blink {
	0%, 100% { opacity: 0.95; }
	50%       { opacity: 0.45; }
}

.vfo-label {
	font-size: 11px;
	font-weight: 600;
	margin-right: 6px;
	padding: 1px 5px;
	border-radius: 3px;
	align-self: center;
	color: #fff;
}

.vfo-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
}

.vfo-remove-btn {
	background: transparent;
	border: 1px solid #555;
	color: #aaa;
	width: 18px;
	height: 18px;
	border-radius: 3px;
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: all 0.15s;
}
.vfo-remove-btn:hover {
	background: #ff4444;
	border-color: #ff4444;
	color: #fff;
}

.vfo-freq-input {
	font-family: 'Roboto Mono', monospace;
	font-size: 20px;
	font-weight: bold;
	color: #e0e0e0;
	letter-spacing: 2px;
	background: transparent;
	border: none;
	outline: none;
	text-align: right;
	width: 140px;
}
.vfo-freq-input:focus {
	color: #00ffea;
}

.vfo-unit {
	margin-left: 8px;
	font-size: 14px;
	color: #aaa;
}

.icon-btn {
	background: transparent;
	border: 1px solid transparent;
	color: var(--text-main);
	cursor: pointer;
	padding: 4px;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.icon-btn:hover:not(:disabled) {
	background: var(--btn-hover);
}
.icon-btn.active {
	color: #ff3a3a;
}
.icon-btn:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}
.github-link {
	text-decoration: none;
	margin-right: 6px;
	color: var(--text-dim);
}
.github-link:hover {
	color: var(--text-main);
}

.top-controls {
	display: flex;
	align-items: center;
	gap: 4px;
}

.main-layout {
	display: flex;
	flex: 1;
	overflow: hidden;
}

.sidebar {
	width: 300px;
	min-width: 300px;
	background-color: var(--bg-panel);
	border-right: 1px solid var(--border);
	display: flex;
	flex-direction: column;
	overflow-y: auto;
}

.panel {
	border-bottom: 1px solid var(--border);
}
.panel.disabled {
	opacity: 0.5;
	pointer-events: none;
}

.panel-header {
	background-color: #252525;
	padding: 6px 12px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	color: #aaa;
	border-bottom: 1px solid var(--border);
}

.panel-header-collapsible {
	cursor: pointer;
	user-select: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.panel-header-collapsible:hover {
	color: #ccc;
}

.panel-chevron {
	opacity: 0.6;
	transition: transform 0.2s ease;
	flex-shrink: 0;
}

.panel-chevron-collapsed {
	transform: rotate(-90deg);
}

.panel-body {
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.panel-condensed {
	gap: 8px;
	padding: 8px 12px;
}

.form-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.form-row.info-row {
	justify-content: flex-start;
	color: var(--text-muted);
}
.form-row label {
	font-size: 13px;
	flex: 1;
}

.input-group {
	display: flex;
	align-items: center;
	background: #000;
	border: 1px solid var(--border);
	border-radius: 4px;
	padding: 0 8px;
	width: 140px;
	box-sizing: border-box;
}
.input-group input {
	flex: 1;
	width: 100%;
	background: transparent;
	border: none;
	color: var(--text-main);
	font-family: 'Roboto Mono', monospace;
	font-size: 13px;
	padding: 6px 0;
	outline: none;
	text-align: right;
}
.input-group span {
	font-size: 11px;
	color: var(--text-muted);
	margin-left: 6px;
}

select {
	background: #000;
	border: 1px solid var(--border);
	color: var(--text-main);
	padding: 4px 8px;
	border-radius: 4px;
	width: 140px;
	font-size: 13px;
	outline: none;
}

.slider-group {
	display: flex;
	align-items: center;
	width: 140px;
	gap: 8px;
}
.slider-group input[type=range] {
	flex: 1;
	width: 100%;
}
.slider-group .val {
	font-size: 12px;
	font-family: 'Roboto Mono', monospace;
	width: 38px;
	text-align: right;
	color: var(--text-muted);
}

.checkbox {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}

.btn {
	background-color: var(--btn-bg);
	border: 1px solid var(--border);
	color: var(--text-main);
	padding: 6px 12px;
	font-size: 13px;
	border-radius: 4px;
	cursor: pointer;
	flex: 1;
	text-align: center;
	transition: background 0.2s;
}
.btn:hover:not(:disabled) {
	background-color: var(--btn-hover);
}
.btn-primary {
	background-color: var(--accent);
	border-color: var(--accent);
	color: #fff;
}
.btn-primary:hover:not(:disabled) {
	background-color: var(--accent-hover);
}

/* SDR++ Custom Controls */
.mode-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 6px;
	margin-bottom: 4px;
}
.mode-radio {
	display: flex;
	align-items: center;
	gap: 4px;
	cursor: pointer;
}
.mode-radio input[type="radio"] {
	display: none;
}
.mode-btn {
	font-size: 11px;
	font-weight: 600;
	color: var(--text-main);
	display: flex;
	align-items: center;
}
.mode-btn::before {
	content: '';
	display: inline-block;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background-color: #2a2a2a;
	margin-right: 4px;
	border: 1px solid #1a1a1a;
	box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}
.mode-radio input[type="radio"]:checked + .mode-btn::before {
	background-color: var(--accent);
	box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
	border-color: var(--accent-hover);
}

.spin-group {
	display: flex;
	background: #1e1e1e;
	border: 1px solid var(--border);
	border-radius: 2px;
	height: 24px;
	width: 130px;
	margin-left: auto;
}
.spin-group input {
	flex: 1;
	background: transparent;
	border: none;
	color: var(--text-main);
	font-family: 'Roboto Mono', monospace;
	font-size: 13px;
	padding: 0 4px;
	text-align: right;
	outline: none;
	width: 0; /* Let flex handle width */
}
.spin-group input::-webkit-outer-spin-button,
.spin-group input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
.spin-group button {
	background: #2a2a2a;
	border: none;
	border-left: 1px solid var(--border);
	color: var(--text-muted);
	width: 20px;
	cursor: pointer;
	font-weight: bold;
	display: flex;
	align-items: center;
	justify-content: center;
}
.spin-group button:hover {
	background: #3a3a3a;
	color: var(--text-main);
}
.spin-group button:active {
	background: #1a1a1a;
}

.custom-checkbox {
	display: flex;
	align-items: center;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
	user-select: none;
}
.custom-checkbox input {
	position: absolute;
	opacity: 0;
	cursor: pointer;
	height: 0;
	width: 0;
}
.checkmark {
	height: 16px;
	width: 16px;
	background-color: #2a2a2a;
	border: 1px solid #1a1a1a;
	border-radius: 2px;
	margin-right: 8px;
	box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
	position: relative;
}
.custom-checkbox:hover input ~ .checkmark {
	background-color: #333;
}
.custom-checkbox input:checked ~ .checkmark {
	background-color: var(--bg-panel); /* SDR++ uses dark background even when checked */
}
.checkmark:after {
	content: "";
	position: absolute;
	display: none;
}
.custom-checkbox input:checked ~ .checkmark:after {
	display: block;
}
/* The blue checkmark shape (SDR++ style checkmark inside dark box) */
.custom-checkbox .checkmark:after {
	left: 5px;
	top: 1px;
	width: 4px;
	height: 9px;
	border: solid var(--accent);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.header-checkbox .checkmark {
	margin-right: 0;
}
.header-checkbox input:disabled ~ .checkmark {
	opacity: 0.5;
	cursor: not-allowed;
}
.header-checkbox input:disabled ~ .checkmark:after {
	border-color: #555;
}

.squelch-row, .full-checkbox-row {
	margin-top: 2px;
}
.full-checkbox-row .custom-checkbox {
	color: #ccc;
}
.compact-slider {
	width: 130px;
}
.compact-slider .val {
	width: 65px;
}


.workspace {
	flex: 1;
	display: flex;
	flex-direction: column;
	position: relative;
	background: #000;
}

.fft-container {
	height: 40%;
	position: relative;
	border-bottom: 1px solid var(--border);
}
.waterfall-container {
	height: 60%;
	position: relative;
}

canvas {
	width: 100%;
	height: 100%;
	display: block;
}

.freq-axis {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 20px;
	pointer-events: none;
}
.tick {
	position: absolute;
	bottom: 2px;
	font-size: 11px;
	color: rgba(255,255,255,0.6);
	transform: translateX(-50%);
	font-family: 'Roboto Mono', monospace;
}
.tick:first-child { transform: none; }
.tick:last-child { transform: translateX(-100%); }

.hover-tick {
	position: absolute;
	top: 10px;
	background: rgba(0,0,0,0.8);
	border: 1px solid var(--border);
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 12px;
	font-family: 'Roboto Mono', monospace;
	transform: translateX(-50%);
	pointer-events: none;
	color: #00ffea;
}

.dsp-stats-overlay {
	position: absolute;
	top: 8px;
	right: 8px;
	background: rgba(0, 0, 0, 0.85);
	border: 1px solid var(--border);
	border-radius: 6px;
	padding: 8px 12px;
	font-size: 11px;
	font-family: 'Roboto Mono', monospace;
	color: #ccc;
	line-height: 1.6;
	pointer-events: none;
	z-index: 50;
	white-space: nowrap;
}
.dsp-stats-overlay b {
	color: #00ffea;
}

.active-audio-overlay {
	position: absolute;
	bottom: 24px;
	right: 24px;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 6px;
	pointer-events: none;
	z-index: 50;
}

.active-audio-title {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	color: #aaa;
	text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.active-audio-chips {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 6px;
	max-width: 400px;
}

.active-audio-chip {
	display: flex;
	align-items: center;
	gap: 6px;
	background: rgba(0, 0, 0, 0.85);
	border: 1px solid var(--border);
	padding: 4px 8px;
	border-radius: 16px;
	pointer-events: auto;
	cursor: pointer;
	transition: all 0.15s ease;
	box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.active-audio-chip:hover {
	background: #1a1a1a;
	box-shadow: 0 0 8px 1px var(--chip-color, #4488ff);
}

.active-audio-chip .vfo-num {
	font-size: 12px;
	font-weight: 700;
	color: #fff;
}

.active-audio-chip .vfo-freq {
	font-size: 12px;
	font-family: 'Roboto Mono', monospace;
	color: #ccc;
}

.snackbar {
	position: fixed;
	bottom: -50px;
	left: 50%;
	transform: translateX(-50%);
	background: #323232;
	color: #fff;
	padding: 12px 24px;
	border-radius: 4px;
	font-size: 14px;
	transition: bottom 0.3s ease;
	z-index: 1000;
	box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.snackbar.show {
	bottom: 24px;
}

/* ────── Transcript / Whisper Panel ────── */
.transcript-panel {
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	height: 200px;
	min-height: 100px;
	border-top: 2px solid var(--accent);
	background: var(--bg-panel);
}

.transcript-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 12px;
	background: #252525;
	border-bottom: 1px solid var(--border);
	flex-shrink: 0;
}

.transcript-title {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	color: #aaa;
	display: flex;
	align-items: center;
	gap: 6px;
}

.transcript-badge {
	font-size: 10px;
	padding: 1px 6px;
	border-radius: 8px;
	background: #2e7d32;
	color: #fff;
	font-weight: 600;
	text-transform: none;
}
.transcript-badge.loading {
	background: #e65100;
}
.transcript-load-file {
	opacity: 0.75;
	font-size: 10px;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	margin-left: 2px;
}
.transcript-badge.error {
	background: #c62828;
}
.transcript-badge.recording {
	background: #c62828;
	animation: pulse-rec 1s ease-in-out infinite;
}
.transcript-badge.transcribing {
	background: #1565c0;
	animation: pulse-rec 1.2s ease-in-out infinite;
}

@keyframes pulse-rec {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.5; }
}

.transcript-controls {
	display: flex;
	align-items: center;
	gap: 6px;
}

.transcript-select {
	background: #000;
	border: 1px solid var(--border);
	color: var(--text-main);
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 11px;
	outline: none;
}

.transcript-btn {
	padding: 2px 10px;
	font-size: 11px;
	flex: none;
}

.btn-stop {
	background: #c62828;
	border-color: #c62828;
	color: #fff;
}
.btn-stop:hover:not(:disabled) {
	background: #e53935;
}

.transcript-body {
	flex: 1;
	overflow-y: auto;
	padding: 8px 12px;
	font-family: 'Roboto Mono', monospace;
	font-size: 12px;
	line-height: 1.7;
}

.transcript-empty {
	color: var(--text-muted);
	font-style: italic;
	font-family: 'Inter', sans-serif;
	font-size: 13px;
	padding: 12px 0;
}

.transcript-entry {
	display: flex;
	gap: 8px;
	align-items: baseline;
	border-left: 3px solid transparent;
	padding-left: 8px;
	margin-left: -11px;
	border-radius: 2px;
}

.transcript-vfo-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	flex-shrink: 0;
	align-self: center;
	opacity: 0.9;
}

.transcript-time {
	color: var(--text-muted);
	flex-shrink: 0;
}

.transcript-freq {
	color: var(--accent);
	flex-shrink: 0;
	font-size: 11px;
}

.transcript-duration {
	color: var(--text-muted);
	flex-shrink: 0;
	font-size: 11px;
}

.transcript-text {
	color: #e0e0e0;
}

/* ────── POCSAG Decoder Panel ────── */
.pocsag-panel {
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	height: 200px;
	min-height: 80px;
	border-top: 2px solid #ff9800;
	background: var(--bg-panel);
}

.pocsag-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 12px;
	background: #252505;
	border-bottom: 1px solid var(--border);
	flex-shrink: 0;
}

.pocsag-title {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	color: #ffb74d;
	display: flex;
	align-items: center;
	gap: 6px;
}

.pocsag-count {
	font-size: 10px;
	padding: 1px 6px;
	border-radius: 8px;
	background: #e65100;
	color: #fff;
	font-weight: 600;
	text-transform: none;
}

.pocsag-controls {
	display: flex;
	align-items: center;
	gap: 6px;
}

.pocsag-body {
	flex: 1;
	overflow-y: auto;
	padding: 6px 12px;
	font-family: 'Roboto Mono', monospace;
	font-size: 11px;
	line-height: 1.8;
}

.pocsag-empty {
	color: var(--text-muted);
	font-style: italic;
	font-family: 'Inter', sans-serif;
	font-size: 13px;
	padding: 12px 0;
}

.pocsag-entry {
	display: flex;
	flex-wrap: nowrap;
	gap: 8px;
	align-items: baseline;
	border-left: 3px solid transparent;
	padding-left: 8px;
	margin-left: -11px;
	border-radius: 2px;
	overflow: hidden;
}

.pocsag-vfo-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	flex-shrink: 0;
	align-self: center;
	opacity: 0.9;
}

.pocsag-time {
	color: var(--text-muted);
	flex-shrink: 0;
}

.pocsag-freq {
	color: #ff9800;
	flex-shrink: 0;
}

.pocsag-capcode {
	color: #80cbc4;
	flex-shrink: 0;
	font-size: 10px;
}

.pocsag-type {
	font-size: 9px;
	font-weight: 700;
	padding: 0px 4px;
	border-radius: 3px;
	flex-shrink: 0;
	letter-spacing: 0.5px;
}

.pocsag-type-alpha   { background: #1b5e20; color: #a5d6a7; }
.pocsag-type-numeric { background: #1a237e; color: #90caf9; }
.pocsag-type-tone    { background: #4a148c; color: #ce93d8; }

.pocsag-baud {
	color: #666;
	font-size: 9px;
	flex-shrink: 0;
}

.pocsag-text {
	color: #e0e0e0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	flex: 1;
	min-width: 0;
}

.pocsag-tone {
	color: #888;
	font-style: italic;
}

/* ────── Bookmarks ────── */
.bookmark-panel-header {
	/* inherits standard panel-header styles only */
}

.bookmark-toolbar {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 5px;
	padding: 8px 10px;
	background: #222;
	border-bottom: 1px solid var(--border);
}

.bm-filter-row {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	gap: 6px;
}

.bm-cat-filter-select {
	flex: 1;
	background: #111;
	border: 1px solid var(--border);
	color: var(--text-main);
	padding: 4px 6px;
	border-radius: 4px;
	font-size: 11px;
	outline: none;
	transition: border-color 0.15s;
}
.bm-cat-filter-select:focus {
	border-color: var(--accent);
}

.bm-search-input {
	flex: 1;
	background: #111;
	border: 1px solid var(--border);
	color: var(--text-main);
	padding: 4px 6px;
	border-radius: 4px;
	font-size: 11px;
	outline: none;
	transition: border-color 0.15s;
	min-width: 0;
}
.bm-search-input:focus {
	border-color: var(--accent);
}
.bm-search-input::placeholder {
	color: var(--text-muted);
}

.bm-search-clear {
	flex-shrink: 0;
	background: none;
	border: none;
	color: var(--text-muted);
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	padding: 0 2px;
	transition: color 0.15s;
}
.bm-search-clear:hover {
	color: var(--text-main);
}

.bookmark-toolbar-row {
	display: contents;
}

.bookmark-save-btn {
	font-size: 12px;
	padding: 5px 8px;
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	border-radius: 4px;
}

.bm-io-btn {
	background: #2a2a2a;
	border-color: #444;
	color: #bbb;
	font-size: 12px;
	padding: 5px 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	border-radius: 4px;
	transition: background 0.15s, color 0.15s;
}
.bm-io-btn:hover {
	background: #3a3a3a;
	color: #fff;
}

/* Type-colored save buttons */
.bm-type-freq {
	background: rgba(58, 134, 255, 0.18);
	border-color: var(--accent);
	color: var(--accent);
}
.bm-type-freq:hover {
	background: rgba(58, 134, 255, 0.32);
}
.bm-type-group {
	background: rgba(56, 176, 94, 0.18);
	border-color: #38b05e;
	color: #38b05e;
}
.bm-type-group:hover {
	background: rgba(56, 176, 94, 0.32);
}

.bookmark-empty {
	color: var(--text-muted);
	font-size: 11px;
	font-style: italic;
	padding: 8px 12px;
}

.bookmark-group-header {
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	padding: 5px 10px 3px;
	border-bottom: 1px solid var(--border);
}
.bm-group-header-freq {
	color: var(--accent);
	background: rgba(58, 134, 255, 0.07);
}
.bm-group-header-group {
	color: #38b05e;
	background: rgba(56, 176, 94, 0.07);
}

/* Collapsible category headers */
.bookmark-cat-header {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 5px 10px;
	cursor: pointer;
	color: var(--text-muted);
	background: #1c1c1c;
	border-bottom: 1px solid var(--border);
	user-select: none;
	transition: background 0.12s, color 0.12s;
}
.bookmark-cat-header:hover {
	background: #252525;
	color: var(--text-main);
}
.bookmark-cat-label {
	flex: 1;
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.07em;
}
.bookmark-cat-count {
	font-size: 10px;
	background: rgba(255,255,255,0.08);
	color: var(--text-muted);
	border-radius: 8px;
	padding: 1px 6px;
	font-weight: 600;
	min-width: 18px;
	text-align: center;
}

.bookmark-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 5px 10px;
	border-bottom: 1px solid var(--border);
	gap: 6px;
}
.bookmark-item:last-child {
	border-bottom: none;
}
.bookmark-item:hover {
	background: rgba(255,255,255,0.04);
}

.bookmark-info {
	display: flex;
	flex-direction: column;
	min-width: 0;
	flex: 1;
}

.bookmark-name {
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: var(--text-main);
}

.bookmark-meta {
	font-size: 10px;
	color: var(--text-muted);
	font-family: 'Roboto Mono', monospace;
	margin-top: 1px;
}

.bookmark-actions {
	display: flex;
	gap: 4px;
	flex-shrink: 0;
}

.bookmark-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 4px;
	border: 1px solid var(--border);
	background: var(--btn-bg);
	color: var(--text-main);
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
	transition: background 0.15s, color 0.15s;
}
.bookmark-btn:hover {
	background: var(--btn-hover);
}
.bookmark-jump {
	color: var(--accent);
	border-color: var(--accent);
}
.bookmark-jump:hover {
	background: rgba(58, 134, 255, 0.15);
}
.bookmark-delete {
	color: #e57373;
	border-color: #e57373;
}
.bookmark-delete:hover {
	background: rgba(229, 115, 115, 0.15);
}

/* Bookmark save dialog */
.bookmark-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.65);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 900;
}

.bookmark-dialog {
	background: var(--bg-panel);
	border: 1px solid var(--border);
	border-radius: 8px;
	width: 340px;
	max-width: 95vw;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
	overflow: hidden;
}

.bookmark-dialog-title {
	font-size: 13px;
	font-weight: 600;
	padding: 10px 14px;
	background: var(--bg-header);
	border-bottom: 1px solid var(--border);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #ccc;
}

.bookmark-dialog-body {
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.bookmark-dialog-input {
	width: 100%;
	background: #111;
	border: 1px solid var(--border);
	color: var(--text-main);
	padding: 6px 10px;
	border-radius: 4px;
	font-size: 13px;
	outline: none;
	transition: border-color 0.15s;
}
.bookmark-dialog-input:focus {
	border-color: var(--accent);
}

.bookmark-dialog-info {
	font-size: 11px;
	color: var(--text-muted);
	font-family: 'Roboto Mono', monospace;
}
.bookmark-dialog-info b {
	color: var(--text-main);
}

.bookmark-vfo-preview {
	display: flex;
	flex-direction: column;
	gap: 4px;
	max-height: 120px;
	overflow-y: auto;
}

.bookmark-vfo-chip {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	font-family: 'Roboto Mono', monospace;
	color: var(--text-muted);
	background: rgba(255,255,255,0.04);
	border: 1px solid;
	border-radius: 4px;
	padding: 3px 8px;
}

.bookmark-vfo-dot {
	display: inline-block;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	flex-shrink: 0;
}

.bookmark-dialog-footer {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	padding: 10px 14px;
	border-top: 1px solid var(--border);
	background: var(--bg-header);
}

/* Bookmark type badges */
.bm-badge {
	display: inline-block;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.06em;
	padding: 1px 5px;
	border-radius: 3px;
	vertical-align: middle;
}
.bm-badge-freq {
	background: rgba(58, 134, 255, 0.22);
	color: #7eb4ff;
	border: 1px solid rgba(58, 134, 255, 0.4);
}
.bm-badge-group {
	background: rgba(56, 176, 94, 0.22);
	color: #6dd68e;
	border: 1px solid rgba(56, 176, 94, 0.4);
}

/* Category badges */
.bm-cat-badge {
	display: inline-block;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.05em;
	padding: 1px 5px;
	border-radius: 3px;
	vertical-align: middle;
	text-transform: uppercase;
}
.bm-cat-marine    { background: rgba(0,136,255,0.2);   color: #55aaff; border: 1px solid rgba(0,136,255,0.45); }
.bm-cat-aviation  { background: rgba(255,152,0,0.2);   color: #ffb84d; border: 1px solid rgba(255,152,0,0.45); }
.bm-cat-fire      { background: rgba(244,67,54,0.2);   color: #ff7066; border: 1px solid rgba(244,67,54,0.45); }
.bm-cat-ambulance { background: rgba(233,30,99,0.2);   color: #ff6699; border: 1px solid rgba(233,30,99,0.45); }
.bm-cat-police    { background: rgba(63,81,181,0.25);  color: #8899ee; border: 1px solid rgba(63,81,181,0.5);  }
.bm-cat-pocsag    { background: rgba(156,39,176,0.2);  color: #cc77ee; border: 1px solid rgba(156,39,176,0.45); }
.bm-cat-amateur   { background: rgba(76,175,80,0.2);   color: #77dd77; border: 1px solid rgba(76,175,80,0.45); }
.bm-cat-weather   { background: rgba(0,188,212,0.2);   color: #44ddee; border: 1px solid rgba(0,188,212,0.45); }
.bm-cat-military  { background: rgba(121,85,72,0.25);  color: #bb9984; border: 1px solid rgba(121,85,72,0.5);  }
.bm-cat-utility   { background: rgba(96,125,139,0.25); color: #99bbcc; border: 1px solid rgba(96,125,139,0.5); }
.bm-cat-other     { background: rgba(158,158,158,0.2); color: #bbbbbb; border: 1px solid rgba(158,158,158,0.4); }

/* Import mode dialog */
.bm-import-dialog {
	width: 300px;
}
.bm-import-body {
	gap: 12px;
}
.bm-import-desc {
	margin: 0;
	font-size: 12px;
	color: var(--text-muted);
}
.bm-import-choices {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.bm-import-choice {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	background: #1a1a1a;
	border: 1px solid var(--border);
	border-radius: 6px;
	text-align: left;
	width: 100%;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s;
	color: var(--text-main);
}
.bm-import-choice:hover {
	background: #252525;
	border-color: var(--accent);
}
.bm-import-replace:hover {
	border-color: #e57373;
}
.bm-import-choice-label {
	font-size: 13px;
	font-weight: 600;
	display: block;
}
.bm-import-choice-desc {
	font-size: 10px;
	color: var(--text-muted);
	display: block;
	margin-top: 1px;
}
.bm-import-choice > svg {
	flex-shrink: 0;
	opacity: 0.7;
}

/* Edit button */
.bookmark-edit {
	color: #ffd54f;
	border-color: #ffd54f;
}
.bookmark-edit:hover {
	background: rgba(255, 213, 79, 0.15);
}

/* Edit dialog — slightly wider to fit more fields */
.bookmark-edit-dialog {
	width: 400px;
}

/* Edit form rows */
.bm-edit-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}
.bm-edit-row:last-child {
	margin-bottom: 0;
}
.bm-edit-label {
	flex: 0 0 88px;
	font-size: 11px;
	color: var(--text-muted);
	font-weight: 500;
}
.bm-edit-input {
	flex: 1;
	background: #111;
	border: 1px solid var(--border);
	color: var(--text-main);
	padding: 4px 8px;
	border-radius: 4px;
	font-size: 12px;
	outline: none;
	transition: border-color 0.15s;
}
.bm-edit-input:focus {
	border-color: var(--accent);
}
.bm-edit-input:disabled {
	opacity: 0.4;
}
.bm-edit-select {
	flex: 1;
	background: #111;
	border: 1px solid var(--border);
	color: var(--text-main);
	padding: 4px 6px;
	border-radius: 4px;
	font-size: 12px;
	outline: none;
}
.bm-mode-grid {
	flex: 1;
}
.bm-edit-section-label {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--text-muted);
	margin: 6px 0 4px;
	font-weight: 600;
}
.bm-vfo-list {
	display: flex;
	flex-direction: column;
	gap: 5px;
	max-height: 180px;
	overflow-y: auto;
}
.bm-vfo-edit-row {
	display: flex;
	align-items: center;
	gap: 6px;
	background: rgba(255,255,255,0.03);
	border: 1px solid var(--border);
	border-radius: 4px;
	padding: 4px 8px;
}

/* ────── Frequency Activity Panel ────── */
.activity-panel {
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	height: 220px;
	min-height: 80px;
	border-top: 2px solid #44cc44;
	background: var(--bg-panel);
}

.activity-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 12px;
	background: #081508;
	border-bottom: 1px solid var(--border);
	flex-shrink: 0;
}

.activity-title {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	color: #80d880;
	display: flex;
	align-items: center;
	gap: 6px;
}

.activity-count {
	font-size: 10px;
	padding: 1px 6px;
	border-radius: 8px;
	background: #2e7d32;
	color: #fff;
	font-weight: 600;
	text-transform: none;
}

.activity-controls {
	display: flex;
	align-items: center;
	gap: 6px;
}

.activity-body {
	flex: 1;
	overflow-y: auto;
	padding: 4px 0;
}

.activity-empty {
	color: var(--text-muted);
	font-style: italic;
	font-family: 'Inter', sans-serif;
	font-size: 13px;
	padding: 12px 16px;
}

.activity-list {
	display: flex;
	flex-direction: column;
}

.activity-row {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 12px;
	cursor: pointer;
	overflow: hidden;
	transition: background 0.1s;
	min-height: 30px;
}

.activity-row:hover {
	background: rgba(255,255,255,0.04);
}

.activity-row-zero {
	opacity: 0.35;
}

.activity-row-live {
	border-left: 3px solid var(--act-color, #44cc44);
}

/* Background fill bar (behind content) */
.act-bar-fill {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	background: var(--act-color, #44cc44);
	opacity: 0.10;
	pointer-events: none;
	transition: width 0.6s ease;
	z-index: 0;
}

/* All row children sit above the bar */
.activity-row > *:not(.act-bar-fill) {
	position: relative;
	z-index: 1;
}

.act-rank {
	font-size: 10px;
	color: var(--text-muted);
	min-width: 22px;
	font-family: 'Roboto Mono', monospace;
}

.act-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	flex-shrink: 0;
}

.act-vfo {
	font-size: 11px;
	font-weight: 700;
	color: var(--act-color, #aaa);
	min-width: 44px;
}

.act-freq {
	font-size: 12px;
	font-family: 'Roboto Mono', monospace;
	color: #e0e0e0;
	min-width: 96px;
}

.act-label {
	font-size: 11px;
	color: #bbb;
	background: rgba(255,255,255,0.07);
	padding: 1px 6px;
	border-radius: 4px;
	max-width: 180px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.act-spacer {
	flex: 1;
}

.act-live-badge {
	font-size: 10px;
	font-weight: 700;
	color: var(--act-color, #44cc44);
	background: rgba(68, 204, 68, 0.12);
	padding: 1px 7px;
	border-radius: 8px;
	border: 1px solid var(--act-color, #44cc44);
	animation: pulse-rec 1s ease-in-out infinite;
	white-space: nowrap;
}

.act-count {
	font-size: 11px;
	color: #888;
	font-family: 'Roboto Mono', monospace;
	min-width: 32px;
	text-align: right;
}

.act-duration {
	font-size: 12px;
	font-family: 'Roboto Mono', monospace;
	color: #e0e0e0;
	min-width: 60px;
	text-align: right;
}