/* Hub — кубики направлений после входа */

.hub-shell {
  --app-rail-header-h: 56px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.hub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  height: var(--app-rail-header-h);
  min-height: var(--app-rail-header-h);
  box-sizing: border-box;
  border-bottom: 1px solid var(--sidebar-border);
  background: var(--bpmn-surface);
}

.hub-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.hub-header-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--sidebar-text);
}

.hub-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Высота как .app-sidebar-footer + .sidebar-platform-link на BPMN */
.hub-header .user-menu-trigger {
  width: auto;
  min-width: 200px;
  max-width: min(280px, 40vw);
  padding: 8px 12px;
  box-sizing: border-box;
  min-height: 36px;
}

.hub-header .user-avatar {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.hub-header .user-menu-dropdown {
  top: calc(100% + 6px);
  bottom: auto;
  left: auto;
  right: 0;
  min-width: 200px;
}

.hub-header .theme-switch--compact {
  padding: 4px 6px;
  min-height: 0;
  gap: 0;
}

.hub-main {
  flex: 1;
  padding: 32px 24px 48px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.hub-page-title {
  margin: 0 0 20px;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
}

.hub-back-row {
  margin-bottom: 20px;
}

.profile-card {
  max-width: 520px;
  background: var(--panel-elevated);
  border: 1px solid var(--border);
  border-radius: var(--app-radius-lg);
  padding: 20px 24px;
  box-shadow: 0 2px 12px rgba(27, 53, 91, 0.06);
}

.profile-card p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.45;
}

.profile-card p:last-child {
  margin-bottom: 0;
}

html[data-theme="dark"] .profile-card {
  box-shadow: none;
}

.hub-lead {
  margin: 0 0 24px;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.hub-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 20px;
  border-radius: var(--app-radius-lg);
  border: 1px solid var(--border);
  background: var(--panel-elevated);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  height: 100%;
  min-height: 168px;
  box-sizing: border-box;
}

.hub-card:hover {
  border-color: var(--highlight);
  box-shadow: 0 8px 24px rgba(27, 53, 91, 0.1);
  transform: translateY(-2px);
}

.hub-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, #1b355b, #3b9eff);
  flex-shrink: 0;
}

.hub-card__icon--bpmn { background: linear-gradient(135deg, #1b355b, #3b9eff); }
.hub-card__icon--govarch { background: linear-gradient(135deg, #1b355b, #59c3ff); }
.hub-card__icon--smartbridge { background: linear-gradient(135deg, #0d4d4d, #34d399); }
.hub-card__icon--yedilov { background: linear-gradient(135deg, #4a2c2a, #f97316); }
.hub-card__icon--hr { background: linear-gradient(135deg, #1b355b, #59c3ff); }
.hub-card__icon--projects { background: linear-gradient(135deg, #1b355b, #3b82f6); }
.hub-card__icon--jira { background: linear-gradient(135deg, #1b355b, #2684ff); }
.hub-card__icon--gitlab { background: linear-gradient(135deg, #1b355b, #fc6d26); }
.hub-card__icon--mail { background: linear-gradient(135deg, #1b355b, #59c3ff); }
.hub-card__icon--user { background: linear-gradient(135deg, #4a3f6a, #a78bfa); }

.hub-card__title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  min-height: 1.35em;
}

.hub-card__desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  flex: 1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.hub-empty {
  padding: 32px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: var(--app-radius-lg);
}

html[data-theme="dark"] .hub-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .app-brand .brand-logo--mark,
html[data-theme="dark"] .hub-header-brand img {
  filter: brightness(0) invert(1);
}
