/* Hub v228: all-department, read-only command dashboard and office-map view. */

.hub-command-dashboard-v228,
.hub-department-floor-v228 {
  font-family: "Leelawadee UI", "Noto Sans Thai", Tahoma, sans-serif;
}

.hub-command-dashboard-v228 {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 18px 0;
  padding: 24px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, #2d78d7 24%, var(--line));
  border-radius: 26px;
  background:
    radial-gradient(circle at 92% 5%, rgba(55, 164, 255, .15), transparent 26rem),
    linear-gradient(145deg, color-mix(in srgb, var(--surface) 96%, #e8f4ff), var(--surface2));
  box-shadow: 0 22px 55px rgba(21, 53, 94, .12);
}

.hub-command-dashboard-v228::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .18;
  background-image:
    linear-gradient(rgba(59, 119, 191, .18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 119, 191, .18) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(140deg, #000, transparent 74%);
}

.hub-command-head-v228,
.hub-command-priority-v228 > header,
.hub-command-pipeline-v228 > header,
.hub-department-floor-head-v228 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.hub-command-head-v228 h2,
.hub-department-floor-head-v228 h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(28px, 3.3vw, 43px);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.hub-command-head-v228 > div > p:last-child,
.hub-department-floor-head-v228 > div > p:last-child {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.5;
}

.hub-command-head-meta-v228 {
  display: grid;
  justify-items: end;
  gap: 5px;
  min-width: 250px;
  padding-top: 5px;
  text-align: right;
}

.hub-command-head-meta-v228 span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #176b55;
  font-size: 13px;
  font-weight: 900;
}

.hub-command-head-meta-v228 span::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #24a177;
  box-shadow: 0 0 0 4px rgba(36, 161, 119, .13);
}

.hub-command-head-meta-v228 small { color: var(--muted); font-size: 11px; font-weight: 700; }
.hub-command-dashboard-v228[data-state="partial"] .hub-command-head-meta-v228 span,
.hub-command-dashboard-v228[data-state="stale"] .hub-command-head-meta-v228 span { color: #9b5c08; }
.hub-command-dashboard-v228[data-state="partial"] .hub-command-head-meta-v228 span::before,
.hub-command-dashboard-v228[data-state="stale"] .hub-command-head-meta-v228 span::before { background: #d58a18; box-shadow: 0 0 0 4px rgba(213, 138, 24, .15); }

.hub-command-kpis-v228 {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.hub-command-kpi-v228 {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 116px;
  align-content: center;
  justify-items: start;
  padding: 15px 16px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, #2872ca 18%, var(--line));
  border-radius: 17px;
  background: color-mix(in srgb, var(--surface) 94%, #deedff);
  color: var(--text);
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75);
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.hub-command-kpi-v228::after {
  content: "→";
  position: absolute;
  right: 12px;
  bottom: 10px;
  color: #2675d4;
  font-weight: 950;
}

.hub-command-kpi-v228:hover { transform: translateY(-2px); border-color: #4288de; box-shadow: 0 12px 24px rgba(27, 83, 151, .12); }
.hub-command-kpi-v228 span { overflow: hidden; color: var(--muted); font-size: 12px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.hub-command-kpi-v228 strong { margin: 5px 0 3px; font-size: clamp(28px, 2.65vw, 38px); font-weight: 950; line-height: 1; font-variant-numeric: tabular-nums; }
.hub-command-kpi-v228 small { max-width: calc(100% - 12px); overflow: hidden; color: #2369b9; font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.hub-command-kpi-v228[data-state="critical"] { border-color: rgba(196, 58, 79, .48); background: color-mix(in srgb, var(--surface) 88%, #ffe3e8); }
.hub-command-kpi-v228[data-state="critical"] strong,
.hub-command-kpi-v228[data-state="critical"]::after { color: #b72540; }
.hub-command-kpi-v228[data-state="clear"] strong { color: #17795d; }
.hub-command-kpi-v228.is-unavailable { border-style: dashed; }

.hub-command-main-v228 {
  display: grid;
  grid-template-columns: minmax(300px, .78fr) minmax(0, 1.6fr);
  gap: 14px;
}

.hub-command-priority-v228,
.hub-command-pipeline-v228 {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
}

.hub-command-priority-v228 > header,
.hub-command-pipeline-v228 > header { align-items: flex-end; margin-bottom: 13px; }
.hub-command-priority-v228 h3,
.hub-command-pipeline-v228 h3 { margin: 0; font-size: 22px; line-height: 1.2; }
.hub-command-priority-v228 > header > span { padding: 5px 9px; border-radius: 999px; background: #edf4ff; color: #245ea7; font-size: 11px; font-weight: 900; white-space: nowrap; }
.hub-command-pipeline-v228 > header > span { color: var(--muted); font-size: 11px; font-weight: 750; text-align: right; }

.hub-command-priority-list-v228 { display: grid; gap: 8px; }
.hub-command-priority-row-v228 {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 62px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.hub-command-priority-row-v228:hover { border-color: #4389dc; background: color-mix(in srgb, var(--surface2) 82%, #deedff); }
.hub-command-priority-row-v228 > b { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: #e1edfc; color: #205eaa; font-size: 17px; font-variant-numeric: tabular-nums; }
.hub-command-priority-row-v228 > span { display: grid; min-width: 0; gap: 2px; }
.hub-command-priority-row-v228 > span strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.hub-command-priority-row-v228 > span small { color: var(--muted); font-size: 10px; font-weight: 700; }
.hub-command-priority-row-v228 > i { color: #2d75cc; font-style: normal; font-weight: 950; }
.hub-command-priority-row-v228[data-tone="critical"] { border-color: rgba(199, 58, 82, .38); background: color-mix(in srgb, var(--surface) 90%, #ffe5e9); }
.hub-command-priority-row-v228[data-tone="critical"] > b { background: #ffe0e5; color: #ad203a; }
.hub-command-priority-row-v228[data-tone="attention"] > b { background: #fff1cc; color: #865807; }

.hub-command-loading-v228,
.hub-command-partial-v228,
.hub-command-clear-v228 {
  padding: 15px;
  border-radius: 13px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}
.hub-command-loading-v228 { border: 1px dashed var(--line); }
.hub-command-partial-v228 { border: 1px solid rgba(205, 129, 14, .35); background: #fff4d7; color: #765008; }
.hub-command-clear-v228 { display: grid; gap: 3px; border: 1px solid rgba(35, 145, 105, .3); background: #eaf8f2; color: #17684f; }
.hub-command-clear-v228 strong { font-size: 14px; }
.hub-command-clear-v228 small { color: #437465; }

.hub-command-pipeline-list-v228 {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.hub-command-pipeline-list-v228 > button {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 142px;
  align-content: start;
  justify-items: start;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.hub-command-pipeline-list-v228 > button:not(:last-child)::after { content: "›"; position: absolute; z-index: 2; top: 50%; right: -8px; width: 15px; height: 24px; transform: translateY(-50%); color: #4b7eaf; font-size: 24px; font-weight: 950; line-height: 1; }
.hub-command-pipeline-list-v228 > button:hover { border-color: #3f86d9; background: color-mix(in srgb, var(--surface2) 78%, #deedff); }
.hub-command-pipeline-list-v228 > button > span { color: #3c77ba; font: 850 10px ui-monospace, monospace; letter-spacing: .08em; }
.hub-command-pipeline-list-v228 > button > strong { min-height: 36px; margin-top: 7px; font-size: 12px; line-height: 1.35; }
.hub-command-pipeline-list-v228 > button > b { margin-top: 9px; color: #185eae; font-size: 29px; font-weight: 950; line-height: 1; font-variant-numeric: tabular-nums; }
.hub-command-pipeline-list-v228 > button > small { margin-top: 8px; padding: 3px 6px; border-radius: 999px; background: #ffe1e6; color: #a5223a; font-size: 9px; font-weight: 900; }

.hub-command-dashboard-v228 button:focus-visible,
.hub-department-floor-v228 button:focus-visible,
.hub-department-floor-v228 a:focus-visible {
  outline: 3px solid #4fa4ff;
  outline-offset: 3px;
}

.hub-command-dashboard-ready-v228 .page-hub .hero { padding: 30px 0 18px; }
.hub-command-dashboard-ready-v228 .page-hub .hero h1 { font-size: clamp(36px, 5.3vw, 58px); }
.hub-command-dashboard-ready-v228 .page-hub .hero-copy > p:last-child { margin-bottom: 0; }

.hub-department-floor-v228 {
  position: relative;
  margin-top: 26px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: color-mix(in srgb, var(--surface) 95%, #e8f3ff);
  box-shadow: 0 18px 44px rgba(17, 49, 88, .1);
}

.hub-department-floor-head-v228 { margin-bottom: 17px; }
.hub-department-floor-head-v228 h2 { font-size: clamp(27px, 3vw, 38px); }
.hub-department-floor-head-v228 button {
  display: none;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.hub-department-stage-v228 { position: relative; border-radius: 22px; }
.hub-department-core-v228 { display: none; }
.hub-department-floor-v228 .primary-heading { margin-top: 0; }
.hub-department-floor-v228 .secondary-heading { margin-top: 24px; }

.hub-department-restricted-v228 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px dashed color-mix(in srgb, #7754c4 34%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface2) 92%, #eee8ff);
}
.hub-department-restricted-v228 > span { color: var(--muted); font-size: 11px; font-weight: 900; white-space: nowrap; }
.hub-department-restricted-v228 > a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; min-height: 44px; flex: 1; padding: 8px 12px; border-radius: 10px; background: var(--surface); color: var(--text); font-size: 13px; font-weight: 900; }
.hub-department-restricted-v228 > a small { grid-column: 1; color: var(--muted); font-size: 10px; font-weight: 700; }
.hub-department-restricted-v228 > a b { grid-column: 2; grid-row: 1 / span 2; color: #7251bd; }

html[data-dark="true"] .hub-command-dashboard-v228,
html[data-dark="true"] .hub-department-floor-v228 { background: linear-gradient(145deg, rgba(16, 29, 56, .98), rgba(8, 21, 43, .98)); }
html[data-dark="true"] .hub-command-head-meta-v228 span { color: #6ee0b6; }
html[data-dark="true"] .hub-command-priority-v228 > header > span { background: #17355b; color: #a9d2ff; }
html[data-dark="true"] .hub-command-partial-v228 { background: #3a2c0e; color: #ffe19a; }
html[data-dark="true"] .hub-command-clear-v228 { background: #12352a; color: #a8efd5; }
html[data-dark="true"] .hub-command-clear-v228 small { color: #82bfa9; }

@media (min-width: 1200px) {
  .hub-department-floor-head-v228 button { display: inline-flex; align-items: center; justify-content: center; }

  .hub-department-floor-v228:not(.is-map-hidden) .hub-department-stage-v228 {
    min-height: 720px;
    padding: 22px;
    overflow: hidden;
    border: 1px solid rgba(91, 142, 198, .32);
    background:
      linear-gradient(180deg, rgba(4, 16, 36, .16), rgba(4, 16, 36, .5)),
      url("/assets/hub-command-office-v228.webp") center / cover no-repeat;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), inset 0 -120px 160px rgba(4, 14, 32, .42);
  }

  .hub-department-floor-v228:not(.is-map-hidden) .primary-heading { position: absolute; z-index: 4; top: 20px; right: 24px; left: 24px; margin: 0; color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .65); }
  .hub-department-floor-v228:not(.is-map-hidden) .primary-heading h2,
  .hub-department-floor-v228:not(.is-map-hidden) .primary-heading span { color: #fff; }
  .hub-department-floor-v228:not(.is-map-hidden) .primary-heading .eyebrow { color: #83d9ff; }

  .hub-department-floor-v228:not(.is-map-hidden) .primary-grid { position: absolute; z-index: 3; inset: 86px 22px 22px; display: block; min-height: 0; }
  .hub-department-floor-v228:not(.is-map-hidden) .primary-card { position: absolute; width: calc((100% - 50px) / 3); min-height: 158px; max-height: 183px; margin: 0; padding: 15px; overflow: hidden; border-width: 1px; border-top-width: 4px; background: color-mix(in srgb, var(--surface) 91%, transparent); box-shadow: 0 15px 34px rgba(3, 15, 34, .34); backdrop-filter: blur(12px); }
  .hub-department-floor-v228:not(.is-map-hidden) .primary-card:nth-child(1) { top: 0; left: 0; }
  .hub-department-floor-v228:not(.is-map-hidden) .primary-card:nth-child(2) { top: 0; left: calc((100% - 50px) / 3 + 25px); }
  .hub-department-floor-v228:not(.is-map-hidden) .primary-card:nth-child(3) { top: 0; right: 0; }
  .hub-department-floor-v228:not(.is-map-hidden) .primary-card:nth-child(4) { right: 0; bottom: 0; }
  .hub-department-floor-v228:not(.is-map-hidden) .primary-card:nth-child(5) { bottom: 0; left: calc((100% - 50px) / 3 + 25px); }
  .hub-department-floor-v228:not(.is-map-hidden) .primary-card:nth-child(6) { bottom: 0; left: 0; }
  .hub-department-floor-v228:not(.is-map-hidden) .primary-card p { display: -webkit-box; margin-top: 4px; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .hub-department-floor-v228:not(.is-map-hidden) .primary-card > small { margin-top: 8px; }
  .hub-department-floor-v228:not(.is-map-hidden) .primary-card h3 { margin: 4px 0; font-size: 20px; }
  .hub-department-floor-v228:not(.is-map-hidden) .primary-card > b { padding-top: 8px; }
  .hub-department-floor-v228:not(.is-map-hidden) .primary-revenue-partner .revenue-partner-links { padding-top: 8px; }
  .hub-department-floor-v228:not(.is-map-hidden) .primary-revenue-partner .revenue-partner-links a { min-height: 47px; padding: 8px; }

  .hub-department-floor-v228:not(.is-map-hidden) .hub-department-core-v228 {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 164px;
    height: 164px;
    padding: 18px;
    transform: translate(-50%, -46%);
    border: 1px solid rgba(105, 206, 255, .55);
    border-radius: 50%;
    background: rgba(5, 24, 50, .76);
    box-shadow: 0 0 0 9px rgba(21, 101, 161, .16), 0 18px 40px rgba(0, 0, 0, .36);
    color: #fff;
    text-align: center;
    backdrop-filter: blur(9px);
  }
  .hub-department-core-v228 span { color: #65d9ff; font-size: 29px; font-weight: 950; line-height: 1; }
  .hub-department-core-v228 strong { font-size: 12px; letter-spacing: .12em; line-height: 1.35; }

  .hub-department-floor-v228.is-map-hidden .hub-department-stage-v228 { min-height: 0; padding: 0; }
  .hub-department-floor-v228.is-map-hidden .primary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .hub-command-kpis-v228 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hub-command-main-v228 { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .hub-command-dashboard-ready-v228 .page-hub .hero { padding: 20px 4px 12px; }
  .hub-command-dashboard-ready-v228 .page-hub .hero h1 { font-size: 38px; }

  .hub-command-dashboard-v228 { gap: 13px; margin: 12px 0; padding: 16px; border-radius: 20px; }
  .hub-command-head-v228,
  .hub-department-floor-head-v228 { display: grid; gap: 8px; }
  .hub-command-head-v228 h2 { font-size: 28px; }
  .hub-command-head-v228 > div > p:last-child,
  .hub-department-floor-head-v228 > div > p:last-child { font-size: 13px; }
  .hub-command-head-meta-v228 { min-width: 0; justify-items: start; padding: 8px 0 0; text-align: left; }

  .hub-command-main-v228 { display: contents; }
  .hub-command-priority-v228 { order: 1; }
  .hub-command-kpis-v228 { order: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .hub-command-pipeline-v228 { order: 3; }
  .hub-command-kpi-v228 { min-height: 102px; padding: 13px; }
  .hub-command-kpi-v228 strong { font-size: 31px; }
  .hub-command-kpi-v228 small { font-size: 9px; }

  .hub-command-priority-v228,
  .hub-command-pipeline-v228 { padding: 14px; border-radius: 17px; }
  .hub-command-priority-v228 h3,
  .hub-command-pipeline-v228 h3 { font-size: 20px; }
  .hub-command-pipeline-v228 > header { display: grid; gap: 5px; }
  .hub-command-pipeline-v228 > header > span { text-align: left; }
  .hub-command-pipeline-list-v228 { grid-template-columns: 1fr; gap: 7px; }
  .hub-command-pipeline-list-v228 > button { grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; min-height: 66px; padding: 10px 12px; }
  .hub-command-pipeline-list-v228 > button:not(:last-child)::after { content: "↓"; top: auto; right: 17px; bottom: -12px; width: auto; height: auto; transform: none; font-size: 14px; }
  .hub-command-pipeline-list-v228 > button > span { grid-column: 1; grid-row: 1 / span 2; }
  .hub-command-pipeline-list-v228 > button > strong { grid-column: 2; min-height: 0; margin: 0; font-size: 13px; }
  .hub-command-pipeline-list-v228 > button > b { grid-column: 3; grid-row: 1 / span 2; margin: 0; font-size: 26px; }
  .hub-command-pipeline-list-v228 > button > small { grid-column: 2; margin: 3px 0 0; justify-self: start; }

  .hub-department-floor-v228 { margin-top: 16px; padding: 14px; border-radius: 20px; }
  .hub-department-floor-head-v228 h2 { font-size: 27px; }
  .hub-department-floor-v228 .primary-heading { margin-top: 16px; }
  .hub-department-floor-v228 .secondary-heading { margin-top: 22px; }
  .hub-department-restricted-v228 { display: grid; gap: 7px; }
  .hub-department-restricted-v228 > span { white-space: normal; }
}

@media (max-width: 360px) {
  .hub-command-kpis-v228 { grid-template-columns: 1fr; }
  .hub-command-kpi-v228 { min-height: 88px; }
  .hub-command-priority-v228 > header { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .hub-command-dashboard-v228 *,
  .hub-department-floor-v228 * { scroll-behavior: auto !important; transition: none !important; }
}
