:root {
	--gl-bg: #0a0e1a;
	--gl-bg2: #0d1326;
	--gl-surface: rgba(255, 255, 255, 0.05);
	--gl-surface2: rgba(255, 255, 255, 0.07);
	--gl-border: rgba(255, 255, 255, 0.09);
	--gl-accent: #6366f1;
	--gl-accent2: #8b5cf6;
	--gl-text: #f1f5f9;
	--gl-muted: #94a3b8;
	--gl-online: #22c55e;
	--gl-tx: #ef4444;
	--gl-busy: #f59e0b;
	--safe-top: env(safe-area-inset-top, 0px);
	--safe-bottom: env(safe-area-inset-bottom, 0px);
}
html,
body {
	height: 100%;
	min-height: 100dvh;
	margin: 0;
	background: var(--gl-bg);
	overflow: hidden;
}
* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	-webkit-tap-highlight-color: transparent;
}
body {
	font-family: "Plus Jakarta Sans", system-ui, sans-serif;
	color: var(--gl-text);
	min-height: 100%;
}

body.gl-tenant-body {
	min-height: 100dvh;
	overflow: auto;
	background:
		radial-gradient(900px 460px at 15% 0%, rgba(20, 184, 166, 0.2), transparent 58%),
		radial-gradient(820px 520px at 88% 8%, rgba(99, 102, 241, 0.24), transparent 56%),
		#0a0e1a;
}

.gl-tenant-shell {
	width: min(1120px, calc(100% - 32px));
	min-height: 100dvh;
	margin: 0 auto;
	padding: 32px 0;
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.gl-tenant-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 0 4px;
}

.gl-tenant-brand {
	display: flex;
	align-items: center;
	gap: 14px;
}

.gl-tenant-logo {
	width: 46px;
	height: 46px;
	border-radius: 12px;
	object-fit: contain;
	box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
}

.gl-tenant-brand h1 {
	font-size: clamp(28px, 5vw, 52px);
	line-height: 0.95;
	letter-spacing: 0;
	margin: 0;
}

.gl-tenant-brand p {
	margin-top: 6px;
	color: #b6c1d3;
	font-weight: 700;
	font-size: 14px;
}

.gl-tenant-lock {
	border: 1px solid rgba(45, 212, 191, 0.34);
	background: rgba(13, 148, 136, 0.13);
	color: #b6fff5;
	border-radius: 8px;
	padding: 10px 12px;
	font-size: 12px;
	font-weight: 800;
	white-space: nowrap;
}

.gl-hospital-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
	align-items: stretch;
}

.gl-hospital-card {
	min-height: 300px;
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background:
		linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.045)),
		rgba(15, 23, 42, 0.86);
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
	color: var(--gl-text);
	text-decoration: none;
	padding: 24px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 24px;
	position: relative;
	overflow: hidden;
}

.gl-hospital-card::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg, rgba(45, 212, 191, 0.18), transparent 46%),
		linear-gradient(0deg, rgba(99, 102, 241, 0.13), transparent 64%);
	opacity: 0.78;
	pointer-events: none;
}

.gl-hospital-card > * {
	position: relative;
	z-index: 1;
}

.gl-hospital-card:hover {
	transform: translateY(-2px);
	border-color: rgba(45, 212, 191, 0.42);
}

.gl-hospital-kicker {
	display: inline-flex;
	margin-bottom: 14px;
	color: #7dd3fc;
	font-size: 12px;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.gl-hospital-card h2 {
	font-size: clamp(28px, 4vw, 44px);
	line-height: 1.02;
	letter-spacing: 0;
	margin-bottom: 14px;
}

.gl-hospital-card p {
	color: #cbd5e1;
	font-size: 15px;
	line-height: 1.55;
	font-weight: 650;
	max-width: 34rem;
}

.gl-hospital-action {
	width: fit-content;
	border-radius: 8px;
	background: #22c55e;
	color: #04210f;
	padding: 11px 14px;
	font-size: 13px;
	font-weight: 900;
}

.gl-tenant-footer {
	color: #aab6c9;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.5;
	max-width: 720px;
	padding-bottom: 18px;
}

@media (max-width: 720px) {
	.gl-tenant-shell {
		width: min(100% - 24px, 520px);
		padding: 18px 0 28px;
	}
	.gl-tenant-header {
		align-items: flex-start;
		flex-direction: column;
	}
	.gl-tenant-lock {
		white-space: normal;
	}
	.gl-hospital-grid {
		grid-template-columns: 1fr;
	}
	.gl-hospital-card {
		min-height: 250px;
		padding: 20px;
	}
}

.app-root {
	position: fixed;
	inset: 0;
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 100dvh;
	background: radial-gradient(
		1200px 600px at 50% -10%,
		#161d3a 0%,
		var(--gl-bg) 55%
	);
}
.screen {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow-x: hidden;
}
.hidden {
	display: none !important;
}
.pad {
	padding: 22px;
}
.scroll {
	flex: 1;
	width: 100%;
	overflow-y: auto;
	overflow-x: hidden;
	min-width: 0;
	padding: 0 22px calc(22px + var(--safe-bottom));
}
.scroll::-webkit-scrollbar {
	width: 0;
}

/* ROLE ORBIT */
#roleGate {
	align-items: center;
	justify-content: flex-start;
	padding: max(26px, env(safe-area-inset-top)) 18px
		max(24px, env(safe-area-inset-bottom));
	text-align: center;
	overflow-y: auto;
	overflow-x: hidden;
	overscroll-behavior: contain;
}
.gl-orbit-shell {
	position: relative;
	z-index: 2;
	width: min(540px, 100%);
	min-height: calc(100svh - max(50px, env(safe-area-inset-top)) - max(36px, env(safe-area-inset-bottom)));
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: clamp(14px, 3vh, 22px);
}
.gl-orbit-brand {
	position: relative;
	z-index: 4;
	animation: glOrbitRise 0.7s ease both;
}
.gl-orbit-title {
	color: #253149;
	font-size: clamp(34px, 8vw, 54px);
	font-weight: 900;
	line-height: 1;
	letter-spacing: 0;
}
.gl-orbit-title span {
	color: #2876f0;
}
.gl-orbit-sub,
.gl-orbit-foot {
	margin-top: 10px;
	color: #6b7890;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}
.gl-orbit-stage {
	position: relative;
	width: min(400px, calc(100vw - 34px));
	aspect-ratio: 1 / 1;
	display: grid;
	place-items: center;
	margin: 0 auto;
	z-index: 3;
}
.gl-orbit-ring {
	position: absolute;
	inset: 2%;
	border: 1px solid rgba(40, 118, 240, 0.22);
	border-radius: 50%;
	pointer-events: none;
	animation: glRingSpin 38s linear infinite;
}
.gl-orbit-ring.r2 {
	inset: 15%;
	border-color: rgba(40, 118, 240, 0.14);
	animation-direction: reverse;
	animation-duration: 48s;
}
.gl-orbit-ring.r3 {
	inset: 27%;
	border-color: rgba(40, 118, 240, 0.1);
	animation-duration: 60s;
}
.gl-orbit-ring.glow {
	inset: -6%;
	border-color: rgba(80, 158, 255, 0.24);
	box-shadow:
		0 0 110px rgba(73, 143, 255, 0.1) inset,
		0 0 90px rgba(73, 143, 255, 0.08);
	animation: glHubPulse 4.6s ease-in-out infinite;
}
.gl-orbit-stage::before,
.gl-orbit-stage::after {
	content: "";
	position: absolute;
	inset: 22%;
	border-radius: 50%;
	border: 1.5px solid rgba(40, 118, 240, 0.15);
	pointer-events: none;
	animation: glRadioWave 3.2s ease-out infinite;
}
.gl-orbit-stage::after {
	animation-delay: 1.45s;
}
.gl-orbit-core,
.gl-role-node {
	font-family: inherit;
	-webkit-user-select: none;
	user-select: none;
}
.gl-orbit-core {
	position: relative;
	z-index: 4;
	width: 46%;
	aspect-ratio: 1 / 1;
	border: 1px solid rgba(255, 255, 255, 0.88);
	border-radius: 50%;
	background:
		linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(222, 239, 255, 0.5)),
		radial-gradient(circle at 36% 28%, rgba(255, 255, 255, 0.88), transparent 44%);
	color: #2876f0;
	box-shadow:
		0 22px 52px rgba(38, 108, 214, 0.22),
		inset 0 1px 0 rgba(255, 255, 255, 0.94);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	cursor: pointer;
	transition:
		transform 0.3s cubic-bezier(0.23, 1, 0.32, 1),
		box-shadow 180ms cubic-bezier(0.23, 1, 0.32, 1),
		filter 180ms cubic-bezier(0.23, 1, 0.32, 1);
}
.gl-orbit-core::after {
	content: "";
	position: absolute;
	inset: -18%;
	border: 1.5px solid rgba(40, 118, 240, 0.18);
	border-radius: 50%;
	animation: glCoreRing 3s ease-in-out infinite;
	pointer-events: none;
}
.gl-core-logo {
	width: 58px;
	height: 58px;
	border-radius: 18px;
	background:
		center / 78% no-repeat url("/assets/logos/logo-white.png"),
		linear-gradient(145deg, #42c8ff, #1162df);
	box-shadow:
		0 18px 40px rgba(38, 108, 214, 0.24),
		inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.gl-core-label {
	font-size: 10px;
	font-weight: 900;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}
.gl-orbit-core:active {
	transform: scale(0.97);
}
.gl-orbit-stage.expanded .gl-orbit-core {
	transform: scale(0.76);
	filter: saturate(1.15) brightness(1.06);
}
.gl-role-node {
	position: absolute;
	z-index: 3;
	width: clamp(90px, 24vw, 106px);
	height: clamp(90px, 24vw, 106px);
	border: 1px solid rgba(255, 255, 255, 0.86);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.72);
	color: #253149;
	box-shadow:
		0 18px 42px rgba(38, 108, 214, 0.16),
		inset 0 1px 0 rgba(255, 255, 255, 0.9);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	cursor: pointer;
	transition:
		transform 0.45s cubic-bezier(0.35, 1.6, 0.45, 1),
		opacity 0.35s ease,
		left 0.45s cubic-bezier(0.35, 1.6, 0.45, 1),
		top 0.45s cubic-bezier(0.35, 1.6, 0.45, 1),
		border-color 180ms cubic-bezier(0.23, 1, 0.32, 1),
		box-shadow 180ms cubic-bezier(0.23, 1, 0.32, 1);
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%) scale(0);
	opacity: 0;
	pointer-events: none;
}
.gl-role-node.staff {
	left: 50%;
	top: 18%;
}
.gl-role-node.supervisor {
	left: 20%;
	top: 75%;
}
.gl-role-node.admin {
	left: 80%;
	top: 75%;
}
.gl-orbit-stage.expanded .gl-role-node {
	transform: translate(-50%, -50%) scale(1);
	opacity: 1;
	pointer-events: auto;
}
.gl-orbit-stage.expanded .gl-role-node.staff {
	transition-delay: 0.05s;
}
.gl-orbit-stage.expanded .gl-role-node.supervisor {
	transition-delay: 0.12s;
}
.gl-orbit-stage.expanded .gl-role-node.admin {
	transition-delay: 0.19s;
}
.gl-role-node:active {
	transform: translate(-50%, -50%) scale(0.96) !important;
}
.gl-role-node.selected,
.gl-role-node:hover {
	border-color: rgba(40, 118, 240, 0.45);
	box-shadow:
		0 22px 54px rgba(38, 108, 214, 0.2),
		inset 0 1px 0 rgba(255, 255, 255, 0.94);
}
.gl-role-node:hover {
	transform: translate(-50%, -50%) scale(1.06) !important;
}
.gl-role-node .node-icon {
	font-size: 25px;
	line-height: 1;
}
.gl-role-node .node-label {
	font-size: 11px;
	font-weight: 900;
	line-height: 1.15;
	max-width: 88px;
}
.gl-role-node .node-sub {
	color: #2876f0;
	font-size: 9px;
	font-weight: 800;
	letter-spacing: 0.04em;
}
.gl-orbit-foot {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 0;
	animation: glOrbitRise 0.8s ease both 0.18s;
}
.gl-orbit-foot .dot {
	background: #2876f0;
	box-shadow: 0 0 12px rgba(40, 118, 240, 0.52);
	margin-right: 0;
}
@keyframes glOrbitRise {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}
@keyframes glRingSpin {
	to {
		transform: rotate(360deg);
	}
}
@keyframes glHubPulse {
	0%,
	100% {
		box-shadow:
			0 0 80px rgba(73, 143, 255, 0.1) inset,
			0 0 60px rgba(73, 143, 255, 0.06);
		transform: scale(1);
	}
	50% {
		box-shadow:
			0 0 110px rgba(73, 143, 255, 0.2) inset,
			0 0 90px rgba(73, 143, 255, 0.12);
		transform: scale(1.02);
	}
}
@keyframes glRadioWave {
	0% {
		opacity: 0.48;
		transform: scale(0.68);
	}
	70%,
	100% {
		opacity: 0;
		transform: scale(1.48);
	}
}
@keyframes glCoreRing {
	0%,
	100% {
		opacity: 0.75;
		transform: scale(0.96);
	}
	50% {
		opacity: 0.24;
		transform: scale(1.08);
	}
}
.gl-switch-role {
	margin-top: 12px;
	border: 0;
	background: transparent;
	color: #2876f0;
	font: inherit;
	font-size: 12px;
	font-weight: 800;
	cursor: pointer;
}

