:root {
  color-scheme: dark;
  --bg: #05080d;
  --panel: rgba(12, 19, 29, 0.9);
  --panel-soft: rgba(17, 29, 43, 0.72);
  --line: rgba(129, 177, 221, 0.2);
  --line-strong: rgba(86, 190, 255, 0.48);
  --text: #f4f8ff;
  --muted: rgba(219, 231, 246, 0.66);
  --muted-2: rgba(219, 231, 246, 0.48);
  --cyan: #38d9d1;
  --blue: #48a7ff;
  --green: #5ae0a4;
  --amber: #ffd166;
  --red: #ff716d;
  --violet: #a592ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
}

body {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% -20%, rgba(54, 136, 190, 0.22), transparent 42%),
    linear-gradient(180deg, #07111b 0%, #05080d 72%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background-image:
    linear-gradient(rgba(122, 181, 236, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 181, 236, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.18));
}

body::after {
  background:
    linear-gradient(90deg, rgba(56, 217, 209, 0.16), transparent 22%, transparent 78%, rgba(72, 167, 255, 0.16)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 26%, transparent 74%, rgba(0, 0, 0, 0.36));
  opacity: 0.58;
}

button,
input,
select,
textarea,
a {
  font: inherit;
}

.cockpit-shell *,
.cockpit-panel * {
  min-width: 0;
}

.hidden {
  display: none !important;
}

.cockpit-shell {
  position: relative;
  z-index: 1;
  width: min(100vw, 1920px);
  height: 100vh;
  margin: 0 auto;
  padding: clamp(10px, 1vw, 18px);
  display: grid;
  grid-template-rows: minmax(48px, 6.3vh) minmax(118px, 15.2vh) minmax(0, 1fr);
  gap: clamp(8px, 0.72vw, 12px);
  overflow: hidden;
}

.cockpit-topbar {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.brand-lockup {
  min-width: 0;
}

.brand-lockup p,
.panel-title p {
  margin: 0 0 4px;
  color: var(--muted-2);
  font-size: clamp(9px, 0.64vw, 12px);
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brand-lockup h1 {
  margin: 0;
  overflow: hidden;
  font-size: clamp(26px, 2.65vw, 52px);
  font-weight: 780;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-status {
  min-width: 0;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
  font-size: clamp(11px, 0.78vw, 14px);
  white-space: nowrap;
}

.topbar-status strong {
  color: var(--green);
  font-weight: 900;
}

.topbar-status a {
  min-height: 28px;
  display: inline-grid;
  place-items: center;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 850;
  text-decoration: none;
}

.live-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 7px rgba(90, 224, 164, 0.14), 0 0 22px rgba(90, 224, 164, 0.52);
  animation: liveBlink 1.7s ease-in-out infinite;
}

.metric-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(8px, 0.72vw, 12px);
}

.metric-card,
.cockpit-panel {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.018)),
    var(--panel);
  box-shadow: 0 20px 64px rgba(0, 0, 0, 0.28);
}

.metric-card::before,
.cockpit-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.metric-card {
  display: grid;
  grid-template-columns: minmax(88px, 1fr) auto;
  grid-template-areas:
    "label value"
    "hint value";
  align-items: center;
  align-content: center;
  gap: 2px clamp(8px, 0.8vw, 14px);
  padding: clamp(8px, 0.68vw, 12px) clamp(10px, 0.82vw, 15px);
}

