/* ==========================================================================
   G03 AI 應用中心
   桌機驗收基準 1440px（原圖 1586px，比例 0.908）
   外殼採 G02 基準（見 shell.css）
   ========================================================================== */

/* 本頁原圖導覽列較窄，為維持放射圖與原圖相同比例，主內容內距略收 */
.g03 .main { padding-left: 14px; padding-right: 14px; }

/* --- 頁首 --- */
.apps__head {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 2px;
}

.apps__title {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: .01em;
  color: #101B1F;
}

.apps__tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.field {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 296px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  background: #FFFDFA;
}

.field__icon { color: #8A9BA2; flex: none; }

.field__input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: none;
  font-size: 15px;
  color: var(--c-ink);
}

.field__input::placeholder { color: #93A5AC; }

.select--scope {
  height: 44px;
  min-width: 140px;
  font-size: 15px;
}

/* ==========================================================================
   放射狀應用圖
   節點座標以原圖量測值換算為百分比（--x／--y 為節點圓心）
   ========================================================================== */

.orbit {
  position: relative;
  margin-top: 20px;
  width: 100%;
  max-width: 960px;
  aspect-ratio: 1055 / 785;
}

.orbit__deco {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* --- 中央樞紐 --- */
.orbit__hub {
  position: absolute;
  left: 53.55%;
  top: 49.43%;
  transform: translate(-50%, -50%);
  width: 169px;
  height: 169px;
  border-radius: 50%;
  border: 1.5px solid #0B6E6B;
  background: var(--c-page);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

.orbit__hub-text {
  font-size: 18px;
  font-weight: 700;
  color: #0B4F52;
  line-height: 1.35;
}

/* --- 群組標籤 --- */
.orbit__group {
  position: absolute;
  transform: translate(-50%, -50%);
  font-size: 17px;
  font-weight: 700;
  color: var(--c-teal-600);
  white-space: nowrap;
}

.orbit__group--doc   { left: 53.55%; top: 7.3%; }
.orbit__group--data  { left: 12.1%;  top: 30.1%; }
.orbit__group--audio { left: 93.6%;  top: 30.1%; }
.orbit__group--draw  { left: 90.1%;  top: 77.3%; }
.orbit__group--cross { left: 53.55%; top: 99.2%; }

/* --- 應用節點 --- */
.node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  width: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.node__dot {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #0B6E6B;
  display: grid;
  place-items: center;
  transition: transform .16s ease, box-shadow .16s ease;
}

.node:hover .node__dot { transform: scale(1.06); }

.node__badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  border: 2px solid var(--c-page);
  background: #12A08C;
}

.node__badge--live::after {
  content: "";
  position: absolute;
  inset: 0;
  background: no-repeat center/9px 9px
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'><path d='m5 12.5 4.5 4.5L19 7'/></svg>");
}

.node__code {
  margin-top: 11px;
  font-size: 19px;
  font-weight: 700;
  color: #16232A;
  line-height: 1.2;
}

.node__name {
  margin-top: 3px;
  font-size: 15px;
  color: #4A6068;
  line-height: 1.3;
}

/* 選中態：外圈光暈 */
.node--active .node__dot {
  box-shadow: 0 0 0 6px #DCEAE9, 0 0 0 7.5px #9EC7C4;
}

/* 規劃中：虛線外框 */
.node--planned .node__dot {
  background: #FFFDFA;
  border: 1.6px dashed #7FB0AE;
}

.node__tag {
  margin-top: 6px;
  font-size: 12px;
  color: #4F8C8A;
  border: 1px solid #B6D5D3;
  border-radius: var(--r-pill);
  padding: 2px 9px;
  background: #F3FAF9;
}

.node--planned .node__code { margin-top: 6px; }

/* --- 圖例 --- */
.legend {
  position: absolute;
  left: 0;
  bottom: -46px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: #FFFDFA;
  padding: 13px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  color: #3F5259;
}

.legend li { display: flex; align-items: center; gap: 10px; }

.legend__mark { flex: none; }

.legend__mark--live {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #0B6E6B;
}

.legend__mark--plan {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1.5px dashed #7FB0AE;
  background: #F3FAF9;
}

.apps__note {
  margin-top: 56px;
  text-align: right;
  font-size: 14px;
  color: #93A5AC;
}

/* ==========================================================================
   右側應用詳情
   ========================================================================== */

.side--detail { padding-top: 92px; }

.detail { padding: 24px 26px 26px; }

.detail__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.detail__title {
  flex: 1;
  font-size: 21px;
  font-weight: 700;
  color: #16232A;
  line-height: 1.3;
}

.detail__code { color: var(--c-teal-600); }

.detail__close { color: #8A9BA2; flex: none; margin-top: 1px; }

.detail__desc {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.75;
  color: #4A6068;
}

.detail__rule {
  margin: 20px 0;
  border: 0;
  border-top: 1px solid #EDEAE5;
}

/* --- 數據列 --- */
.stats { display: flex; flex-direction: column; gap: 18px; }

.stat { display: flex; align-items: center; gap: 13px; }

.stat__icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #E9F2F1;
  display: grid;
  place-items: center;
  flex: none;
}

.stat__label { flex: 1; font-size: 15px; color: #3F5259; }

.stat__value {
  font-size: 26px;
  font-weight: 700;
  color: var(--c-teal-600);
  line-height: 1;
}

.stat__value--ok { font-size: 18px; }

/* --- 按鈕 --- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  border-radius: var(--r-sm);
  font-size: 17px;
  font-weight: 700;
}

.btn--solid {
  background: var(--c-teal-800);
  color: #fff;
  transition: background .16s ease;
}

.btn--solid:hover { background: #004E58; }

.btn--ghost {
  margin-top: 12px;
  border: 1.5px solid var(--c-teal-800);
  color: var(--c-teal-800);
  background: #FFFDFA;
  transition: background .16s ease;
}

.btn--ghost:hover { background: #F1F8F7; }

/* ==========================================================================
   響應式
   ========================================================================== */

@media (max-width: 1280px) {
  .side--detail { padding-top: 0; }
  .orbit { max-width: 100%; margin-inline: auto; }
}

@media (max-width: 900px) {
  .apps__head { flex-wrap: wrap; gap: 14px; }
  .apps__tools { margin-left: 0; width: 100%; }
  .field { flex: 1; width: auto; }
}

@media (max-width: 640px) {
  .apps__title { font-size: 28px; }
  .field, .select--scope { height: 40px; font-size: 14px; }

  /* 窄版：放射圖改為清單，避免節點重疊不可讀 */
  .orbit {
    aspect-ratio: auto;
    max-width: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
  }

  .orbit__deco,
  .orbit__hub,
  .orbit__group { display: none; }

  .node {
    position: static;
    transform: none;
    width: 100%;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    text-align: left;
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    background: #FFFDFA;
    padding: 11px 14px;
  }

  .node__dot { width: 46px; height: 46px; flex: none; }
  .node__dot svg { width: 21px; height: 21px; }
  .node__badge { width: 16px; height: 16px; }

  .node__code {
    margin-top: 0;
    font-size: 16px;
    order: 2;
    flex: none;
  }

  .node__name {
    margin-top: 0;
    font-size: 14px;
    order: 3;
    flex: 1;
  }

  .node__tag { order: 4; margin-top: 0; }
  .node--planned .node__code { margin-top: 0; }

  .legend {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-top: 6px;
    font-size: 13px;
  }

  .detail { padding: 18px 16px 20px; }
  .detail__title { font-size: 18px; }
  .stat__value { font-size: 22px; }
  .btn { height: 46px; font-size: 15.5px; }
}