/* logo */
.brand {
	display: flex;
	align-items: center;
	gap: 12px;
}
.shield {
	width: 42px;
	height: 42px;
	flex: none;
	border-radius: 12px;
	background:
		center / 78% no-repeat url(/assets/logos/logo-white.png),
		linear-gradient(145deg, rgba(70, 201, 255, 0.95), rgba(13, 67, 152, 0.9));
	box-shadow: 0 0 22px rgba(66, 200, 255, 0.28);
	padding: 0;
	object-fit: contain;
	display: block;
	overflow: hidden;
	color: transparent;
	font-size: 0;
}
.shield * {
	display: none;
}
.brand h1 {
	font-size: 21px;
	font-weight: 800;
	letter-spacing: -0.02em;
}
.brand .sub {
	font-size: 11px;
	color: var(--gl-muted);
	font-weight: 600;
	letter-spacing: 0.05em;
}

/* LOGIN */
#login {
	justify-content: center;
	align-items: center;
	text-align: center;
	padding: calc(32px + var(--safe-top)) 32px calc(32px + var(--safe-bottom));
}
.login-inner {
	width: 100%;
	max-width: 360px;
	display: flex;
	flex-direction: column;
	align-items: center;
}
#login .logoBig {
	width: 96px;
	height: 96px;
	margin-bottom: 22px;
	border-radius: 24px;
	background: center / cover no-repeat url(/assets/logos/logo-blue-bg.png);
	filter: drop-shadow(0 12px 30px rgba(66, 200, 255, 0.38));
	color: transparent;
	font-size: 0;
	overflow: hidden;
	display: block;
}
#login .logoBig * {
	display: none;
}
#login h1 {
	font-size: 32px;
	font-weight: 800;
	letter-spacing: -0.03em;
	background: linear-gradient(90deg, #fff, #c7d2fe);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
#login .tag {
	margin-top: 6px;
	font-size: 13px;
	color: var(--gl-muted);
	font-weight: 600;
	letter-spacing: 0.04em;
}
.field {
	width: 100%;
	margin-top: 14px;
	text-align: left;
}
.field label {
	font-size: 11px;
	color: var(--gl-muted);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}