.metric-card span,
.metric-card small {
  overflow: hidden;
  color: var(--muted);
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-card span {
  grid-area: label;
  color: rgba(244, 248, 255, 0.82);
  font-size: clamp(12px, 0.82vw, 15px);
  line-height: 1.1;
}

.metric-card strong {
  grid-area: value;
  color: var(--blue);
  position: relative;
  z-index: 1;
  justify-self: end;
  font-size: clamp(24px, 2vw, 38px);
  font-variant-numeric: tabular-nums;
  font-weight: 820;
  line-height: 1;
  text-align: right;
}

.metric-card small {
  grid-area: hint;
  font-size: clamp(10px, 0.66vw, 12px);
  line-height: 1.1;
}

.metric-card i {
  position: absolute;
  right: clamp(8px, 0.7vw, 12px);
  top: 50%;
  width: clamp(30px, 2.4vw, 44px);
  height: clamp(28px, 2.25vw, 40px);
  transform: translateY(-50%);
  border: 1px solid rgba(72, 167, 255, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, transparent 12%, rgba(72, 167, 255, 0.26) 13%, transparent 14%),
    linear-gradient(45deg, transparent 28%, rgba(56, 217, 209, 0.42) 30%, transparent 33%),
    linear-gradient(160deg, transparent 53%, rgba(90, 224, 164, 0.3) 56%, transparent 60%);
  opacity: 0.36;
}

.metric-card.primary strong {
  color: var(--cyan);
}

.metric-card.amber strong {
  color: var(--amber);
}

.metric-card.violet strong {
  color: var(--violet);
}

.metric-card.green strong {
  color: var(--green);
}

.metric-card.red strong {
  color: var(--red);
}

.metric-card.total {
  border-color: rgba(56, 217, 209, 0.34);
}

.metric-card.total strong {
  color: var(--text);
}

.metric-card.soft {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.012)),
    rgba(11, 17, 26, 0.82);
}

.metric-card.soft span,
.metric-card.soft small {
  color: rgba(219, 231, 246, 0.66);
}

.screen-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(190px, 1.02fr) minmax(190px, 1.02fr) minmax(320px, 1.68fr) minmax(230px, 1.12fr) minmax(230px, 1.08fr);
  grid-template-rows: minmax(0, 1.03fr) minmax(0, 0.97fr) minmax(150px, 0.78fr);
  grid-template-areas:
    "force map map activity command"
    "force map map activity command"
    "chart staff brief recent health";
  gap: clamp(8px, 0.72vw, 12px);
  overflow: hidden;
}

.cockpit-panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: clamp(9px, 0.78vw, 14px);
}

.force-panel {
  grid-area: force;
}

.chart-panel {
  grid-area: chart;
}

.map-panel {
  grid-area: map;
}

.activity-panel {
  grid-area: activity;
}

.command-panel {
  grid-area: command;
}

.staff-panel {
  grid-area: staff;
}

.brief-panel {
  grid-area: brief;
}

.recent-panel {
  grid-area: recent;
}

.health-panel,
.history-panel {
  grid-area: health;
}

.panel-title {
  min-width: 0;
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: clamp(7px, 0.6vw, 10px);
}

.panel-title > div {
  min-width: 0;
}

