.tg-command-shell {
  --cmd-accent: #36d8ee;
  --cmd-accent-2: #79a8ff;
  --cmd-gold: #f2bd61;
  --cmd-red: #ff737c;
  --cmd-green: #46d5a0;
  --cmd-panel: rgba(7, 31, 49, .82);
  --cmd-line: rgba(79, 161, 188, .2);
  min-height: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 8px 10px 10px;
  color: #d7edf5;
  background:
    radial-gradient(circle at 78% -12%, rgba(30, 173, 205, .18), transparent 35%),
    radial-gradient(circle at 2% 95%, rgba(91, 110, 190, .12), transparent 30%),
    linear-gradient(rgba(58, 138, 163, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58, 138, 163, .055) 1px, transparent 1px),
    #061724;
  background-size: auto, auto, 30px 30px, 30px 30px, auto;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

.tg-command-head,
.tg-command-subtitle,
.tg-command-kpi-grid { flex: none; }

.tg-command-office {
  --cmd-accent: #77a7ff;
  --cmd-accent-2: #b88cff;
  --cmd-gold: #ffc76d;
  --cmd-green: #61d7c2;
}

.tg-command-rnd {
  --cmd-accent: #a692ff;
  --cmd-accent-2: #54d9db;
  --cmd-gold: #ffca78;
  --cmd-green: #6dddb1;
}

.tg-command-finance {
  --cmd-accent: #5be1bb;
  --cmd-accent-2: #55bfe8;
  --cmd-gold: #ffc86c;
  --cmd-green: #72e3a1;
}

.tg-command-head {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 50px;
  padding: 2px 14px 8px;
  border-bottom: 1px solid var(--cmd-line);
}

.tg-command-head::before,
.tg-command-head::after {
  content: "";
  position: absolute;
  bottom: -1px;
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cmd-accent));
}

.tg-command-head::before { left: 0; }
.tg-command-head::after { right: 0; transform: scaleX(-1); }

.tg-command-title { text-align: center; }

.tg-command-title span {
  color: rgba(111, 200, 220, .58);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .2em;
}

.tg-command-title h1 {
  margin: 4px 0 0;
  color: #f2fbff;
  font-size: 20px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: .055em;
  text-shadow: 0 0 24px rgba(69, 216, 237, .22);
}

.tg-command-head-side {
  display: flex;
  align-items: center;
  gap: 9px;
}

.tg-command-head-side.is-right { justify-content: flex-end; }

.tg-command-head-side time {
  color: #7298a8;
  font-size: 8px;
  font-variant-numeric: tabular-nums;
}

.tg-command-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #8fc5d1;
  font-size: 8px;
}

.tg-command-live i,
.tg-live-chip i,
.tg-equipment-strip i,
.tg-rnd-launch i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cmd-green);
  box-shadow: 0 0 0 4px rgba(70, 213, 160, .1), 0 0 12px rgba(70, 213, 160, .75);
  animation: tg-command-pulse 1.8s ease-in-out infinite;
}

.tg-command-live.is-loading i {
  background: var(--cmd-gold);
  animation-duration: .65s;
}

.tg-command-refresh {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(102, 185, 204, .28);
  border-radius: 7px;
  color: #8fc8d4;
  background: rgba(8, 42, 61, .82);
  font-size: 15px;
  cursor: pointer;
}

.tg-command-refresh:hover { color: #efffff; border-color: var(--cmd-accent); }

.tg-command-subtitle {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 4px 12px 6px;
  color: #6f96a5;
  font-size: 8px;
}

.tg-command-subtitle span {
  overflow: hidden;
  max-width: 55%;
  color: #d4ad61;
  text-overflow: ellipsis;
  white-space: nowrap;
  animation: tg-command-pulse-text 2.8s ease-in-out infinite;
}

.tg-command-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.tg-command-kpi {
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 83px;
  padding: 8px 9px 7px;
  border: 1px solid rgba(71, 153, 181, .2);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(12, 52, 74, .88), rgba(5, 26, 42, .9));
  box-shadow: inset 0 1px rgba(160, 226, 239, .05);
  animation: none;
}

.tg-command-kpi::before {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 2px solid var(--cmd-accent);
  opacity: .62;
  clip-path: polygon(0 0, 72% 0, 74% 2px, 0 2px);
}

.tg-command-kpi-scan {
  position: absolute;
  inset: -40% auto -40% -40%;
  width: 35%;
  background: linear-gradient(90deg, transparent, rgba(111, 226, 242, .1), transparent);
  transform: skewX(-20deg);
  animation: tg-command-scan 4.8s linear infinite;
}

.tg-command-kpi > span {
  display: block;
  color: #9db7c3;
  font-size: 9px;
}

.tg-command-kpi-icon {
  float: right;
  width: 19px;
  height: 19px;
  color: var(--cmd-gold);
}

.tg-command-kpi-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tg-command-kpi-value {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-top: 9px;
}

.tg-command-kpi-value b {
  color: #f4fbff;
  font-family: "Bahnschrift", "DIN Alternate", "Microsoft YaHei UI", sans-serif;
  font-size: 22px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -.02em;
  text-shadow: 0 0 16px rgba(81, 220, 239, .22);
}

.tg-command-kpi-value em {
  color: #a5bdc8;
  font-size: 8px;
  font-style: normal;
}

.tg-command-kpi small {
  display: block;
  margin-top: 5px;
  color: #688c9c;
  font-size: 7px;
}

.tg-command-kpi.tone-good .tg-command-kpi-icon { color: var(--cmd-green); }
.tg-command-kpi.tone-warning .tg-command-kpi-icon { color: var(--cmd-gold); }
.tg-command-kpi.tone-danger .tg-command-kpi-icon { color: var(--cmd-red); }

.tg-command-layout {
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr) 190px;
  gap: 6px;
  margin-top: 6px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.tg-command-column {
  display: grid;
  align-content: start;
  gap: 8px;
}

.tg-command-panel {
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--cmd-line);
  border-radius: 8px;
  background:
    linear-gradient(150deg, rgba(8, 37, 56, .85), rgba(4, 23, 37, .9));
  box-shadow: inset 0 1px rgba(146, 218, 234, .045), 0 9px 28px rgba(0, 8, 16, .2);
}

.tg-command-panel::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 27px;
  height: 2px;
  background: var(--cmd-accent);
  box-shadow: 0 0 12px rgba(54, 216, 238, .4);
}

.tg-command-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px 6px;
  border-bottom: 1px solid rgba(65, 134, 155, .12);
}

.tg-command-panel > header span {
  display: block;
  color: rgba(81, 190, 214, .58);
  font-size: 6px;
  font-weight: 800;
  letter-spacing: .15em;
}

.tg-command-panel > header h2 {
  margin: 3px 0 0;
  color: #dbedf4;
  font-size: 11px;
  font-weight: 700;
}

.tg-command-panel > header > b {
  color: #789ba9;
  font-size: 7px;
  font-weight: 500;
  white-space: nowrap;
}

.tg-live-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--cmd-green) !important;
}

.tg-command-load-list { padding: 5px 11px 10px; }