.field input,
.field select,
.field textarea {
	width: 100%;
	margin-top: 6px;
	padding: 14px 16px;
	border-radius: 14px;
	border: 1px solid var(--gl-border);
	background: var(--gl-surface);
	color: var(--gl-text);
	font-size: 15px;
	font-family: inherit;
	outline: none;
}
.field select {
	appearance: none;
	background:
		linear-gradient(45deg, transparent 50%, var(--gl-muted) 50%)
		calc(100% - 19px) 52% / 7px 7px no-repeat,
		linear-gradient(135deg, var(--gl-muted) 50%, transparent 50%)
		calc(100% - 14px) 52% / 7px 7px no-repeat,
		var(--gl-surface);
}
.field textarea {
	min-height: 110px;
	resize: vertical;
	line-height: 1.45;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
	border-color: var(--gl-accent);
	box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18);
}
.btn {
	width: 100%;
	margin-top: 22px;
	padding: 16px;
	border: none;
	border-radius: 16px;
	font-family: inherit;
	font-size: 16px;
	font-weight: 800;
	letter-spacing: 0.02em;
	color: #fff;
	cursor: pointer;
	background: linear-gradient(120deg, var(--gl-accent), var(--gl-accent2));
	box-shadow: 0 14px 34px rgba(99, 102, 241, 0.4);
	transition:
		transform 0.12s ease,
		box-shadow 0.2s;
}
.btn:active {
	transform: scale(0.97);
}
.loginfoot {
	margin-top: 18px;
	font-size: 12px;
	color: var(--gl-muted);
}
.loginerr {
	color: #fca5a5;
	font-size: 12.5px;
	margin-top: 12px;
	min-height: 16px;
	text-align: center;
	font-weight: 600;
}
.empty {
	color: var(--gl-muted);
	text-align: center;
	padding: 40px 0;
	font-weight: 600;
}
.audioprompt {
	margin: 14px 4px 0;
	background: rgba(245, 158, 11, 0.16);
	border: 1px solid rgba(245, 158, 11, 0.45);
	color: #fde68a;
	border-radius: 14px;
	padding: 12px 16px;
	font-weight: 700;
	font-size: 13.5px;
	text-align: center;
	cursor: pointer;
}
.voice-status {
	margin: 10px 4px 0;
	padding: 10px 13px;
	border-radius: 13px;
	border: 1px solid rgba(148, 163, 184, 0.2);
	background: rgba(255, 255, 255, 0.055);
	color: #cbd5e1;
	font-size: 12px;
	font-weight: 800;
	line-height: 1.35;
	text-align: center;
}
.voice-status.ready {
	border-color: rgba(34, 197, 94, 0.34);
	background: rgba(34, 197, 94, 0.11);
	color: #bbf7d0;
}
.voice-status.warn {
	border-color: rgba(245, 158, 11, 0.42);
	background: rgba(245, 158, 11, 0.14);
	color: #fde68a;
}
.voice-status.bad {
	border-color: rgba(248, 113, 113, 0.4);
	background: rgba(248, 113, 113, 0.13);
	color: #fecaca;
}
.quality-line {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
}
.quality-line b {
	font-weight: 900;
}
.quality-meter {
	display: inline-flex;
	align-items: flex-end;
	gap: 3px;
	height: 16px;
	flex: none;
}
.quality-meter i {
	width: 4px;
	border-radius: 999px;
	background: currentColor;
}
.quality-meter i:nth-child(1) {
	height: 7px;
	opacity: 0.62;
}
.quality-meter i:nth-child(2) {
	height: 11px;
	opacity: 0.78;
}
.quality-meter i:nth-child(3) {
	height: 15px;
}
.quality-meter.ready {
	color: #86efac;
}
.quality-meter.warn {
	color: #fde68a;
}
.quality-meter.bad {
	color: #fecaca;
}
.audio-mode-card,
.priority-banner {
	margin: 10px 4px 0;
	border-radius: 14px;
	border: 1px solid rgba(148, 163, 184, 0.18);
	background: rgba(255, 255, 255, 0.05);
}
.audio-mode-card {
	padding: 11px;
	display: grid;
	grid-template-columns: minmax(0, 0.92fr) minmax(220px, 1.08fr);
	gap: 10px;
	align-items: center;
}
.audio-mode-card b {
	font-size: 12.5px;
	font-weight: 900;
}
.audio-mode-card p {
	margin-top: 2px;
	color: var(--gl-muted);
	font-size: 10.5px;
	font-weight: 700;
	line-height: 1.25;
}
.audio-mode-toggle {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 6px;
	padding: 4px;
	margin: 0;
	border: 0;
	border-radius: 12px;
	background: rgba(2, 6, 23, 0.22);
	min-inline-size: 0;
}
.audio-mode-toggle button {
	min-height: 34px;
	border: 0;
	border-radius: 9px;
	background: transparent;
	color: var(--gl-muted);
	font-family: inherit;
	font-size: 11px;
	font-weight: 900;
	cursor: pointer;
}
.audio-mode-toggle button.active {
	background: rgba(99, 102, 241, 0.24);
	color: #eef2ff;
	box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.28);
}
.priority-banner {
	padding: 11px 13px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	font-size: 12px;
	font-weight: 800;
}
.priority-banner b {
	font-size: 12.5px;
}
.priority-banner span {
	color: var(--gl-muted);
	font-size: 11px;
	font-weight: 800;
	text-align: right;
}
.priority-banner.supervisor {
	border-color: rgba(245, 158, 11, 0.34);
	background: rgba(245, 158, 11, 0.12);
	color: #fde68a;
}
.priority-banner.emergency {
	border-color: rgba(239, 68, 68, 0.4);
	background: rgba(239, 68, 68, 0.14);
	color: #fecaca;
}
.toast {
	position: fixed;
	left: 50%;
	bottom: calc(28px + var(--safe-bottom));
	transform: translateX(-50%);
	background: rgba(15, 20, 40, 0.96);
	border: 1px solid var(--gl-border);
	color: var(--gl-text);
	padding: 12px 18px;
	border-radius: 12px;
	font-size: 13px;
	font-weight: 600;
	z-index: 50;
	max-width: 90%;
	text-align: center;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

/* HEADER */
.hdr {
	padding: calc(18px + var(--safe-top)) 22px 14px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid var(--gl-border);
	gap: 14px;
}
.hdr .who {
	font-size: 13px;
	color: var(--gl-muted);
	font-weight: 600;
	margin-top: 2px;
}
.brand-subline {
	margin-top: 3px;
	color: var(--gl-muted);
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.04em;
}
.admin-signout {
	min-height: 38px;
	min-width: 96px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 0 13px;
	border-radius: 12px;
	border: 1px solid var(--gl-border);
	background: rgba(255, 255, 255, 0.055);
	color: var(--gl-text);
	font-family: inherit;
	font-size: 12px;
	font-weight: 800;
	cursor: pointer;
	transition:
		transform 0.14s ease-out,
		background 0.18s ease-out,
		border-color 0.18s ease-out;
}
.admin-signout b {
	font-size: 14px;
	line-height: 1;
}
.admin-signout:active {
	transform: scale(0.97);
}
.admin-profile-card {
	margin: 12px 22px 12px;
	padding: 14px;
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
	gap: 14px;
	align-items: center;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 18px;
	background: linear-gradient(
		145deg,
		rgba(99, 102, 241, 0.16),
		rgba(255, 255, 255, 0.045)
	);
	backdrop-filter: blur(12px);
}
.admin-profile-card.has-sos {
	border-color: rgba(239, 68, 68, 0.45);
	background: linear-gradient(
		145deg,
		rgba(239, 68, 68, 0.16),
		rgba(99, 102, 241, 0.09)
	);
}
.admin-profile-main {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}
.admin-avatar {
	width: 46px;
	height: 46px;
	flex: none;
	display: grid;
	place-items: center;
	border-radius: 14px;
	background: linear-gradient(135deg, #22c55e, #6366f1);
	color: #fff;
	font-size: 16px;
	font-weight: 900;
	box-shadow: 0 14px 30px rgba(34, 197, 94, 0.18);
}
.admin-profile-copy {
	min-width: 0;
}
.admin-profile-label {
	color: var(--gl-muted);
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}
.admin-profile-name {
	margin-top: 3px;
	font-size: 17px;
	font-weight: 900;
	line-height: 1.2;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.admin-profile-role {
	margin-top: 3px;
	color: #cbd5e1;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.admin-profile-metrics {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;
}
.profile-metric {
	min-height: 58px;
	padding: 10px 9px;
	border-radius: 14px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(255, 255, 255, 0.055);
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 3px;
}
.profile-metric strong {
	font-size: 20px;
	font-weight: 900;
	line-height: 1;
}
.profile-metric span {
	color: var(--gl-muted);
	font-size: 10.5px;
	font-weight: 800;
	line-height: 1.18;
}
.profile-metric.urgent {
	border-color: rgba(239, 68, 68, 0.2);
}
.profile-metric.urgent strong {
	color: #fca5a5;
}
.dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--gl-online);
	box-shadow: 0 0 10px var(--gl-online);
	margin-right: 6px;
	vertical-align: middle;
}
.sectlabel {
	font-size: 11px;
	color: var(--gl-muted);
	font-weight: 800;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	margin: 20px 4px 12px;
}
.sectlabel.compact {
	margin-top: 16px;
	margin-bottom: 10px;
}

/* OPERATIONS */
.ops-panel,
.ops-card,
.incident-mini {
	background: var(--gl-surface);
	border: 1px solid var(--gl-border);
	border-radius: 16px;
	backdrop-filter: blur(12px);
}
.ops-panel {
	padding: 16px;
	margin-bottom: 12px;
}
.ops-panel,
.ops-grid,
.chan-actions,
.ops-card,
.incident-mini,
.card {
	width: 100%;
	max-width: 100%;
}
.ops-panel-top,
.ops-card-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}
.ops-panel-top > div,
.ops-card-head > div {
	min-width: 0;
}
.ops-panel-top b,
.ops-card-head b {
	font-size: 15px;
	line-height: 1.25;
}
.ops-panel-top p,
.ops-card-head p {
	margin-top: 3px;
	color: var(--gl-muted);
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.35;
}
.ops-grid,
.chan-actions,
.ops-actions {
	display: grid;
	gap: 10px;
}
.ops-grid,
.chan-actions {
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.chan-actions {
	margin: 14px 4px 0;
}
.ops-btn {
	min-height: 72px;
	padding: 13px 14px;
	border-radius: 16px;
	border: 1px solid rgba(99, 102, 241, 0.32);
	background: rgba(99, 102, 241, 0.13);
	color: var(--gl-text);
	font-family: inherit;
	cursor: pointer;
	text-align: left;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
	transition:
		transform 0.14s ease-out,
		background 0.18s ease-out,
		border-color 0.18s ease-out;
}
.ops-btn span {
	font-size: 14px;
	font-weight: 800;
	line-height: 1.2;
}
.ops-btn b {
	color: var(--gl-muted);
	font-size: 11.5px;
	font-weight: 700;
	line-height: 1.25;
}
.ops-btn.danger {
	border-color: rgba(239, 68, 68, 0.36);
	background: rgba(239, 68, 68, 0.13);
}
.ops-btn.signout {
	border-color: rgba(148, 163, 184, 0.22);
	background: rgba(148, 163, 184, 0.09);
}
.account-actions {
	margin: 18px 0 4px;
}
.safe-signout {
	width: 100%;
	min-height: 60px;
	border-radius: 16px;
	border: 1px solid rgba(148, 163, 184, 0.26);
	background: rgba(255, 255, 255, 0.055);
	color: var(--gl-text);
	font-family: inherit;
	text-align: left;
	padding: 12px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	cursor: pointer;
	transition:
		transform 0.14s ease-out,
		border-color 0.18s ease-out,
		background 0.18s ease-out;
}
.safe-signout span {
	font-size: 14px;
	font-weight: 900;
}
.safe-signout b {
	color: var(--gl-muted);
	font-size: 11.5px;
	font-weight: 800;
}
.safe-signout:active {
	transform: scale(0.98);
}
.ops-btn:disabled {
	opacity: 0.72;
	cursor: wait;
}
.ops-btn:active {
	transform: scale(0.97);
}
.ops-status {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 26px;
	padding: 5px 10px;
	border-radius: 999px;
	font-size: 11.5px;
	font-weight: 800;
	white-space: nowrap;
}
.ops-status.ready {
	background: rgba(34, 197, 94, 0.14);
	color: #86efac;
	border: 1px solid rgba(34, 197, 94, 0.38);
}
.ops-status.warn {
	background: rgba(245, 158, 11, 0.14);
	color: #fde68a;
	border: 1px solid rgba(245, 158, 11, 0.38);
}
.ops-status.bad {
	background: rgba(239, 68, 68, 0.14);
	color: #fecaca;
	border: 1px solid rgba(239, 68, 68, 0.38);
}
.health-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}
.health-chips span {
	display: inline-flex;
	align-items: center;
	min-height: 28px;
	padding: 6px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 800;
	line-height: 1.1;
}
.health-chips .ok {
	background: rgba(34, 197, 94, 0.12);
	color: #bbf7d0;
}
.health-chips .bad {
	background: rgba(239, 68, 68, 0.12);
	color: #fecaca;
}
.ops-note {
	margin-top: 12px;
	color: #cbd5e1;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.45;
}
.incident-mini {
	position: relative;
	padding: 14px 92px 14px 14px;
	margin-bottom: 10px;
}
.incident-mini b {
	display: block;
	font-size: 14px;
	line-height: 1.25;
}
.incident-mini p {
	margin-top: 4px;
	color: var(--gl-muted);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.35;
}
.incident-mini .ops-status {
	position: absolute;
	right: 12px;
	top: 12px;
}
.incident-mini.assigned-me {
	border-color: rgba(99, 102, 241, 0.34);
	background:
		linear-gradient(135deg, rgba(99, 102, 241, 0.11), rgba(255, 255, 255, 0.04)),
		var(--gl-surface);
}
.mini-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}
.mini-actions .btn-sm {
	min-height: 36px;
	padding: 8px 12px;
	font-size: 12px;
}
.gl-modal {
	position: fixed;
	inset: 0;
	z-index: 900;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 18px;
	background: rgba(2, 6, 23, 0.72);
	backdrop-filter: blur(10px);
}
.gl-sheet {
	width: 100%;
	max-width: 520px;
	max-height: calc(100vh - 36px);
	overflow-y: auto;
	border-radius: 22px;
	border: 1px solid var(--gl-border);
	background: rgba(10, 14, 26, 0.98);
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.58);
	padding: 18px;
}
.gl-sheet-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 4px;
}
.gl-sheet-head h2 {
	font-size: 20px;
	line-height: 1.2;
}
.gl-sheet-head p {
	margin-top: 4px;
	color: var(--gl-muted);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.35;
}

