/* Home 2 — split panel: categories (left) + child tiles (right) */
.hub-main-split {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 1rem 1.25rem 1.75rem;
  min-height: calc(100vh - 56px);
  max-width: none;
}

.hub-main-split .hub-hero {
  text-align: left;
  margin-bottom: 1rem;
  max-width: 1600px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.hub-main-split .hub-hero h1 {
  font-size: clamp(1.35rem, 3vw, 1.65rem);
}

.hub-main-split .hub-hero .lead {
  font-size: 0.88rem;
}

.hub-home-layout {
  display: flex;
  gap: 1rem;
  flex: 1;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  min-height: 0;
  align-items: stretch;
}

.hub-home-sidebar {
  width: 268px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.hub-home-sidebar-head {
  padding: 0.65rem 0.85rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  border-bottom: 1px solid var(--card-border);
  background: rgba(0, 0, 0, 0.15);
}

.hub-home-sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.45rem;
}

.hub-home-sidebar .hub-group-tiles {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  max-width: none;
  width: 100%;
}

.hub-home-sidebar .hub-group-tile {
  flex-direction: row;
  align-items: center;
  text-align: left;
  padding: 0.5rem 0.55rem;
  min-height: 0;
  border-radius: 10px;
  border-left-width: 3px;
  transform: none;
  box-shadow: none;
}

.hub-home-sidebar .hub-group-tile:hover {
  transform: none;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.hub-home-sidebar .hub-group-tile.is-active {
  background: rgba(99, 102, 241, 0.18);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.35);
}

.hub-home-sidebar .hub-group-tile--all {
  border-left: 3px solid var(--accent);
  margin-bottom: 0.2rem;
}

.hub-home-sidebar .hub-group-tile--all .hub-group-tile-icon {
  background: rgba(99, 102, 241, 0.28);
  color: #c7d2fe;
}

.hub-home-sidebar .hub-group-tile--all.is-active {
  background: rgba(99, 102, 241, 0.22);
}

.hub-home-sidebar .hub-group-tile-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 8px;
  font-size: 0.95rem;
  margin: 0 0.55rem 0 0;
}

.hub-home-sidebar .hub-group-tile-title {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
}

.hub-home-sidebar .hub-group-tile-desc {
  display: none;
}

.hub-home-sidebar .hub-group-tile-meta {
  flex: 1;
  min-width: 0;
}

.hub-home-sidebar .hub-group-tile-count {
  font-size: 0.65rem;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.12);
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  margin-left: 0.35rem;
  flex-shrink: 0;
}

.hub-home-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.hub-home-content-head {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--card-border);
  background: rgba(0, 0, 0, 0.12);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.hub-home-content-head h2 {
  font-size: 1rem;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0;
  flex: 1;
  min-width: 0;
}

.hub-home-content-head .hub-home-content-desc {
  font-size: 0.78rem;
  color: #94a3b8;
  margin: 0;
  width: 100%;
}

.hub-home-open-parent {
  font-size: 0.75rem;
  font-weight: 600;
  color: #a5b4fc;
  text-decoration: none;
  white-space: nowrap;
}

.hub-home-open-parent:hover {
  color: #c7d2fe;
}

.hub-home-content-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.85rem 1rem 1.1rem;
}

.hub-home-empty {
  color: #64748b;
  font-size: 0.85rem;
  margin: 1rem 0;
}

.hub-child-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 0.5rem;
}

.hub-child-tiles-grouped {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hub-child-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin: 0 0 0.45rem 0;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--card-border);
}

.hub-child-tile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  min-height: 0;
  background: rgba(22, 26, 36, 0.6);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.hub-child-tile:hover {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.12);
  color: inherit;
  transform: translateY(-2px);
}

.hub-child-tile-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  background: rgba(99, 102, 241, 0.22);
  color: #a5b4fc;
}

.hub-child-tile-text {
  flex: 1;
  min-width: 0;
}

.hub-child-tile-title {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hub-child-tile-desc {
  display: block;
  font-size: 0.68rem;
  color: #64748b;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hub-child-tile-arrow {
  font-size: 0.65rem;
  color: #64748b;
  flex-shrink: 0;
}

.hub-child-tile:hover .hub-child-tile-arrow {
  color: #a5b4fc;
}

/* All categories — parent tiles at ~50% of original home grid */
.hub-home-content.is-all-view .hub-home-open-parent {
  display: none !important;
}

.hub-home-content.is-all-view .hub-home-content-body {
  padding: 0.75rem 0.85rem 1rem;
}

.hub-group-tiles--all-view {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  width: 100%;
  max-width: none;
}

@media (max-width: 1200px) {
  .hub-group-tiles--all-view {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .hub-group-tiles--all-view {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .hub-group-tiles--all-view {
    grid-template-columns: repeat(2, 1fr);
  }
}

.hub-group-tiles--all-view .hub-group-tile {
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem 0.75rem;
  min-height: 100px;
  border-radius: 12px;
  border-left-width: 4px;
  transform: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(8px);
}

.hub-group-tiles--all-view .hub-group-tile:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.32);
}

.hub-group-tiles--all-view .hub-group-tile-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 10px;
  font-size: 1rem;
  margin: 0 0 0.5rem 0;
}