.tg-command-load-row {
  appearance: none;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 8px;
  padding: 7px 0;
  border: 0;
  border-radius: 5px;
  border-bottom: 1px solid rgba(66, 132, 153, .12);
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.tg-command-load-row:last-child { border-bottom: 0; }
.tg-command-load-row:hover,
.tg-command-load-row.is-selected { background: rgba(65, 172, 195, .09); }
.tg-command-load-row.is-selected { box-shadow: inset 2px 0 var(--cmd-accent); }
.tg-command-load-row > div:first-child { min-width: 0; }
.tg-command-load-row b { color: #cfe5ed; font-size: 8px; }
.tg-command-load-row span { display: block; overflow: hidden; margin-top: 2px; color: #688e9d; font-size: 6px; text-overflow: ellipsis; white-space: nowrap; }
.tg-command-load-row strong { color: #f0be66; font-size: 9px; font-weight: 600; }
.tg-command-load-bar { grid-column: 1 / -1; height: 4px; overflow: hidden; border-radius: 3px; background: #102d3e; }
.tg-command-load-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1c8ca5, #4dd9ec); box-shadow: 0 0 10px rgba(72, 211, 231, .3); animation: tg-command-bar 2.4s ease-in-out infinite alternate; }

.tg-material-grid { display: grid; gap: 6px; padding: 8px 10px 10px; }
.tg-material-grid > div { display: grid; grid-template-columns: 1fr auto auto; gap: 3px; padding: 7px; border: 1px solid rgba(72, 145, 166, .16); border-radius: 6px; background: rgba(7, 35, 53, .62); }
.tg-material-grid span { grid-column: 1 / -1; color: #86a8b5; font-size: 7px; }
.tg-material-grid b { color: #ecf8fb; font-size: 15px; }
.tg-material-grid em { align-self: end; color: #7798a6; font-size: 7px; font-style: normal; }
.tg-material-grid small { grid-column: 1 / -1; color: #cf9f52; font-size: 6px; }

.tg-command-center { min-height: 420px; }
.tg-command-center {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.tg-workshop-3d {
  position: relative;
  overflow: hidden;
  height: auto;
  flex: 1;
  min-height: 150px;
  margin: 7px 8px 0;
  border: 1px solid rgba(69, 158, 182, .18);
  border-radius: 7px;
  background:
    radial-gradient(ellipse at 50% 78%, rgba(38, 145, 178, .2), transparent 62%),
    linear-gradient(180deg, #0d2b40, #061a2c);
}

.tg-workshop-slot {
  position: absolute;
  inset: 0;
}

.tg-workshop-canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  cursor: grab;
  touch-action: none;
}

.tg-workshop-badge,
.tg-workshop-hint {
  position: absolute;
  z-index: 2;
  pointer-events: none;
}

.tg-workshop-badge {
  top: 9px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border: 1px solid rgba(83, 188, 206, .22);
  border-radius: 5px;
  color: #91c6d2;
  background: rgba(5, 27, 42, .72);
  font-size: 6px;
  letter-spacing: .07em;
}

.tg-workshop-badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cmd-green);
  box-shadow: 0 0 8px var(--cmd-green);
  animation: tg-command-pulse 1.7s ease-in-out infinite;
}

.tg-workshop-hint {
  right: 10px;
  bottom: 9px;
  padding: 5px 7px;
  border-radius: 5px;
  color: #6e929f;
  background: rgba(5, 25, 39, .7);
  font-size: 6px;
}

.tg-scene-expand {
  position: absolute;
  right: 9px;
  bottom: 7px;
  z-index: 3;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid rgba(82, 169, 190, .28);
  border-radius: 5px;
  color: #8fc4d1;
  background: rgba(6, 31, 47, .86);
  font-size: 13px;
  line-height: 22px;
  cursor: pointer;
  pointer-events: auto;
}

.tg-scene-expand:hover {
  color: #efffff;
  border-color: rgba(73, 212, 230, .65);
}

.tg-workshop-hint,
.tg-scene-hint { right: 40px; }

.tg-workshop-3d:fullscreen,
.tg-workshop-3d.is-scene-presentation,
.tg-digital-scene:fullscreen,
.tg-digital-scene.is-scene-presentation {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0;
  border: 0;
  border-radius: 0;
  background-color: #061724;
}

.tg-workshop-3d:fullscreen .tg-workshop-slot,
.tg-digital-scene:fullscreen .tg-digital-scene-slot,
.tg-workshop-3d.is-scene-presentation .tg-workshop-slot,
.tg-digital-scene.is-scene-presentation .tg-digital-scene-slot {
  inset: 0;
}

.tg-workshop-detail-head {
  padding: 9px 10px 7px;
}

.tg-workshop-detail-head b {
  display: block;
  margin-top: 6px;
  color: #e5f8fc;
  font-size: 12px;
}

.tg-workshop-detail-head small {
  display: block;
  margin-top: 3px;
  color: #6e919f;
  font-size: 6px;
}

.tg-workshop-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: start;
  gap: 5px;
  padding: 0 9px 8px;
}

.tg-workshop-detail-grid span {
  min-width: 0;
  padding: 6px;
  border: 1px solid rgba(74, 145, 165, .13);
  border-radius: 5px;
  color: #6f92a0;
  background: rgba(7, 34, 51, .62);
  font-size: 6px;
}

.tg-workshop-detail-grid b {
  display: block;
  margin-top: 3px;
  color: #c8e2e9;
  font-size: 7px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
}

.tg-workshop-link {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
}

.tg-workshop-link > span { flex: 1; min-width: 0; }
.tg-workshop-link small { display: block; color: #668997; font-size: 6px; }
.tg-workshop-link b { display: block; overflow: hidden; margin-top: 3px; color: #9fd6df; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.tg-workshop-link i { flex: 1; height: 1px; background: linear-gradient(90deg, #1c7184, #4cd9eb); animation: tg-command-flow-line 1.8s ease-in-out infinite alternate; }

.tg-workshop-detail-bar {
  height: 4px;
  margin: 2px 9px 9px;
  overflow: hidden;
  border-radius: 3px;
  background: #123044;
}

.tg-workshop-detail-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #198ba1, #63e8f3);
  animation: tg-command-bar 2.4s ease-in-out infinite alternate;
}

.tg-digital-twin {
  position: relative;
  overflow: hidden;
  height: 268px;
  margin: 7px 8px 0;
  border: 1px solid rgba(69, 158, 182, .18);
  border-radius: 7px;
  background:
    radial-gradient(ellipse at 50% 70%, rgba(51, 153, 187, .24), transparent 54%),
    linear-gradient(180deg, #16374c, #092236 60%, #061a2b);
  perspective: 800px;
}

.tg-dt-grid {
  position: absolute;
  inset: 18% 8% -28%;
  transform: rotateX(60deg);
  background-image: linear-gradient(rgba(77, 194, 214, .14) 1px, transparent 1px), linear-gradient(90deg, rgba(77, 194, 214, .14) 1px, transparent 1px);
  background-size: 25px 25px;
  mask-image: radial-gradient(ellipse, #000 10%, transparent 72%);
}

.tg-dt-aisle {
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: 7%;
  height: 53%;
  transform: perspective(300px) rotateX(50deg);
  border: 1px dashed rgba(107, 220, 234, .34);
  background: linear-gradient(90deg, transparent 48%, rgba(90, 207, 224, .11) 49%, rgba(90, 207, 224, .11) 51%, transparent 52%);
}

.tg-dt-aisle::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #45d9ed, #45d9ed, transparent);
  box-shadow: 0 0 18px #45d9ed;
  animation: tg-command-conveyor 2.4s linear infinite;
}

.tg-dt-machines {
  position: absolute;
  inset: 18% 12% 14%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-content: end;
  gap: 16px 14px;
  transform: perspective(500px) rotateX(38deg);
  transform-origin: center bottom;
}

.tg-dt-machine {
  position: relative;
  min-height: 38px;
  padding: 6px 5px 4px;
  border: 1px solid rgba(94, 188, 207, .35);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(58, 110, 132, .92), rgba(20, 60, 82, .95));
  box-shadow: 8px 10px 14px rgba(0, 8, 16, .4);
  animation: tg-command-float 3s ease-in-out infinite;
  animation-delay: calc(var(--i) * -.22s);
}

.tg-dt-machine span { position: absolute; top: 5px; right: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--cmd-green); box-shadow: 0 0 8px var(--cmd-green); }
.tg-dt-machine b { display: block; color: #b8d8e2; font-size: 5px; white-space: nowrap; }
.tg-dt-machine small { display: block; margin-top: 7px; color: #79cbd9; font-size: 6px; }
.tg-dt-machine.danger span { background: var(--cmd-red); box-shadow: 0 0 8px var(--cmd-red); }
.tg-dt-machine.warning span { background: var(--cmd-gold); box-shadow: 0 0 8px var(--cmd-gold); }

.tg-dt-scanner {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0, rgba(77, 211, 231, .04) 46%, rgba(77, 211, 231, .3) 50%, transparent 54%);
  background-size: 100% 42%;
  animation: tg-command-scan-y 4s linear infinite;
  pointer-events: none;
}

.tg-dt-legend {
  position: absolute;
  left: 8px;
  bottom: 7px;
  display: flex;
  gap: 10px;
  color: #6e96a5;
  font-size: 6px;
}

.tg-dt-legend span { display: flex; align-items: center; gap: 4px; }
.tg-dt-legend i { width: 5px; height: 5px; border-radius: 50%; background: var(--cmd-green); }
.tg-dt-legend span:nth-child(2) i { background: var(--cmd-accent); }
.tg-dt-legend span:nth-child(3) i { background: var(--cmd-red); }

.tg-equipment-strip {
  display: flex;
  gap: 6px;
  overflow: hidden;
  margin: 7px 8px 0;
  padding: 6px 7px;
  border: 1px solid rgba(65, 143, 164, .16);
  border-radius: 6px;
  background: rgba(6, 29, 45, .68);
}

.tg-equipment-strip span {
  display: flex;
  flex: none;
  align-items: center;
  gap: 4px;
  color: #83aab8;
  font-size: 6px;
}

.tg-equipment-strip span.danger i { background: var(--cmd-red); box-shadow: 0 0 8px var(--cmd-red); }
.tg-equipment-strip span.warning i { background: var(--cmd-gold); box-shadow: 0 0 8px var(--cmd-gold); }

.tg-stage-flow {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px 9px;
  color: #7699a8;
  font-size: 6px;
}

.tg-stage-flow i { flex: 1; height: 1px; background: linear-gradient(90deg, #1d6d83, var(--cmd-accent)); animation: tg-command-flow-line 2s ease-in-out infinite alternate; }
.tg-stage-flow span:last-child { color: var(--cmd-green); }

.tg-quality-ring,
.tg-finance-ring {
  --value: 50;
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  margin: 13px auto 8px;
  border-radius: 50%;
  background: conic-gradient(var(--cmd-accent) calc(var(--value) * 1%), rgba(83, 134, 151, .12) 0);
  box-shadow: 0 0 30px rgba(54, 216, 238, .1);
  animation: tg-command-ring 3.2s ease-in-out infinite;
}

.tg-quality-ring::before,
.tg-finance-ring::before {
  content: "";
  position: absolute;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #092538;
}

.tg-quality-ring > *,
.tg-finance-ring > * { position: relative; z-index: 1; }
.tg-quality-ring b,
.tg-finance-ring b { display: block; color: #eefcff; font-size: 20px; text-align: center; }
.tg-quality-ring small,
.tg-finance-ring small { display: block; margin-top: 2px; color: #7598a6; font-size: 6px; text-align: center; }

.tg-quality-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0 10px 10px; }
.tg-quality-meta span { padding: 6px; border-radius: 5px; color: #7295a3; background: rgba(9, 42, 61, .7); font-size: 6px; text-align: center; }
.tg-quality-meta strong { display: block; margin-bottom: 2px; color: #e8f7fa; font-size: 12px; }

.tg-command-risk-list { padding: 5px 10px 9px; }
.tg-command-risk-list > div { display: grid; grid-template-columns: 7px 1fr; gap: 7px; padding: 7px 0; border-bottom: 1px solid rgba(68, 132, 151, .12); }
.tg-command-risk-list > div:last-child { border-bottom: 0; }
.tg-command-risk-list i { width: 5px; height: 5px; margin-top: 4px; border-radius: 50%; background: var(--cmd-gold); box-shadow: 0 0 8px currentColor; }
.tg-command-risk-list i.danger { background: var(--cmd-red); }
.tg-command-risk-list b { display: block; color: #d8ebf1; font-size: 7px; }
.tg-command-risk-list small { display: block; margin-top: 3px; color: #6d8e9d; font-size: 6px; line-height: 1.45; }

.tg-command-bottom {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
  gap: 6px;
  margin-top: 6px;
  flex: 0 0 clamp(132px, 20vh, 190px);
  min-height: 0;
  overflow: hidden;
}

.tg-command-manufacturing .tg-command-bottom {
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr) minmax(0, .9fr);
}

.tg-command-manufacturing .tg-command-layout {
  grid-template-columns: 184px minmax(0, 1fr) 216px;
}

.tg-command-manufacturing .tg-command-column {
  min-height: 0;
  overflow: hidden;
}

.tg-command-manufacturing .tg-command-layout > .tg-command-column {
  min-height: 0;
  overflow: hidden;
}

.tg-command-manufacturing .tg-command-layout > .tg-command-column:first-of-type {
  grid-template-rows: minmax(0, 1.52fr) minmax(0, 1fr);
}

.tg-command-manufacturing .tg-command-layout > .tg-command-column:last-of-type {
  grid-template-rows: minmax(0, 1fr);
}

.tg-command-manufacturing .tg-material-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 6px 8px 7px;
}

.tg-command-manufacturing .tg-material-grid > div {
  gap: 5px 4px;
  padding: 6px;
}

.tg-command-manufacturing .tg-material-grid > div:nth-child(3) {
  display: none;
}

.tg-command-manufacturing .tg-command-load-row {
  padding: 5px 0;
}

.tg-command-manufacturing .tg-workshop-detail {
  height: 100%;
  overflow: hidden;
}

.tg-command-manufacturing .tg-table-wrap,
.tg-command-manufacturing .tg-command-table { max-height: none; }

.tg-command-manufacturing .tg-command-table td {
  padding-top: 5px;
  padding-bottom: 5px;
}

.tg-compact-quality {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  height: calc(100% - 42px);
  min-height: 0;
}

.tg-quality-ring-small {
  width: 82px;
  height: 82px;
  margin: 7px auto;
}

.tg-quality-ring-small::before {
  width: 62px;
  height: 62px;
}

.tg-quality-ring-small b { font-size: 15px; }

.tg-compact-quality .tg-command-risk-list {
  min-height: 0;
  padding-top: 3px;
  padding-bottom: 3px;
}

.tg-trend-chart { padding: 3px 10px 8px; }
.tg-trend-chart svg { width: 100%; height: 102px; overflow: visible; }
.tg-trend-chart .area { fill: url(#tgAreaM); }
.tg-trend-chart .line { fill: none; stroke: var(--cmd-accent); stroke-width: 2; filter: drop-shadow(0 0 5px rgba(54, 216, 238, .6)); stroke-dasharray: 7 4; animation: tg-command-dash 6s linear infinite; }
.tg-trend-chart circle { fill: #baf7ff; stroke: var(--cmd-accent); stroke-width: 1.5; animation: tg-command-pulse 2s ease-in-out infinite; }

.tg-command-table { width: 100%; border-collapse: collapse; }
.tg-command-table td { padding: 7px 10px; border-bottom: 1px solid rgba(66, 132, 153, .11); color: #7599a7; font-size: 7px; }
.tg-command-table tr:last-child td { border-bottom: 0; }
.tg-command-table b { display: block; color: #d6eaf0; font-size: 7px; }
.tg-command-table small { display: block; margin-top: 2px; color: #678997; font-size: 6px; }
.tg-command-progress { width: 82px; height: 4px; overflow: hidden; border-radius: 2px; background: #133142; }
.tg-command-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1688a1, #49d9eb); animation: tg-command-bar 2.6s ease-in-out infinite alternate; }

.tg-command-status {
  display: inline-flex;
  padding: 3px 5px;
  border-radius: 4px;
  color: #86a4b0;
  background: rgba(116, 148, 159, .12);
  font-size: 6px;
  white-space: nowrap;
}
.tg-command-status.good { color: var(--cmd-green); background: rgba(70, 213, 160, .1); }
.tg-command-status.warning { color: var(--cmd-gold); background: rgba(242, 189, 97, .1); }
.tg-command-status.danger { color: var(--cmd-red); background: rgba(255, 115, 124, .1); }

.tg-module-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  padding: 7px 9px 9px;
  border-top: 1px solid rgba(67, 135, 155, .13);
}

.tg-module-mini-grid > div {
  min-width: 0;
  padding: 7px;
  border: 1px solid rgba(70, 142, 162, .13);
  border-radius: 5px;
  background: rgba(7, 33, 50, .62);
}

.tg-module-mini-grid span,
.tg-module-mini-grid small {
  display: block;
  overflow: hidden;
  color: #6f919f;
  font-size: 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tg-module-mini-grid b {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  color: #dcf5fa;
  font-family: "Bahnschrift", "Microsoft YaHei UI", sans-serif;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tg-module-mini-grid small { margin-top: 3px; color: #597b89; }

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

.tg-rnd-resource-panel .tg-module-mini-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tg-finance-mini-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(67, 135, 155, .13);
}

.tg-department-mini {
  display: grid;
  gap: 5px;
  padding: 0 11px 10px;
}

.tg-department-mini > div {
  display: grid;
  grid-template-columns: 62px 1fr 18px;
  align-items: center;
  gap: 6px;
  color: #6f929f;
  font-size: 6px;
}

.tg-department-mini i {
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: #132f43;
}

.tg-department-mini em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #526fda, #54dbe0);
  animation: tg-command-bar 2.5s ease-in-out infinite alternate;
}

.tg-department-mini b { color: #a8c2cd; text-align: right; }

.tg-office-map-panel,
.tg-rnd-map-panel,
.tg-finance-flow-panel {
  display: flex;
  min-height: 0;
  flex-direction: column;
}

.tg-digital-scene {
  position: relative;
  flex: 1;
  min-height: 290px;
  margin: 7px 8px 0;
  overflow: hidden;
  border: 1px solid rgba(74, 158, 182, .17);
  border-radius: 7px;
  background:
    radial-gradient(ellipse at 50% 68%, rgba(57, 157, 193, .17), transparent 57%),
    linear-gradient(180deg, #0c293e, #061a2c);
}

.tg-rnd-3d-scene {
  background:
    radial-gradient(ellipse at 50% 60%, rgba(122, 92, 220, .2), transparent 56%),
    linear-gradient(180deg, #151431, #08182d);
}

.tg-finance-3d-scene {
  background:
    radial-gradient(ellipse at 50% 70%, rgba(48, 183, 154, .18), transparent 57%),
    linear-gradient(180deg, #0b2934, #061a27);
}

.tg-digital-scene-slot {
  position: absolute;
  inset: 0;
}

.tg-digital-scene-canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: 0;
  cursor: grab;
  touch-action: none;
}

.tg-scene-badge,
.tg-scene-stats,
.tg-scene-hint {
  position: absolute;
  z-index: 2;
  pointer-events: none;
}

.tg-scene-stats {
  top: 9px;
  right: 10px;
  display: flex;
  gap: 5px;
}

.tg-scene-stats span {
  padding: 4px 6px;
  border: 1px solid rgba(77, 153, 174, .18);
  border-radius: 5px;
  color: #6f95a4;
  background: rgba(5, 27, 42, .66);
  font-size: 6px;
}

.tg-scene-stats b {
  margin-left: 5px;
  color: var(--cmd-accent);
  font-size: 7px;
}

.tg-scene-badge {
  top: 9px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border: 1px solid rgba(81, 171, 193, .22);
  border-radius: 5px;
  color: #85b7c4;
  background: rgba(5, 27, 42, .7);
  font-size: 6px;
}

.tg-scene-badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cmd-green);
  box-shadow: 0 0 8px var(--cmd-green);
  animation: tg-command-pulse 1.7s ease-in-out infinite;
}

.tg-scene-hint {
  right: 9px;
  bottom: 8px;
  color: #627f8d;
  font-size: 6px;
}

/* Enterprise overview */
.tg-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  flex: 1;
  min-height: 0;
  margin-top: 8px;
}

.tg-overview-card {
  --domain-color: #38d6ea;
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  padding: 13px;
  border: 1px solid rgba(75, 155, 180, .2);
  border-radius: 9px;
  color: inherit;
  background:
    radial-gradient(circle at 88% 4%, color-mix(in srgb, var(--domain-color) 16%, transparent), transparent 35%),
    linear-gradient(150deg, rgba(9, 40, 60, .94), rgba(4, 23, 37, .96));
  box-shadow: inset 0 1px rgba(150, 226, 239, .06), 0 10px 30px rgba(0, 8, 16, .18);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease;
}

.tg-overview-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--domain-color), transparent 72%);
  box-shadow: 0 0 14px var(--domain-color);
}

.tg-overview-card:hover {
  border-color: color-mix(in srgb, var(--domain-color) 48%, transparent);
  transform: translateY(-2px);
}

.tg-overview-card.domain-office { --domain-color: #7da9ff; }
.tg-overview-card.domain-rnd { --domain-color: #a78bff; }
.tg-overview-card.domain-finance { --domain-color: #58dfb8; }

.tg-overview-card > header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.tg-overview-card > header > div:first-child { min-width: 0; flex: 1; }
.tg-overview-card header span { color: var(--domain-color); font-size: 7px; font-weight: 800; letter-spacing: .14em; }
.tg-overview-card header h2 { margin: 5px 0 0; color: #edf9fc; font-size: 18px; }
.tg-overview-card header p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 2.7em;
  margin: 5px 0 0;
  color: #7f9da9;
  font-size: var(--tg-read-xs);
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
}

.tg-overview-health {
  --value: 80;
  display: grid;
  flex: none;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: conic-gradient(var(--domain-color) calc(var(--value) * 1%), rgba(93, 139, 155, .14) 0);
}

.tg-overview-health::before {
  content: "";
  position: absolute;
  width: 41px;
  height: 41px;
  border-radius: 50%;
  background: #082337;
}

.tg-overview-health b { position: relative; z-index: 1; color: #eaffff; font-size: 10px; }

.tg-overview-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-top: 9px;
}

.tg-overview-metrics span {
  min-width: 0;
  padding: 7px;
  border: 1px solid rgba(73, 139, 160, .13);
  border-radius: 5px;
  background: rgba(8, 32, 49, .62);
}

.tg-overview-metrics small { display: block; overflow: hidden; color: #7192a0; font-size: 6px; text-overflow: ellipsis; white-space: nowrap; }
.tg-overview-metrics b { display: inline-block; margin-top: 6px; color: #e8f9fc; font-family: "Bahnschrift", "Microsoft YaHei UI", sans-serif; font-size: 18px; font-weight: 600; }
.tg-overview-metrics em { margin-left: 3px; color: #7597a4; font-size: 6px; font-style: normal; }

.tg-overview-wave {
  display: flex;
  align-items: end;
  gap: 4px;
  flex: 1;
  min-height: 58px;
  margin-top: 13px;
  padding: 0 2px;
  border-bottom: 1px solid rgba(69, 134, 155, .15);
}

.tg-overview-wave i {
  flex: 1;
  min-height: 9px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--domain-color), color-mix(in srgb, var(--domain-color) 15%, transparent));
  animation: tg-overview-bars 2.2s ease-in-out infinite alternate;
}

.tg-overview-wave i:nth-child(1) { height: 28%; animation-delay: -.8s; }
.tg-overview-wave i:nth-child(2) { height: 60%; animation-delay: -.3s; }
.tg-overview-wave i:nth-child(3) { height: 42%; animation-delay: -1.1s; }
.tg-overview-wave i:nth-child(4) { height: 82%; animation-delay: -.5s; }
.tg-overview-wave i:nth-child(5) { height: 66%; animation-delay: -1.5s; }

.tg-overview-card > footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  margin-top: 11px;
}

.tg-overview-card > footer small { overflow: hidden; color: #7796a3; font-size: 6px; text-overflow: ellipsis; white-space: nowrap; }
.tg-overview-card > footer > b { color: var(--domain-color); font-size: 6px; }

.tg-overview-footer {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 8px;
  flex: 0 0 125px;
  min-height: 0;
  margin-top: 8px;
}

.tg-source-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 10px 12px;
}

.tg-source-links span {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 7px;
  border: 1px solid rgba(69, 139, 160, .14);
  border-radius: 5px;
  color: #7f9eab;
  background: rgba(7, 31, 47, .58);
  font-size: 6px;
}

.tg-source-links i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cmd-green);
  box-shadow: 0 0 8px var(--cmd-green);
  animation: tg-command-pulse 1.8s ease-in-out infinite;
}

.tg-pulse-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  height: calc(100% - 46px);
  padding: 5px 8px 7px;
}

.tg-pulse-item {
  --pulse-color: #36d8ee;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 5px 7px;
  border: 1px solid color-mix(in srgb, var(--pulse-color) 20%, transparent);
  border-radius: 6px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--pulse-color) 8%, transparent), rgba(6, 28, 43, .74));
}

.tg-pulse-item.tone-blue { --pulse-color: #77a7ff; }
.tg-pulse-item.tone-green { --pulse-color: #52d8aa; }
.tg-pulse-item.tone-mint { --pulse-color: #58dfb8; }

.tg-pulse-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  color: var(--pulse-color);
  font-size: var(--tg-read-xs);
  font-weight: 700;
  line-height: 1;
  letter-spacing: .04em;
}

.tg-pulse-code span { display: inline-flex; align-items: center; gap: 5px; }
.tg-pulse-code i { width: 6px; height: 6px; border-radius: 50%; background: var(--pulse-color); box-shadow: 0 0 8px var(--pulse-color); }
.tg-pulse-code em { color: #83a7b3; font-size: var(--tg-read-xs); font-style: normal; font-weight: 500; letter-spacing: 0; }
.tg-pulse-item > b { overflow: hidden; margin-top: 4px; color: #effcff; font-family: "Bahnschrift", "Microsoft YaHei UI", sans-serif; font-size: 20px; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.tg-pulse-item > b small { margin-left: 3px; color: #86a7b2; font-family: "Microsoft YaHei UI", sans-serif; font-size: var(--tg-read-xs); font-weight: 500; }
.tg-pulse-item > p { overflow: hidden; margin: 4px 0 0; color: #84a5b1; font-size: var(--tg-read-xs); line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }

.tg-overview-alerts .tg-command-risk-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 8px 10px;
}

.tg-overview-alerts .tg-command-risk-list > div {
  min-width: 0;
  padding: 6px;
  border: 1px solid rgba(67, 137, 157, .13);
  border-radius: 5px;
}

@keyframes tg-overview-bars {
  from { filter: brightness(.78); transform: scaleY(.88); transform-origin: bottom; }
  to { filter: brightness(1.28); transform: scaleY(1.04); transform-origin: bottom; }
}

/* Office */
.tg-office-layout { grid-template-columns: 250px minmax(0, 1fr) 190px; }
.tg-office-queue { padding: 5px 10px 9px; }
.tg-office-queue-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 7px; align-items: start; padding: 8px 0; border-bottom: 1px solid rgba(64, 129, 151, .12); }
.tg-office-queue-row:last-child { border-bottom: 0; }
.tg-office-queue-row b { display: block; color: #d4e8ef; font-size: 7px; }
.tg-office-queue-row small { display: block; margin-top: 3px; color: #6b8e9d; font-size: 6px; line-height: 1.4; }
.tg-office-queue-row em { color: var(--cmd-gold); font-size: 7px; font-style: normal; }
.tg-office-map-panel { min-height: 350px; }
.tg-office-orbit { position: relative; height: 260px; overflow: hidden; background: radial-gradient(circle at center, rgba(76, 128, 220, .17), transparent 46%); }
.tg-office-core { position: absolute; top: 50%; left: 50%; z-index: 2; display: grid; place-items: center; width: 100px; height: 100px; border: 1px solid rgba(105, 169, 255, .42); border-radius: 50%; background: radial-gradient(circle, rgba(28, 75, 128, .94), rgba(9, 39, 62, .95)); transform: translate(-50%, -50%); box-shadow: 0 0 40px rgba(73, 138, 237, .22); }
.tg-office-core::before { content: ""; position: absolute; inset: -15px; border: 1px dashed rgba(99, 163, 239, .25); border-radius: 50%; animation: tg-command-spin 18s linear infinite; }
.tg-office-core span { color: #7eb4ff; font-size: 19px; font-weight: 800; }
.tg-office-core b { color: #e6f3ff; font-size: 9px; }
.tg-office-core small { color: #6d94b6; font-size: 6px; }
.tg-office-node { position: absolute; z-index: 2; min-width: 82px; padding: 7px 8px; border: 1px solid rgba(98, 163, 223, .24); border-radius: 6px; background: rgba(8, 39, 61, .9); box-shadow: 0 8px 20px rgba(0, 11, 24, .25); animation: tg-command-float 3.6s ease-in-out infinite; animation-delay: calc(var(--i) * -.3s); }
.tg-office-node b { display: block; color: #c9dff0; font-size: 7px; }
.tg-office-node span { display: inline-block; margin-top: 5px; color: var(--cmd-accent); font-size: 12px; }
.tg-office-node.node-0 { top: 38px; left: 38px; }
.tg-office-node.node-1 { top: 58px; right: 38px; }
.tg-office-node.node-2 { bottom: 39px; left: 50px; }
.tg-office-node.node-3 { right: 44px; bottom: 44px; }
.tg-office-links { position: absolute; inset: 0; width: 100%; height: 100%; }
.tg-office-links path { fill: none; stroke: rgba(95, 170, 245, .44); stroke-width: 1.2; stroke-dasharray: 6 5; animation: tg-command-dash 3s linear infinite; }
.tg-workflow-bars { display: grid; gap: 7px; padding: 7px 12px 12px; }
.tg-workflow-bars > div { display: grid; grid-template-columns: 60px 1fr 20px; align-items: center; gap: 7px; color: #7f9eac; font-size: 6px; }
.tg-workflow-bars i { position: relative; height: 4px; border-radius: 2px; background: #153145; }
.tg-workflow-bars i::after { content: ""; display: block; width: var(--w); height: 100%; border-radius: inherit; background: linear-gradient(90deg, #607ce8, #59dfe2); animation: tg-command-bar 2.4s ease-in-out infinite alternate; }
.tg-workflow-bars b { color: #bfd7e0; text-align: right; }
.tg-donut { --p1: 30; --p2: 60; position: relative; width: 112px; height: 112px; margin: 14px auto 10px; border-radius: 50%; background: conic-gradient(var(--cmd-accent) calc(var(--p1) * 1%), var(--cmd-gold) calc(var(--p1) * 1%) calc(var(--p2) * 1%), #4a6b88 0); box-shadow: 0 0 30px rgba(110, 160, 255, .12); }
.tg-donut::before { content: ""; position: absolute; inset: 14px; border-radius: 50%; background: #092337; }
.tg-donut > span { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.tg-donut b { color: #edf8ff; font-size: 20px; }
.tg-donut small { color: #7196aa; font-size: 6px; }
.tg-donut-legend { display: grid; gap: 6px; padding: 0 12px 12px; }
.tg-donut-legend span { display: flex; align-items: center; gap: 6px; color: #7799a8; font-size: 6px; }
.tg-donut-legend i { width: 5px; height: 5px; border-radius: 50%; background: var(--cmd-accent); }.tg-donut-legend i.tone-1 { background: var(--cmd-gold); }.tg-donut-legend i.tone-2 { background: #4a6b88; }
.tg-donut-legend b { margin-left: auto; color: #cce1e8; }
.tg-process-timeline { display: flex; justify-content: space-between; gap: 7px; padding: 18px 12px 16px; }
.tg-process-timeline span { position: relative; flex: 1; min-width: 0; color: #688998; font-size: 6px; text-align: center; }
.tg-process-timeline span::before { content: ""; position: absolute; top: 5px; left: -50%; width: 100%; height: 1px; background: rgba(96, 173, 230, .25); }
.tg-process-timeline span:first-child::before { display: none; }
.tg-process-timeline i { position: relative; z-index: 1; display: block; width: 11px; height: 11px; margin: 0 auto 7px; border: 2px solid #4b89ca; border-radius: 50%; background: #09253a; animation: tg-command-pulse 2.2s ease-in-out infinite; animation-delay: calc(var(--i) * -.25s); }
.tg-process-timeline b { display: block; overflow: hidden; color: #acc7d3; font-size: 6px; text-overflow: ellipsis; white-space: nowrap; }
.tg-process-timeline small { display: block; overflow: hidden; margin-top: 3px; font-size: 5px; text-overflow: ellipsis; white-space: nowrap; }
.tg-heat-grid { display: grid; grid-template-columns: repeat(9, 1fr); gap: 5px; padding: 13px 12px 16px; }
.tg-heat-grid span { display: grid; place-items: center; aspect-ratio: 1; border: 1px solid rgba(104, 169, 231, .16); border-radius: 5px; color: #88acc2; background: rgba(25, 83, 126, calc(.18 + var(--i) * .025)); font-size: 6px; animation: tg-command-heat 2.6s ease-in-out infinite; animation-delay: calc(var(--i) * -.15s); }

.tg-live-sla {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  gap: 8px;
  height: calc(100% - 35px);
  min-height: 0;
  padding: 7px 9px 8px;
}

.tg-sla-summary {
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: 4px;
}

.tg-sla-summary span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 7px;
  border: 1px solid rgba(66, 139, 159, .13);
  border-radius: 5px;
  color: #6e919f;
  background: rgba(7, 32, 49, .58);
  font-size: 6px;
}

.tg-sla-summary span.danger { border-color: rgba(255, 113, 123, .2); }
.tg-sla-summary span.warning { border-color: rgba(242, 189, 97, .2); }
.tg-sla-summary b { color: #d9eef4; font-size: 12px; }
.tg-sla-summary .danger b { color: var(--cmd-red); }
.tg-sla-summary .warning b { color: var(--cmd-gold); }

.tg-sla-track {
  display: grid;
  align-content: center;
  gap: 3px;
  min-height: 0;
}

.tg-sla-row {
  display: grid;
  grid-template-columns: 6px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-height: 14px;
}

.tg-sla-row > i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cmd-green);
  box-shadow: 0 0 7px var(--cmd-green);
}

.tg-sla-row.danger > i { background: var(--cmd-red); box-shadow: 0 0 7px var(--cmd-red); }
.tg-sla-row.warning > i { background: var(--cmd-gold); box-shadow: 0 0 7px var(--cmd-gold); }
.tg-sla-row span { min-width: 0; }
.tg-sla-row b,
.tg-sla-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-sla-row b { color: #b9d3dc; font-size: 6px; }
.tg-sla-row small { margin-top: 1px; color: #658694; font-size: 5px; }
.tg-sla-row em { color: #7da0ad; font-size: 5px; font-style: normal; }

.tg-department-heat {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  height: calc(100% - 35px);
  padding: 7px 9px 8px;
}

.tg-department-heat > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 6px;
  border: 1px solid rgba(73, 144, 166, .16);
  border-radius: 5px;
  background: linear-gradient(155deg, rgba(15, 58, 82, .7), rgba(7, 31, 49, .72));
  animation: tg-command-heat 2.8s ease-in-out infinite;
}

.tg-department-heat > div.heat-1 { border-color: rgba(111, 148, 246, .2); }
.tg-department-heat > div.heat-2 { border-color: rgba(162, 138, 247, .2); }
.tg-department-heat > div.heat-3 { border-color: rgba(82, 212, 188, .2); }
.tg-department-heat span { overflow: hidden; color: #83a5b3; font-size: 6px; text-overflow: ellipsis; white-space: nowrap; }
.tg-department-heat b { margin-top: 4px; color: #e7f8fb; font-size: 14px; }
.tg-department-heat small { overflow: hidden; margin-top: 2px; color: #648693; font-size: 5px; text-overflow: ellipsis; white-space: nowrap; }
.tg-department-heat i { height: 3px; margin-top: 5px; overflow: hidden; border-radius: 2px; background: #132f43; }
.tg-department-heat em { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #5682e9, #59dce3); animation: tg-command-bar 2.2s ease-in-out infinite alternate; }

/* R&D */
.tg-rnd-layout { grid-template-columns: 210px minmax(0, 1fr) 210px; }
.tg-rnd-stages { display: grid; gap: 10px; padding: 9px 11px 12px; }
.tg-rnd-stages > div { display: grid; grid-template-columns: 68px 30px 1fr; align-items: center; gap: 6px; color: #789aa9; font-size: 6px; }
.tg-rnd-stages b { color: #bcd6df; text-align: right; }
.tg-rnd-stages i { height: 4px; border-radius: 2px; background: #142f43; }
.tg-rnd-stages em { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7866d9, #58dce0); animation: tg-command-bar 2.5s ease-in-out infinite alternate; }
.tg-rnd-map-panel { min-height: 375px; }
.tg-rnd-map { position: relative; height: 316px; overflow: hidden; background: radial-gradient(circle at center, rgba(143, 103, 239, .15), transparent 48%); }
.tg-rnd-map::before { content: ""; position: absolute; inset: 35px 70px; border: 1px dashed rgba(134, 120, 240, .2); border-radius: 50%; animation: tg-command-spin 26s linear infinite; }
.tg-rnd-core { position: absolute; top: 50%; left: 50%; z-index: 2; display: grid; place-items: center; width: 104px; height: 104px; border: 1px solid rgba(155, 132, 255, .45); border-radius: 50%; background: radial-gradient(circle, rgba(74, 53, 132, .95), rgba(15, 33, 60, .96)); transform: translate(-50%, -50%); box-shadow: 0 0 45px rgba(141, 111, 255, .2); }
.tg-rnd-core span { color: #b3a4ff; font-size: 19px; font-weight: 800; }
.tg-rnd-core b { color: #eef0ff; font-size: 9px; }
.tg-rnd-core small { color: #807ea9; font-size: 6px; }
.tg-rnd-node { position: absolute; z-index: 2; width: 126px; padding: 7px 8px; border: 1px solid rgba(141, 132, 226, .25); border-radius: 7px; background: rgba(12, 38, 64, .9); animation: tg-command-float 3.8s ease-in-out infinite; animation-delay: calc(var(--i) * -.35s); }
.tg-rnd-node span { color: #8d82d9; font-size: 6px; }
.tg-rnd-node b { display: block; overflow: hidden; margin-top: 3px; color: #e0e4ff; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.tg-rnd-node small { display: block; overflow: hidden; margin-top: 3px; color: #6f8da2; font-size: 6px; text-overflow: ellipsis; white-space: nowrap; }
.tg-rnd-node.node-0 { top: 30px; left: 28px; }.tg-rnd-node.node-1 { top: 54px; right: 24px; }.tg-rnd-node.node-2 { bottom: 36px; left: 42px; }
.tg-rnd-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }.tg-rnd-map path { fill: none; stroke: rgba(153, 137, 255, .38); stroke-width: 1.2; stroke-dasharray: 7 5; animation: tg-command-dash 3.5s linear infinite; }
.tg-rnd-streak { display: flex; align-items: center; gap: 5px; padding: 5px 12px 11px; color: #7a98ad; font-size: 6px; }.tg-rnd-streak i { flex: 1; height: 1px; background: linear-gradient(90deg, #725bd0, #53dce0); animation: tg-command-flow-line 2s ease-in-out infinite alternate; }
.tg-rnd-projects { display: grid; gap: 6px; padding: 7px 10px 10px; }
.tg-rnd-projects > div { position: relative; padding: 8px; border: 1px solid rgba(87, 140, 171, .14); border-radius: 6px; background: rgba(8, 32, 51, .62); }
.tg-rnd-projects > div > b { display: block; margin-top: 6px; color: #d9e5f4; font-size: 7px; }
.tg-rnd-projects > div > small { display: block; margin-top: 3px; color: #708c9f; font-size: 6px; }
.tg-rnd-projects .tg-command-progress { margin-top: 7px; width: 100%; }.tg-rnd-projects em { position: absolute; right: 9px; bottom: 7px; color: #a897ff; font-size: 7px; font-style: normal; }
.tg-rnd-launch { display: flex; gap: 6px; padding: 12px; overflow: hidden; }.tg-rnd-launch span { flex: 1; min-width: 0; padding: 8px; border: 1px solid rgba(87, 145, 178, .15); border-radius: 6px; background: rgba(8, 35, 54, .58); }.tg-rnd-launch b { display: block; overflow: hidden; margin-top: 6px; color: #cfdef0; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }.tg-rnd-launch small { display: block; margin-top: 3px; color: #6f8da1; font-size: 6px; }
.tg-budget-pulse { display: grid; gap: 8px; padding: 12px; }.tg-budget-pulse > div { display: grid; grid-template-columns: 100px 1fr 45px; align-items: center; gap: 8px; color: #7d9aaa; font-size: 6px; }.tg-budget-pulse i { position: relative; height: 5px; border-radius: 3px; background: #142e43; }.tg-budget-pulse i::after { content: ""; display: block; width: var(--v); height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7b69dc, #54dadd); animation: tg-command-bar 2.3s ease-in-out infinite alternate; }.tg-budget-pulse b { color: #b9ced8; font-size: 7px; text-align: right; }

/* Finance */
.tg-finance-layout { grid-template-columns: 205px minmax(0, 1fr) 200px; }
.tg-budget-gauges { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; }
.tg-budget-gauges > div { text-align: center; }
.tg-gauge { --v: 50; display: grid; place-items: center; width: 66px; height: 66px; margin: 0 auto 5px; border-radius: 50%; background: conic-gradient(var(--cmd-green) calc(var(--v) * 1%), rgba(85, 134, 150, .14) 0); }
.tg-gauge::before { content: ""; position: absolute; width: 51px; height: 51px; border-radius: 50%; background: #092638; }.tg-gauge span { position: relative; z-index: 1; color: #ddf8f2; font-size: 10px; }
.tg-budget-gauges b { display: block; color: #b7d3dc; font-size: 7px; }.tg-budget-gauges small { display: block; margin-top: 2px; color: #698d9c; font-size: 6px; }
.tg-finance-flow-panel { min-height: 370px; }
.tg-finance-wave { position: relative; height: 280px; margin: 8px 9px 0; border: 1px solid rgba(77, 166, 182, .16); border-radius: 7px; background: radial-gradient(ellipse at 50% 100%, rgba(56, 192, 184, .13), transparent 55%), linear-gradient(180deg, #0b2d42, #071f32); }
.tg-finance-wave svg { position: absolute; inset: 25px 14px 25px; width: calc(100% - 28px); height: calc(100% - 50px); }.tg-finance-wave polyline { fill: none; stroke: var(--cmd-accent); stroke-width: 2; filter: drop-shadow(0 0 7px rgba(91, 225, 187, .42)); stroke-dasharray: 7 4; animation: tg-command-dash 6s linear infinite; }.tg-finance-wave circle { fill: #bdfbe9; stroke: var(--cmd-accent); stroke-width: 1.5; animation: tg-command-pulse 2s ease-in-out infinite; }.tg-finance-wave .area { fill: url(#tgFinArea); }
.tg-finance-total { position: absolute; top: 16px; right: 17px; text-align: right; }.tg-finance-total span { display: block; color: #6c99a7; font-size: 7px; }.tg-finance-total b { color: #eafff8; font-size: 24px; font-weight: 600; text-shadow: 0 0 18px rgba(74, 217, 183, .22); }.tg-finance-total em { margin-left: 3px; color: #7a9ca8; font-size: 7px; font-style: normal; }
.tg-finance-ribbon { display: flex; align-items: center; gap: 5px; padding: 7px 12px 11px; color: #7395a3; font-size: 6px; }.tg-finance-ribbon i { flex: 1; height: 1px; background: linear-gradient(90deg, #228f96, var(--cmd-accent)); animation: tg-command-flow-line 2.2s ease-in-out infinite alternate; }
.tg-finance-ring { margin-top: 17px; }
.tg-invoice-list { display: grid; gap: 5px; padding: 7px 10px 10px; }.tg-invoice-list > div { display: grid; grid-template-columns: auto 75px 1fr auto; align-items: center; gap: 6px; padding: 6px 7px; border-bottom: 1px solid rgba(66, 135, 149, .11); }.tg-invoice-list b { color: #d4e9ee; font-size: 7px; }.tg-invoice-list small { overflow: hidden; color: #7393a1; font-size: 6px; text-overflow: ellipsis; white-space: nowrap; }.tg-invoice-list em { color: #8ca4ad; font-size: 6px; font-style: normal; }
.tg-payment-signal { position: relative; min-height: 153px; display: grid; place-content: center; text-align: center; }.tg-payment-signal > i { position: absolute; top: 50%; left: 50%; width: 90px; height: 90px; border: 1px solid rgba(72, 213, 173, .22); border-radius: 50%; transform: translate(-50%, -50%); animation: tg-command-ripple 3s ease-out infinite; }.tg-payment-signal > i:nth-child(2) { animation-delay: -1s; }.tg-payment-signal > i:nth-child(3) { animation-delay: -2s; }.tg-payment-signal div { position: relative; z-index: 1; }.tg-payment-signal span { display: block; color: #79a49f; font-size: 7px; }.tg-payment-signal b { color: #eafff7; font-size: 22px; }.tg-payment-signal em { margin-left: 3px; color: #749b9a; font-size: 7px; font-style: normal; }.tg-payment-signal small { position: absolute; bottom: 12px; left: 0; right: 0; color: #6d8e96; font-size: 6px; }

.tg-command-loading,
.tg-command-error {
  min-height: 510px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #86afbd;
  background: #061724;
}

.tg-command-loading i {
  width: 46px;
  height: 46px;
  border: 2px solid rgba(68, 205, 225, .18);
  border-top-color: var(--cmd-accent, #36d8ee);
  border-radius: 50%;
  animation: tg-command-spin 1s linear infinite;
}

.tg-command-loading b,
.tg-command-error b { color: #d9f0f5; font-size: 13px; }
.tg-command-loading span,
.tg-command-error span { color: #6f97a5; font-size: 8px; }
.tg-command-error button { margin-top: 8px; padding: 7px 13px; border: 1px solid rgba(75, 181, 207, .3); border-radius: 6px; color: #b9e9f0; background: #0d3548; cursor: pointer; }
.tg-command-connect-state {
  max-width: 560px;
  min-height: 300px;
  margin: auto;
  padding: 36px 34px;
  border: 1px solid rgba(75, 181, 207, .22);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 0, rgba(47, 190, 214, .12), transparent 42%),
    rgba(7, 31, 48, .72);
}
.tg-command-connect-state > b { display: block; margin-top: 18px; font-size: clamp(20px, 1.4vw, 27px); }
.tg-command-connect-state > span { display: block; max-width: 460px; margin: 12px auto 0; font-size: var(--tg-read-sm); line-height: 1.75; }
.tg-command-connect-state > small { display: block; max-width: 460px; margin: 8px auto 0; color: #668b99; font-size: var(--tg-read-xs); }
.tg-command-connect-icon {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin: 0 auto;
  border: 1px solid rgba(80, 199, 219, .38);
  border-radius: 15px;
  color: #65dff0;
  background: rgba(15, 67, 91, .62);
  font-size: 32px;
  font-style: normal;
}
.tg-command-connect {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  min-height: 40px;
  margin-top: 22px;
  padding: 0 22px;
  border: 1px solid rgba(84, 202, 220, .48);
  border-radius: 7px;
  color: #e9fdff;
  background: linear-gradient(135deg, #126b83, #0d3b57);
  font-size: var(--tg-read-sm);
  font-weight: 700;
  text-decoration: none;
}
.tg-command-connect:hover { color: #fff; border-color: #6de8f7; background: linear-gradient(135deg, #1788a2, #124d6b); }

/* Hidden assistant */
.tg-cockpit-assistant {
  position: absolute;
  inset: 0;
  z-index: 70;
  pointer-events: none;
}

.tg-assistant-fab {
  position: absolute;
  top: 50%;
  right: -1px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 12px;
  height: 96px;
  padding: 8px 0;
  border: 1px solid transparent;
  border-right: 0;
  border-radius: 13px 0 0 13px;
  color: #effeff;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  pointer-events: auto;
  transform: translateY(-50%);
  transition: width .2s ease, transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.tg-assistant-fab::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 2px;
  height: 34px;
  border-radius: 4px 0 0 4px;
  background: rgba(79, 203, 222, .44);
  box-shadow: 0 0 7px rgba(69, 209, 229, .26);
  transform: translateY(-50%);
  transition: inset .2s ease, width .2s ease, height .2s ease, border-radius .2s ease, background .2s ease, transform .2s ease;
  pointer-events: none;
}

.tg-assistant-fab:hover,
.tg-assistant-fab:focus-visible {
  width: 42px;
  border-color: rgba(128, 235, 245, .7);
  background: linear-gradient(180deg, rgba(32, 139, 164, .98), rgba(8, 55, 80, .99));
  box-shadow: -10px 8px 28px rgba(0, 7, 15, .4), inset 1px 0 rgba(168, 239, 248, .1);
  outline: none;
  transform: translate(-3px, -50%);
}

.tg-assistant-fab:hover::before,
.tg-assistant-fab:focus-visible::before {
  inset: 8px 5px;
  width: auto;
  height: auto;
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(84, 221, 235, .1), transparent 45%, rgba(79, 212, 180, .07));
  box-shadow: none;
  transform: none;
}

.tg-assistant-fab-mark {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: none;
  border: 1px solid rgba(132, 230, 241, .38);
  border-radius: 7px;
  color: #effeff;
  background: rgba(9, 47, 65, .72);
  font-family: "Bahnschrift", "Microsoft YaHei UI", sans-serif;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .01em;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity .16s ease, transform .2s ease;
}

.tg-assistant-fab-title {
  position: relative;
  z-index: 1;
  color: #bcebf2;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1;
  text-orientation: upright;
  writing-mode: vertical-rl;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity .16s ease, transform .2s ease;
}

.tg-assistant-fab:hover .tg-assistant-fab-mark,
.tg-assistant-fab:hover .tg-assistant-fab-title,
.tg-assistant-fab:hover i,
.tg-assistant-fab:focus-visible .tg-assistant-fab-mark,
.tg-assistant-fab:focus-visible .tg-assistant-fab-title,
.tg-assistant-fab:focus-visible i {
  opacity: 1;
  transform: translateX(0);
}

.tg-assistant-fab::after {
  content: attr(data-label);
  position: absolute;
  top: 50%;
  right: 52px;
  width: max-content;
  padding: 6px 8px;
  border: 1px solid rgba(96, 178, 197, .24);
  border-radius: 5px;
  color: #b9d9e2;
  background: rgba(6, 28, 43, .92);
  font-size: 8px;
  opacity: 0;
  transform: translate(5px, -50%);
  transition: .18s ease;
  pointer-events: none;
}

.tg-assistant-fab:hover::after { opacity: 1; transform: translate(0, -50%); }
.tg-assistant-fab i { position: absolute; z-index: 2; top: 7px; right: 5px; width: 7px; height: 7px; border: 2px solid #0a3045; border-radius: 50%; background: var(--cmd-green, #46d5a0); box-shadow: 0 0 8px rgba(70, 213, 160, .65); opacity: 0; transform: translateX(6px); transition: opacity .16s ease, transform .2s ease; }

.tg-assistant-drawer {
  position: absolute;
  top: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  width: min(var(--assistant-width, 430px), calc(100% - 20px));
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(95, 177, 197, .28);
  border-radius: 13px;
  background:
    radial-gradient(circle at 80% 0, rgba(29, 164, 189, .15), transparent 30%),
    rgba(6, 27, 42, .985);
  box-shadow: -24px 0 70px rgba(0, 5, 13, .55);
  opacity: 0;
  transform: translateX(28px);
  transition: opacity .2s ease, transform .24s ease;
  pointer-events: none;
}

.tg-assistant-resizer {
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  left: -5px;
  width: 11px;
  cursor: col-resize;
  touch-action: none;
}

.tg-assistant-resizer::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 4px;
  width: 3px;
  height: 52px;
  border-radius: 4px;
  background: rgba(105, 210, 226, .32);
  box-shadow: 0 0 12px rgba(64, 205, 224, .2);
  transform: translateY(-50%);
  transition: background .18s ease, box-shadow .18s ease;
}

.tg-assistant-resizer:hover::after {
  background: rgba(115, 235, 247, .8);
  box-shadow: 0 0 16px rgba(64, 205, 224, .52);
}

.tg-cockpit-assistant.is-open .tg-assistant-drawer {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.tg-cockpit-assistant.is-open .tg-assistant-fab {
  opacity: 0;
  pointer-events: none;
  transform: translate(10px, -50%);
}

.tg-assistant-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 15px;
  border-bottom: 1px solid rgba(76, 151, 171, .18);
  background: rgba(8, 39, 58, .76);
}

.tg-assistant-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border: 1px solid rgba(103, 219, 235, .4);
  border-radius: 9px;
  color: #effeff;
  background: radial-gradient(circle at 30% 20%, rgba(110, 229, 242, .7), transparent 22%), linear-gradient(145deg, #135875, #102d4a);
  font-size: 11px;
  font-weight: 800;
}

.tg-assistant-head > div:nth-child(2) { min-width: 0; }
.tg-assistant-head b { display: block; color: #eef9fc; font-size: 15px; }
.tg-assistant-head small { display: block; margin-top: 4px; color: #7399a7; font-size: 8px; }
.tg-assistant-head-actions { display: flex; gap: 5px; margin-left: auto; }
.tg-assistant-head-actions button { width: 29px; height: 29px; border: 0; border-radius: 6px; color: #8eb3c0; background: transparent; cursor: pointer; }
.tg-assistant-head-actions button:hover { color: #efffff; background: rgba(85, 159, 180, .13); }
.tg-assistant-tools { display: flex; gap: 18px; padding: 12px 16px; border-bottom: 1px solid rgba(76, 151, 171, .14); }
.tg-assistant-tools button { border: 0; color: #c2dbe3; background: transparent; font-size: 11px; cursor: pointer; }
.tg-assistant-tools button:hover { color: #67e3f2; }
.tg-assistant-model-wrap { display: flex; align-items: center; gap: 6px; min-width: 0; margin-left: auto; color: #7098a8; font-size: 8px; }
.tg-assistant-model-select { max-width: 150px; height: 27px; padding: 0 24px 0 8px; border: 1px solid rgba(76, 153, 175, .3); border-radius: 6px; outline: 0; color: #b7dae4; background: #0a2b40; font: inherit; font-size: 8px; text-overflow: ellipsis; }
.tg-assistant-model-select:focus { border-color: rgba(74, 211, 230, .62); }
.tg-assistant-body { flex: 1; min-height: 0; overflow: auto; padding: 20px 18px; }
.tg-assistant-body h2 { margin: 0; color: #f3fbfd; font-size: 22px; }
.tg-assistant-body > p { margin: 9px 0 0; color: #85a7b3; font-size: 10px; line-height: 1.7; }
.tg-assistant-section-label { display: block; margin: 20px 0 8px; color: #7096a5; font-size: 9px; }
.tg-assistant-suggestions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tg-assistant-suggestions button { min-height: 41px; padding: 8px 10px; border: 1px solid rgba(70, 135, 157, .34); border-radius: 7px; color: #a9c8d3; background: rgba(13, 51, 72, .56); font-size: 10px; text-align: left; cursor: pointer; }
.tg-assistant-suggestions button:hover { color: #eafcff; border-color: rgba(73, 201, 219, .65); background: rgba(19, 77, 98, .62); }
.tg-assistant-note { margin: 18px 0 0; color: #668d9b; font-size: 8px; line-height: 1.75; }
.tg-assistant-messages { display: grid; gap: 9px; margin-top: 12px; }
.tg-assistant-message { padding: 9px 10px; border-radius: 8px; font-size: 9px; line-height: 1.65; white-space: pre-wrap; }
.tg-assistant-message.user { margin-left: 38px; color: #dffbff; background: rgba(31, 122, 145, .32); }
.tg-assistant-message.assistant { margin-right: 28px; color: #a9c4ce; border: 1px solid rgba(76, 148, 168, .18); background: rgba(8, 38, 56, .78); }
.tg-assistant-typing { animation: tg-command-pulse-text 1.4s ease-in-out infinite; }
.tg-assistant-compose { padding: 12px 15px 14px; border-top: 1px solid rgba(76, 151, 171, .16); background: rgba(7, 31, 47, .9); }
.tg-assistant-input-wrap { position: relative; }
.tg-assistant-input { width: 100%; min-height: 72px; box-sizing: border-box; resize: none; padding: 12px 48px 12px 12px; border: 1px solid rgba(77, 155, 178, .27); border-radius: 9px; outline: 0; color: #e1f5f8; background: rgba(8, 29, 45, .82); font: inherit; font-size: 10px; }
.tg-assistant-input:focus { border-color: rgba(71, 211, 229, .62); box-shadow: 0 0 0 3px rgba(53, 199, 220, .06); }
.tg-assistant-send { position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; border: 1px solid rgba(84, 185, 202, .33); border-radius: 7px; color: #a2dbe3; background: #123d51; cursor: pointer; }
.tg-assistant-send:hover { color: #fff; background: #17627a; }
.tg-assistant-foot { display: flex; justify-content: space-between; margin-top: 7px; color: #648795; font-size: 8px; }

.tg-enterprise-cockpit {
  --assistant-width: 430px;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.tg-cockpit-surface {
  width: 100%;
  height: 100%;
  min-height: 0;
  container-type: inline-size;
  transition: width .22s ease;
}

.tg-enterprise-cockpit.has-assistant .tg-cockpit-surface {
  width: calc(100% - var(--assistant-width));
}

.tg-enterprise-cockpit.has-assistant .tg-command-kpi-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tg-enterprise-cockpit.has-assistant .tg-command-kpi {
  min-height: 82px;
}

.tg-enterprise-cockpit.has-assistant .tg-command-layout {
  grid-template-columns: minmax(150px, .72fr) minmax(310px, 1.5fr) minmax(160px, .78fr);
  gap: 8px;
}

.tg-enterprise-cockpit.has-assistant .tg-command-bottom {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  flex-basis: clamp(168px, 20vh, 190px);
}

.tg-enterprise-cockpit.has-assistant .tg-command-title h1 {
  font-size: clamp(22px, 1.55vw, 31px);
}

.tg-enterprise-cockpit.has-assistant .tg-command-subtitle {
  font-size: clamp(10px, .72vw, 12px);
}

.tg-enterprise-cockpit.has-assistant .tg-command-kpi-value b {
  font-size: clamp(24px, 1.8vw, 32px);
}

.tg-enterprise-cockpit.has-assistant .tg-command-panel > header h2 {
  font-size: clamp(14px, .95vw, 18px);
}

.tg-enterprise-cockpit.has-assistant .tg-command-table td,
.tg-enterprise-cockpit.has-assistant .tg-command-table small,
.tg-enterprise-cockpit.has-assistant .tg-command-risk-list small,
.tg-enterprise-cockpit.has-assistant .tg-command-load-row span {
  font-size: clamp(9px, .68vw, 11.5px);
}

.tg-enterprise-cockpit.has-assistant .tg-assistant-fab {
  opacity: 0;
  pointer-events: none;
  transform: translate(10px, -50%);
}

.tg-enterprise-cockpit:fullscreen,
.tg-enterprise-cockpit.is-presentation {
  width: 100vw;
  height: 100vh;
  background: #061724;
}

.tg-enterprise-cockpit.is-presentation {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
}

.tg-enterprise-cockpit:fullscreen .tg-cockpit-surface,
.tg-enterprise-cockpit.is-presentation .tg-cockpit-surface {
  height: 100vh;
}

#tiangong-cockpit-inline .tg-enterprise-cockpit {
  width: 100%;
  transition: width .22s ease;
}

#tiangong-cockpit-inline.has-assistant .tg-enterprise-cockpit {
  width: calc(100% - 430px);
}

#tiangong-cockpit-inline.has-assistant .tg-assistant-fab {
  opacity: 0;
  pointer-events: none;
  transform: translate(10px, -50%);
}

#tiangong-cockpit-inline.has-assistant .tg-assistant-drawer {
  top: 8px;
  right: 8px;
  bottom: 8px;
  width: min(414px, calc(100% - 16px));
  box-shadow: -16px 0 45px rgba(0, 5, 13, .28);
}

#tiangong-cockpit-inline:fullscreen {
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  border: 0;
  border-radius: 0;
}

#tiangong-cockpit-inline.is-presentation {
  inset: 0 !important;
  z-index: 2147483000;
  width: 100vw !important;
  height: 100vh !important;
  border: 0;
  border-radius: 0;
}

#tiangong-cockpit-inline:fullscreen .tg-command-shell {
  min-height: 100vh;
}

.tg-payment-intelligence {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) minmax(0, 1fr);
  gap: 7px;
  height: calc(100% - 35px);
  min-height: 0;
  padding: 8px 10px 9px;
}

.tg-payment-total,
.tg-payment-due-list,
.tg-payment-methods {
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(69, 144, 162, .14);
  border-radius: 6px;
  background: rgba(7, 33, 49, .58);
}

.tg-payment-total {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tg-payment-total span,
.tg-payment-due-list > span,
.tg-payment-methods > span {
  display: block;
  color: #7398a5;
  font-size: 8px;
}

.tg-payment-total b {
  margin-top: 5px;
  color: #5ee2bd;
  font-family: "Bahnschrift", "Microsoft YaHei UI", sans-serif;
  font-size: 25px;
  line-height: 1;
}

.tg-payment-total em {
  margin-left: 3px;
  color: #7fa09e;
  font-size: 8px;
  font-style: normal;
}

.tg-payment-total small {
  margin-top: 7px;
  color: #678a97;
  font-size: 7px;
}

.tg-payment-due-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 6px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(62, 128, 147, .12);
}

.tg-payment-due-list > div:last-child { border-bottom: 0; }
.tg-payment-due-list b { overflow: hidden; color: #c8dfe6; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.tg-payment-due-list small { color: #638492; font-size: 7px; }
.tg-payment-due-list em { grid-row: 1 / 3; grid-column: 2; align-self: center; color: #e4b866; font-size: 8px; font-style: normal; }

.tg-payment-methods { display: grid; align-content: start; gap: 5px; }
.tg-payment-methods > div { display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 5px; }
.tg-payment-methods small { overflow: hidden; color: #7897a4; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.tg-payment-methods i { height: 4px; overflow: hidden; border-radius: 2px; background: #133144; }
.tg-payment-methods em { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2fae9b, #5ee2bd); animation: tg-command-bar 2.3s ease-in-out infinite alternate; }
.tg-payment-methods b { color: #a9c6cc; font-size: 7px; }

/* Readable presentation typography */
.tg-command-title h1 { font-size: clamp(27px, 1.72vw, 38px); }
.tg-command-title span { font-size: clamp(10px, .58vw, 12px); }
.tg-command-subtitle { font-size: clamp(10px, .68vw, 13px); }
.tg-command-kpi { min-height: 92px; }
.tg-command-kpi > span { overflow: hidden; font-size: clamp(12px, .78vw, 15px); text-overflow: ellipsis; white-space: nowrap; }
.tg-command-kpi-value b { font-size: clamp(29px, 2.1vw, 42px); }
.tg-command-kpi-value em { font-size: clamp(10px, .65vw, 13px); }
.tg-command-kpi small { font-size: clamp(9px, .6vw, 12px); }
.tg-command-panel > header span { font-size: clamp(9px, .58vw, 12px); }
.tg-command-panel > header h2 { font-size: clamp(16px, 1.04vw, 21px); }
.tg-command-panel > header > b { font-size: clamp(10px, .62vw, 13px); }
.tg-command-load-row b,
.tg-office-queue-row b,
.tg-command-risk-list b,
.tg-project-card h3,
.tg-rnd-projects > div > b,
.tg-budget-head b,
.tg-invoice-list b,
.tg-command-table b { font-size: clamp(11px, .7vw, 14px); }
.tg-command-load-row span,
.tg-office-queue-row small,
.tg-command-risk-list small,
.tg-project-card > p,
.tg-rnd-projects > div > small,
.tg-budget-row small,
.tg-invoice-list small,
.tg-command-table small { font-size: clamp(10px, .62vw, 13px); }
.tg-command-load-row strong,
.tg-command-kpi small,
.tg-office-queue-row em,
.tg-command-table td { font-size: clamp(10px, .63vw, 13px); }
.tg-command-status { font-size: clamp(9px, .55vw, 12px); }
.tg-module-mini-grid span,
.tg-module-mini-grid small,
.tg-department-mini,
.tg-scene-stats span,
.tg-scene-badge,
.tg-scene-hint,
.tg-workshop-badge,
.tg-workshop-hint { font-size: clamp(10px, .64vw, 13px); }
.tg-module-mini-grid b { font-size: clamp(18px, 1.15vw, 24px); }
.tg-scene-stats b { font-size: clamp(10px, .64vw, 13px); }
.tg-equipment-strip span,
.tg-stage-flow { font-size: clamp(10px, .62vw, 13px); }
.tg-sla-row b,
.tg-sla-row em,
.tg-department-heat span,
.tg-department-heat small { font-size: clamp(10px, .62vw, 13px); }
.tg-department-heat b { font-size: clamp(20px, 1.25vw, 28px); }
.tg-payment-total span,
.tg-payment-due-list > span,
.tg-payment-methods > span,
.tg-payment-total small,
.tg-payment-due-list b,
.tg-payment-due-list small,
.tg-payment-due-list em,
.tg-payment-methods small,
.tg-payment-methods b { font-size: clamp(10px, .62vw, 13px); }
.tg-payment-total b { font-size: clamp(26px, 1.7vw, 36px); }

.tg-overview-card header span,
.tg-overview-card header p,
.tg-overview-metrics small,
.tg-overview-metrics em,
.tg-overview-card > footer small,
.tg-overview-card > footer > b,
.tg-workflow-bars > div,
.tg-donut small,
.tg-donut-legend span,
.tg-rnd-stages > div,
.tg-rnd-launch small,
.tg-rnd-launch b,
.tg-budget-pulse > div,
.tg-budget-pulse b,
.tg-budget-gauges b,
.tg-budget-gauges small,
.tg-finance-total span,
.tg-finance-total em,
.tg-finance-ribbon,
.tg-sla-summary span,
.tg-material-grid span,
.tg-material-grid em,
.tg-material-grid small,
.tg-workshop-link small,
.tg-workshop-link b { font-size: clamp(10px, .62vw, 13px); }

.tg-overview-metrics b { font-size: clamp(21px, 1.35vw, 25px); }
.tg-rnd-stages b { font-size: clamp(10px, .63vw, 13px); }
.tg-gauge span { font-size: clamp(13px, .8vw, 17px); }

/* Final readable scale: keep dense dashboards single-screen without sub-12px copy. */
.tg-command-shell {
  --tg-read-xs: clamp(11.5px, .72vw, 12px);
  --tg-read-sm: clamp(12px, .8vw, 13px);
  --tg-read-md: clamp(13px, .88vw, 14px);
  --tg-read-lg: clamp(16px, 1.05vw, 18px);
  --tg-read-value: clamp(28px, 1.85vw, 34px);
  text-rendering: optimizeLegibility;
}

.tg-command-title span,
.tg-command-head-side time,
.tg-command-live,
.tg-command-subtitle,
.tg-command-kpi small,
.tg-command-kpi-value em,
.tg-module-mini-grid span,
.tg-module-mini-grid small,
.tg-department-mini,
.tg-department-mini > div,
.tg-scene-stats span,
.tg-scene-stats b,
.tg-scene-badge,
.tg-scene-hint,
.tg-workshop-badge,
.tg-workshop-hint,
.tg-workshop-detail-head small,
.tg-workshop-detail-grid span,
.tg-workshop-link small,
.tg-equipment-strip span,
.tg-stage-flow,
.tg-quality-ring small,
.tg-finance-ring small,
.tg-quality-meta span,
.tg-command-table small,
.tg-sla-row small,
.tg-sla-summary small,
.tg-office-queue-row small,
.tg-command-risk-list small,
.tg-project-card > p,
.tg-rnd-projects > div > small,
.tg-budget-row small,
.tg-invoice-list small,
.tg-invoice-list em { font-size: var(--tg-read-xs); }

.tg-command-panel > header span,
.tg-command-status,
.tg-workflow-bars > div,
.tg-donut small,
.tg-donut-legend span,
.tg-rnd-stages > div,
.tg-rnd-stages b,
.tg-rnd-launch small,
.tg-budget-pulse > div,
.tg-budget-gauges small,
.tg-finance-total span,
.tg-finance-total em,
.tg-finance-ribbon,
.tg-sla-summary span,
.tg-material-grid span,
.tg-material-grid em,
.tg-material-grid small,
.tg-workshop-link b,
.tg-payment-total span,
.tg-payment-due-list > span,
.tg-payment-methods > span,
.tg-payment-total small,
.tg-payment-due-list small,
.tg-payment-due-list em,
.tg-payment-methods small,
.tg-payment-methods b,
.tg-overview-card header span,
.tg-overview-card header p,
.tg-overview-metrics small,
.tg-overview-metrics em,
.tg-overview-card > footer small,
.tg-overview-card > footer > b,
.tg-source-links span,
.tg-payment-total em,
.tg-payment-due-list b,
.tg-rnd-projects em,
.tg-command-load-row span,
.tg-command-load-row strong,
.tg-office-queue-row em { font-size: var(--tg-read-sm); }

.tg-command-kpi > span,
.tg-command-panel > header > b,
.tg-command-load-row b,
.tg-office-queue-row b,
.tg-command-risk-list b,
.tg-project-card h3,
.tg-rnd-projects > div > b,
.tg-rnd-launch b,
.tg-budget-head b,
.tg-budget-pulse b,
.tg-invoice-list b,
.tg-command-table b,
.tg-command-table td,
.tg-workshop-detail-head b,
.tg-workshop-detail-grid b,
.tg-office-core b,
.tg-office-node b,
.tg-process-timeline b,
.tg-sla-row b,
.tg-sla-row em,
.tg-rnd-node span,
.tg-rnd-node b,
.tg-rnd-proof b,
.tg-budget-gauges b { font-size: var(--tg-read-sm); }

.tg-command-panel > header h2,
.tg-overview-card header h2,
.tg-office-core span,
.tg-rnd-core span,
.tg-finance-total b,
.tg-overview-health b { font-size: var(--tg-read-lg); }

.tg-command-kpi-value b { font-size: var(--tg-read-value); }
.tg-module-mini-grid b { font-size: clamp(19px, 1.25vw, 23px); }
.tg-department-heat span { font-size: var(--tg-read-md); }
.tg-department-heat b { font-size: clamp(28px, 1.78vw, 32px); }
.tg-department-heat small { font-size: var(--tg-read-xs); }
.tg-department-mini > div { grid-template-columns: 78px 1fr 28px; }
.tg-process-timeline small { font-size: 11px; }
.tg-heat-grid span,
.tg-rnd-streak,
.tg-rnd-streak span,
.tg-dt-legend,
.tg-dt-machine b,
.tg-dt-machine small { font-size: var(--tg-read-xs); }
.tg-payment-signal span,
.tg-payment-signal em,
.tg-payment-signal small { font-size: var(--tg-read-xs); }
.tg-payment-signal b { font-size: clamp(28px, 1.75vw, 34px); }
.tg-payment-total b { font-size: clamp(28px, 1.8vw, 34px); }
.tg-quality-meta strong,
.tg-quality-ring-small b { font-size: var(--tg-read-md); }
.tg-sla-summary b { font-size: var(--tg-read-lg); }

.tg-command-kpi small,
.tg-command-load-row span,
.tg-command-load-row strong,
.tg-command-table small,
.tg-office-queue-row small,
.tg-command-risk-list small,
.tg-workshop-detail-grid span,
.tg-workshop-link small,
.tg-scene-hint,
.tg-workshop-hint { color: #8eafbb; }

.tg-command-panel > header { min-height: 45px; }
.tg-command-kpi { min-height: 96px; }

/* Keep the larger typography complete within one presentation screen. */
.tg-command-layout,
.tg-command-layout > *,
.tg-command-column,
.tg-command-column > * {
  min-height: 0;
}

.tg-command-layout { grid-template-rows: minmax(0, 1fr); }
.tg-command-bottom { flex-basis: clamp(186px, 22.5vh, 208px); }
.tg-command-panel > header {
  min-height: 45px;
  padding: 5px 9px 4px;
}
.tg-command-panel > header h2 { line-height: 1.1; }
.tg-command-panel > header span { line-height: 1; }

.tg-command-load-row {
  gap: 0 6px;
  padding-top: 2px;
  padding-bottom: 2px;
}
.tg-command-load-row span { margin-top: 0; line-height: 1.15; }
.tg-command-load-bar { height: 3px; margin-top: 2px; }

.tg-command-risk-list > div {
  gap: 1px 6px;
  padding-top: 2px;
  padding-bottom: 2px;
}
.tg-command-risk-list { padding-top: 3px; padding-bottom: 4px; }
.tg-command-risk-list b { line-height: 1.15; }
.tg-command-risk-list small { margin-top: 0; line-height: 1.25; }

.tg-command-table tr { height: 26px; }
.tg-command-table td {
  height: 26px;
  box-sizing: border-box;
  overflow: hidden;
  padding: 2px 6px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tg-command-table b,
.tg-command-table small { display: inline; margin: 0; vertical-align: middle; }
.tg-command-table small::before { content: " · "; }

.tg-invoice-list { gap: 0; padding-top: 4px; padding-bottom: 5px; }
.tg-invoice-list > div {
  min-height: 24px;
  grid-template-columns: auto 98px minmax(0, 1fr) auto;
  padding: 1px 5px;
  line-height: 1.1;
  white-space: nowrap;
}
.tg-invoice-list b,
.tg-invoice-list small,
.tg-invoice-list em { overflow: hidden; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }

.tg-invoice-list b {
  overflow: visible;
  text-overflow: clip;
}

.tg-compact-quality { padding: 2px 5px 3px; }

#tiangong-cockpit-inline .tg-enterprise-cockpit {
  overscroll-behavior: contain;
  scrollbar-color: rgba(82, 181, 202, .55) rgba(5, 25, 39, .75);
  scrollbar-width: thin;
}

#tiangong-cockpit-inline .tg-enterprise-cockpit::-webkit-scrollbar {
  width: 8px;
}

#tiangong-cockpit-inline .tg-enterprise-cockpit::-webkit-scrollbar-track {
  background: rgba(5, 25, 39, .75);
}

#tiangong-cockpit-inline .tg-enterprise-cockpit::-webkit-scrollbar-thumb {
  border: 2px solid rgba(5, 25, 39, .75);
  border-radius: 8px;
  background: rgba(82, 181, 202, .55);
}

#tiangong-cockpit-inline .tg-command-shell {
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}

#tiangong-cockpit-inline .tg-command-layout {
  height: auto;
  flex: 1 1 auto;
}

.tg-live-sla,
.tg-department-heat,
.tg-payment-intelligence { height: calc(100% - 46px); }

.tg-command-office .tg-office-map-panel .tg-digital-scene,
.tg-command-rnd .tg-rnd-map-panel .tg-digital-scene { min-height: 0; }

.tg-command-office .tg-command-layout > .tg-command-column {
  grid-template-rows: minmax(0, 1.16fr) minmax(0, 1fr);
}

.tg-command-office .tg-command-layout > .tg-command-column > .tg-command-panel:first-child {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-content: stretch;
}

.tg-command-office .tg-command-layout > .tg-command-column > .tg-command-panel:first-child > header,
.tg-command-office .tg-command-layout > .tg-command-column > .tg-command-panel:first-child > .tg-department-mini {
  grid-column: 1 / -1;
}

.tg-command-office .tg-command-layout > .tg-command-column > .tg-command-panel:first-child > .tg-donut {
  align-self: center;
  width: 82px;
  height: 82px;
  margin: 3px auto 2px;
}

.tg-command-office .tg-command-layout > .tg-command-column > .tg-command-panel:first-child > .tg-donut::before {
  inset: 12px;
}

.tg-command-office .tg-command-layout > .tg-command-column > .tg-command-panel:first-child > .tg-donut-legend {
  align-content: center;
  gap: 2px;
  padding: 2px 7px 2px 0;
}

.tg-command-office .tg-command-layout > .tg-command-column > .tg-command-panel:first-child > .tg-department-mini {
  gap: 2px;
  padding: 3px 9px 6px;
}

.tg-command-office .tg-command-layout > .tg-command-column > .tg-command-panel:first-child > .tg-department-mini > div {
  grid-template-columns: 76px minmax(0, 1fr) 24px;
}

.tg-command-rnd .tg-command-layout > .tg-command-column {
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr);
}

.tg-rnd-stages {
  gap: 2px;
  padding: 2px 8px 4px;
}

.tg-command-rnd .tg-rnd-resource-panel .tg-module-mini-grid {
  gap: 4px;
  padding: 4px 8px 5px;
}

.tg-command-rnd .tg-rnd-resource-panel .tg-module-mini-grid > div {
  padding: 2px 5px;
}

.tg-command-rnd .tg-rnd-resource-panel .tg-module-mini-grid small { display: none; }

.tg-finance-mini-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  padding: 5px 8px 6px;
}

.tg-finance-mini-grid > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0 7px;
  min-height: 33px;
  padding: 3px 7px;
}

.tg-finance-mini-grid span {
  grid-row: 1;
  grid-column: 1;
  color: #92b3bf;
}

.tg-finance-mini-grid b {
  grid-row: 1 / 3;
  grid-column: 2;
  align-self: center;
  margin: 0;
  color: #effcff;
  font-size: 18px;
  line-height: 1;
  white-space: nowrap;
}

.tg-finance-mini-grid small {
  grid-row: 2;
  grid-column: 1;
  margin: 1px 0 0;
  color: #809faa;
  font-size: 11px;
  line-height: 1;
}

.tg-command-manufacturing .tg-command-layout > .tg-command-column > .tg-command-panel:first-child {
  overflow-y: auto;
  scrollbar-color: rgba(74, 193, 215, .48) transparent;
  scrollbar-width: thin;
}

.tg-command-manufacturing .tg-command-layout > .tg-command-column > .tg-command-panel:first-child::-webkit-scrollbar {
  width: 5px;
}

.tg-command-manufacturing .tg-command-layout > .tg-command-column > .tg-command-panel:first-child::-webkit-scrollbar-thumb {
  border-radius: 5px;
  background: rgba(74, 193, 215, .48);
}

.tg-command-finance .tg-finance-flow-panel .tg-digital-scene {
  min-height: 0;
}

.tg-command-manufacturing .tg-command-load-list {
  padding: 3px 10px 5px;
}

.tg-command-manufacturing .tg-command-load-row {
  gap: 2px 6px;
  padding: 4px 0;
}

.tg-command-manufacturing .tg-command-table td {
  padding: 1px 6px;
}

.tg-command-office .tg-command-layout > .tg-command-column > .tg-command-panel:nth-child(2) .tg-command-risk-list > div {
  gap: 0 5px;
  padding: 1px 0;
}

.tg-command-office .tg-command-layout > .tg-command-column > .tg-command-panel:nth-child(2) .tg-command-risk-list b {
  line-height: 1.1;
}

.tg-command-office .tg-command-layout > .tg-command-column > .tg-command-panel:nth-child(2) .tg-command-risk-list small {
  line-height: 1.15;
}

.tg-rnd-stages {
  gap: 1px;
  padding: 1px 7px 2px;
}

.tg-command-rnd .tg-rnd-resource-panel .tg-module-mini-grid {
  gap: 3px;
  padding: 2px 7px 3px;
}

.tg-quality-risk-compact .tg-compact-quality {
  padding: 0 4px 1px;
}

.tg-command-manufacturing .tg-command-load-row b {
  line-height: 1.2;
}

.tg-command-manufacturing .tg-command-load-row span {
  margin-top: 0;
  line-height: 1.3;
}

.tg-command-manufacturing .tg-command-load-bar {
  margin-top: 3px;
}

.tg-command-manufacturing .tg-material-grid span {
  min-height: 2.7em;
  line-height: 1.35;
}

.tg-command-manufacturing .tg-material-grid b {
  align-self: center;
  line-height: 1.05;
  font-size: clamp(18px, 1.2vw, 22px);
}

.tg-command-manufacturing .tg-material-grid em {
  align-self: center;
  line-height: 1.2;
}

.tg-command-manufacturing .tg-material-grid small {
  margin-top: 1px;
  line-height: 1.3;
}

.tg-command-manufacturing .tg-workshop-link b {
  overflow: hidden;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}

.tg-command-manufacturing .tg-workshop-link i {
  width: 1px;
  height: 12px;
  flex: 0 0 12px;
  margin: 0 auto;
  background: linear-gradient(180deg, #1c7184, #4cd9eb);
}

.tg-command-manufacturing .tg-workshop-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
}

.tg-command-manufacturing .tg-workshop-link > span {
  min-width: 0;
}

.tg-workshop-equipment-queue {
  min-height: 0;
  margin: 0 9px 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(71, 146, 167, .16);
}

.tg-workshop-equipment-queue > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
  color: #8cafba;
  font-size: var(--tg-read-xs);
}

.tg-workshop-equipment-queue > header em {
  color: #6f9aa8;
  font-size: 11px;
  font-style: normal;
}

.tg-workshop-equipment-queue > div {
  display: grid;
}

.tg-workshop-equipment-row {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 3px 0;
  border: 0;
  border-bottom: 1px solid rgba(58, 122, 141, .12);
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.tg-workshop-equipment-row:last-child { border-bottom: 0; }
.tg-workshop-equipment-row:hover,
.tg-workshop-equipment-row.is-active { background: rgba(67, 181, 202, .07); }
.tg-workshop-equipment-row > i { width: 6px; height: 6px; border-radius: 50%; background: var(--cmd-green); box-shadow: 0 0 7px var(--cmd-green); }
.tg-workshop-equipment-row > i.warning { background: var(--cmd-gold); box-shadow: 0 0 7px var(--cmd-gold); }
.tg-workshop-equipment-row > i.danger { background: var(--cmd-red); box-shadow: 0 0 7px var(--cmd-red); }
.tg-workshop-equipment-row > span { min-width: 0; }
.tg-workshop-equipment-row b { display: block; min-width: 0; overflow: hidden; color: #cae3ea; font-size: var(--tg-read-sm); line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.tg-workshop-equipment-row small { display: none; }
.tg-workshop-equipment-row em { color: #79d6e4; font-size: var(--tg-read-sm); font-style: normal; }

.tg-command-manufacturing .tg-workshop-detail {
  display: flex;
  min-height: 0;
  flex-direction: column;
}

@keyframes tg-command-card-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes tg-command-scan { 0% { left: -45%; } 60%, 100% { left: 125%; } }
@keyframes tg-command-pulse { 0%, 100% { opacity: .55; transform: scale(.82); } 50% { opacity: 1; transform: scale(1.2); } }
@keyframes tg-command-pulse-text { 0%, 100% { opacity: .68; } 50% { opacity: 1; } }
@keyframes tg-command-bar { from { filter: brightness(.86); } to { filter: brightness(1.25); } }
@keyframes tg-command-conveyor { from { transform: translateX(-42%); } to { transform: translateX(42%); } }
@keyframes tg-command-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes tg-command-scan-y { 0% { background-position: 0 -120%; } 100% { background-position: 0 220%; } }
@keyframes tg-command-flow-line { from { opacity: .35; transform: scaleX(.72); } to { opacity: 1; transform: scaleX(1); } }
@keyframes tg-command-dash { to { stroke-dashoffset: -60; } }
@keyframes tg-command-ring { 0%, 100% { filter: drop-shadow(0 0 4px rgba(53, 210, 233, .18)); } 50% { filter: drop-shadow(0 0 12px rgba(53, 210, 233, .44)); } }
@keyframes tg-command-spin { to { transform: rotate(360deg); } }
@keyframes tg-command-heat { 0%, 100% { filter: brightness(.86); } 50% { filter: brightness(1.45); } }

/* Assistants dock beside the cockpit. Reflow the whole page instead of clipping it. */
.tg-enterprise-cockpit.has-assistant .tg-command-shell {
  --tg-read-xs: 10px;
  --tg-read-sm: 11px;
  --tg-read-md: 12px;
  --tg-read-lg: 15px;
  --tg-read-value: 25px;
  padding: 6px 7px 8px;
}

.tg-enterprise-cockpit.has-assistant .tg-cockpit-surface {
  overflow: hidden;
}

.tg-enterprise-cockpit.has-assistant .tg-command-kpi-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.tg-enterprise-cockpit.has-assistant .tg-command-kpi {
  min-height: 76px;
  padding: 7px 9px;
}

.tg-enterprise-cockpit.has-assistant .tg-command-title h1 {
  font-size: clamp(20px, 1.6vw, 26px);
}

.tg-enterprise-cockpit.has-assistant .tg-command-layout {
  grid-template-columns: minmax(116px, .68fr) minmax(0, 1.58fr) minmax(124px, .74fr);
  gap: 6px;
}

.tg-enterprise-cockpit.has-assistant .tg-command-column {
  min-width: 0;
}

.tg-enterprise-cockpit.has-assistant .tg-command-bottom {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  flex-basis: clamp(150px, 18vh, 176px);
  gap: 6px;
}

.tg-enterprise-cockpit.has-assistant .tg-command-panel > header {
  min-height: 38px;
  padding: 3px 7px;
}

.tg-enterprise-cockpit.has-assistant .tg-command-panel > header h2 {
  font-size: clamp(13px, .92vw, 16px);
  white-space: nowrap;
}

.tg-enterprise-cockpit.has-assistant .tg-command-panel > header span {
  font-size: 9px;
}

.tg-enterprise-cockpit.has-assistant .tg-command-table td {
  padding-left: 4px;
  padding-right: 4px;
}

.tg-enterprise-cockpit.has-assistant .tg-command-load-row,
.tg-enterprise-cockpit.has-assistant .tg-office-queue-row,
.tg-enterprise-cockpit.has-assistant .tg-command-risk-list > div {
  min-width: 0;
}

.tg-enterprise-cockpit.has-assistant .tg-command-load-row span,
.tg-enterprise-cockpit.has-assistant .tg-office-queue-row small,
.tg-enterprise-cockpit.has-assistant .tg-command-risk-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@container (max-width: 700px) {
  .tg-enterprise-cockpit.has-assistant .tg-command-shell {
    overflow-y: auto;
    height: 100%;
    min-height: 100%;
  }

  .tg-enterprise-cockpit.has-assistant .tg-command-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tg-enterprise-cockpit.has-assistant .tg-command-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto;
    flex: none;
    overflow: visible;
  }

  .tg-enterprise-cockpit.has-assistant .tg-command-layout > .tg-command-panel {
    grid-column: 1 / -1;
    min-height: 310px;
  }

  .tg-enterprise-cockpit.has-assistant .tg-command-column {
    min-height: 300px;
  }

  .tg-enterprise-cockpit.has-assistant .tg-command-bottom {
    grid-template-columns: minmax(0, 1fr);
    flex: none;
    margin-top: 6px;
  }

  .tg-enterprise-cockpit.has-assistant .tg-command-bottom > .tg-command-panel {
    min-height: 150px;
  }

  .tg-enterprise-cockpit.has-assistant .tg-workshop-3d,
  .tg-enterprise-cockpit.has-assistant .tg-digital-scene {
    min-height: 255px;
  }
}

@container (max-width: 1100px) {
  .tg-command-shell {
    overflow: hidden;
  }

  .tg-command-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .tg-command-kpi {
    min-height: 82px;
  }

  .tg-command-layout,
  .tg-command-manufacturing .tg-command-layout,
  .tg-command-office .tg-command-layout,
  .tg-command-rnd .tg-command-layout,
  .tg-command-finance .tg-command-layout {
    display: grid;
    grid-template-columns: minmax(128px, .72fr) minmax(280px, 1.55fr) minmax(176px, .9fr);
    grid-template-rows: minmax(0, 1fr);
    flex: 1 1 auto;
    overflow: hidden;
    gap: 6px;
  }

  .tg-command-layout > .tg-command-panel {
    grid-column: auto;
    min-height: 0;
  }

  .tg-command-layout > .tg-command-column {
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
  }

  .tg-command-bottom,
  .tg-command-manufacturing .tg-command-bottom {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr);
    flex: 0 0 clamp(178px, 21vh, 202px);
    margin-top: 4px;
    gap: 6px;
  }

  .tg-workshop-detail-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .tg-workshop-3d,
  .tg-digital-scene {
    min-height: 0;
  }

  .tg-workshop-detail-grid span,
  .tg-workshop-detail-grid b {
    min-width: 0;
  }

  .tg-workshop-detail-grid b {
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .tg-office-layout > .tg-command-panel:first-child,
  .tg-office-layout > .tg-command-column {
    min-width: 0;
  }
}

/* Office flow status: keep the donut, legend and department list in separate rows. */
.tg-command-office .tg-command-layout > .tg-command-column:last-of-type > .tg-command-panel:first-child {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  align-content: start;
  gap: 7px 10px;
  min-height: 260px;
  padding-bottom: 10px;
}

.tg-command-office .tg-command-layout > .tg-command-column:last-of-type > .tg-command-panel:first-child > header {
  grid-column: 1 / -1;
  grid-row: 1;
}

.tg-command-office .tg-command-layout > .tg-command-column:last-of-type > .tg-command-panel:first-child > .tg-donut {
  grid-column: 1;
  grid-row: 2;
  align-self: center;
  width: 88px;
  height: 88px;
  margin: 2px auto;
}

.tg-command-office .tg-command-layout > .tg-command-column:last-of-type > .tg-command-panel:first-child > .tg-donut-legend {
  grid-column: 2;
  grid-row: 2;
  align-content: center;
  padding: 0 4px 0 0;
}

.tg-command-office .tg-command-layout > .tg-command-column:last-of-type > .tg-command-panel:first-child > .tg-department-mini {
  grid-column: 1 / -1;
  grid-row: 3;
  position: relative;
  z-index: 1;
  margin: 0 8px;
  padding: 5px 2px 0;
  border-top: 1px solid rgba(76, 151, 171, .16);
}

.tg-command-office .tg-command-layout > .tg-command-column:last-of-type > .tg-command-panel:first-child > .tg-department-mini > div {
  grid-template-columns: minmax(82px, 1fr) minmax(42px, .9fr) 24px;
}

/* Finance payment signal: reserve enough height for the invoice-count caption. */
.tg-command-finance .tg-command-bottom > .tg-command-panel:last-child {
  min-height: 190px;
}

.tg-command-finance .tg-payment-intelligence {
  height: auto;
  min-height: 148px;
  grid-template-columns: minmax(104px, .78fr) minmax(0, 1.18fr) minmax(0, 1fr);
  align-items: stretch;
}

.tg-command-finance .tg-payment-total {
  position: relative;
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto auto;
  place-content: center;
  align-items: end;
  column-gap: 5px;
  row-gap: 5px;
  min-height: 0;
  padding: 12px 8px;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(circle at 50% 52%, rgba(67, 222, 187, .12) 0 35%, transparent 36%),
    rgba(7, 33, 49, .58);
}

.tg-command-finance .tg-payment-total::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 82px;
  height: 82px;
  border: 1px solid rgba(77, 218, 191, .27);
  border-radius: 50%;
  box-shadow: 0 0 24px rgba(62, 210, 183, .12) inset;
  transform: translate(-50%, -50%);
}

.tg-command-finance .tg-payment-total > * {
  position: relative;
  z-index: 1;
}

.tg-command-finance .tg-payment-total > span {
  grid-column: 1 / -1;
  grid-row: 1;
  white-space: nowrap;
}

.tg-command-finance .tg-payment-total > b {
  grid-column: 1;
  grid-row: 2;
  margin: 0;
  justify-self: end;
  line-height: 1;
}

.tg-command-finance .tg-payment-total > em {
  grid-column: 2;
  grid-row: 2;
  justify-self: start;
  margin: 0;
  line-height: 1.2;
}

.tg-command-finance .tg-payment-total small {
  grid-column: 1 / -1;
  grid-row: 3;
  display: block;
  margin-top: 3px;
  padding-top: 0;
  line-height: 1.4;
  text-align: center;
  overflow-wrap: anywhere;
  white-space: normal;
}

.tg-command-finance .tg-payment-due-list {
  min-height: 0;
  overflow-y: auto;
}

.tg-command-office .tg-command-layout > .tg-command-column:last-of-type {
  grid-template-rows: minmax(250px, 1.3fr) minmax(112px, .7fr);
  overflow: hidden;
}

.tg-command-office .tg-command-layout > .tg-command-column:last-of-type > .tg-command-panel {
  min-height: 0;
}

.tg-command-office .tg-command-layout > .tg-command-column:last-of-type .tg-command-risk-list {
  min-height: 0;
  overflow-y: auto;
}

@container (max-width: 1100px) {
  .tg-office-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tg-office-mini-grid > div {
    min-width: 0;
  }

  .tg-office-mini-grid span,
  .tg-office-mini-grid b,
  .tg-office-mini-grid small {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .tg-command-manufacturing .tg-command-bottom .tg-command-panel:last-child {
    min-height: 0;
    overflow-y: auto;
  }

  .tg-command-manufacturing .tg-command-bottom .tg-command-table td {
    height: auto;
    min-height: 27px;
    padding: 4px 5px;
    line-height: 1.25;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .tg-command-manufacturing .tg-command-bottom .tg-command-table b,
  .tg-command-manufacturing .tg-command-bottom .tg-command-table small {
    display: block;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .tg-command-manufacturing .tg-command-bottom .tg-command-table small::before {
    content: "";
  }

  .tg-invoice-list > div {
    grid-template-columns: auto minmax(112px, auto) minmax(0, 1fr) auto;
  }

  .tg-invoice-list b {
    overflow: visible;
    text-overflow: clip;
  }

  .tg-overview-alerts .tg-command-risk-list {
    min-height: 0;
    overflow-y: auto;
  }

  .tg-overview-alerts .tg-command-risk-list b {
    overflow: visible;
    line-height: 1.25;
    text-overflow: clip;
    white-space: normal;
  }

  .tg-command-rnd .tg-rnd-launch b {
    overflow: visible;
    line-height: 1.25;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
  }

  .tg-command-rnd .tg-rnd-launch span {
    min-width: 0;
  }
}

.tg-command-rnd .tg-command-layout > .tg-command-column:first-of-type {
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.tg-command-rnd .tg-command-bottom {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tg-command-rnd .tg-command-bottom > .tg-command-panel {
  min-width: 0;
  overflow: hidden;
}

.tg-command-rnd .tg-rnd-resource-panel .tg-module-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 4px;
  padding: 5px 7px;
}

.tg-command-rnd .tg-rnd-resource-panel .tg-module-mini-grid > div {
  min-width: 0;
  padding: 4px 5px;
}

.tg-command-rnd .tg-rnd-resource-panel .tg-module-mini-grid span,
.tg-command-rnd .tg-rnd-resource-panel .tg-module-mini-grid small {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.tg-command-rnd .tg-command-bottom .tg-budget-pulse {
  gap: 3px;
  padding: 5px 8px;
}

.tg-command-rnd .tg-command-bottom .tg-budget-pulse > div {
  grid-template-columns: minmax(100px, 1fr) minmax(52px, .9fr) 42px;
  min-height: 24px;
}

.tg-command-rnd .tg-command-bottom .tg-budget-pulse span {
  overflow: visible;
  line-height: 1.2;
  text-overflow: clip;
  white-space: normal;
}

/* Horizontal modules keep a readable minimum width and scroll when docked beside the assistant. */
.tg-command-finance .tg-invoice-list {
  overflow-x: scroll;
  overflow-y: hidden;
  padding-bottom: 12px;
  scrollbar-gutter: stable;
  scrollbar-color: rgba(81, 195, 214, .68) rgba(5, 27, 42, .72);
  scrollbar-width: thin;
}

.tg-command-finance .tg-invoice-list::-webkit-scrollbar {
  height: 9px;
}

.tg-command-finance .tg-invoice-list::-webkit-scrollbar-thumb {
  border-radius: 6px;
  background: rgba(81, 195, 214, .68);
}

.tg-command-finance .tg-invoice-list > div {
  grid-template-columns: 70px 130px minmax(250px, 1fr) 62px;
  min-width: 560px;
  gap: 9px;
}

.tg-command-finance .tg-invoice-list b {
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.tg-command-finance .tg-invoice-list small {
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.tg-overview-alerts .tg-command-risk-list {
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 1fr);
  grid-template-columns: none;
  overflow-x: scroll;
  overflow-y: hidden;
  padding-bottom: 12px;
  scrollbar-gutter: stable;
  scrollbar-color: rgba(81, 195, 214, .68) rgba(5, 27, 42, .72);
  scrollbar-width: thin;
}

.tg-overview-alerts .tg-command-risk-list::-webkit-scrollbar {
  height: 9px;
}

.tg-overview-alerts .tg-command-risk-list::-webkit-scrollbar-thumb {
  border-radius: 6px;
  background: rgba(81, 195, 214, .68);
}

.tg-overview-alerts .tg-command-risk-list > div {
  min-width: 230px;
}

.tg-overview-alerts .tg-command-risk-list b,
.tg-overview-alerts .tg-command-risk-list small {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

/* Balanced payment summary card. */
.tg-command-finance .tg-payment-intelligence {
  height: calc(100% - 45px);
  max-height: calc(100% - 45px);
  grid-template-columns: minmax(128px, .82fr) minmax(0, 1.2fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.tg-command-finance .tg-payment-total {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 9px 8px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(43, 174, 163, .08), transparent 58%),
    rgba(7, 33, 49, .58);
}

.tg-command-finance .tg-payment-total::before {
  top: 0;
  left: 14px;
  width: 44px;
  height: 2px;
  border: 0;
  border-radius: 2px;
  background: linear-gradient(90deg, #33c7dc, #5ee2bd);
  box-shadow: 0 0 12px rgba(74, 218, 196, .35);
  transform: none;
}

.tg-command-finance .tg-payment-total > span {
  width: 100%;
  color: #8eb8c1;
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
}

.tg-command-finance .tg-payment-value {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  min-height: 38px;
}

.tg-command-finance .tg-payment-value b {
  color: #5ee2bd;
  font-family: "Bahnschrift", "Microsoft YaHei UI", sans-serif;
  font-size: 34px;
  line-height: 1;
  text-shadow: 0 0 16px rgba(57, 218, 187, .16);
}

.tg-command-finance .tg-payment-value em {
  color: #82a5ad;
  font-size: 11px;
  font-style: normal;
}

.tg-command-finance .tg-payment-total small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  margin: 0;
  padding: 2px 8px;
  border: 1px solid rgba(79, 158, 172, .2);
  border-radius: 999px;
  color: #8eafb8;
  background: rgba(12, 53, 70, .58);
  font-size: 10px;
  line-height: 1.2;
  white-space: normal;
}

/* Keep the dashboard flush with the normal shell padding; the assistant trigger floats above the edge. */
.tg-enterprise-cockpit:not(.has-assistant) .tg-command-shell {
  padding-right: 10px;
}

.tg-command-shell,
.tg-command-layout,
.tg-command-column,
.tg-command-panel,
.tg-command-head,
.tg-command-bottom {
  min-width: 0;
}

.tg-command-panel {
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-color: rgba(81, 195, 214, .68) rgba(5, 27, 42, .72);
  scrollbar-width: thin;
  overscroll-behavior: contain;
}

.tg-command-panel::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.tg-command-panel::-webkit-scrollbar-track {
  background: rgba(5, 27, 42, .72);
}

.tg-command-panel::-webkit-scrollbar-thumb {
  border: 1px solid rgba(5, 27, 42, .72);
  border-radius: 6px;
  background: rgba(81, 195, 214, .68);
}

.tg-command-panel > header {
  position: sticky;
  z-index: 3;
  top: 0;
  background: linear-gradient(180deg, rgba(7, 34, 52, .98), rgba(7, 34, 52, .92));
}

.tg-command-table-wrap {
  min-width: 0;
  overflow: hidden;
}

.tg-command-table {
  table-layout: fixed;
}

.tg-workshop-3d:fullscreen .tg-scene-stats,
.tg-digital-scene:fullscreen .tg-scene-stats,
.tg-workshop-3d.is-scene-presentation .tg-scene-stats,
.tg-digital-scene.is-scene-presentation .tg-scene-stats {
  top: 54px;
  right: 14px;
  max-width: min(430px, 48vw);
}

.tg-workshop-3d:fullscreen .tg-workshop-hint,
.tg-digital-scene:fullscreen .tg-scene-hint,
.tg-workshop-3d.is-scene-presentation .tg-workshop-hint,
.tg-digital-scene.is-scene-presentation .tg-scene-hint {
  right: 14px;
  bottom: 14px;
}
@keyframes tg-command-ripple { 0% { opacity: .85; transform: translate(-50%, -50%) scale(.55); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.35); } }

@media (prefers-reduced-motion: reduce) {
  .tg-command-shell *,
  .tg-cockpit-assistant * {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Flow status cards replace the four generic progress bars. */
.tg-workflow-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 7px 9px 9px;
}

.tg-workflow-status-card {
  --flow-tone: #46d8e8;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  grid-template-rows: auto 4px;
  gap: 5px 8px;
  min-width: 0;
  padding: 7px 9px 7px;
  overflow: hidden;
  border: 1px solid rgba(78, 158, 181, .18);
  border-radius: 7px;
  background:
    linear-gradient(110deg, color-mix(in srgb, var(--flow-tone) 10%, transparent), transparent 34%),
    rgba(5, 28, 43, .72);
  box-shadow: inset 0 1px rgba(151, 230, 242, .045);
}

.tg-workflow-status-card.tone-1 { --flow-tone: #6e8ff1; }
.tg-workflow-status-card.tone-2 { --flow-tone: #e0b25a; }
.tg-workflow-status-card.tone-3 { --flow-tone: #48c7a7; }

.tg-workflow-status-index {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  align-self: center;
  width: 28px;
  height: 28px;
  border: 1px solid color-mix(in srgb, var(--flow-tone) 40%, transparent);
  border-radius: 6px;
  color: var(--flow-tone);
  background: color-mix(in srgb, var(--flow-tone) 9%, rgba(5, 24, 37, .82));
  font-family: "Bahnschrift", "Microsoft YaHei UI", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
}

.tg-workflow-status-copy {
  min-width: 0;
}

.tg-workflow-status-copy b {
  display: block;
  overflow: hidden;
  color: #dceff4;
  font-size: var(--tg-read-sm, 12px);
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tg-workflow-status-copy small {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: #7197a5;
  font-size: var(--tg-read-xs, 10px);
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tg-workflow-status-card > strong {
  display: flex;
  align-items: baseline;
  gap: 3px;
  color: var(--flow-tone);
  font-family: "Bahnschrift", "Microsoft YaHei UI", sans-serif;
  font-size: clamp(17px, 1.12vw, 22px);
  line-height: 1;
}

.tg-workflow-status-card > strong small {
  color: #789aa7;
  font-family: "Microsoft YaHei UI", sans-serif;
  font-size: 9px;
  font-weight: 500;
  white-space: nowrap;
}

.tg-workflow-status-meter {
  grid-column: 2 / 4;
  display: block;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(58, 105, 122, .25);
}

.tg-workflow-status-meter em {
  display: block;
  width: var(--w);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--flow-tone) 58%, #3a6e93), var(--flow-tone));
  box-shadow: 0 0 10px color-mix(in srgb, var(--flow-tone) 45%, transparent);
  animation: tg-command-bar 2.4s ease-in-out infinite alternate;
}

/* Quality uses a linear KPI block so labels can never collide with a ring. */
.tg-quality-risk-compact .tg-compact-quality {
  grid-template-columns: minmax(118px, .78fr) minmax(0, 1.22fr);
  gap: 9px;
}

.tg-quality-linear {
  --value: 98;
  display: grid;
  grid-template-rows: auto auto auto auto;
  align-content: center;
  gap: 4px;
  min-width: 0;
  height: calc(100% - 12px);
  margin: 5px 0;
  padding: 7px 9px;
  overflow: hidden;
  border: 1px solid rgba(66, 204, 218, .2);
  border-radius: 7px;
  background:
    linear-gradient(120deg, rgba(46, 206, 222, .11), transparent 44%),
    rgba(6, 30, 45, .74);
}

.tg-quality-linear > span {
  overflow: hidden;
  color: #86a9b5;
  font-size: var(--tg-read-xs, 10px);
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tg-quality-linear > b {
  display: flex;
  align-items: baseline;
  gap: 2px;
  color: #f2fdff;
  font-family: "Bahnschrift", "Microsoft YaHei UI", sans-serif;
  font-size: clamp(25px, 1.6vw, 32px);
  line-height: .95;
  letter-spacing: -.02em;
}

.tg-quality-linear > b small {
  color: #6bdce7;
  font-size: 12px;
  font-weight: 600;
}

.tg-quality-linear-track {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(66, 121, 139, .23);
}

.tg-quality-linear-track em {
  display: block;
  width: calc(var(--value) * 1%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #228fa7, #4ce1e9);
  box-shadow: 0 0 12px rgba(68, 222, 232, .36);
  animation: tg-command-bar 2.5s ease-in-out infinite alternate;
}

.tg-quality-linear > small {
  overflow: hidden;
  color: #6e929f;
  font-size: 9px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Keep reminder cards inside their own bounds and expose a clear horizontal scrollbar. */
html body .tg-enterprise-cockpit.has-assistant .tg-overview-alerts .tg-command-risk-list,
html body .tg-enterprise-cockpit .tg-overview-alerts .tg-command-risk-list {
  grid-auto-columns: minmax(250px, 290px);
  gap: 8px;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 10px 14px;
  scrollbar-color: rgba(81, 195, 214, .82) rgba(5, 27, 42, .78);
  scrollbar-width: thin;
}

html body .tg-enterprise-cockpit.has-assistant .tg-overview-alerts .tg-command-risk-list::-webkit-scrollbar,
html body .tg-enterprise-cockpit .tg-overview-alerts .tg-command-risk-list::-webkit-scrollbar {
  height: 10px;
}

html body .tg-enterprise-cockpit.has-assistant .tg-overview-alerts .tg-command-risk-list::-webkit-scrollbar-thumb,
html body .tg-enterprise-cockpit .tg-overview-alerts .tg-command-risk-list::-webkit-scrollbar-thumb {
  border: 2px solid rgba(5, 27, 42, .8);
  border-radius: 999px;
  background: rgba(81, 195, 214, .82);
}

html body .tg-enterprise-cockpit.has-assistant .tg-overview-alerts .tg-command-risk-list > div,
html body .tg-enterprise-cockpit .tg-overview-alerts .tg-command-risk-list > div {
  min-width: 250px;
  align-content: start;
  padding: 7px 8px;
  overflow: hidden;
}

html body .tg-enterprise-cockpit.has-assistant .tg-overview-alerts .tg-command-risk-list > div > span,
html body .tg-enterprise-cockpit .tg-overview-alerts .tg-command-risk-list > div > span {
  min-width: 0;
  overflow: hidden;
}

html body .tg-enterprise-cockpit.has-assistant .tg-overview-alerts .tg-command-risk-list b,
html body .tg-enterprise-cockpit.has-assistant .tg-overview-alerts .tg-command-risk-list small,
html body .tg-enterprise-cockpit .tg-overview-alerts .tg-command-risk-list b,
html body .tg-enterprise-cockpit .tg-overview-alerts .tg-command-risk-list small {
  max-width: 100%;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

html body .tg-enterprise-cockpit.has-assistant .tg-overview-alerts .tg-command-risk-list small,
html body .tg-enterprise-cockpit .tg-overview-alerts .tg-command-risk-list small {
  line-height: 1.3;
}

/* Trial-delivery cards grow or wrap instead of truncating MES work-order IDs. */
html body .tg-enterprise-cockpit .tg-command-rnd .tg-rnd-launch {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  align-content: start;
  gap: 7px;
  padding: 9px 10px 10px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-color: rgba(81, 195, 214, .68) rgba(5, 27, 42, .72);
  scrollbar-width: thin;
}

html body .tg-enterprise-cockpit .tg-command-rnd .tg-rnd-launch > span {
  min-width: 0;
  min-height: 62px;
  padding: 8px 9px;
  overflow: hidden;
}

html body .tg-enterprise-cockpit .tg-command-rnd .tg-rnd-launch b {
  max-width: 100%;
  overflow: visible;
  color: #d7edf5;
  font-size: clamp(10px, .72vw, 12px);
  line-height: 1.35;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
  word-break: break-word;
}

html body .tg-enterprise-cockpit .tg-command-rnd .tg-rnd-launch small {
  overflow: visible;
  margin-top: 4px;
  font-size: var(--tg-read-xs, 10px);
  line-height: 1.25;
  text-overflow: clip;
  white-space: normal;
}

/* Manufacturing work-order tracking keeps IDs and products readable. */
html body .tg-command-manufacturing .tg-command-bottom .tg-command-panel:nth-child(2) .tg-command-table td {
  height: auto;
  min-height: 27px;
  overflow: visible;
  line-height: 1.25;
  text-overflow: clip;
  white-space: normal;
}

html body .tg-command-manufacturing .tg-command-bottom .tg-command-panel:nth-child(2) .tg-command-table td:first-child {
  width: 45%;
}

html body .tg-command-manufacturing .tg-command-bottom .tg-command-panel:nth-child(2) .tg-command-table b,
html body .tg-command-manufacturing .tg-command-bottom .tg-command-panel:nth-child(2) .tg-command-table small {
  display: block;
  overflow: visible;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

html body .tg-command-manufacturing .tg-command-bottom .tg-command-panel:nth-child(2) .tg-command-table small::before {
  content: "";
}

.tg-command-title h1[tabindex="-1"]:focus {
  outline: none;
}

/* When the assistant opens on a 1280x720-class screen, keep the cockpit to one screen. */
@container (max-width: 700px) {
  .tg-enterprise-cockpit.has-assistant .tg-command-shell {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    padding: 5px 6px 6px;
  }

  .tg-enterprise-cockpit.has-assistant .tg-command-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  .tg-enterprise-cockpit.has-assistant .tg-command-kpi {
    min-height: 64px;
    padding: 5px 6px;
  }

  .tg-enterprise-cockpit.has-assistant .tg-command-kpi-value {
    margin-top: 4px;
  }

  .tg-enterprise-cockpit.has-assistant .tg-command-kpi-value b {
    font-size: clamp(18px, 4vw, 24px);
  }

  .tg-enterprise-cockpit.has-assistant .tg-command-kpi > span {
    font-size: 8px;
  }

  .tg-enterprise-cockpit.has-assistant .tg-command-kpi small {
    margin-top: 2px;
  }

  .tg-enterprise-cockpit.has-assistant .tg-command-layout,
  .tg-enterprise-cockpit.has-assistant .tg-command-manufacturing .tg-command-layout,
  .tg-enterprise-cockpit.has-assistant .tg-command-office .tg-command-layout,
  .tg-enterprise-cockpit.has-assistant .tg-command-rnd .tg-command-layout,
  .tg-enterprise-cockpit.has-assistant .tg-command-finance .tg-command-layout {
    display: grid;
    grid-template-columns: minmax(104px, .7fr) minmax(0, 1.65fr) minmax(108px, .75fr);
    grid-template-rows: minmax(0, 1fr);
    flex: 1 1 auto;
    gap: 5px;
    min-height: 0;
    overflow: hidden;
  }

  .tg-enterprise-cockpit.has-assistant .tg-command-layout > .tg-command-panel {
    grid-column: auto;
    min-height: 0;
  }

  .tg-enterprise-cockpit.has-assistant .tg-command-column {
    min-height: 0;
    overflow: hidden;
  }

  .tg-enterprise-cockpit.has-assistant .tg-command-bottom {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    flex: 0 0 142px;
    gap: 5px;
    margin-top: 5px;
  }

  .tg-enterprise-cockpit.has-assistant .tg-command-manufacturing .tg-command-bottom,
  .tg-enterprise-cockpit.has-assistant .tg-command-rnd .tg-command-bottom {
    grid-template-columns: minmax(0, .82fr) minmax(0, 1.2fr) minmax(0, .88fr);
  }

  .tg-enterprise-cockpit.has-assistant .tg-command-bottom > .tg-command-panel {
    min-height: 0;
  }

  .tg-enterprise-cockpit.has-assistant .tg-workshop-3d,
  .tg-enterprise-cockpit.has-assistant .tg-digital-scene {
    min-height: 0;
  }
}

/* Refined assistant workspace */
.tg-cockpit-assistant .tg-assistant-drawer {
  top: 8px;
  right: 8px;
  bottom: 8px;
  border: 1px solid rgba(93, 190, 211, .3);
  border-radius: 18px;
  background:
    radial-gradient(circle at 82% -8%, rgba(51, 210, 226, .2), transparent 34%),
    radial-gradient(circle at -8% 92%, rgba(88, 108, 204, .13), transparent 34%),
    linear-gradient(165deg, rgba(8, 35, 52, .985), rgba(4, 21, 34, .995));
  box-shadow: -28px 12px 80px rgba(0, 5, 13, .58), inset 0 1px rgba(160, 232, 241, .08);
  backdrop-filter: blur(18px);
}

.tg-cockpit-assistant .tg-assistant-drawer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 28px;
  right: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(89, 224, 237, .52), transparent);
  pointer-events: none;
}

.tg-cockpit-assistant .tg-assistant-resizer::after {
  left: 3px;
  width: 2px;
  height: 62px;
  background: rgba(100, 216, 231, .46);
}

.tg-cockpit-assistant .tg-assistant-head {
  gap: 11px;
  min-height: 76px;
  padding: 14px 15px 12px;
  border-bottom: 1px solid rgba(83, 165, 185, .16);
  background: linear-gradient(180deg, rgba(12, 49, 69, .82), rgba(7, 33, 49, .62));
}

.tg-cockpit-assistant .tg-assistant-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(116, 229, 241, .42);
  border-radius: 12px;
  background:
    radial-gradient(circle at 28% 20%, rgba(130, 242, 250, .72), transparent 20%),
    linear-gradient(145deg, #19647d, #0b2c47);
  box-shadow: 0 8px 22px rgba(0, 12, 23, .28), inset 0 1px rgba(223, 252, 255, .13);
}

.tg-cockpit-assistant .tg-assistant-avatar::after {
  content: "";
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 9px;
  height: 9px;
  border: 2px solid #0a2b40;
  border-radius: 50%;
  background: #4be0ad;
  box-shadow: 0 0 9px rgba(75, 224, 173, .68);
}

.tg-cockpit-assistant .tg-assistant-heading {
  display: grid;
  align-content: center;
  min-width: 0;
}

.tg-cockpit-assistant .tg-assistant-heading > span {
  overflow: hidden;
  margin-bottom: 2px;
  color: rgba(91, 216, 232, .72);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .17em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tg-cockpit-assistant .tg-assistant-heading > b {
  overflow: hidden;
  color: #effcff;
  font-size: 14px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tg-cockpit-assistant .tg-assistant-heading > small {
  overflow: hidden;
  margin-top: 3px;
  color: #759baa;
  font-size: 8px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tg-cockpit-assistant .tg-assistant-head-actions {
  align-self: flex-start;
}

.tg-cockpit-assistant .tg-assistant-head-actions button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(89, 166, 184, .18);
  border-radius: 8px;
  background: rgba(9, 39, 56, .48);
  font-size: 17px;
}

.tg-cockpit-assistant .tg-assistant-tools {
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-bottom: 1px solid rgba(75, 146, 166, .13);
  background: rgba(5, 28, 43, .42);
}

.tg-cockpit-assistant .tg-assistant-new {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(85, 172, 191, .22);
  border-radius: 8px;
  color: #bcd6de;
  background: rgba(14, 54, 73, .52);
  font-size: 9px;
}

.tg-cockpit-assistant .tg-assistant-new span {
  color: #59dce9;
  font-size: 14px;
  line-height: 1;
}

.tg-cockpit-assistant .tg-assistant-model-wrap {
  flex: 1;
  gap: 7px;
  min-width: 0;
  justify-content: flex-end;
}

.tg-cockpit-assistant .tg-assistant-model-wrap > span {
  flex: none;
  color: #688e9d;
  font-size: 8px;
}

.tg-cockpit-assistant .tg-assistant-model-select {
  width: 185px;
  max-width: 185px;
  flex: 0 1 185px;
  height: 29px;
  border-color: rgba(80, 170, 190, .24);
  border-radius: 8px;
  color: #bce1e8;
  background: rgba(7, 35, 51, .92);
  font-size: 8.5px;
}

.tg-cockpit-assistant .tg-assistant-body {
  position: relative;
  padding: 13px 14px 16px;
  background:
    radial-gradient(circle at 50% calc(100% + 170px), rgba(57, 184, 204, .09), transparent 42%),
    linear-gradient(rgba(63, 139, 158, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(63, 139, 158, .025) 1px, transparent 1px);
  background-size: auto, 28px 28px, 28px 28px;
  scrollbar-color: rgba(72, 183, 202, .55) transparent;
  scrollbar-width: thin;
}

.tg-cockpit-assistant .tg-assistant-body > * {
  position: relative;
  z-index: 1;
}

.tg-cockpit-assistant [data-assistant-welcome] {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.tg-cockpit-assistant .tg-assistant-welcome-hero {
  position: relative;
  overflow: hidden;
  padding: 17px 16px 15px;
  border: 1px solid rgba(73, 172, 192, .2);
  border-radius: 14px;
  background:
    radial-gradient(circle at 93% 4%, rgba(64, 220, 231, .16), transparent 30%),
    linear-gradient(145deg, rgba(16, 57, 76, .78), rgba(7, 33, 49, .7));
  box-shadow: inset 0 1px rgba(185, 243, 249, .055);
}

.tg-cockpit-assistant .tg-assistant-welcome-hero::after {
  content: "AI";
  position: absolute;
  right: 10px;
  bottom: -18px;
  color: rgba(116, 224, 237, .055);
  font-family: "Bahnschrift", "Microsoft YaHei UI", sans-serif;
  font-size: 76px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.08em;
  pointer-events: none;
}

.tg-cockpit-assistant .tg-assistant-kicker {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #58d7e5;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .14em;
}

.tg-cockpit-assistant .tg-assistant-kicker i,
.tg-cockpit-assistant .tg-assistant-context span:first-child i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4be0ad;
  box-shadow: 0 0 8px rgba(75, 224, 173, .7);
}

.tg-cockpit-assistant .tg-assistant-body h2 {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  color: #f4fdff;
  font-size: 21px;
  line-height: 1.18;
}

.tg-cockpit-assistant .tg-assistant-welcome-hero > p {
  position: relative;
  z-index: 1;
  max-width: 330px;
  margin: 8px 0 0;
  color: #8eb0bb;
  font-size: 9.5px;
  line-height: 1.65;
}

.tg-cockpit-assistant .tg-assistant-context {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 12px;
}

.tg-cockpit-assistant .tg-assistant-context span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border: 1px solid rgba(82, 164, 182, .16);
  border-radius: 999px;
  color: #7ca1ad;
  background: rgba(5, 27, 42, .46);
  font-size: 7px;
}

.tg-cockpit-assistant .tg-assistant-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 15px 1px 8px;
}

.tg-cockpit-assistant .tg-assistant-section-label {
  margin: 0;
  color: #b7d4dc;
  font-size: 9px;
  font-weight: 700;
}

.tg-cockpit-assistant .tg-assistant-section-head > small {
  color: #638594;
  font-size: 7.5px;
}

.tg-cockpit-assistant .tg-assistant-suggestions {
  gap: 7px;
}

.tg-cockpit-assistant .tg-assistant-suggestions button {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 12px;
  align-items: center;
  gap: 7px;
  min-height: 55px;
  padding: 8px 9px;
  border-color: rgba(74, 150, 170, .22);
  border-radius: 10px;
  color: #abccd5;
  background: linear-gradient(145deg, rgba(14, 52, 71, .66), rgba(7, 33, 49, .56));
  font-size: 9px;
  line-height: 1.4;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.tg-cockpit-assistant .tg-assistant-suggestions button > b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(82, 199, 216, .24);
  border-radius: 6px;
  color: #58d6e4;
  background: rgba(6, 36, 53, .65);
  font-family: "Bahnschrift", sans-serif;
  font-size: 7px;
}

.tg-cockpit-assistant .tg-assistant-suggestions button > span {
  min-width: 0;
  text-align: left;
}

.tg-cockpit-assistant .tg-assistant-suggestions button > i {
  color: #5bbdca;
  font-size: 10px;
  font-style: normal;
  opacity: .55;
}

.tg-cockpit-assistant .tg-assistant-suggestions button:hover {
  border-color: rgba(74, 211, 228, .55);
  background: linear-gradient(145deg, rgba(20, 76, 96, .76), rgba(8, 40, 57, .7));
  transform: translateY(-1px);
}

.tg-cockpit-assistant .tg-assistant-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 13px 0 0;
  padding: 9px 10px;
  border: 1px solid rgba(79, 146, 164, .13);
  border-radius: 9px;
  color: #688e9c;
  background: rgba(5, 27, 42, .42);
  font-size: 8px;
  line-height: 1.55;
}

.tg-cockpit-assistant .tg-assistant-note > i {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  flex: none;
  border-radius: 50%;
  color: #e8bd67;
  background: rgba(232, 189, 103, .1);
  font-size: 9px;
  font-style: normal;
}

.tg-cockpit-assistant .tg-assistant-ready {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding: 22px 2px 5px;
  color: #5d8290;
}

.tg-cockpit-assistant .tg-assistant-ready > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(81, 173, 191, .55);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .13em;
}

.tg-cockpit-assistant .tg-assistant-ready > span i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #41cfa0;
  box-shadow: 0 0 8px rgba(65, 207, 160, .6);
}

.tg-cockpit-assistant .tg-assistant-ready > small {
  color: #5f8290;
  font-size: 8px;
}

.tg-cockpit-assistant .tg-assistant-messages {
  gap: 12px;
  margin-top: 0;
}

.tg-cockpit-assistant .tg-assistant-message {
  position: relative;
  padding: 11px 12px;
  border-radius: 11px;
  font-size: 9.5px;
  line-height: 1.7;
}

.tg-cockpit-assistant .tg-assistant-message::before {
  display: block;
  margin-bottom: 5px;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .12em;
}

.tg-cockpit-assistant .tg-assistant-message.user {
  margin-left: 44px;
  color: #dffbff;
  border: 1px solid rgba(70, 194, 213, .22);
  background: linear-gradient(145deg, rgba(24, 100, 120, .42), rgba(12, 57, 76, .38));
}

.tg-cockpit-assistant .tg-assistant-message.user::before {
  content: "YOU";
  color: rgba(103, 222, 235, .6);
}

.tg-cockpit-assistant .tg-assistant-message.assistant {
  margin-right: 12px;
  color: #b5d0d8;
  border: 1px solid rgba(76, 148, 168, .18);
  background: rgba(8, 38, 56, .76);
}

.tg-cockpit-assistant .tg-assistant-message.assistant::before {
  content: "AI COPILOT";
  color: rgba(91, 216, 232, .68);
}

.tg-cockpit-assistant .tg-assistant-compose {
  padding: 10px 13px 12px;
  border-top-color: rgba(76, 151, 171, .14);
  background: linear-gradient(180deg, rgba(7, 29, 44, .9), rgba(5, 23, 37, .98));
}

.tg-cockpit-assistant .tg-assistant-compose-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.tg-cockpit-assistant .tg-assistant-compose-head > b {
  color: #bad8e0;
  font-size: 9px;
}

.tg-cockpit-assistant .tg-assistant-compose-head > span {
  color: #5f8795;
  font-size: 7px;
}

.tg-cockpit-assistant .tg-assistant-input {
  min-height: 82px;
  padding: 11px 50px 11px 12px;
  border-color: rgba(77, 168, 188, .26);
  border-radius: 11px;
  background: rgba(5, 27, 42, .78);
  font-size: 9.5px;
  line-height: 1.55;
}

.tg-cockpit-assistant .tg-assistant-input:focus {
  border-color: rgba(76, 218, 234, .58);
  box-shadow: 0 0 0 3px rgba(53, 199, 220, .07), inset 0 1px rgba(183, 244, 250, .04);
}

.tg-cockpit-assistant .tg-assistant-send {
  right: 9px;
  bottom: 9px;
  width: 36px;
  height: 36px;
  border-color: rgba(97, 228, 237, .48);
  border-radius: 9px;
  color: #eaffff;
  background: linear-gradient(145deg, #1b9bb0, #0c526b);
  box-shadow: 0 7px 17px rgba(0, 21, 31, .32);
}

.tg-cockpit-assistant .tg-assistant-foot {
  margin-top: 6px;
  color: #587c8a;
  font-size: 7px;
}

/* Horizontal assistant edge tab: hidden until hover, then aligned like a normal label. */
html body #tiangong-cockpit-assistant .tg-assistant-fab {
  top: 50%;
  right: -1px;
  display: flex;
  width: 12px;
  height: 46px;
  flex-direction: row;
  gap: 7px;
  padding: 0 8px;
  overflow: hidden;
  border: 1px solid transparent;
  border-right: 0;
  border-radius: 12px 0 0 12px;
  background: transparent;
  box-shadow: none;
  transform: translateY(-50%);
}

html body #tiangong-cockpit-assistant .tg-assistant-fab::before {
  top: 50%;
  right: 0;
  width: 2px;
  height: 28px;
  border-radius: 3px 0 0 3px;
  background: rgba(79, 203, 222, .48);
  box-shadow: 0 0 7px rgba(69, 209, 229, .24);
  transform: translateY(-50%);
}

html body #tiangong-cockpit-assistant .tg-assistant-fab::after {
  display: none;
}

html body #tiangong-cockpit-assistant .tg-assistant-fab-mark {
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 7px;
  opacity: 0;
  transform: translateX(8px);
}

html body #tiangong-cockpit-assistant .tg-assistant-fab-title {
  color: #c5edf3;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1;
  text-orientation: initial;
  white-space: nowrap;
  writing-mode: horizontal-tb;
  opacity: 0;
  transform: translateX(8px);
}

html body #tiangong-cockpit-assistant .tg-assistant-fab > i {
  top: 6px;
  right: 6px;
  opacity: 0;
  transform: translateX(8px);
}

html body #tiangong-cockpit-assistant .tg-assistant-fab:hover,
html body #tiangong-cockpit-assistant .tg-assistant-fab:focus-visible {
  width: 112px;
  height: 44px;
  padding: 0 10px;
  border-color: rgba(105, 218, 233, .5);
  border-right: 0;
  background: linear-gradient(135deg, rgba(23, 111, 133, .98), rgba(7, 48, 69, .98));
  box-shadow: -10px 8px 26px rgba(0, 7, 15, .38);
  transform: translate(-3px, -50%);
}

html body #tiangong-cockpit-assistant .tg-assistant-fab:hover::before,
html body #tiangong-cockpit-assistant .tg-assistant-fab:focus-visible::before {
  inset: 7px 6px;
  width: auto;
  height: auto;
  border-radius: 9px;
  background: rgba(64, 203, 220, .055);
  box-shadow: none;
  transform: none;
}

html body #tiangong-cockpit-assistant .tg-assistant-fab:hover .tg-assistant-fab-mark,
html body #tiangong-cockpit-assistant .tg-assistant-fab:hover .tg-assistant-fab-title,
html body #tiangong-cockpit-assistant .tg-assistant-fab:hover > i,
html body #tiangong-cockpit-assistant .tg-assistant-fab:focus-visible .tg-assistant-fab-mark,
html body #tiangong-cockpit-assistant .tg-assistant-fab:focus-visible .tg-assistant-fab-title,
html body #tiangong-cockpit-assistant .tg-assistant-fab:focus-visible > i {
  opacity: 1;
  transform: translateX(0);
}