/* CHANNEL CARD */
.card {
	background: var(--gl-surface);
	border: 1px solid var(--gl-border);
	border-radius: 20px;
	padding: 18px;
	margin-bottom: 14px;
	cursor: pointer;
	backdrop-filter: blur(12px);
	transition:
		transform 0.14s ease,
		border-color 0.2s,
		background 0.2s;
	animation: cardIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.card:hover {
	background: var(--gl-surface2);
	border-color: rgba(99, 102, 241, 0.4);
}
.card:active {
	transform: scale(0.985);
}
.card .top {
	display: flex;
	align-items: center;
	gap: 13px;
}
.chico {
	width: 46px;
	height: 46px;
	border-radius: 14px;
	flex: none;
	display: grid;
	place-items: center;
	font-size: 20px;
	background: linear-gradient(
		135deg,
		rgba(99, 102, 241, 0.25),
		rgba(139, 92, 246, 0.25)
	);
	border: 1px solid rgba(99, 102, 241, 0.3);
}
.card .name {
	font-size: 17px;
	font-weight: 800;
}
.card .meta {
	font-size: 12.5px;
	color: var(--gl-muted);
	font-weight: 600;
	margin-top: 2px;
}
.card .status {
	margin-top: 13px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.pill {
	font-size: 12px;
	font-weight: 700;
	padding: 6px 12px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	gap: 7px;
}
.pill.quiet {
	background: rgba(148, 163, 184, 0.12);
	color: var(--gl-muted);
}
.pill.live {
	background: rgba(239, 68, 68, 0.15);
	color: #fca5a5;
}
.pill.live .ic {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--gl-tx);
	animation: blink 1s infinite;
}
.go {
	font-size: 13px;
	font-weight: 800;
	color: var(--gl-accent);
	display: flex;
	align-items: center;
	gap: 5px;
}

/* CHANNEL VIEW */
#chan {
	overflow: hidden;
}
.cv-hdr {
	padding: calc(16px + var(--safe-top)) 22px 16px;
	display: flex;
	align-items: center;
	gap: 14px;
	border-bottom: 1px solid var(--gl-border);
	flex: none;
	position: relative;
	z-index: 12;
	background: rgba(10, 14, 26, 0.98);
}
.chan-main {
	flex: 0 1 auto;
	min-height: 0;
	max-height: min(44dvh, 390px);
	overflow-y: auto;
	overflow-x: hidden;
	overscroll-behavior: contain;
	padding: 16px 18px 0;
	position: relative;
	z-index: 2;
}
.chan-main::-webkit-scrollbar {
	width: 0;
}
.back {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	border: 1px solid var(--gl-border);
	background: var(--gl-surface);
	color: var(--gl-text);
	font-size: 18px;
	cursor: pointer;
	flex: none;
	position: relative;
	z-index: 20;
	touch-action: manipulation;
}
.cv-hdr .t {
	font-size: 17px;
	font-weight: 800;
}
.cv-hdr .c {
	font-size: 12px;
	color: var(--gl-muted);
	font-weight: 600;
}
.roster {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 6px 4px 0;
}
.chip {
	font-size: 12.5px;
	font-weight: 700;
	padding: 7px 12px;
	border-radius: 999px;
	background: var(--gl-surface);
	border: 1px solid var(--gl-border);
	display: flex;
	align-items: center;
	gap: 7px;
}
.chip .d {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--gl-online);
}
.chip.tx .d {
	background: var(--gl-tx);
	box-shadow: 0 0 8px var(--gl-tx);
	animation: blink 1s infinite;
}

.banner {
	margin: 18px 4px 0;
	border-radius: 16px;
	padding: 14px 16px;
	font-weight: 700;
	font-size: 14px;
	display: flex;
	align-items: center;
	gap: 10px;
	opacity: 0;
	height: 0;
	padding-top: 0;
	padding-bottom: 0;
	overflow: hidden;
	transition: all 0.3s ease;
}
.banner.show {
	opacity: 1;
	height: auto;
	padding-top: 14px;
	padding-bottom: 14px;
}
.banner.me {
	background: rgba(239, 68, 68, 0.16);
	border: 1px solid rgba(239, 68, 68, 0.4);
	color: #fecaca;
}
.banner.them {
	background: rgba(245, 158, 11, 0.14);
	border: 1px solid rgba(245, 158, 11, 0.4);
	color: #fde68a;
}
.eq {
	display: flex;
	gap: 3px;
	align-items: flex-end;
	height: 16px;
}
.eq i {
	width: 3px;
	background: currentColor;
	border-radius: 2px;
	animation: eq 0.8s ease-in-out infinite;
}
.eq i:nth-child(2) {
	animation-delay: 0.15s;
}
.eq i:nth-child(3) {
	animation-delay: 0.3s;
}
.eq i:nth-child(4) {
	animation-delay: 0.45s;
}
.eq i:nth-child(5) {
	animation-delay: 0.2s;
}

