/* v0.33.31 - shared fleet command overlay for Orbit and Systematlas. */
body.fleet-command-open { overflow: hidden; }
.fleet-command-backdrop {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(1, 6, 12, .82);
  backdrop-filter: blur(8px);
}
.fleet-command-dialog {
  width: min(1420px, calc(100vw - 44px));
  max-height: calc(100dvh - 44px);
  min-height: min(760px, calc(100dvh - 44px));
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(83, 198, 245, .34);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(7, 20, 33, .995), rgba(3, 10, 18, .995));
  box-shadow: 0 32px 100px rgba(0, 0, 0, .7);
}
.fleet-command-dialog > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(91, 176, 214, .18);
  background: radial-gradient(circle at 84% 0, rgba(52, 167, 219, .15), transparent 36%);
}
.fleet-command-dialog > header > div { display: grid; gap: 4px; }
.fleet-command-dialog > header span,
.fleet-command-section-head span {
  color: #6ccbf1;
  font-size: 13px;
  letter-spacing: .09em;
}
.fleet-command-dialog > header h2 { margin: 0; font-size: 24px; }
.fleet-command-dialog > header p,
.fleet-command-section-head p { margin: 0; color: #91a8b9; font-size: 13px; line-height: 1.4; }
.fleet-command-dialog > header > button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(91, 183, 225, .24);
  border-radius: 10px;
  background: rgba(7, 24, 39, .9);
  color: #e2f4fd;
  font-size: 24px;
  cursor: pointer;
}
.fleet-command-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  padding: 10px 18px 0;
}
.fleet-command-metric {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 10px;
  padding: 9px 11px;
  border: 1px solid rgba(91, 169, 204, .16);
  border-radius: 9px;
  background: rgba(8, 24, 37, .72);
}
.fleet-command-metric small { color: #7f9aac; font-size: 13px; }
.fleet-command-metric strong { color: #effaff; font-size: 17px; }
.fleet-command-metric em { grid-column: 1 / -1; color: #7c94a5; font-size: 13px; font-style: normal; }
.fleet-command-target-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 9px 18px 0;
  padding: 9px 11px;
  border: 1px solid rgba(63, 194, 239, .28);
  border-radius: 9px;
  background: rgba(14, 58, 79, .3);
}
.fleet-command-target-banner > div { display: grid; gap: 2px; min-width: 0; }
.fleet-command-target-banner span { color: #6cd1f4; font-size: 13px; letter-spacing: .08em; }
.fleet-command-target-banner strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fleet-command-target-banner small { color: #93aabb; font-size: 13px; }
.fleet-command-target-banner button,
.fleet-command-section-head > button {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(78, 192, 238, .34);
  border-radius: 8px;
  background: rgba(29, 119, 157, .24);
  color: #dbf5ff;
  font-weight: 700;
  white-space: nowrap;
}
.fleet-command-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 10px 18px;
}
.fleet-command-tabs button {
  min-width: 0;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(91, 169, 204, .16);
  border-radius: 8px;
  background: rgba(7, 21, 34, .82);
  color: #9bb4c5;
  text-align: left;
}
.fleet-command-tabs button strong {
  min-width: 24px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(81, 179, 222, .12);
  color: #d9f5ff;
  text-align: center;
}
.fleet-command-tabs button:hover,
.fleet-command-tabs button.active {
  border-color: rgba(74, 201, 251, .48);
  background: rgba(22, 78, 106, .42);
  color: #effaff;
}
.fleet-command-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 18px 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(82, 181, 224, .4) transparent;
}
.fleet-command-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin: 2px 0 10px;
  padding: 10px 12px;
  border: 1px solid rgba(95, 165, 196, .14);
  border-radius: 9px;
  background: rgba(6, 18, 30, .7);
}
.fleet-command-section-head > div { display: grid; gap: 3px; }
.fleet-command-section-head h3 { margin: 0; font-size: 18px; }
.fleet-command-dialog .orbit-fleet-management { margin: 0; }
.fleet-command-dialog .orbit-fleet-management-title { display: none; }
.fleet-command-dialog .orbit-fleet-card,
.fleet-command-dialog .orbit-fleet-create { border-radius: 10px; }
.fleet-command-dialog .orbit-fleet-list > h3 { display: none; }
.fleet-command-dialog .orbit-fleet-card { margin-bottom: 10px; }
.fleet-command-situation {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 10px;
}
.fleet-command-local-list,
.fleet-command-order-list { display: grid; gap: 7px; }
.fleet-command-local-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 110px;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 9px 11px;
  border: 1px solid rgba(98, 160, 190, .16);
  border-left-width: 3px;
  border-radius: 8px;
  background: rgba(7, 18, 29, .72);
  color: #d9ecf7;
  text-align: left;
}
.fleet-command-local-row > span { display: grid; gap: 2px; min-width: 0; }
.fleet-command-local-row small { color: #8199aa; font-size: 13px; }
.fleet-command-local-row em { color: #9db2c0; font-style: normal; }
.fleet-command-local-row b { color: #6fcdf2; text-align: right; }
.fleet-command-local-row:hover,
.fleet-command-local-row.active { border-color: rgba(75, 202, 248, .5); background: rgba(17, 60, 81, .42); }
.fleet-command-local-row.relation-own { border-left-color: #4adea4; }
.fleet-command-local-row.relation-allied { border-left-color: #4bc3e2; }
.fleet-command-local-row.relation-hostile { border-left-color: #ff615c; }
.fleet-command-local-row.relation-unknown { border-left-color: #f2c04f; }
.fleet-command-local-row.relation-neutral { border-left-color: #95a8b8; }
.fleet-command-orders-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
  gap: 12px;
}
.fleet-command-orders-grid > section { min-width: 0; }
.fleet-command-order-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 11px;
  border: 1px solid rgba(93, 163, 194, .16);
  border-radius: 8px;
  background: rgba(7, 18, 29, .72);
}
.fleet-command-order-list article > div { display: grid; gap: 2px; min-width: 0; }
.fleet-command-order-list span { color: #67c9ee; font-size: 13px; letter-spacing: .06em; }
.fleet-command-order-list small { color: #8299aa; font-size: 13px; }
.fleet-command-order-list button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(237, 113, 113, .3);
  border-radius: 7px;
  background: rgba(102, 25, 31, .24);
  color: #ffc1bd;
  white-space: nowrap;
}
.fleet-command-empty {
  display: grid;
  gap: 7px;
  place-items: center;
  min-height: 190px;
  padding: 24px;
  border: 1px dashed rgba(111, 166, 193, .24);
  border-radius: 10px;
  background: rgba(5, 14, 23, .48);
  text-align: center;
}
.fleet-command-empty.compact { min-height: 120px; }
.fleet-command-empty p { max-width: 600px; margin: 0; color: #879eaf; }
.fleet-command-empty button {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(80, 191, 236, .34);
  border-radius: 8px;
  background: rgba(27, 116, 155, .24);
  color: #ddf6ff;
}
.fleet-command-dialog .atlas-fleet-target-panel { margin-top: 0; }
.fleet-command-dialog > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  border-top: 1px solid rgba(91, 176, 214, .16);
  background: rgba(4, 13, 22, .96);
}
.fleet-command-dialog > footer span { color: #7f97a8; font-size: 13px; }
.fleet-command-dialog > footer > div { display:flex; gap:8px; align-items:center; }
.system-atlas-fleet-button { display: inline-flex; align-items: center; gap: 7px; }
.system-atlas-fleet-button strong {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(78, 195, 239, .16);
  color: #dcf7ff;
  text-align: center;
}
.atlas-fleet-open-shortcut {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(73, 195, 238, .25);
  border-radius: 8px;
  background: rgba(12, 49, 68, .25);
}
.atlas-fleet-open-shortcut span { color: #68c9ed; font-size: 13px; letter-spacing: .08em; }
.atlas-fleet-open-shortcut p { margin: 0; color: #8fa7b8; font-size: 13px; line-height: 1.4; }
.atlas-fleet-open-shortcut button { width: 100%; }

@media (max-width: 1100px) {
  .fleet-command-backdrop { padding: 10px; }
  .fleet-command-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); min-height: 0; }
  .fleet-command-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fleet-command-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fleet-command-orders-grid { grid-template-columns: 1fr; }
  .fleet-command-situation { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .fleet-command-dialog > header,
  .fleet-command-section-head,
  .fleet-command-dialog > footer,
  .fleet-command-order-list article { align-items: stretch; flex-direction: column; }
  .fleet-command-dialog > header h2 { font-size: 20px; }
  .fleet-command-target-banner { align-items: stretch; flex-direction: column; }
  .fleet-command-summary { grid-template-columns: 1fr 1fr; }
  .fleet-command-local-row { grid-template-columns: minmax(0, 1fr) auto; }
  .fleet-command-local-row b { grid-column: 1 / -1; text-align: left; }
}
.orbit-overview-actions.has-fleet-command { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1500px) { .orbit-overview-actions.has-fleet-command { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 980px) { .orbit-overview-actions.has-fleet-command { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .orbit-overview-actions.has-fleet-command { grid-template-columns: 1fr; } }