.hub-group-tiles--all-view .hub-group-tile-title {
  font-size: clamp(0.72rem, 1.4vw, 0.88rem);
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.hub-group-tiles--all-view .hub-group-tile-desc,
.hub-group-tiles--all-view .hub-group-tile-count,
.hub-group-tiles--all-view .hub-group-tile-meta {
  display: none !important;
}

/* Extra group colors (match index.html) */
.hub-group-tiles--all-view .hub-group-tile[data-group="Structure"] { border-left-color: #0ea5e9; }
.hub-group-tiles--all-view .hub-group-tile[data-group="Structure"]:hover { background: rgba(14, 165, 233, 0.14); }
.hub-group-tiles--all-view .hub-group-tile[data-group="Structure"] .hub-group-tile-icon { background: rgba(14, 165, 233, 0.3); color: #7dd3fc; }

.hub-group-tiles--all-view .hub-group-tile[data-group="port-group-management"] { border-left-color: #0ea5e9; }
.hub-group-tiles--all-view .hub-group-tile[data-group="port-group-management"]:hover { background: rgba(14, 165, 233, 0.12); }
.hub-group-tiles--all-view .hub-group-tile[data-group="port-group-management"] .hub-group-tile-icon { background: rgba(14, 165, 233, 0.28); color: #7dd3fc; }

.hub-group-tiles--all-view .hub-group-tile[data-group="coa-rule-engine"] { border-left-color: #eab308; }
.hub-group-tiles--all-view .hub-group-tile[data-group="coa-rule-engine"]:hover { background: rgba(234, 179, 8, 0.12); }
.hub-group-tiles--all-view .hub-group-tile[data-group="coa-rule-engine"] .hub-group-tile-icon { background: rgba(234, 179, 8, 0.28); color: #fde047; }

.hub-group-tiles--all-view .hub-group-tile[data-group="cc-cost-center-generator"] { border-left-color: #ec4899; }
.hub-group-tiles--all-view .hub-group-tile[data-group="cc-cost-center-generator"]:hover { background: rgba(236, 72, 153, 0.12); }
.hub-group-tiles--all-view .hub-group-tile[data-group="cc-cost-center-generator"] .hub-group-tile-icon { background: rgba(236, 72, 153, 0.28); color: #f9a8d4; }

/* Child tile accent inherits parent data-group on container */
.hub-home-content[data-group="config"] .hub-child-tile-icon,
.hub-home-content[data-group="admin"] .hub-child-tile-icon { background: rgba(194, 65, 12, 0.25); color: #fdba74; }
.hub-home-content[data-group="Rating"] .hub-child-tile-icon { background: rgba(139, 92, 246, 0.28); color: #c4b5fd; }
.hub-home-content[data-group="solutions"] .hub-child-tile-icon { background: rgba(6, 182, 212, 0.28); color: #22d3ee; }
.hub-home-content[data-group="control-tower"] .hub-child-tile-icon { background: rgba(99, 102, 241, 0.28); color: #a5b4fc; }
.hub-home-content[data-group="schema"] .hub-child-tile-icon { background: rgba(168, 85, 247, 0.25); color: #d8b4fe; }
.hub-home-content[data-group="workflow"] .hub-child-tile-icon { background: rgba(34, 197, 94, 0.25); color: #4ade80; }
.hub-home-content[data-group="tools"] .hub-child-tile-icon { background: rgba(139, 92, 246, 0.25); color: #c4b5fd; }
.hub-home-content[data-group="mcp"] .hub-child-tile-icon { background: rgba(13, 148, 136, 0.25); color: #5eead4; }
.hub-home-content[data-group="data-migration"] .hub-child-tile-icon { background: rgba(245, 158, 11, 0.25); color: #fcd34d; }
.hub-home-content[data-group="service-levels"] .hub-child-tile-icon { background: rgba(20, 184, 166, 0.28); color: #5eead4; }
.hub-home-content[data-group="Structure"] .hub-child-tile-icon { background: rgba(14, 165, 233, 0.25); color: #7dd3fc; }

@media (max-width: 900px) {
  .hub-home-layout {
    flex-direction: column;
  }
  .hub-home-sidebar {
    width: 100%;
    max-height: 38vh;
  }
  .hub-child-tiles {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}