.ptt-wrap {
	flex: 1 0 auto;
	position: relative;
	isolation: isolate;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 18px;
	min-height: 210px;
	max-height: 34dvh;
	padding: 14px 18px calc(14px + var(--safe-bottom));
	z-index: 1;
}
.ptt {
	width: 210px;
	height: 210px;
	flex: 0 0 auto;
	border-radius: 50%;
	border: none;
	cursor: pointer;
	position: relative;
	font-family: inherit;
	color: #fff;
	font-weight: 800;
	font-size: 17px;
	letter-spacing: 0.06em;
	background: radial-gradient(
		circle at 50% 35%,
		#7c7ff5,
		var(--gl-accent) 55%,
		#4f46e5
	);
	box-shadow:
		0 24px 60px rgba(99, 102, 241, 0.45),
		inset 0 2px 6px rgba(255, 255, 255, 0.35),
		inset 0 -10px 24px rgba(0, 0, 0, 0.35);
	transition:
		transform 0.1s ease,
		background 0.2s;
	user-select: none;
	touch-action: none;
	z-index: 2;
}
.ptt .lbl {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}
.ptt .mic {
	font-size: 34px;
}
.ptt:active {
	transform: scale(0.96);
}
.ptt.tx {
	background: radial-gradient(
		circle at 50% 35%,
		#ff8a8a,
		var(--gl-tx) 55%,
		#dc2626
	);
	box-shadow:
		0 24px 60px rgba(239, 68, 68, 0.5),
		inset 0 2px 6px rgba(255, 255, 255, 0.4),
		inset 0 -10px 24px rgba(0, 0, 0, 0.35);
}
.ptt.blocked {
	background: radial-gradient(
		circle at 50% 35%,
		#fbbf24,
		var(--gl-busy) 55%,
		#d97706
	);
	cursor: not-allowed;
	opacity: 0.92;
}
.ring {
	position: absolute;
	left: 50%;
	top: calc(50% - 18px);
	width: 210px;
	height: 210px;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	border: 2px solid var(--gl-tx);
	opacity: 0;
	pointer-events: none;
	z-index: 1;
}
.ptt.tx ~ .ring {
	animation: ring 1.6s ease-out infinite;
}
.ptt-eq {
	position: absolute;
	bottom: 42px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 4px;
	align-items: flex-end;
	height: 28px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s;
}
.ptt.tx .ptt-eq {
	opacity: 1;
}
.ptt-eq i {
	display: block;
	width: 4px;
	height: 26px;
	background: rgba(255, 255, 255, 0.8);
	border-radius: 2px;
	transform: scaleY(0.15);
	transform-origin: bottom center;
}
.ptt.tx .ptt-eq i {
	animation: pttWave 0.55s ease-in-out infinite;
}
.ptt.tx .ptt-eq i:nth-child(1) { animation-delay: 0s;    }
.ptt.tx .ptt-eq i:nth-child(2) { animation-delay: 0.11s; }
.ptt.tx .ptt-eq i:nth-child(3) { animation-delay: 0.22s; }
.ptt.tx .ptt-eq i:nth-child(4) { animation-delay: 0.06s; }
.ptt.tx .ptt-eq i:nth-child(5) { animation-delay: 0.17s; }
.ptt.tx .ptt-eq i:nth-child(6) { animation-delay: 0.28s; }
.ptt.tx .ptt-eq i:nth-child(7) { animation-delay: 0.09s; }
@keyframes pttWave {
	0%, 100% { transform: scaleY(0.15); }
	50%       { transform: scaleY(1);   }
}
.r2 {
	animation-delay: 0.5s !important;
}
.r3 {
	animation-delay: 1s !important;
}
.hint {
	font-size: 13px;
	color: var(--gl-muted);
	font-weight: 600;
	letter-spacing: 0.04em;
}

.sim {
	margin: 0 22px 18px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: var(--gl-surface);
	border: 1px solid var(--gl-border);
	border-radius: 14px;
	padding: 12px 16px;
}
.sim span {
	font-size: 12.5px;
	color: var(--gl-muted);
	font-weight: 700;
}
.toggle {
	width: 46px;
	height: 26px;
	border-radius: 999px;
	background: rgba(148, 163, 184, 0.25);
	position: relative;
	cursor: pointer;
	transition: background 0.2s;
	flex: none;
}
.toggle.on {
	background: var(--gl-busy);
}
.toggle::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	transition: transform 0.2s;
}
.toggle.on::after {
	transform: translateX(20px);
}

/* ADMIN */
.tabbar {
	display: flex;
	gap: 6px;
	padding: 12px 16px;
	border-bottom: 1px solid var(--gl-border);
	overflow-x: auto;
}
.tabbar::-webkit-scrollbar {
	height: 0;
}
.tab {
	flex: none;
	padding: 9px 14px;
	border-radius: 999px;
	border: 1px solid var(--gl-border);
	background: var(--gl-surface);
	color: var(--gl-muted);
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	transition: all 0.15s;
}
.tab.active {
	background: linear-gradient(120deg, var(--gl-accent), var(--gl-accent2));
	color: #fff;
	border-color: transparent;
}
.tab-badge {
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: rgba(239, 68, 68, 0.92);
	color: #fff;
	font-size: 10.5px;
	font-weight: 900;
	line-height: 1;
	box-shadow: 0 8px 18px rgba(239, 68, 68, 0.26);
}
.tab.active .tab-badge {
	background: #fff;
	color: #dc2626;
}
.adminbar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 16px 0 10px;
}
.adminbar input,
#memSearch,
#memCh {
	padding: 12px 14px;
	border-radius: 12px;
	border: 1px solid var(--gl-border);
	background: var(--gl-surface);
	color: var(--gl-text);
	font-size: 14px;
	font-family: inherit;
	outline: none;
	flex: 1;
	min-width: 140px;
}
#memSearch,
#memCh {
	width: 100%;
	margin-top: 10px;
}
.adminbar input:focus,
#memSearch:focus {
	border-color: var(--gl-accent);
}
.staff-toolbar {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr);
	gap: 10px;
	align-items: center;
	margin: 12px 0 14px;
}
.account-create-card {
	margin-top: 16px;
}
.account-head {
	align-items: center;
	gap: 14px;
}
.account-form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin-top: 16px;
}
.account-form-grid label {
	display: flex;
	flex-direction: column;
	gap: 7px;
	min-width: 0;
}
.account-form-grid span,
.channel-picker-title {
	color: var(--gl-muted);
	font-size: 11px;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}