.panel-title h2 {
  margin: 0;
  overflow: hidden;
  font-size: clamp(15px, 1vw, 20px);
  font-weight: 820;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-title p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-legend {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: wrap;
}

.map-legend span {
  min-height: 23px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.map-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.map-legend .ground {
  background: var(--green);
}

.map-legend .network {
  background: var(--blue);
}

.map-legend .hot {
  background: var(--amber);
}

.operation-map {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(122, 190, 255, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(29, 83, 118, 0.34), transparent 42%),
    linear-gradient(35deg, rgba(44, 113, 87, 0.24), transparent 48%),
    rgba(255, 255, 255, 0.035);
}

.operation-map::before {
  content: "";
  position: absolute;
  inset: 11%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.operation-map::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 70%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px dashed rgba(90, 224, 164, 0.18);
  border-radius: 50%;
  animation: mapRotate 28s linear infinite;
}

.map-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(153, 200, 244, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(153, 200, 244, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
}

.map-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(72, 167, 255, 0.14), transparent);
  animation: scan 5.4s linear infinite;
}

.map-lane {
  position: absolute;
  height: 2px;
  border-radius: 999px;
  opacity: 0.62;
  transform-origin: left center;
}

.lane-one {
  left: 20%;
  top: 36%;
  width: 58%;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  transform: rotate(18deg);
}

.lane-two {
  left: 28%;
  top: 70%;
  width: 52%;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
  transform: rotate(-22deg);
}

.map-core {
  position: absolute;
  left: 50%;
  top: 52%;
  width: clamp(92px, 7vw, 140px);
  aspect-ratio: 1;
  display: grid;
  place-content: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 58px rgba(72, 167, 255, 0.25), inset 0 0 30px rgba(255, 255, 255, 0.06);
  text-align: center;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.map-core::before,
.map-core::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(72, 167, 255, 0.2);
  border-radius: 50%;
}

.map-core::before {
  inset: -17px;
}

.map-core::after {
  inset: -34px;
  border-color: rgba(90, 224, 164, 0.14);
}

.map-core strong {
  font-size: clamp(14px, 1vw, 18px);
  font-weight: 900;
}

.map-core span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.map-point {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 3;
  width: clamp(74px, 6.2vw, 116px);
  display: grid;
  gap: 4px;
  transform: translate(-50%, -50%);
}

.map-point::before {
  content: "";
  width: calc(11px + var(--scale) * 3px);
  height: calc(11px + var(--scale) * 3px);
  border-radius: 50%;
  background: var(--point);
  box-shadow: 0 0 0 8px var(--point-soft), 0 0 34px var(--point-glow);
  animation: pulse 2.4s ease-in-out infinite;
}

.map-point strong,
.map-point span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-point strong {
  font-size: clamp(10px, 0.72vw, 13px);
}

.map-point span {
  color: var(--muted);
  font-size: 10px;
}

.map-point.ground {
  --point: var(--green);
  --point-soft: rgba(90, 224, 164, 0.16);
  --point-glow: rgba(90, 224, 164, 0.42);
}

.map-point.network {
  --point: var(--blue);
  --point-soft: rgba(72, 167, 255, 0.16);
  --point-glow: rgba(72, 167, 255, 0.42);
}

.map-point.hot {
  --point: var(--amber);
  --point-soft: rgba(255, 209, 102, 0.18);
  --point-glow: rgba(255, 209, 102, 0.5);
}

.activity-feed,
.team-grid,
.command-deck,
.staff-grid,
.health-list,
.recent-list,
.brief-plan,
.bar-chart {
  min-height: 0;
  display: grid;
  gap: 7px;
  overflow: hidden;
}

.activity-feed,
.command-deck,
.staff-grid,
.health-list,
.recent-list,
.bar-chart {
  flex: 1 1 auto;
}

.activity-item {
  min-width: 0;
  min-height: 44px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  animation: rise 0.35s ease both;
}

.activity-item:first-child {
  border-top: 0;
}

.activity-item time {
  color: var(--cyan);
  font-size: 10px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.activity-item strong,
.command-item strong,
.staff-card strong,
.recent-row strong {
  overflow: hidden;
  display: block;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-item strong {
  font-size: clamp(12px, 0.76vw, 14px);
}

.activity-item p,
.team-row p,
.command-item p,
.staff-card p,
.brief-summary,
.empty-line,
.recent-row p {
  margin: 0;
  color: var(--muted);
  line-height: 1.38;
}

.activity-item p,
.command-item p,
.staff-card p,
.recent-row p,
.team-row p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.activity-item p {
  margin-top: 3px;
  font-size: 11px;
  -webkit-line-clamp: 2;
}

.activity-item.high strong {
  color: var(--amber);
}

.activity-item.warning strong {
  color: var(--red);
}

.empty-line {
  display: grid;
  align-content: center;
  min-height: 54px;
  padding: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
}

.empty-line strong {
  color: var(--text);
  font-size: 13px;
}

.empty-line span {
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 11px;
}

.team-grid {
  flex: 1 1 auto;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.team-row {
  min-height: 0;
  display: grid;
  grid-template-columns: clamp(54px, 4.15vw, 76px) minmax(0, 1fr);
  gap: clamp(8px, 0.7vw, 12px);
  align-items: center;
  padding: clamp(8px, 0.72vw, 12px);
  border: 1px solid rgba(137, 174, 214, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.038);
}

.team-row.network {
  --team-accent: var(--blue);
}

.team-row.ground,
.team-row:not(.network) {
  --team-accent: var(--green);
}

.team-gauge {
  width: clamp(54px, 4vw, 74px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(11, 18, 28, 0.96) 54%, transparent 55%),
    conic-gradient(var(--team-accent) var(--completion), rgba(255, 255, 255, 0.12) 0);
  box-shadow: inset 0 0 24px rgba(255, 255, 255, 0.04);
}

.team-gauge strong {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  font-size: clamp(14px, 1vw, 18px);
  font-variant-numeric: tabular-nums;
}

.team-gauge small {
  color: var(--muted);
  font-size: 10px;
}

.team-body {
  min-width: 0;
  display: grid;
  gap: clamp(5px, 0.45vw, 8px);
}

.team-head,
.command-item-head,
.staff-card-head,
.health-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.team-head h3 {
  margin: 0;
  overflow: hidden;
  font-size: clamp(13px, 0.9vw, 16px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-head .status-pill {
  max-width: 78px;
}

.team-meter {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: center;
  gap: 7px;
}

.team-meter-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.team-meter-track span {
  display: block;
  width: var(--completion);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--team-accent), rgba(255, 255, 255, 0.8));
  box-shadow: 0 0 16px var(--team-accent);
  transition: width 0.5s ease;
}

.team-meter em {
  color: var(--muted);
  font-size: 10.5px;
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

.team-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.team-stats div {
  min-width: 0;
  min-height: clamp(34px, 2.9vw, 46px);
  overflow: hidden;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 5px 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent);
}

.team-stats strong {
  overflow: hidden;
  font-size: clamp(14px, 1.08vw, 20px);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-stats span,
.command-form span,
.health-row span,
.staff-card span,
.command-item span,
.recent-row span {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-stats span {
  display: block;
  font-size: 9.5px;
  line-height: 1.05;
}

.team-row p {
  display: none !important;
}

.team-note {
  display: none !important;
}

.status-pill,
.command-status,
#briefEngine {
  flex: 0 0 auto;
  min-height: 23px;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(90, 224, 164, 0.14);
  color: var(--green);
  font-size: 10.5px;
  font-weight: 900;
  white-space: nowrap;
}

.status-pill.warming,
.command-status.feedback,
.command-status.acknowledged {
  background: rgba(255, 209, 102, 0.14);
  color: var(--amber);
}

.status-pill.idle,
.command-status.new {
  background: rgba(255, 255, 255, 0.09);
  color: var(--muted);
}

.command-status.completed {
  background: rgba(90, 224, 164, 0.14);
  color: var(--green);
}

.dual-chart {
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 9px;
}

.dual-chart > div {
  min-width: 0;
  min-height: 0;
}

.dual-chart h3 {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.bar-row {
  min-height: 25px;
  display: grid;
  grid-template-columns: minmax(46px, 0.8fr) minmax(0, 2fr) 28px;
  gap: 7px;
  align-items: center;
}

.bar-row span {
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.bar-fill {
  width: var(--width);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--violet));
  box-shadow: 0 0 18px rgba(72, 167, 255, 0.24);
  transition: width 0.5s ease;
}

.bar-row strong {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.command-form {
  flex: 0 0 auto;
  display: grid;
  gap: 7px;
}

.command-form label {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.command-form input,
.command-form select,
.command-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.command-form input,
.command-form select {
  height: 32px;
  padding: 0 8px;
}

.command-form textarea {
  min-height: 54px;
  max-height: 62px;
  padding: 7px 8px;
  resize: none;
  line-height: 1.34;
}

.command-form input::placeholder,
.command-form textarea::placeholder {
  color: rgba(219, 231, 246, 0.45);
}

.command-form input:focus,
.command-form select:focus,
.command-form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(72, 167, 255, 0.14);
}

.command-form-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(82px, 0.62fr);
  gap: 7px;
  align-items: end;
}

.deadline-row {
  grid-template-columns: minmax(0, 1fr);
}

.command-form button {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  color: #05101a;
  cursor: pointer;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(72, 167, 255, 0.2);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.command-form button:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.command-form button:disabled {
  cursor: wait;
  filter: saturate(0.78);
  opacity: 0.84;
  transform: none;
}

.command-form button.is-success {
  background: linear-gradient(90deg, var(--green), var(--cyan));
}

.command-form button.is-loading {
  animation: buttonBreath 0.9s ease-in-out infinite alternate;
}

.command-deck {
  margin-top: 8px;
  overflow: hidden;
}

.command-item,
.staff-card,
.health-row,
.recent-row {
  min-width: 0;
  border-top: 1px solid var(--line);
}

.command-item:first-child,
.staff-card:first-child,
.health-row:first-child,
.recent-row:first-child {
  border-top: 0;
}

.command-item,
.staff-card {
  padding: 7px 0;
}

.command-item strong,
.staff-card strong {
  min-width: 0;
  font-size: clamp(12px, 0.76vw, 14px);
}

.command-item p,
.staff-card p {
  margin-top: 4px;
  font-size: 10.5px;
  -webkit-line-clamp: 2;
}

.command-meta,
.staff-metrics {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 6px;
  overflow: hidden;
  max-height: 25px;
}

.command-meta span,
.staff-metrics span {
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.staff-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 9px;
  align-content: start;
}

.staff-card {
  padding: 7px 0 6px;
}

.staff-card p {
  -webkit-line-clamp: 1;
}

.staff-card-head span {
  flex: 0 0 auto;
}

.health-list {
  gap: 0;
}

.health-row {
  min-height: 25px;
  padding: 4px 0;
}

.health-row strong {
  font-size: 11px;
  text-align: right;
  white-space: nowrap;
}

.health-row.ok strong {
  color: var(--green);
}

.health-row.warn strong {
  color: var(--amber);
}

.health-row.danger strong {
  color: var(--red);
}

.history-panel {
  gap: 8px;
}

.history-trend {
  flex: 1 1 56%;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: 5px;
  padding: 6px 0 2px;
}

.trend-bar {
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  align-items: end;
  justify-items: center;
  gap: 2px;
}

.trend-bar span {
  width: 72%;
  height: var(--height);
  min-height: 8px;
  border-radius: 999px 999px 2px 2px;
  background: linear-gradient(180deg, var(--cyan), rgba(72, 167, 255, 0.38));
  box-shadow: 0 0 18px rgba(56, 217, 209, 0.28);
  animation: barRise 0.62s ease both;
}

.trend-bar em {
  color: var(--text);
  font-size: 10.5px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  line-height: 1.1;
}

.trend-bar small {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted-2);
  font-size: 9.5px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-funnel {
  flex: 0 0 auto;
  display: grid;
  gap: 5px;
}

.funnel-row {
  position: relative;
  min-height: 24px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 6px;
  padding: 0 7px;
  border: 1px solid rgba(122, 190, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
}

.funnel-row::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--width);
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(72, 167, 255, 0.28), rgba(56, 217, 209, 0.08));
  animation: widthSweep 0.58s ease both;
  animation-delay: var(--delay);
}

.funnel-row span,
.funnel-row strong {
  position: relative;
  z-index: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.funnel-row span {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 850;
}

.funnel-row strong {
  color: var(--text);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.brief-summary {
  display: -webkit-box;
  overflow: hidden;
  font-size: clamp(12px, 0.84vw, 15px);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.brief-plan {
  flex: 1 1 auto;
  margin: 7px 0 0;
  padding-left: 20px;
  overflow: hidden;
}

.brief-plan li {
  margin: 3px 0;
  color: rgba(244, 248, 255, 0.86);
  font-size: clamp(10.5px, 0.76vw, 13px);
  line-height: 1.32;
}

.recent-list {
  gap: 0;
}

.recent-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  min-height: 0;
}

.recent-row > span:nth-child(3),
.recent-row > span:last-child {
  display: none;
}

.recent-row strong {
  font-size: 11.5px;
}

.recent-row p {
  margin-top: 3px;
  font-size: 10.5px;
  -webkit-line-clamp: 2;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(5, 8, 13, 0.9);
  backdrop-filter: blur(18px);
}

.auth-gate.hidden {
  display: none;
}

.auth-gate div {
  width: min(430px, calc(100% - 40px));
  display: grid;
  gap: 12px;
  padding: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(13, 20, 31, 0.92);
  text-align: center;
}

.auth-gate p,
.auth-gate span {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.auth-gate h2 {
  margin: 0;
  font-size: 26px;
}

.auth-gate a {
  min-height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-weight: 900;
  text-decoration: none;
}

@keyframes liveBlink {
  50% {
    opacity: 0.45;
  }
}

@keyframes scan {
  from {
    transform: translateY(-100%);
  }

  to {
    transform: translateY(100%);
  }
}

@keyframes mapRotate {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes pulse {
  50% {
    transform: scale(1.14);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(7px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes buttonBreath {
  from {
    box-shadow: 0 12px 28px rgba(72, 167, 255, 0.2);
  }

  to {
    box-shadow: 0 14px 36px rgba(56, 217, 209, 0.34);
  }
}

@keyframes barRise {
  from {
    height: 8px;
    opacity: 0.35;
  }
}

@keyframes widthSweep {
  from {
    width: 8%;
    opacity: 0.35;
  }
}

@media (max-height: 820px) and (min-width: 1120px) {
  .cockpit-shell {
    grid-template-rows: minmax(44px, 6vh) minmax(108px, 15vh) minmax(0, 1fr);
    gap: 8px;
    padding: 10px;
  }

  .brand-lockup h1 {
    font-size: clamp(24px, 2.25vw, 42px);
  }

  .metric-card {
    grid-template-columns: minmax(80px, 1fr) auto;
    padding: 8px 9px;
  }

  .metric-card strong {
    font-size: clamp(21px, 1.8vw, 34px);
  }

  .metric-card i {
    width: 36px;
    height: 34px;
  }

  .cockpit-panel {
    padding: 9px;
  }

  .panel-title {
    margin-bottom: 6px;
  }

  .panel-title h2 {
    font-size: clamp(14px, 0.9vw, 18px);
  }

  .command-form {
    gap: 5px;
  }

  .command-form textarea {
    min-height: 42px;
    max-height: 48px;
  }

  .command-deck {
    margin-top: 6px;
  }

  .command-item p,
  .activity-item p,
  .recent-row p {
    -webkit-line-clamp: 1;
  }

  .team-note {
    display: none;
  }

  .brief-plan li:nth-child(n + 4),
  .staff-card:nth-child(n + 4),
  .recent-row:nth-child(n + 4) {
    display: none;
  }
}

@media (max-height: 720px) and (min-width: 1120px) {
  .topbar-status span#viewerName,
  .metric-card small,
  .map-point span,
  .command-meta span:nth-child(3),
  .staff-metrics span:nth-child(3) {
    display: none;
  }

  .screen-grid {
    grid-template-rows: minmax(0, 1fr) minmax(0, 0.94fr) minmax(126px, 0.66fr);
  }

  .health-row {
    min-height: 22px;
    padding: 3px 0;
  }

  .history-trend {
    gap: 3px;
  }

  .funnel-row {
    min-height: 20px;
  }
}

@media (max-width: 1180px), (max-aspect-ratio: 4 / 3) {
  body {
    overflow: auto;
  }

  .cockpit-shell {
    width: 100%;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .screen-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    grid-template-areas:
      "map map"
      "force activity"
      "chart command"
      "staff brief"
      "recent health";
    overflow: visible;
  }

  .cockpit-panel {
    min-height: 220px;
  }

  .map-panel {
    min-height: 450px;
  }
}

@media (max-width: 760px) {
  .cockpit-shell {
    padding: 12px 10px 24px;
  }

  .cockpit-topbar,
  .topbar-status {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .brand-lockup h1 {
    white-space: normal;
  }

  .metric-grid,
  .screen-grid,
  .command-form-row,
  .dual-chart,
  .staff-grid {
    grid-template-columns: 1fr;
  }

  .screen-grid {
    grid-template-areas:
      "map"
      "force"
      "activity"
      "chart"
      "command"
      "brief"
      "staff"
      "recent"
      "health";
  }

  .cockpit-panel {
    min-height: auto;
  }

  .map-panel {
    min-height: 380px;
  }

  .operation-map {
    min-height: 300px;
  }

  .metric-card {
    min-height: 92px;
  }
}
