.orion-live-orbat {
  --olo-bg: #07131e;
  --olo-panel: #112636;
  --olo-panel-dark: #0d202e;
  --olo-border: #35617d;
  --olo-border-soft: #25445a;
  --olo-accent: #68b7e8;
  --olo-text: #edf3f7;
  --olo-muted: #a9bdcb;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  width: 100vw;
  overflow: hidden;
  color: var(--olo-text);
  background: radial-gradient(circle at 50% 0, #153550 0, #0b1d2c 30%, var(--olo-bg) 72%, #050c12 100%);
  box-sizing: border-box;
}

.orion-live-orbat *, .orion-live-orbat *::before, .orion-live-orbat *::after { box-sizing: border-box; }
.olo-canvas { width: min(1440px, 100%); margin: 0 auto; padding: 52px 42px 74px; }
.olo-status { padding: 60px 20px; color: #b9c6cf; text-align: center; }
.olo-status.is-error { color: #e9aaaa; }
.olo-grid { width: 100%; }

.olo-command-axis { display: flex; justify-content: center; }
.olo-command {
  width: min(420px, 100%);
  overflow: hidden;
  background: linear-gradient(145deg, #102a3d, var(--olo-panel-dark));
  border: 1px solid var(--olo-border);
  border-radius: 3px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .24);
}
.olo-command--valkyrie { border-top: 3px solid #8d73c7; }
.olo-command--infantry { border-top: 3px solid #477a59; }
.olo-command--odin { border-top: 3px solid #d4b15c; }
.olo-command__header { display: block; padding: 12px 15px; background: linear-gradient(90deg, #183b53, #142f43); }
.olo-command--valkyrie .olo-command__header { background: linear-gradient(90deg, #342d50, #1b3040); }
.olo-command--infantry .olo-command__header { background: linear-gradient(90deg, #203c2c, #1b3040); }
.olo-command--odin .olo-command__header { background: linear-gradient(90deg, #3b3525, #1b3040); }
.olo-kicker { display: block; color: #aad6ef; font: 600 11px/1.2 Arial, sans-serif; }
.olo-command--valkyrie .olo-kicker { color: #c4b2ec; }
.olo-command--infantry .olo-kicker { color: #91c5a0; }
.olo-command--odin .olo-kicker { color: #e3c978; }
.olo-command__name { margin: 3px 0 0; color: #fff; font: 700 20px/1.15 Arial, sans-serif; }

.olo-peer-branch { position: relative; width: 50%; height: 45px; margin: 25px auto 0; border-top: 1px solid #52758d; }
.olo-peer-branch::before { content: ""; position: absolute; left: 50%; top: -25px; width: 1px; height: 25px; background: #52758d; }
.olo-peer-branch::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 45px; border-left: 1px solid #52758d; border-right: 1px solid #52758d; }
.olo-peer-nodes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 60px; align-items: start; }
.olo-peer-nodes .olo-command { width: 100%; }

.olo-infantry-branch { position: relative; height: 52px; }
.olo-infantry-branch::before { content: ""; position: absolute; left: 75%; top: 0; width: 1px; height: 25px; background: #52758d; }
.olo-infantry-branch__fork { position: absolute; left: 25%; right: 25%; top: 25px; height: 27px; border-top: 1px solid #52758d; border-left: 1px solid #52758d; border-right: 1px solid #52758d; }

.olo-formations { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; align-items: start; }
.olo-formation { min-width: 0; overflow: hidden; background: #0c1c28; border: 1px solid var(--olo-border); border-radius: 3px; box-shadow: 0 14px 30px rgba(0, 0, 0, .24); }
.olo-formation--apollo { border-top: 4px solid #9d5a67; }
.olo-formation--baldur { border-top: 4px solid #3f7195; }
.olo-formation__header { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 68px; padding: 14px 17px; border-bottom: 1px solid var(--olo-border); background: #17394f; }
.olo-formation--apollo .olo-formation__header { background: linear-gradient(90deg, #412b33, #173448); }
.olo-formation--baldur .olo-formation__header { background: linear-gradient(90deg, #1d3850, #173448); }
.olo-formation__name { margin: 2px 0 0; color: #fff; font: 700 27px/1.1 Arial, sans-serif; }
.olo-formation__header .olo-kicker { color: #b9d7e8; }
.olo-formation--apollo .olo-kicker { color: #dda0aa; }
.olo-formation--baldur .olo-kicker { color: #91b9d4; }
.olo-strength { flex: 0 0 auto; padding: 5px 7px; border: 1px solid #4d7893; border-radius: 2px; color: #d0e2ed; background: rgba(5, 18, 28, .28); font: 600 10px/1 Arial, sans-serif; }

.olo-elements { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 12px; }
.olo-element-column { display: flex; min-width: 0; flex-direction: column; gap: 12px; }
.olo-element { min-width: 0; overflow: hidden; background: var(--olo-panel); border: 1px solid var(--olo-border-soft); border-radius: 2px; }
.olo-element__name { margin: 0; padding: 10px 12px; color: #e6f0f5; border-bottom: 1px solid var(--olo-border-soft); background: #1a3447; font: 700 12px/1.2 Arial, sans-serif; }
.olo-formation--apollo .olo-element__name { border-left: 3px solid #9d5a67; }
.olo-formation--baldur .olo-element__name { border-left: 3px solid #3f7195; }
.olo-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 35px; padding: 7px 12px; border-bottom: 1px solid rgba(70, 95, 114, .25); font: 12px/1.25 Arial, sans-serif; }
.olo-row:last-child { border-bottom: 0; }
.olo-role { min-width: 0; color: var(--olo-muted); }
.olo-member { flex: 0 1 auto; min-width: 0; overflow: hidden; color: var(--olo-text); font-weight: 600; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.olo-member.is-vacant { color: #7793a5; font-size: 10px; font-style: italic; }

@media (max-width: 980px) {
  .olo-canvas { padding: 40px 20px 58px; }
  .olo-peer-nodes { gap: 28px; }
  .olo-formations { gap: 20px; }
  .olo-elements { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .orion-live-orbat { left: 0; margin-left: 0; width: 100%; }
  .olo-canvas { padding: 28px 12px 42px; }
  .olo-peer-branch, .olo-infantry-branch { display: none; }
  .olo-peer-nodes, .olo-formations { grid-template-columns: 1fr; gap: 18px; margin-top: 18px; }
  .olo-elements { grid-template-columns: 1fr; }
  .olo-formation__header { min-height: 62px; padding: 12px 14px; }
  .olo-row { align-items: flex-start; min-height: 45px; flex-direction: column; gap: 3px; }
  .olo-member { text-align: left; white-space: normal; }
}