.account-form-grid input,
.account-form-grid select,
.role-select {
	width: 100%;
	min-height: 44px;
	padding: 11px 13px;
	border-radius: 12px;
	border: 1px solid var(--gl-border);
	background: rgba(255, 255, 255, 0.055);
	color: var(--gl-text);
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	outline: none;
}
.account-form-grid input:focus,
.account-form-grid select:focus,
.role-select:focus {
	border-color: var(--gl-accent);
	box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.16);
}
.account-form-grid option,
.role-select option {
	background: #111827;
	color: #eef2ff;
}
.channel-picker {
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid var(--gl-border);
}
.channel-picker-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 9px;
	margin-top: 10px;
}
.channel-picker-grid label {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 42px;
	padding: 10px 12px;
	border-radius: 12px;
	border: 1px solid var(--gl-border);
	background: rgba(255, 255, 255, 0.045);
	color: var(--gl-text);
	font-size: 13px;
	font-weight: 800;
	cursor: pointer;
}
.channel-picker-grid input {
	accent-color: var(--gl-accent);
	flex: none;
}
.form-error {
	margin-top: 12px;
	padding: 11px 13px;
	border-radius: 12px;
	border: 1px solid rgba(248, 113, 113, 0.3);
	background: rgba(248, 113, 113, 0.12);
	color: #fecaca;
	font-size: 13px;
	font-weight: 800;
}
.btn-sm {
	padding: 12px 18px;
	border: none;
	border-radius: 12px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 800;
	color: #fff;
	cursor: pointer;
	background: linear-gradient(120deg, var(--gl-accent), var(--gl-accent2));
	flex: none;
}
.btn-sm:active {
	transform: scale(0.97);
}
.row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	background: var(--gl-surface);
	border: 1px solid var(--gl-border);
	border-radius: 14px;
	padding: 14px 16px;
	margin-bottom: 10px;
}
.row b {
	font-size: 14.5px;
	font-weight: 700;
}
.row .sub {
	font-size: 12px;
	color: var(--gl-muted);
	font-weight: 600;
	margin-top: 2px;
}
.del {
	padding: 8px 14px;
	border-radius: 10px;
	border: 1px solid rgba(239, 68, 68, 0.4);
	background: rgba(239, 68, 68, 0.12);
	color: #fca5a5;
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	flex: none;
}
.mem {
	padding: 8px 14px;
	border-radius: 10px;
	border: 1px solid var(--gl-border);
	background: var(--gl-surface);
	color: var(--gl-muted);
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	flex: none;
}
.mem.on {
	background: rgba(34, 197, 94, 0.14);
	border-color: rgba(34, 197, 94, 0.45);
	color: #86efac;
}
.rowbtns {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 8px;
	flex: none;
}
.staff-row {
	align-items: flex-start;
}
.staff-row > div:first-child {
	min-width: 0;
}
.role-select {
	width: 168px;
	min-height: 38px;
	padding: 8px 10px;
	font-size: 12px;
}
.priority-select,
.incident-assign-row select {
	min-height: 38px;
	padding: 8px 10px;
	border-radius: 10px;
	border: 1px solid var(--gl-border);
	background: rgba(255, 255, 255, 0.055);
	color: var(--gl-text);
	font-family: inherit;
	font-size: 12px;
	font-weight: 800;
	outline: none;
}
.priority-select {
	width: 178px;
}
.priority-select option,
.incident-assign-row option {
	background: #111827;
	color: #eef2ff;
}
.role-select:disabled {
	opacity: 0.58;
	cursor: not-allowed;
}
.role-chip {
	display: inline-flex;
	align-items: center;
	width: fit-content;
	min-height: 24px;
	margin-top: 8px;
	padding: 5px 9px;
	border-radius: 999px;
	border: 1px solid rgba(148, 163, 184, 0.22);
	background: rgba(148, 163, 184, 0.08);
	color: var(--gl-muted);
	font-size: 11px;
	font-weight: 800;
	line-height: 1.1;
}
.role-chip.radio {
	border-color: rgba(34, 197, 94, 0.32);
	background: rgba(34, 197, 94, 0.12);
	color: #bbf7d0;
}
.role-chip.admin {
	border-color: rgba(99, 102, 241, 0.42);
	background: rgba(99, 102, 241, 0.15);
	color: #c7d2fe;
}
.acc {
	padding: 8px 14px;
	border-radius: 10px;
	border: 1px solid var(--gl-border);
	background: var(--gl-surface);
	color: var(--gl-muted);
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	flex: none;
}
.acc.on {
	background: rgba(99, 102, 241, 0.16);
	border-color: rgba(99, 102, 241, 0.5);
	color: #c7d2fe;
}
.ops-summary {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	margin: 16px 0 14px;
}
.ops-summary.ops-summary-four {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}
.ops-summary > div {
	min-height: 74px;
	border-radius: 16px;
	border: 1px solid var(--gl-border);
	background: var(--gl-surface);
	padding: 14px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
}
.ops-summary b {
	font-size: 23px;
	line-height: 1;
}
.ops-summary span {
	color: var(--gl-muted);
	font-size: 11.5px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	line-height: 1.25;
}
.ops-card {
	padding: 16px;
	margin-bottom: 12px;
}
.ops-card.mini {
	margin-bottom: 10px;
}
.ops-card .sub {
	margin-top: 10px;
	color: var(--gl-muted);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.35;
}
.status-stack {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 6px;
}
.incident-assign-row {
	margin-top: 12px;
	display: grid;
	grid-template-columns: 92px minmax(0, 1fr);
	gap: 10px;
	align-items: center;
}
.incident-assign-row span {
	color: var(--gl-muted);
	font-size: 11px;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}
.sos-rec-wrap {
	margin: 10px 0 4px;
	padding: 10px 12px;
	background: rgba(239, 68, 68, 0.07);
	border: 1px solid rgba(239, 68, 68, 0.22);
	border-radius: 10px;
}
.sos-rec-label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	color: #fca5a5;
	text-transform: uppercase;
}
.sos-task-card {
	border-color: rgba(239, 68, 68, 0.28);
	background:
		linear-gradient(135deg, rgba(239, 68, 68, 0.11), rgba(255, 255, 255, 0.04)),
		var(--gl-surface);
}
.ops-card textarea {
	width: 100%;
	margin-top: 14px;
	padding: 14px 16px;
	border-radius: 14px;
	border: 1px solid var(--gl-border);
	background: rgba(255, 255, 255, 0.045);
	color: var(--gl-text);
	font-size: 14px;
	font-family: inherit;
	line-height: 1.45;
	resize: vertical;
	outline: none;
}
.ops-card textarea:focus {
	border-color: var(--gl-accent);
	box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18);
}
.ops-actions {
	grid-template-columns: repeat(2, minmax(0, auto));
	justify-content: end;
	margin-top: 14px;
}
.ops-actions .btn-sm {
	min-width: 124px;
}
.btn-sm.ghost {
	background: rgba(255, 255, 255, 0.07);
	border: 1px solid var(--gl-border);
	color: #cbd5e1;
}
.btn-sm.resolve {
	background: rgba(34, 197, 94, 0.18);
	border: 1px solid rgba(34, 197, 94, 0.38);
	color: #bbf7d0;
}
.btn-sm.danger {
	background: rgba(239, 68, 68, 0.18);
	border: 1px solid rgba(239, 68, 68, 0.4);
	color: #fecaca;
}
.ops-dashboard-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 14px;
	align-items: start;
}
.radio-command-card {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(280px, 0.92fr);
	gap: 14px;
	align-items: center;
	margin: 16px 0 12px;
	padding: 16px;
	border-radius: 16px;
	border: 1px solid rgba(239, 68, 68, 0.22);
	background:
		linear-gradient(135deg, rgba(239, 68, 68, 0.13), rgba(99, 102, 241, 0.08)),
		var(--gl-surface);
}
.radio-command-card b {
	font-size: 15px;
	font-weight: 900;
}
.radio-command-card p {
	margin-top: 4px;
	color: var(--gl-muted);
	font-size: 12.5px;
	font-weight: 700;
	line-height: 1.35;
}
.radio-command-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}
.radio-command-actions input {
	min-width: 0;
	flex: 1;
	min-height: 44px;
	padding: 11px 13px;
	border-radius: 12px;
	border: 1px solid var(--gl-border);
	background: rgba(255, 255, 255, 0.055);
	color: var(--gl-text);
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	outline: none;
}
.radio-command-actions input:focus {
	border-color: var(--gl-accent);
	box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.16);
}
.radio-health-row .sub,
.audit-row .sub {
	line-height: 1.35;
}
.audit-list {
	margin-bottom: 10px;
}
.row.slim {
	padding: 12px 14px;
}
.compact-empty {
	padding: 20px 0;
}
.reportbar input[type="date"] {
	flex: 0 1 180px;
}
.report-kpis {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}
.report-note-card {
	border-color: rgba(34, 211, 238, 0.22);
	background:
		linear-gradient(135deg, rgba(34, 211, 238, 0.09), rgba(99, 102, 241, 0.08)),
		var(--gl-surface);
}
.report-table-wrap {
	width: 100%;
	overflow-x: auto;
	margin-bottom: 16px;
	border: 1px solid var(--gl-border);
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.04);
}
.ops-table {
	width: 100%;
	min-width: 980px;
	border-collapse: collapse;
}
.ops-table th,
.ops-table td {
	padding: 12px 13px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.07);
	text-align: left;
	vertical-align: top;
	font-size: 12px;
	line-height: 1.35;
}
.ops-table th {
	position: sticky;
	top: 0;
	z-index: 1;
	background: rgba(10, 14, 26, 0.96);
	color: var(--gl-muted);
	font-size: 10.5px;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}
.ops-table td b {
	display: block;
	font-size: 12.5px;
	color: var(--gl-text);
}
.ops-table td span {
	display: block;
	margin-top: 4px;
	color: var(--gl-muted);
	font-size: 11px;
	font-weight: 750;
}
.staff-report-table tbody tr:hover {
	background: rgba(99, 102, 241, 0.08);
}
.report-admin-grid {
	margin-top: 12px;
	margin-bottom: 8px;
}
.report-control-card {
	min-height: 100%;
}
.report-form-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	margin-top: 14px;
}
.report-form-grid label {
	min-width: 0;
}
.report-form-grid span {
	display: block;
	margin-bottom: 6px;
	color: var(--gl-muted);
	font-size: 10.5px;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}
