:root {
	--bg:#10151b;
	--panel:#192029;
	--panel-alt:#202a35;
	--border:#33404e;
	--text:#e0e6ec;
	--dim:#9aa9b8;
	--rcpd:#80b3df;
	--lcso:#cbb783;
	--ok:#88b69b;
	--red:#ed7979;
	--radius:3px;
}
html, body {
	background:#10151b;
	background-image:none;
	font-size:14px;
}
h1,h2,h3,.display,nav.mdt-nav a,button,.btn,th {
	font-family:inherit;
	letter-spacing:0;
	text-transform:none;
}
h1 {
	font-size:25px;
	font-weight:600;
}
h2 {
	font-size:15px;
}
h3 {
	font-size:13px;
}
.mono,.cad-bar {
	font-family:Consolas,monospace;
}
.cad-bar {
	min-height:48px;
	background:#0d1218;
	gap:16px;
	padding:8px 24px;
}
.cad-bar .dot {
	animation:none;
	box-shadow:none;
	width:6px;
	height:6px;
}
nav.mdt-nav {
	padding:0 24px;
	background:#192029;
	gap:10px;
}
nav.mdt-nav a {
	font-size:13px;
	padding:15px 12px;
}
nav.mdt-nav a.active {
	color:var(--text);
	background:#232e3a;
}
main {
	max-width:1680px;
	padding:24px;
}
.page-heading {
	display:flex;
	align-items:center;
	justify-content:space-between;
	gap:16px;
	margin-bottom:22px;
}
.eyebrow {
	display:block;
	color:var(--dim);
	font:10px Consolas,monospace;
	letter-spacing:.15em;
	margin-bottom:6px;
}
.panel {
	padding:18px;
	box-shadow:none;
}
.panel>h2 {
	color:var(--text);
	font-size:14px;
	font-weight:600;
	padding-bottom:12px;
	border-bottom:1px solid var(--border);
}
.grid-2 {
	grid-template-columns:minmax(0,1.45fr) minmax(360px,1fr);
	gap:18px;
	align-items:start;
}
.grid-2>* {
	min-width:0;
}
.duty-toolbar {
	display:flex;
	align-items:center;
	gap:24px;
	padding:12px 18px;
}
.duty-toolbar>h2 {
	margin:0;
	padding:0;
	border:0;
}
.status-toggle button {
	padding:8px 18px;
	font-size:12px;
}
.status-toggle button.active {
	border-color:var(--amber);
	background:#30465a;
	color:var(--text);
}
.status-toggle button.active[data-status] {
	background:#293f36;
	color:#bfdfcc;
	border-color:#526e60;
}
.status-toggle button.active[data-status="przerwa"] {
	background:#413b2b;
	color:#e4d4a7;
	border-color:#746748;
}
.status-toggle button.active[data-status="Offline"] {
	background:#303841;
	color:#c4cdd6;
	border-color:#637080;
}
button,.btn {
	font-size:12px;
	font-weight:600;
	background:#354e65;
	color:#eef4f9;
	border:1px solid #4e6a82;
}
button:disabled {
	opacity:.45;
	cursor:not-allowed;
}
input,select,textarea {
	background:#111820;
	border-color:#3a4959;
}
label {
	text-transform:none;
	letter-spacing:0;
}
th {
	font-size:11px;
	font-weight:500;
	background:#151c24;
}
td {
	vertical-align:top;
	overflow-wrap:anywhere;
}
tr.wanted-row {
	background:transparent;
}
tr.wanted-row td:first-child {
	border-left:2px solid #a96262;
}
.map-wrap {
	min-height:0;
	background:#0c1117;
}
.legend {
	font-size:11px;
}
.duty-group {
	margin:0 0 18px;
}
.duty-group h3 {
	padding:6px 0;
	color:var(--dim);
	display:flex;
	justify-content:space-between;
}
.patrol-row {
	display:flex;
	align-items:center;
	justify-content:space-between;
	gap:12px;
	padding:12px 0;
	border-top:1px solid var(--border);
}
.patrol-row p {
	margin:5px 0 0;
	color:var(--dim);
	font-size:12px;
}
.call-row {
	padding:14px 0;
	border-bottom:1px solid var(--border);
	text-align:left;
}
.call-row:first-child {
	padding-top:0;
}
.call-row p {
	margin:8px 0;
}
.call-row small,.muted {
	color:var(--dim);
	font-size:12px;
	line-height:1.6;
}
.empty-state {
	text-align:left;
	padding:12px 0;
	color:var(--dim);
}
.panic-button {
	background:#442326;
	border-color:#a35158;
	color:#ffd9dc;
	min-width:210px;
	touch-action:none;
	user-select:none;
}
.panic-button.holding {
	background:linear-gradient(90deg,#a73340 50%,#442326 50%);
	background-size:200% 100%;
	animation:panic-hold 2s linear forwards;
}
@keyframes panic-hold {
	from {
		background-position:100% 0;
	}
	to {
		background-position:0 0;
	}
}
#alarm-banner {
	background:#7d2530;
	color:white;
	padding:14px 24px;
	font-weight:600;
}
.pin.panic {
	z-index:100;
}
.pin.panic .dotmark {
	background:#ff263b!important;
	border-color:white;
	animation:panic-flash .6s infinite alternate;
}
.pin.panic .chip {
	background:#a42331;
	color:white;
}
@keyframes panic-flash {
	from {
		box-shadow:0 0 0 3px #ff263b;
		opacity:1;
	}
	to {
		box-shadow:0 0 0 14px #ff263b33;
		opacity:.4;
	}
}
.chat-panel {
	max-width:1100px;
}
#chat-messages {
	height:52vh;
	min-height:250px;
	overflow:auto;
	border-block:1px solid var(--border);
	margin:16px 0;
}
.chat-message {
	padding:14px 0;
	border-bottom:1px solid #293440;
}
.chat-message header {
	display:flex;
	align-items:center;
	gap:12px;
	font-size:12px;
}
.chat-message header span,.chat-message time {
	color:var(--dim);
	font-size:11px;
}
.chat-message time {
	margin-left:auto;
}
.chat-message p {
	margin:8px 0 0;
	white-space:pre-wrap;
	overflow-wrap:anywhere;
	line-height:1.5;
}
.settings-panel {
	max-width:720px;
}
.setting-row {
	display:flex;
	gap:12px;
	align-items:center;
	padding:14px 0;
	border-bottom:1px solid var(--border);
	color:var(--text);
	font-size:14px;
}
.setting-row input {
	width:18px;
	height:18px;
	accent-color:var(--rcpd);
}
@media(max-width:1000px) {
	.grid-2 {
		grid-template-columns:1fr;
	}
}
@media(max-width:600px) {
	main {
		padding:12px;
	}
	.cad-bar {
		flex-wrap:wrap;
		padding:10px 12px;
		gap:10px;
	}
	.cad-bar .unit {
		flex:1;
	}
	.page-heading {
		align-items:flex-start;
		flex-direction:column;
	}
	.duty-toolbar {
		flex-wrap:wrap;
		gap:12px;
	}
	.panel {
		padding:12px;
		overflow-x:auto;
	}
	nav.mdt-nav {
		padding:0 8px;
	}
	h1 {
		font-size:22px;
	}
}
@media(prefers-reduced-motion:reduce) {
	.pin.panic .dotmark {
		animation:none;
		box-shadow:0 0 0 6px #ff263b88;
	}
}
