/* ===================== SEA RADAR — AMIR TECHNOLOGY ===================== */
#sea-radar-root, #sea-radar-root * { box-sizing: border-box; }

#sea-radar-root {
	--sr-bg: #060c14;
	--sr-panel: #0b1520e6;
	--sr-panel-border: #1c3244;
	--sr-cyan: #33e6ff;
	--sr-gold: #e9c168;
	--sr-green: #35e08a;
	--sr-red: #ff5468;
	--sr-text: #d9ecf5;
	--sr-text-dim: #7f97a8;
	font-family: "Yekan", "IRANYekan", Tahoma, sans-serif;
	direction: rtl;
	color: var(--sr-text);
	background: radial-gradient(ellipse at 50% -10%, #10243a 0%, #060c14 55%, #030608 100%);
	border-radius: 18px;
	overflow: hidden;
	border: 1px solid var(--sr-panel-border);
	box-shadow: 0 30px 80px -20px #000c, inset 0 0 60px #00131f80;
	height: var(--sr-height, 820px);
	display: flex;
	flex-direction: column;
}

/* ---------- top bar ---------- */
.sr-topbar {
	display: flex; align-items: center; justify-content: space-between;
	padding: 10px 18px;
	background: linear-gradient(180deg, #0d1c2b, #0a1622);
	border-bottom: 1px solid var(--sr-panel-border);
}
.sr-brand { display: flex; align-items: center; gap: 10px; }
.sr-logo-dot {
	width: 14px; height: 14px; border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, #9df4ff, var(--sr-cyan) 60%, #086 100%);
	box-shadow: 0 0 14px 2px #33e6ffaa;
}
.sr-brand-text b { font-size: 17px; letter-spacing: 1px; color: #fff; }
.sr-brand-text small { display: block; color: var(--sr-text-dim); font-size: 11px; }
.sr-topbar-status { display: flex; gap: 8px; }
.sr-pill {
	font-size: 11px; padding: 5px 12px; border-radius: 999px;
	background: #ffffff0d; border: 1px solid #ffffff1a; color: var(--sr-text-dim);
}
.sr-pill-live { color: var(--sr-green); border-color: #35e08a55; }
.sr-dot { display:inline-block; width:7px; height:7px; border-radius:50%; background: var(--sr-green); margin-left:6px; animation: sr-blink 1.4s infinite; }
@keyframes sr-blink { 50% { opacity: .25; } }

/* ---------- body layout ---------- */
.sr-body { flex: 1; display: grid; grid-template-columns: 250px 1fr 250px; min-height: 0; }
.sr-panel { overflow-y: auto; padding: 14px; background: var(--sr-panel); }
.sr-panel-left { border-left: 1px solid var(--sr-panel-border); }
.sr-panel-right { border-right: 1px solid var(--sr-panel-border); }
.sr-panel::-webkit-scrollbar { width: 6px; }
.sr-panel::-webkit-scrollbar-thumb { background: #1c3244; border-radius: 4px; }

.sr-panel-title {
	font-size: 12px; color: var(--sr-cyan); margin: 14px 0 8px; letter-spacing: .5px;
	display: flex; justify-content: space-between; align-items: baseline;
	border-bottom: 1px dashed #1c3244; padding-bottom: 6px;
}
.sr-panel-title:first-child { margin-top: 0; }
.sr-panel-title span { font-size: 9px; color: var(--sr-text-dim); font-family: 'Chakra Petch', monospace; }

.sr-gauge-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sr-metric {
	background: #0e1c2b; border: 1px solid #17293a; border-radius: 10px; padding: 8px 10px;
}
.sr-metric label { display: block; font-size: 10px; color: var(--sr-text-dim); margin-bottom: 4px; }
.sr-metric b { font-family: 'JetBrains Mono', monospace; font-size: 16px; color: #fff; }
.sr-metric small { color: var(--sr-text-dim); font-size: 10px; margin-right: 4px; }

.sr-ndt canvas, .sr-leak canvas { width: 100%; border-radius: 8px; background: #04141c; border: 1px solid #123044; }
.sr-ndt-row, .sr-power-row { display: flex; justify-content: space-between; font-size: 12px; padding: 5px 0; color: var(--sr-text-dim); }
.sr-ndt-row b, .sr-power-row b { color: #fff; font-family: 'JetBrains Mono', monospace; }

.sr-btn {
	width: 100%; margin-top: 8px; padding: 9px; border-radius: 8px; border: none; cursor: pointer;
	font-family: inherit; font-size: 12px; font-weight: bold;
}
.sr-btn-danger { background: linear-gradient(180deg, #ff6b7d, #d3283f); color: #fff; box-shadow: 0 4px 14px #ff29471a; }
.sr-btn-danger:active { transform: translateY(1px); }

/* ---------- center stage ---------- */
.sr-stage { display: flex; flex-direction: column; min-width: 0; background: #000; }
.sr-canvas-wrap { position: relative; flex: 1; min-height: 0; background: #010b14; }
#sr-canvas { width: 100%; height: 100%; display: block; }
.sr-loading {
	position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
	color: var(--sr-cyan); font-size: 13px; background: #010b14; letter-spacing: .5px;
}

.sr-hud-topleft {
	position: absolute; top: 12px; right: 12px; background: #05121cb3; border: 1px solid #123044;
	border-radius: 10px; padding: 8px 12px; font-family: 'JetBrains Mono', monospace; font-size: 11px;
	backdrop-filter: blur(6px);
}
.sr-hud-line { color: var(--sr-text-dim); display: flex; justify-content: space-between; gap: 14px; }
.sr-hud-line b { color: var(--sr-cyan); }

.sr-hud-topright {
	position: absolute; top: 12px; left: 12px; background: #05121cb3; border: 1px solid #e9c16855;
	color: var(--sr-gold); border-radius: 10px; padding: 8px 14px; font-size: 11px; font-weight: bold;
	letter-spacing: 1px; backdrop-filter: blur(6px);
}

.sr-sonar-wrap { position: absolute; bottom: 12px; left: 12px; text-align: center; }
#sonar-canvas { border-radius: 50%; border: 1px solid #123044; background: #010e0a; box-shadow: 0 0 30px #00ff8822; }
.sr-sonar-label { font-size: 9px; color: var(--sr-green); margin-top: 4px; letter-spacing: 1px; }

.sr-cam-presets, .sr-render-modes {
	position: absolute; top: 60px; left: 12px; display: flex; flex-direction: column; gap: 6px;
}
.sr-render-modes { top: auto; bottom: 60px; flex-direction: row; left: 12px; }
.sr-chip {
	font-family: inherit; font-size: 11px; padding: 6px 10px; border-radius: 8px; cursor: pointer;
	background: #05121cb3; color: var(--sr-text-dim); border: 1px solid #123044; backdrop-filter: blur(6px);
	text-align: right; transition: .15s;
}
.sr-chip:hover { color: #fff; }
.sr-chip.active { color: #001a12; background: var(--sr-cyan); border-color: var(--sr-cyan); font-weight: bold; }

.sr-fab {
	position: absolute; bottom: 12px; right: 12px; width: 46px; height: 46px; border-radius: 50%;
	background: var(--sr-gold); border: none; font-size: 18px; cursor: pointer; box-shadow: 0 6px 20px #e9c16855;
}

/* ---------- pilot console ---------- */
.sr-console {
	display: flex; flex-wrap: wrap; gap: 22px; align-items: center;
	padding: 12px 18px; background: linear-gradient(0deg, #0d1c2b, #0a1622);
	border-top: 1px solid var(--sr-panel-border);
}
.sr-console-group { display: flex; flex-direction: column; gap: 6px; }
.sr-console-label { font-size: 10px; color: var(--sr-text-dim); }
.sr-modes { display: flex; gap: 6px; }
.sr-mode-btn {
	font-family: inherit; font-size: 11px; padding: 7px 12px; border-radius: 8px; cursor: pointer;
	background: #0e1c2b; color: var(--sr-text-dim); border: 1px solid #17293a; font-weight: bold; letter-spacing: .3px;
}
.sr-mode-btn.active { color: #001a12; background: var(--sr-green); border-color: var(--sr-green); }

.sr-dpad { display: grid; grid-template-columns: repeat(3, 34px); gap: 4px; }
.sr-dpad-btn {
	width: 34px; height: 34px; border-radius: 8px; background: #0e1c2b; border: 1px solid #17293a;
	color: var(--sr-cyan); font-family: 'JetBrains Mono', monospace; font-size: 12px; cursor: pointer;
}
.sr-dpad-btn.ghost { visibility: hidden; }
.sr-dpad-btn:active, .sr-dpad-btn.pressed { background: var(--sr-cyan); color: #001a2b; }

.sr-joy-pad {
	position: relative; width: 74px; height: 74px; border-radius: 50%;
	background: radial-gradient(circle at 50% 50%, #10202e, #0a1622 70%);
	border: 1px solid #1c3244; touch-action: none; cursor: grab;
}
.sr-joy-knob {
	position: absolute; top: 50%; left: 50%; width: 30px; height: 30px; margin: -15px;
	border-radius: 50%; background: var(--sr-cyan); box-shadow: 0 0 12px #33e6ff88;
	transition: transform .05s linear;
}
.sr-throttle {
	width: 140px; accent-color: var(--sr-cyan); cursor: pointer;
}
.sr-console-label b { color: var(--sr-cyan); font-family: 'JetBrains Mono', monospace; font-weight: normal; }

/* ---------- right panel ---------- */
.sr-cam-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sr-cam-tile {
	position: relative; height: 60px; border-radius: 8px; background: #0e1c2b; border: 1px solid #17293a;
	font-size: 10px; color: var(--sr-text-dim); display: flex; align-items: flex-end; padding: 6px; overflow: hidden;
}
.sr-cam-tile span { position: absolute; top: 6px; right: 6px; color: var(--sr-cyan); font-size: 9px; }
.sr-cam-tile.active { border-color: var(--sr-cyan); box-shadow: inset 0 0 0 1px var(--sr-cyan); color: #fff; }

.sr-bathy { width: 100%; border-radius: 8px; background: #03121c; border: 1px solid #123044; }

.sr-log { list-style: none; margin: 0; padding: 0; font-size: 11px; max-height: 160px; overflow-y: auto; }
.sr-log li { padding: 6px 0; border-bottom: 1px dashed #14283a; color: var(--sr-text-dim); }
.sr-log li b { color: var(--sr-gold); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
	.sr-body { grid-template-columns: 1fr; grid-template-rows: auto auto auto; }
	.sr-panel-left, .sr-panel-right { border: none; border-top: 1px solid var(--sr-panel-border); }
	#sea-radar-root { height: auto; }
	.sr-canvas-wrap { height: 460px; }
}