.report-form-grid input,
.report-form-grid select {
	width: 100%;
	min-height: 42px;
	padding: 10px 12px;
	border: 1px solid var(--gl-border);
	border-radius: 12px;
	background: rgba(2, 6, 23, 0.28);
	color: var(--gl-text);
	font: inherit;
	font-size: 12px;
	font-weight: 800;
	outline: none;
}
.report-form-grid input:focus,
.report-form-grid select:focus {
	border-color: var(--gl-accent);
	box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.14);
}
.report-form-grid option {
	background: #111827;
	color: #eef2ff;
}
.report-mini-list {
	margin-top: 14px;
}
.gl-bar-row {
	margin-bottom: 10px;
	padding: 12px;
	border: 1px solid var(--gl-border);
	border-radius: 14px;
	background: var(--gl-surface);
	overflow: hidden;
}
.gl-bar-row > div {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 9px;
}
.gl-bar-row b {
	font-size: 13px;
}
.gl-bar-row span {
	color: var(--gl-muted);
	font-size: 12px;
	font-weight: 900;
}
.gl-bar-row i {
	display: block;
	height: 8px;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--gl-accent), var(--gl-accent2));
	box-shadow: 0 8px 18px rgba(99, 102, 241, 0.22);
}
.role-chip.staff {
	border-color: rgba(34, 197, 94, 0.32);
	background: rgba(34, 197, 94, 0.12);
	color: #bbf7d0;
}
.role-chip.supervisor {
	border-color: rgba(245, 158, 11, 0.34);
	background: rgba(245, 158, 11, 0.12);
	color: #fde68a;
}

@media (hover: hover) and (pointer: fine) {
	.ops-btn:hover,
	.btn-sm:hover,
	.back:hover,
	.admin-signout:hover {
		border-color: rgba(99, 102, 241, 0.45);
	}
}

@media (min-width: 760px) {
	#home .scroll {
		width: 100%;
		max-width: 640px;
		margin: 0 auto;
	}
	#admin .scroll {
		width: 100%;
		max-width: 1040px;
		margin: 0 auto;
	}
	.admin-profile-card {
		width: calc(100% - 44px);
		max-width: 1040px;
		margin-left: auto;
		margin-right: auto;
	}
	#admin .tabbar {
		width: calc(100% - 44px);
		max-width: 1040px;
		margin-left: auto;
		margin-right: auto;
		padding-left: 0;
		padding-right: 0;
	}
	.gl-modal {
		align-items: center;
	}
	.gl-sheet {
		padding: 22px;
	}
}

@media (max-width: 759px) {
	.admin-profile-card {
		grid-template-columns: 1fr;
	}
	.admin-profile-metrics {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.account-form-grid,
	.channel-picker-grid,
	.staff-toolbar {
		grid-template-columns: 1fr;
	}
	.ops-dashboard-grid {
		grid-template-columns: 1fr;
	}
	.radio-command-card {
		grid-template-columns: 1fr;
	}
	.ops-summary.ops-summary-four {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.report-kpis {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.report-form-grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 520px) {
	#roleGate {
		justify-content: flex-start;
		padding-top: max(24px, env(safe-area-inset-top));
	}
	.gl-orbit-shell {
		min-height: calc(100svh - max(48px, env(safe-area-inset-top)) - max(28px, env(safe-area-inset-bottom)));
		justify-content: center;
	}
	.gl-orbit-title {
		font-size: 38px;
	}
	.gl-orbit-sub,
	.gl-orbit-foot {
		font-size: 9.5px;
	}
	.gl-orbit-stage {
		width: min(356px, calc(100vw - 32px));
	}
	.gl-role-node {
		width: 94px;
		height: 94px;
	}
	.gl-role-node .node-icon {
		font-size: 21px;
	}
	.gl-role-node .node-label {
		font-size: 10px;
		max-width: 76px;
	}
	.gl-role-node .node-sub {
		font-size: 8px;
	}
	.gl-core-logo {
		width: 48px;
		height: 48px;
		border-radius: 16px;
	}
	.gl-core-label {
		font-size: 9px;
	}
	.hdr {
		padding: calc(16px + var(--safe-top)) 16px 12px;
		gap: 12px;
	}
	.shield {
		width: 38px;
		height: 38px;
	}
	.brand h1 {
		font-size: 18px;
	}
	.brand-subline {
		font-size: 10.5px;
		line-height: 1.2;
	}
	.admin-signout {
		width: auto;
		min-width: 92px;
		height: 42px;
		padding: 0 11px;
		flex: none;
	}
	.admin-signout span {
		display: inline;
	}
	.admin-profile-card {
		margin: 10px 16px 10px;
		padding: 12px;
		grid-template-columns: 1fr;
		gap: 12px;
		border-radius: 16px;
	}
	.admin-avatar {
		width: 42px;
		height: 42px;
		border-radius: 13px;
	}
	.admin-profile-name {
		font-size: 16px;
	}
	.admin-profile-metrics {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.profile-metric {
		min-height: 54px;
	}
	.scroll {
		padding: 0 16px calc(18px + var(--safe-bottom));
	}
	.cv-hdr {
		padding: calc(14px + var(--safe-top)) 16px 14px;
	}
	.chan-main {
		max-height: 38dvh;
		padding: 12px 16px 0;
	}
	.chan-actions {
		margin-top: 10px;
	}
	.audio-mode-card {
		grid-template-columns: 1fr;
	}
	.audio-mode-toggle button {
		font-size: 10px;
	}
	.priority-banner {
		align-items: flex-start;
		flex-direction: column;
	}
	.priority-banner span {
		text-align: left;
	}
	.ops-grid {
		grid-template-columns: 1fr;
	}
	.chan-actions {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.chan-actions .ops-btn {
		min-height: 62px;
		padding: 11px 12px;
	}
	.chan-actions .ops-btn span {
		font-size: 13px;
	}
	.chan-actions .ops-btn b {
		font-size: 10.5px;
	}
	.radio-command-actions {
		flex-direction: column;
		align-items: stretch;
	}
	.radio-command-actions .btn-sm {
		width: 100%;
	}
	.ops-panel-top,
	.ops-card-head {
		flex-wrap: wrap;
	}
	.ops-summary {
		gap: 8px;
	}
	.ops-summary.ops-summary-four {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.ops-summary > div {
		min-height: 68px;
		padding: 12px 10px;
	}
	.ops-summary b {
		font-size: 20px;
	}
	.ops-summary span {
		font-size: 10px;
	}
	.ops-actions {
		grid-template-columns: 1fr;
	}
	.ops-actions .btn-sm {
		width: 100%;
		min-width: 0;
	}
	.report-form-grid {
		grid-template-columns: 1fr;
	}
	.report-table-wrap {
		border-radius: 12px;
	}
	.status-stack {
		justify-content: flex-start;
	}
	.incident-assign-row,
	.sos-location-control {
		grid-template-columns: 1fr;
		gap: 7px;
	}
	.row {
		align-items: flex-start;
		flex-wrap: wrap;
	}
	.rowbtns {
		width: 100%;
		justify-content: flex-end;
		flex-wrap: wrap;
	}
	.account-head {
		align-items: stretch;
	}
	.account-head .btn-sm {
		width: 100%;
	}
	.role-select {
		flex: 1 1 170px;
	}
	.priority-select {
		width: 100%;
		flex: 1 1 180px;
	}
	.sos-wrap {
		padding: 8px 16px calc(18px + var(--safe-bottom));
	}
	.sos-bar {
		margin-left: 16px;
		margin-right: 16px;
	}
	.gl-modal {
		padding: 10px;
	}
	.gl-sheet {
		border-radius: 20px;
		padding: 16px;
	}
	.ptt {
		width: 178px;
		height: 178px;
		font-size: 15px;
	}
	.ring {
		width: 178px;
		height: 178px;
		top: calc(50% - 14px);
	}
	.ptt .mic {
		font-size: 30px;
	}
	.ptt-wrap {
		gap: 12px;
		min-height: 184px;
		max-height: 30dvh;
		padding-top: 10px;
		padding-bottom: 10px;
	}
}

@media (max-width: 360px) {
	.ops-summary {
		grid-template-columns: 1fr;
	}
	.ops-summary.ops-summary-four {
		grid-template-columns: 1fr;
	}
	.gl-role-node {
		width: 88px;
		height: 88px;
	}
	.gl-orbit-stage {
		width: min(326px, calc(100vw - 28px));
	}
	.gl-role-node.staff {
		left: 50%;
		top: 19%;
	}
	.gl-role-node.supervisor {
		left: 21%;
		top: 74%;
		right: auto;
	}
	.gl-role-node.admin {
		left: 79%;
		top: 74%;
		right: auto;
	}
	.incident-mini {
		padding-right: 14px;
	}
	.incident-mini .ops-status {
		position: static;
		margin-top: 8px;
	}
	.mini-actions .btn-sm {
		flex: 1;
		min-width: 0;
	}
}

@media (max-height: 620px) {
	#roleGate {
		padding-top: 18px;
		padding-bottom: 18px;
	}
	.gl-orbit-shell {
		min-height: auto;
		gap: 12px;
	}
	.gl-orbit-title {
		font-size: clamp(30px, 7vw, 42px);
	}
	.gl-orbit-sub,
	.gl-orbit-foot {
		font-size: 9px;
		margin-top: 6px;
	}
	.gl-orbit-stage {
		width: min(326px, calc(100vw - 34px));
	}
	.gl-role-node {
		width: 86px;
		height: 86px;
	}
	.gl-core-logo {
		width: 44px;
		height: 44px;
	}
	.gl-core-label {
		font-size: 8px;
	}
}

@media (max-height: 680px) {
	.ptt {
		width: 156px;
		height: 156px;
		font-size: 14px;
	}
	.ring {
		width: 156px;
		height: 156px;
		top: calc(50% - 12px);
	}
	.ptt .mic {
		font-size: 27px;
	}
	.ptt-wrap {
		gap: 10px;
		min-height: 164px;
		max-height: 28dvh;
	}
	.hint {
		font-size: 12px;
	}
}

@keyframes cardIn {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}
@keyframes blink {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: 0.3;
	}
}
@keyframes ring {
	0% {
		opacity: 0.7;
		transform: translate(-50%, -50%) scale(1);
	}
	100% {
		opacity: 0;
		transform: translate(-50%, -50%) scale(1.5);
	}
}
@keyframes eq {
	0%,
	100% {
		height: 5px;
	}
	50% {
		height: 16px;
	}
}

/* ── SOS / Panic ─────────────────────────────────────────────────────────── */
.sos-wrap {
	padding: 8px 22px calc(22px + var(--safe-bottom));
	margin-top: auto;
}
.sos-location-control {
	display: grid;
	grid-template-columns: auto minmax(150px, 1fr);
	align-items: center;
	gap: 10px;
	margin: 0 0 9px;
	padding: 9px 11px;
	border-radius: 13px;
	border: 1px solid rgba(239, 68, 68, 0.2);
	background: rgba(255, 255, 255, 0.045);
}
.sos-location-control span {
	color: var(--gl-muted);
	font-size: 10.5px;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}
.sos-location-control select {
	width: 100%;
	min-height: 36px;
	padding: 7px 10px;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(2, 6, 23, 0.28);
	color: var(--gl-text);
	font-family: inherit;
	font-size: 12px;
	font-weight: 900;
	outline: none;
}
.sos-location-control option {
	background: #111827;
	color: #eef2ff;
}
.sos-btn {
	position: relative;
	overflow: hidden;
	width: 100%;
	padding: 16px;
	border-radius: 16px;
	background: #2a0a0a;
	border: 1px solid rgba(239, 68, 68, 0.5);
	color: #fecaca;
	font-family: inherit;
	font-weight: 800;
	font-size: 15px;
	letter-spacing: 0.08em;
	cursor: pointer;
	user-select: none;
	touch-action: none;
	-webkit-user-select: none;
}
.sos-btn:active {
	transform: scale(0.99);
}
.sos-btn .sos-lbl {
	position: relative;
	z-index: 2;
}
.sos-fill {
	position: absolute;
	inset: 0;
	width: 0;
	background: linear-gradient(90deg, #ef4444, #dc2626);
	z-index: 1;
	transition: none;
}
.sos-btn.holding .sos-fill {
	width: 100%;
	transition: width 2s linear;
}
.sos-hint {
	text-align: center;
	font-size: 11px;
	color: var(--gl-muted);
	margin-top: 8px;
	letter-spacing: 0.04em;
}

.sos-bar {
	margin: 14px 22px 0;
	background: rgba(239, 68, 68, 0.16);
	border: 1px solid rgba(239, 68, 68, 0.5);
	color: #fecaca;
	border-radius: 14px;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	font-weight: 800;
	font-size: 13.5px;
}
.sos-bar button {
	padding: 9px 14px;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	font-family: inherit;
	font-weight: 800;
	font-size: 13px;
	cursor: pointer;
	flex: none;
}

.sos-overlay {
	position: fixed;
	inset: 0;
	z-index: 1000;
	background: rgba(120, 10, 10, 0.96);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 32px;
	animation: sosflash 1s steps(1, end) infinite;
}
@keyframes sosflash {
	0%,
	100% {
		background: rgba(120, 10, 10, 0.97);
	}
	50% {
		background: rgba(185, 28, 28, 0.98);
	}
}
.sos-overlay .sosicon {
	font-size: 66px;
	line-height: 1;
	animation: sospulse 0.8s ease-in-out infinite;
}
@keyframes sospulse {
	0%,
	100% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.16);
	}
}
.sos-overlay h2 {
	font-size: 28px;
	font-weight: 800;
	margin: 18px 0 6px;
	color: #fff;
	letter-spacing: -0.01em;
}
.sos-overlay p {
	font-size: 15px;
	color: #fee2e2;
	font-weight: 600;
}
.sos-overlay .sosbtns {
	display: flex;
	gap: 12px;
	margin-top: 30px;
	flex-wrap: wrap;
	justify-content: center;
}
.sos-overlay .sosbtns button {
	padding: 14px 22px;
	border-radius: 14px;
	border: none;
	font-family: inherit;
	font-weight: 800;
	font-size: 15px;
	cursor: pointer;
}
.sos-go {
	background: #fff;
	color: #b91c1c;
}
.sos-silence {
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.35);
}
.sos-resolve {
	background: #16a34a;
	color: #fff;
}

.interhospital-card {
	border-color: rgba(45, 212, 191, 0.22);
	background:
		linear-gradient(135deg, rgba(20, 184, 166, 0.13), rgba(99, 102, 241, 0.08)),
		var(--gl-surface);
}

.interhospital-compose {
	display: grid;
	grid-template-columns: minmax(160px, 220px) 1fr auto;
	gap: 10px;
	align-items: stretch;
	margin-top: 14px;
}

.interhospital-compose select,
.interhospital-compose textarea {
	width: 100%;
	border: 1px solid var(--gl-border);
	background: rgba(2, 6, 23, 0.36);
	color: var(--gl-text);
	border-radius: 8px;
	padding: 12px;
	font: inherit;
	font-size: 13px;
	font-weight: 750;
	outline: none;
	resize: vertical;
}

.interhospital-compose textarea {
	min-height: 72px;
}

.interhospital-feed {
	display: grid;
	gap: 10px;
}

.interhospital-message {
	border-color: rgba(125, 211, 252, 0.14);
}

.interhospital-message.mine {
	border-color: rgba(34, 197, 94, 0.22);
}

@media (max-width: 760px) {
	.interhospital-compose {
		grid-template-columns: 1fr;
	}
}

/* ── Emergency codes ────────────────────────────────────────────────────────── */

.active-code-banner {
	position: fixed;
	top: 0; left: 0; right: 0;
	z-index: 9999;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.active-code-banner.hidden { display: none; }
.acb-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 16px;
	background: var(--acb-color, #ef4444);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	animation: acbPulse 2s ease-in-out infinite;
}
@keyframes acbPulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.85; }
}
.acb-dot {
	width: 10px; height: 10px;
	border-radius: 50%;
	background: #fff;
	flex-shrink: 0;
	animation: acbDot 1s ease-in-out infinite;
}
@keyframes acbDot {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.4); }
}
.acb-meta {
	font-weight: 400;
	opacity: 0.9;
	margin-left: 4px;
	flex: 1;
}
.acb-resolve {
	background: rgba(0,0,0,0.25);
	border: 1px solid rgba(255,255,255,0.4);
	color: #fff;
	border-radius: 6px;
	padding: 4px 12px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	flex-shrink: 0;
}
.acb-resolve:hover { background: rgba(0,0,0,0.4); }

.code-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-top: 12px;
}
.code-btn {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	padding: 12px 14px;
	border: 2px solid rgba(255,255,255,0.1);
	border-radius: 10px;
	background: rgba(255,255,255,0.04);
	color: var(--gl-text);
	cursor: pointer;
	text-align: left;
	transition: border-color 0.15s, background 0.15s;
}
.code-btn b { font-size: 13px; font-weight: 700; color: var(--code-color, #fff); }
.code-btn span { font-size: 11px; color: var(--gl-muted); }
.code-btn.selected, .code-btn:hover {
	border-color: var(--code-color, #8b5cf6);
	background: rgba(255,255,255,0.08);
}
.code-btn.selected { background: color-mix(in srgb, var(--code-color) 15%, transparent); }

.code-chip {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 12px;
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 6px;
	background: rgba(255,255,255,0.05);
	border: 1px solid rgba(255,255,255,0.1);
}
.code-chip input { margin: 0; }

.code-pill {
	display: inline-block;
	padding: 1px 6px;
	border-radius: 4px;
	font-size: 10px;
	font-weight: 700;
	color: #fff;
	opacity: 0.9;
}

.gl-btn.danger {
	background: #ef4444;
	color: #fff;
	border: none;
}
.gl-btn.danger:hover { background: #dc2626; }
