/* ══════════════════════════════════════════════════════════════
   DEELIAR Hub – Complete Stylesheet
   Premium dark theme with glass morphism & refined polish
   ══════════════════════════════════════════════════════════════ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* Scroll lock — see ScrollLock in utils.js */
html.scroll-locked,
html.scroll-locked body {
  overflow: hidden !important;
  overscroll-behavior: none;
}

:root {
  --bg-body: #06060e;
  --bg-surface: #0e0e1a;
  --bg-card: #111122;
  --bg-card-hover: #181832;
  --bg-elevated: #1a1a30;
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-glow: rgba(99,102,241,0.15);
  --accent: #a855f7;
  --success: #22c55e;
  --warning: #fbbf24;
  --danger: #ef4444;
  --text-primary: #f0f0f8;
  --text-secondary: #9898b0;
  --text-muted: #5a5a72;
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --glass: rgba(255,255,255,0.03);
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.3);
  --shadow-lg: 0 16px 64px rgba(0,0,0,0.4);
  --transition: 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: clip;  /* clip, NOT hidden — avoids turning body into a separate scroll container */
  -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════════════════════════════════════
   NAVBAR
   ══════════════════════════════════════════════════════════════ */
.hub-navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: 64px;
  background: rgba(10,10,18,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.08));
  display: flex;
  align-items: center;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
}
.hub-nav-inner {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 100%;
}
.hub-nav-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.hub-nav-logo-icon {
  color: var(--primary);
  font-size: 1.1rem;
}
.hub-nav-middle {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.8rem, 2vw, 1.6rem);
  min-width: 0;
}
.hub-section-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(0.65rem, 1.35vw, 1.25rem);
  min-width: 0;
  flex: 0 0 auto;
}
.hub-section-nav[hidden],
.hub-section-nav.is-empty {
  display: none;
}
.hub-nav-link {
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--transition), opacity var(--transition);
}
.hub-nav-link:hover,
.hub-nav-link.active {
  color: var(--primary-light);
}
.hub-nav-end {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hub-nav-auth {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hub-nav-auth-user { position: relative; }
.hub-nav-btn {
  padding: 8px 18px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}
.hub-nav-btn-ghost {
  color: var(--text-secondary);
  background: transparent;
}
.hub-nav-btn-ghost:hover { color: var(--text-primary); background: var(--glass); }
.hub-nav-btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 12px rgba(99,102,241,0.3);
}
.hub-nav-btn-primary:hover {
  filter: brightness(1.15);
  box-shadow: 0 4px 20px rgba(99,102,241,0.4);
  transform: translateY(-1px);
}

/* ── User Pill ── */
.hub-user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 16px 5px 5px;
  border-radius: 50px;
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.10));
  border: 1px solid rgba(99,102,241,0.25);
  cursor: pointer;
  animation: welcomeFadeIn 0.5s ease-out;
  transition: var(--transition);
}
/* @keyframes welcomeFadeIn → components.css */
.hub-user-pill:hover { border-color: rgba(99,102,241,0.35); background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(139,92,246,0.15)); }
.hub-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary, #6366f1), #a78bfa);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(99,102,241,0.35);
}
.hub-user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary, #f1f1f5);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

/* ── User Menu Dropdown ── */
.hub-user-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  max-width: min(320px, calc(100vw - 16px));
  width: 280px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform-origin: top right;
  transform: translateY(-8px);
  transition: var(--transition);
  z-index: 2000;
}
.hub-user-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.hub-user-menu-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
}
.hub-user-avatar-lg {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}
.hub-user-menu-name { font-weight: 700; font-size: 0.95rem; }
.hub-user-menu-email { font-size: 0.78rem; color: var(--text-muted); }
.hub-user-menu-divider { height: 1px; background: var(--border); margin: 0 12px; }
.hub-user-chevron { font-size: 0.7rem; color: var(--text-muted); margin-left: 2px; transition: var(--transition); }
.hub-user-pill:hover .hub-user-chevron { color: var(--text-primary); }
.hub-user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  border-radius: 0;
}
.hub-user-menu-item:last-child { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.hub-user-menu-link:hover { background: rgba(99,102,241,0.08); color: var(--primary); }
.hub-user-menu-logout:hover { background: rgba(239,68,68,0.08); color: var(--danger); }

/* Mobile: prevent overflow on small screens */
@media (max-width: 480px) {
  .hub-user-menu {
    right: max(-8px, calc(env(safe-area-inset-right) * -1));
    width: min(280px, calc(100vw - 16px));
  }
}

/* ── Shared shell: welcome chip + hamburger/sidebar ── */
.hub-welcome-chip {
  cursor: default;
  padding-right: 12px;
}

.hub-welcome-chip:hover {
  border-color: var(--border);
  background: var(--glass);
}

.hub-nav-logo-img,
.hub-sidebar-logo-img {
  max-width: 140px;
  max-height: 34px;
  object-fit: contain;
  display: block;
}

.hub-sidebar-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 4px;
}

.hamburger-btn {
  position: relative;
  z-index: 9999;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.15s ease;
  padding: 8px;
  flex-shrink: 0;
}

.hamburger-btn:hover { background: rgba(255,255,255,0.06); }
.hamburger-btn:active { transform: scale(0.94); }
.hamburger-icon {
  width: 22px;
  height: 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hamburger-icon span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--text-primary);
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: center;
}
.hamburger-btn.open .hamburger-icon span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.open .hamburger-icon span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger-btn.open .hamburger-icon span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 9990;
  pointer-events: none;
  transition: background 0.35s ease;
}
.sidebar-overlay.open {
  background: rgba(0,0,0,0.55);
  pointer-events: auto;
}
.sidebar-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(340px, 88vw);
  z-index: 9995;
  background: #0d0d18;
  border-left: 1px solid var(--border-hover);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.sidebar-drawer.open {
  transform: translateX(0);
  box-shadow: -20px 0 60px rgba(0,0,0,0.5);
}
.sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fff;
  flex-shrink: 0;
}
.sidebar-logo-text {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-close-btn {
  margin-left: auto;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.sidebar-close-btn:hover {
  background: var(--bg-secondary, rgba(255,255,255,0.08));
  color: var(--text-primary);
}
.sidebar-nav { padding: 16px 12px; flex: 1; }
.sidebar-nav-section { margin-bottom: 20px; }
.sidebar-nav-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0 12px;
  margin-bottom: 8px;
}
.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  background: none;
  text-align: left;
  font-family: inherit;
}
.sidebar-nav-item:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
.sidebar-nav-item.active { background: rgba(99,102,241,0.12); color: var(--text-primary); }
.sidebar-nav-item .nav-icon { width: 24px; text-align: center; flex-shrink: 0; }
.sidebar-nav-item .nav-badge { margin-left: auto; padding: 2px 8px; border-radius: 50px; background: rgba(99,102,241,0.15); color: var(--primary-light); font-size: 0.7rem; font-weight: 700; }
.sidebar-nav-item .nav-badge.danger { background: rgba(248,113,113,0.15); color: #f87171; }
.sidebar-divider { height: 1px; background: var(--border); margin: 8px 12px; }
.sidebar-lang-dropdown { margin: 0 12px; }
.sidebar-lang-dropdown .lang-dropdown-toggle { width: 100%; justify-content: flex-start; }
.sidebar-lang-dropdown .lang-dropdown-menu {
  position: relative;
  top: 4px;
  right: auto;
  background: rgba(255,255,255,0.03);
  box-shadow: none;
  max-height: 0;
  overflow: hidden;
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: max-height 0.25s ease, padding 0.25s ease;
  padding: 0 6px;
}
.sidebar-lang-dropdown.open .lang-dropdown-menu { max-height: 300px; padding: 6px; }
.sidebar-footer { padding: 16px; border-top: 1px solid var(--border); flex-shrink: 0; }
.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
}
.sidebar-user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name,
.sidebar-user-email { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-name { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); }
.sidebar-user-email { font-size: 0.72rem; color: var(--text-muted); }
.sidebar-signout-row:hover { color: var(--danger); background: rgba(239,68,68,0.08); }
.sidebar-signout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  background: rgba(248,113,113,0.08);
  border: 1px solid rgba(248,113,113,0.15);
  color: #f87171;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.sidebar-signout-btn:hover {
  background: rgba(248,113,113,0.18);
  border-color: rgba(248,113,113,0.35);
}

.hub-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hub-nav-btn-outline {
  color: var(--text-secondary);
  background: var(--glass);
  border: 1px solid var(--border);
}
.hub-nav-btn-outline:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.07);
}

@media (max-width: 1024px) {
  .hub-nav-middle { display: none !important; }
  .hub-nav-logo span { max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media (max-width: 1180px) {
  .hub-section-nav { display: none; }
}

/* ══════════════════════════════════════════════════════════════
   HERO – GUEST
   ══════════════════════════════════════════════════════════════ */
.hub-hero {
  position: relative;
  overflow: hidden;
}
.hub-hero-guest {
  padding: 140px 24px 80px;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hub-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hub-hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
}
.hub-hero-glow-1 {
  top: -20%; left: 20%;
  width: 500px; height: 500px;
  background: rgba(99,102,241,0.12);
  animation: heroFloat 12s ease-in-out infinite alternate;
}
.hub-hero-glow-2 {
  bottom: -10%; right: 10%;
  width: 400px; height: 400px;
  background: rgba(168,85,247,0.08);
  animation: heroFloat 15s ease-in-out infinite alternate-reverse;
}
@keyframes heroFloat {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -20px) scale(1.1); }
}
.hub-hero-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
}
.hub-hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  text-align: center;
}
.hub-hero-align-left .hub-hero-content {
  margin-right: auto;
  text-align: left;
}
.hub-hero-align-left .hub-hero-desc {
  margin-left: 0;
  margin-right: 0;
}
.hub-hero-align-left .hub-hero-actions,
.hub-hero-align-left .hub-hero-stats {
  justify-content: flex-start;
}
.hub-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 50px;
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.18);
  color: var(--primary-light);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 28px;
}
.hub-hero-badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse-glow 2s infinite;
}
/* @keyframes pulse-glow → components.css */
.hub-hero-title {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}
.hub-hero-gradient {
  background: linear-gradient(135deg, var(--primary-light), var(--accent), #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hub-hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 36px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.hub-hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.hub-hero-btn {
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
}
.hub-hero-btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 24px rgba(99,102,241,0.35);
}
.hub-hero-btn-primary:hover {
  filter: brightness(1.15);
  box-shadow: 0 8px 36px rgba(99,102,241,0.45);
  transform: translateY(-2px);
}
.hub-hero-btn-ghost {
  background: var(--glass);
  border: 1px solid var(--border-hover);
  color: var(--text-primary);
}
.hub-hero-btn-ghost:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

/* ── Hero Stats ── */
.hub-hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}
.hub-hero-stat { text-align: center; }
.hub-hero-stat-num {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hub-hero-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}
.hub-hero-stat-sep {
  width: 1px;
  height: 32px;
  background: var(--border);
}

/* ══════════════════════════════════════════════════════════════
   HERO – USER (logged in)
   ══════════════════════════════════════════════════════════════ */
.hub-hero-user {
  padding: 100px 24px 40px;
  background: linear-gradient(180deg, var(--bg-body) 0%, var(--bg-surface) 100%);
}
.hub-hero-user .hub-hero-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: left;
  display: block;
  grid-template-columns: none;
}
.hub-hero-title-sm {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.hub-hero-desc-sm {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

/* ── Quick Stats ── */
.hub-quick-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.hub-qs-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.hub-qs-card:hover { border-color: var(--border-hover); background: var(--bg-card-hover); }
.hub-qs-card-admin:hover { border-color:rgba(139,92,246,.75) !important; background:linear-gradient(135deg,rgba(139,92,246,.28) 0%,rgba(99,102,241,.18) 100%) !important; box-shadow:0 0 26px rgba(139,92,246,.28),inset 0 1px 0 rgba(255,255,255,.08) !important; transform:translateY(-1px); }
.hub-qs-icon { font-size: 1.6rem; }
.hub-qs-val { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; }
.hub-qs-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px; }

@media (max-width: 768px) {
  .hub-quick-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .hub-quick-stats { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════
   MAIN
   ══════════════════════════════════════════════════════════════ */
.hub-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
  position: relative;
  z-index: 1;
}

/* ══════════════════════════════════════════════════════════════
   TABS
   ══════════════════════════════════════════════════════════════ */
.hub-tabs {
  display: flex;
  gap: 4px;
  padding: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 32px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
}
.hub-tabs::-webkit-scrollbar { display: none; } /* Chrome/Safari */
.hub-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  position: relative;
}
.hub-tab:hover { color: var(--text-secondary); background: var(--glass); }
.hub-tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 12px rgba(99,102,241,0.3);
}
.hub-tab-icon { font-size: 1rem; }
.hub-tab-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 50px;
  background: rgba(239,68,68,0.15);
  color: var(--danger);
  line-height: 1.2;
}
.hub-tab.active .hub-tab-badge { background: rgba(255,255,255,0.2); color: #fff; }

/* ── Tab Panels ── */
.hub-tab-panel { display: none; }
.hub-tab-panel.active { display: block; animation: fadeIn 0.3s ease; }
/* @keyframes fadeIn → components.css */

/* ══════════════════════════════════════════════════════════════
   FILTER BAR
   ══════════════════════════════════════════════════════════════ */
.hub-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.hub-filter-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.hub-chip {
  padding: 8px 18px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.hub-chip:hover { border-color: var(--border-hover); color: var(--text-primary); }
.hub-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 2px 12px rgba(99,102,241,0.25);
}
.hub-chip-icon { font-size: 0.95rem; }
.hub-chip-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 4px;
  flex-shrink: 0;
}
.hub-chip-sub {
  font-size: 0.78rem;
  padding: 6px 14px;
}
.hub-search-wrap {
  position: relative;
  min-width: 200px;
}
.hub-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  pointer-events: none;
  opacity: 0.5;
}
.hub-search-input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.88rem;
  transition: var(--transition);
  outline: none;
}
.hub-search-input::placeholder { color: var(--text-muted); }
.hub-search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.hub-search-wide { flex: 1; min-width: 240px; }

/* ══════════════════════════════════════════════════════════════
   CATEGORY SECTIONS
   ══════════════════════════════════════════════════════════════ */
.hub-category {
  margin-bottom: 48px;
}
.hub-category-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.hub-category-icon {
  font-size: 2rem;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: var(--primary-glow);
  flex-shrink: 0;
}
.hub-category-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.hub-category-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── Platform mode sub-filter bar ── */
.hub-mode-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: -8px 0 20px;
  padding: 12px 0 12px;
  border-bottom: 1px solid var(--border);
}

/* ══════════════════════════════════════════════════════════════
   PAGINATION
   ══════════════════════════════════════════════════════════════ */
.hub-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 28px;
  padding: 12px 0 4px;
  user-select: none;
}
.hub-pagination:empty { display: none; }

.hub-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.hub-page-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}
.hub-page-btn:active {
  transform: translateY(0);
}
.hub-page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(99,102,241,0.3);
}
.hub-page-btn.active:hover {
  background: var(--primary-light);
  border-color: var(--primary-light);
}
.hub-page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}
.hub-page-btn:disabled:hover {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text-secondary);
  transform: none;
}
.hub-page-arrow {
  font-size: 1rem;
  letter-spacing: -1px;
}
.hub-page-info {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-left: 12px;
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════
   APP CARDS (new grid layout)
   ══════════════════════════════════════════════════════════════ */
.hub-apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.hub-card-density-compact .hub-apps-grid {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}
.hub-card-density-spacious .hub-apps-grid {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}
.hub-app-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px);
  animation: cardReveal 0.45s ease-out forwards;
}
.hub-card-density-compact .hub-app-card { padding: 16px; }
.hub-card-density-spacious .hub-app-card { padding: 30px; }
.hub-app-card:nth-child(1) { animation-delay: 0.05s; }
.hub-app-card:nth-child(2) { animation-delay: 0.1s; }
.hub-app-card:nth-child(3) { animation-delay: 0.15s; }
.hub-app-card:nth-child(4) { animation-delay: 0.2s; }
.hub-app-card:nth-child(5) { animation-delay: 0.25s; }
.hub-app-card:nth-child(6) { animation-delay: 0.3s; }
@keyframes cardReveal { to { opacity: 1; transform: translateY(0); } }

.hub-app-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--card-accent, var(--primary)), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.hub-app-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.hub-app-card:hover::before { opacity: 1; }

.hub-app-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}
.hub-app-icon-wrap {
  width: 52px; height: 52px;
  border-radius: var(--radius);
  background: var(--icon-bg, var(--primary-glow));
  border: 1px solid var(--icon-border, rgba(99,102,241,0.2));
  display: flex;
  align-items: center;
  justify-content: center;
}
.hub-app-icon { font-size: 1.5rem; }
.hub-app-badge {
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.hub-app-badge-platform {
  background: rgba(168,85,247,0.1);
  color: #c084fc;
  border: 1px solid rgba(168,85,247,0.2);
}
.hub-app-badge-external {
  background: rgba(14,165,233,0.1);
  color: #7dd3fc;
  border: 1px solid rgba(14,165,233,0.22);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hub-app-badge-live {
  background: rgba(34,197,94,0.1);
  color: var(--success);
  border: 1px solid rgba(34,197,94,0.2);
  display: flex;
  align-items: center;
  gap: 5px;
}
.hub-live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
  animation: pulse-glow 2s infinite;
}
.hub-live-dot-sm {
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 4px var(--success);
}

.hub-app-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.hub-app-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 14px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hub-app-features {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.hub-app-feat {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 600;
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.hub-app-pricing {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 16px;
}
.hub-app-price-from {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.hub-app-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.hub-app-price small {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
}
.hub-app-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}
.hub-app-btn {
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}
.hub-app-btn-secondary {
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.hub-app-btn-secondary:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
  border-color: var(--border-hover);
}
.hub-app-btn-primary {
  background: var(--card-accent, var(--primary));
  color: #fff;
  border: 1px solid transparent;
  box-shadow: 0 2px 12px color-mix(in srgb, var(--card-accent, var(--primary)) 30%, transparent);
}
.hub-app-btn-primary:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px color-mix(in srgb, var(--card-accent, var(--primary)) 40%, transparent);
}
.hub-app-btn-download {
  flex-basis: 100%;
  background: linear-gradient(135deg, #22c55e, #06b6d4);
  color: #03120d;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 8px 22px rgba(34,197,94,0.16);
  font-weight: 800;
}
.hub-app-btn-download:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(6,182,212,0.2);
}
.hub-app-btn-sm {
  padding: 7px 12px;
  font-size: 0.78rem;
}

/* ══════════════════════════════════════════════════════════════
   MEINE APPS SECTION (active packages)
   ══════════════════════════════════════════════════════════════ */
.hub-my-apps-section {
  position: relative;
}
.hub-my-apps-section::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-xl);
  padding: 1px;
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(168,85,247,0.1), transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 0;
}
.hub-my-app-card {
  border-color: rgba(99,102,241,0.15);
  background: linear-gradient(135deg, rgba(99,102,241,0.04), var(--bg-card));
}
.hub-my-app-card:hover {
  border-color: rgba(99,102,241,0.3);
  background: linear-gradient(135deg, rgba(99,102,241,0.07), var(--bg-card));
}
.hub-my-app-active-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(34,197,94,0.1);
  color: #22c55e;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.hub-my-app-stats {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  margin-bottom: 6px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.hub-my-app-stat {
  display: flex;
  align-items: baseline;
  gap: 5px;
}
.hub-my-app-stat-val {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}
.hub-my-app-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.hub-chip-myapps {
  border-color: rgba(99,102,241,0.2);
  background: rgba(99,102,241,0.06);
}
.hub-chip-myapps.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.hub-my-app-access-btn {
  width: 100%;
}
.hub-my-app-access-panel {
  --my-app-accent: var(--primary);
  width: min(980px, calc(100vw - 32px));
  height: auto;
  max-height: min(860px, 90vh);
  border-color: color-mix(in srgb, var(--my-app-accent) 24%, var(--border-hover));
  overflow: hidden;
}
.hub-my-app-access-header {
  align-items: flex-start;
  gap: 16px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--my-app-accent) 15%, transparent), transparent 52%),
    rgba(255,255,255,0.015);
}
.hub-my-app-access-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.hub-my-app-access-icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: color-mix(in srgb, var(--my-app-accent) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--my-app-accent) 30%, transparent);
  font-size: 1.35rem;
}
.hub-my-app-access-kicker {
  margin: 0 0 3px;
  color: color-mix(in srgb, var(--my-app-accent) 62%, #e2e8f0);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}
.hub-my-app-access-body {
  padding: 22px;
  overflow-y: auto;
}
.hub-my-app-access-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
  gap: 16px;
}
.hub-my-app-access-grid-hub {
  grid-template-columns: minmax(260px, 0.75fr) minmax(320px, 1fr);
}
.hub-my-app-access-section {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255,255,255,0.025);
}
.hub-my-app-access-section-wide {
  grid-column: 1 / -1;
}
.hub-my-app-access-section-head {
  margin-bottom: 14px;
}
.hub-my-app-access-section-head h4 {
  margin: 0 0 4px;
  color: var(--text-primary);
  font-size: 0.98rem;
  font-weight: 800;
}
.hub-my-app-access-section-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.45;
}
.hub-my-app-access-links {
  display: grid;
  gap: 10px;
}
.hub-my-app-access-link {
  min-height: 68px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid var(--border);
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}
.hub-my-app-access-link:hover {
  transform: translateY(-1px);
}
.hub-my-app-access-link.hub-app-btn-primary {
  border-color: transparent;
  background: var(--my-app-accent);
  color: #fff;
  box-shadow: 0 12px 30px color-mix(in srgb, var(--my-app-accent) 24%, transparent);
}
.hub-my-app-access-link.hub-app-btn-secondary {
  background: rgba(255,255,255,0.045);
  color: var(--text-primary);
}
.hub-my-app-access-link.hub-app-btn-secondary:hover {
  border-color: color-mix(in srgb, var(--my-app-accent) 30%, var(--border-hover));
  background: rgba(255,255,255,0.07);
}
.hub-my-app-access-link.hub-app-btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.hub-my-app-access-link.hub-app-btn-ghost:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: rgba(255,255,255,0.035);
}
.hub-my-app-access-link-title {
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.2;
}
.hub-my-app-access-link-sub {
  color: currentColor;
  font-size: 0.73rem;
  line-height: 1.25;
  opacity: 0.72;
}
.hub-my-app-package-list,
.hub-my-app-owned-hubs {
  display: grid;
  gap: 10px;
}
.hub-my-app-package-card,
.hub-my-app-owned-hub-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(8,10,20,0.34);
  padding: 13px;
}
.hub-my-app-package-head,
.hub-my-app-owned-hub-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.hub-my-app-package-head h4,
.hub-my-app-owned-hub-main h4 {
  margin: 0 0 3px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.hub-my-app-package-head p,
.hub-my-app-owned-hub-main p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.74rem;
  overflow-wrap: anywhere;
}
.hub-my-app-package-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
}
.hub-my-app-package-status.is-active {
  background: rgba(34,197,94,0.12);
  color: #34d399;
}
.hub-my-app-package-status.is-muted {
  background: rgba(148,163,184,0.12);
  color: #94a3b8;
}
.hub-my-app-package-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 0.74rem;
}
.hub-my-app-package-meta strong {
  color: var(--text-primary);
}
.hub-my-app-owned-hub-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.hub-my-app-access-empty {
  padding: 16px;
  border: 1px dashed var(--border-hover);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}
@media (max-width: 760px) {
  .hub-my-app-access-panel {
    width: calc(100vw - 18px);
    max-height: 92vh;
  }
  .hub-my-app-access-header {
    align-items: stretch;
    flex-direction: column;
  }
  .hub-my-app-access-header #hubMyAppAccessClose {
    width: 100%;
  }
  .hub-my-app-access-body {
    padding: 14px;
  }
  .hub-my-app-access-grid,
  .hub-my-app-access-grid-hub {
    grid-template-columns: 1fr;
  }
  .hub-my-app-owned-hub-actions {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════════════════════ */
.hub-empty {
  text-align: center;
  padding: 60px 20px;
}
.hub-empty-icon { font-size: 2.5rem; margin-bottom: 12px; opacity: 0.5; }
.hub-empty-text { font-size: 0.95rem; color: var(--text-muted); }
.hub-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.hub-spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
/* @keyframes spin → components.css */

/* ══════════════════════════════════════════════════════════════
   CONTRACTS PANEL
   ══════════════════════════════════════════════════════════════ */
.hub-panel-header {
  margin-bottom: 28px;
}
.hub-panel-header h2 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 6px;
}
.hub-panel-header p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.hub-contracts-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  align-items: center;
}
.hub-toolbar-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.hub-select {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.82rem;
  outline: none;
  transition: var(--transition);
  cursor: pointer;
  -webkit-appearance: none;
}
.hub-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }

/* ── Contract Cards Grid ── */
.hub-contracts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.hub-contract-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition);
  opacity: 0;
  transform: translateY(12px);
  animation: cardReveal 0.4s ease-out forwards;
}
.hub-contract-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.hub-contract-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.hub-contract-app-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.hub-contract-app-info { flex: 1; min-width: 0; }
.hub-contract-app-name { font-weight: 700; font-size: 0.95rem; }
.hub-contract-tier { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.hub-contract-status {
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.hub-status-active { background: rgba(34,197,94,0.1); color: var(--success); border: 1px solid rgba(34,197,94,0.2); }
.hub-status-expired { background: rgba(239,68,68,0.1); color: var(--danger); border: 1px solid rgba(239,68,68,0.2); }
.hub-status-other { background: var(--glass); color: var(--text-muted); border: 1px solid var(--border); }

.hub-contract-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius);
}
.hub-contract-detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hub-cd-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.hub-cd-val { font-size: 0.88rem; font-weight: 600; }
.hub-cd-uuid {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.hub-contract-actions {
  display: flex;
  gap: 8px;
}

/* ══════════════════════════════════════════════════════════════
   BILLING PANEL
   ══════════════════════════════════════════════════════════════ */
.hub-billing-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}
.hub-billing-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: var(--transition);
}
.hub-billing-card:hover { border-color: var(--border-hover); }
.hub-billing-card-icon { font-size: 1.8rem; }
.hub-billing-card-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.hub-billing-card-val { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02em; }

@media (max-width: 768px) {
  .hub-billing-summary { grid-template-columns: 1fr; }
}

.hub-billing-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.hub-billing-section h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.hub-billing-table-wrap { overflow-x: auto; }
.hub-billing-table {
  width: 100%;
  border-collapse: collapse;
}
.hub-billing-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.hub-billing-table td {
  padding: 12px 16px;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  vertical-align: middle;
}
.hub-billing-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.hub-billing-table tfoot td {
  padding-top: 16px;
  border-top: 1px solid var(--border);
  border-bottom: none;
}
.hub-bill-app { font-weight: 600; }
.hub-bill-price { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ══════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════ */
.hub-footer {
  border-top: 1px solid var(--border);
  background: #06060c;
  color: var(--text-muted);
  padding: 0 24px;
}
.hub-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: block;
}
.hub-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) repeat(2, minmax(160px, 1fr));
  gap: clamp(28px, 5vw, 56px);
  padding: 46px 0 36px;
  border-bottom: 1px solid var(--border);
}
.hub-footer-brand,
.hub-footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1rem;
  color: var(--text-primary);
  text-decoration: none;
}
.hub-footer-brand img {
  height: 32px;
  max-width: 180px;
  object-fit: contain;
  border-radius: 6px;
}
.hub-footer-brand-block p {
  max-width: 360px;
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}
.hub-footer-logo-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #fff;
}
.hub-footer-column h4 {
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 14px;
}
.hub-footer-column ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hub-footer-column a,
.hub-footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.hub-footer-column a:hover,
.hub-footer-links a:hover { color: var(--text-primary); }
.hub-footer-bottom,
.hub-footer-copy {
  padding: 18px 0 20px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}
.hub-footer-powered {
  color: color-mix(in srgb, var(--text-muted) 78%, transparent);
}
.hub-footer-powered a {
  color: var(--primary-light);
  text-decoration: none;
}
.hub-footer-powered a:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════════════════════
   LANGUAGE DROPDOWN
   ══════════════════════════════════════════════════════════════ */
.lang-dropdown { position: relative; }
.lang-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.lang-dropdown-toggle:hover { background: rgba(255,255,255,0.08); border-color: var(--border-hover); }
.lang-dropdown-toggle .lang-flag { font-size: 1rem; }
.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  padding: 6px;
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition);
}
.lang-dropdown.open .lang-dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 14px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}
.lang-option:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
.lang-option.active { background: rgba(99,102,241,0.12); color: #fff; }
.lang-option .lang-flag { font-size: 1.1rem; }
.lang-option .lang-check { margin-left: auto; font-size: 0.75rem; opacity: 0; color: var(--primary); }
.lang-option.active .lang-check { opacity: 1; }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .hub-hero-guest { padding: 120px 16px 60px; min-height: auto; }
  .hub-hero-title { font-size: 1.8rem; }
  .hub-hero-actions { flex-direction: column; }
  .hub-hero-stats { gap: 16px; }
  .hub-hero-stat-num { font-size: 1.2rem; }
  .hub-navbar { padding: 0 16px; }
  .hub-main { padding: 0 16px 60px; }
  .hub-apps-grid { grid-template-columns: 1fr; }
  .hub-contracts-grid { grid-template-columns: 1fr; }
  .hub-filter-bar { flex-direction: column; align-items: stretch; }
  .hub-filter-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .hub-filter-chips::-webkit-scrollbar { display: none; }
  .hub-contracts-toolbar { flex-direction: column; }
  .hub-toolbar-group { flex-wrap: wrap; }
  .hub-footer-grid { grid-template-columns: 1fr; text-align: center; }
  .hub-footer-brand { justify-content: center; }
  .hub-footer-brand-block p { margin-left: auto; margin-right: auto; }
  .hub-footer-bottom { text-align: center; }
  .hub-doc-item { flex-direction: column; align-items: flex-start; gap: 10px; }
  .hub-doc-item-actions { width: 100%; }
  .hub-doc-item-amount { margin: 0; }
  .hub-viewer-panel { width: 96%; height: 92vh; margin: 4vh 2%; border-radius: var(--radius); }
  .hub-viewer-panel.hub-my-app-access-panel { height: auto; margin: 4vh auto; }
  .hub-cd-stats { grid-template-columns: repeat(2, 1fr); }
  .hub-pagination { gap: 4px; flex-wrap: wrap; }
  .hub-page-btn { min-width: 34px; height: 34px; font-size: 0.8rem; }
  .hub-page-info { display: none; }
  .hub-my-apps-grid { grid-template-columns: 1fr; }
  .hub-my-app-stats { gap: 10px; }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .hub-apps-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ══════════════════════════════════════════════════════════════
   SUB-TABS (Posteingang | Verträge | Rechnungen)
   ══════════════════════════════════════════════════════════════ */
.hub-subtabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  margin-bottom: 20px;
}
.hub-subtab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.hub-subtab:hover { color: var(--text-secondary); background: rgba(255,255,255,0.04); }
.hub-subtab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(99,102,241,0.25);
}

/* ══════════════════════════════════════════════════════════════
   DOCUMENT LIST ITEMS (inbox, contracts, invoices)
   ══════════════════════════════════════════════════════════════ */
.hub-doc-result-list { min-height: 120px; }
.hub-doc-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  transition: border-color 0.2s, background 0.2s;
}
.hub-doc-item:hover {
  border-color: rgba(99,102,241,0.25);
  background: rgba(99,102,241,0.04);
}
.hub-doc-item-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.hub-doc-item-info { flex: 1; min-width: 0; }
.hub-doc-item-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hub-doc-item-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.hub-doc-app-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 20px;
  background: rgba(99,102,241,0.1);
  color: var(--primary-light);
  font-size: 0.72rem;
  font-weight: 600;
}
.hub-doc-item-amount {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  margin-left: 8px;
  margin-right: 4px;
  flex-shrink: 0;
}
.hub-doc-item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* ── Mail read/unread states ── */
.hub-mail-unread {
  border-left: 3px solid var(--primary-light, #818cf8);
}
.hub-mail-read {
  opacity: 0.75;
}
.hub-mail-read:hover {
  opacity: 1;
}
.hub-mail-new-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 20px;
  background: var(--primary-light, #818cf8);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  vertical-align: middle;
  margin-right: 5px;
  letter-spacing: 0.03em;
}

/* ══════════════════════════════════════════════════════════════
   PAGINATION
   ══════════════════════════════════════════════════════════════ */
.hub-doc-pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}
.hub-page-btn {
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--glass);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.hub-page-btn:hover { border-color: var(--primary); color: var(--text-primary); }
.hub-page-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(99,102,241,0.3);
}

/* ══════════════════════════════════════════════════════════════
   VIEWER OVERLAY (PDF / Mail iframe)
   ══════════════════════════════════════════════════════════════ */
.hub-viewer-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
}
.hub-viewer-overlay.active { display: flex; }
.hub-viewer-panel {
  width: 90%;
  max-width: 900px;
  height: 85vh;
  background: var(--bg-elevated);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.hub-viewer-panel-md { max-width: 700px; height: auto; max-height: 85vh; }
.hub-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.hub-viewer-header h3 { font-size: 1rem; font-weight: 700; }
.hub-viewer-actions { display: flex; gap: 8px; }
.hub-viewer-frame {
  flex: 1;
  border: none;
  background: #fff;
}

/* ══════════════════════════════════════════════════════════════
   CONTRACT DETAIL OVERLAY
   ══════════════════════════════════════════════════════════════ */
.hub-contract-detail-body {
  padding: 20px;
  overflow-y: auto;
  max-height: calc(85vh - 60px);
}
.hub-cd-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.hub-cd-hero-left { display: flex; align-items: center; gap: 14px; }
.hub-cd-hero-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.hub-cd-hero-title { font-size: 1.1rem; font-weight: 800; }
.hub-cd-hero-sub { font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; }
.hub-cd-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.hub-cd-stat {
  padding: 12px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}
.hub-cd-stat-label { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.hub-cd-stat-val { font-size: 0.92rem; font-weight: 700; }
.hub-cd-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 10px;
  margin-top: 16px;
}
.hub-cd-grid { display: flex; flex-direction: column; gap: 6px; }
.hub-cd-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
}
.hub-cd-row:nth-child(even) { background: rgba(255,255,255,0.04); }
.hub-cd-key { font-size: 0.82rem; color: var(--text-secondary); }
.hub-cd-value { font-size: 0.85rem; font-weight: 600; text-align: right; max-width: 60%; word-break: break-all; }
.hub-cd-section { margin-top: 12px; }

/* ── Light theme ── */
[data-theme="light"] .hub-bg { background: #f5f5fa; }
[data-theme="light"] body { background: #f5f5fa; }

/* Navbar */
[data-theme="light"] .hub-navbar {
  background: rgba(255,255,255,0.88);
  border-bottom-color: rgba(0,0,0,0.08);
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}
[data-theme="light"] .hub-nav-logo { color: #1e1e2e; }
[data-theme="light"] .hub-nav-btn-ghost { color: #4a4a6a; }
[data-theme="light"] .hub-nav-btn-ghost:hover { color: #1e1e2e; background: rgba(0,0,0,0.04); }
[data-theme="light"] .hub-user-pill { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .hub-user-pill:hover { border-color: rgba(0,0,0,0.15); background: rgba(0,0,0,0.05); }
[data-theme="light"] .hub-user-name { color: #1e1e2e; }
[data-theme="light"] .hub-user-menu { background: #fff; border-color: rgba(0,0,0,0.1); box-shadow: 0 16px 48px rgba(0,0,0,0.12); }
[data-theme="light"] .hub-user-menu-name { color: #1e1e2e; }
[data-theme="light"] .hub-user-menu-divider { background: rgba(0,0,0,0.06); }
[data-theme="light"] .hub-user-menu-item { color: #4a4a6a; }
[data-theme="light"] .hub-user-menu-link:hover { background: rgba(99,102,241,0.06); color: var(--primary); }
[data-theme="light"] .hub-user-menu-logout:hover { background: rgba(239,68,68,0.06); }
[data-theme="light"] .hd-pag-btn { background: #fff; border-color: rgba(0,0,0,0.1); color: #4a4a6a; }
[data-theme="light"] .hd-pag-btn:hover:not(.disabled):not(.active) { background: rgba(99,102,241,0.06); color: var(--primary); border-color: rgba(99,102,241,0.3); }
[data-theme="light"] .hd-pag-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Theme toggle */
.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer; font-size: 1.15rem; transition: all 0.3s ease;
  color: var(--text-primary, #f1f1f5); position: relative; overflow: hidden;
}
.theme-toggle:hover { background: rgba(99,102,241,0.15); border-color: var(--primary); transform: rotate(15deg) scale(1.08); }
.theme-toggle:active { transform: scale(0.92); }
[data-theme="light"] .theme-toggle { background: rgba(99,102,241,0.08); border-color: rgba(99,102,241,0.2); }
[data-theme="light"] .theme-toggle:hover { background: rgba(99,102,241,0.15); border-color: var(--primary); }

/* Language dropdown */
[data-theme="light"] .lang-dropdown-toggle { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.1); color: #1e1e2e; }
[data-theme="light"] .lang-dropdown-toggle:hover { background: rgba(0,0,0,0.07); border-color: rgba(0,0,0,0.15); }
[data-theme="light"] .lang-dropdown-menu { background: #fff; border-color: rgba(0,0,0,0.1); box-shadow: 0 12px 40px rgba(0,0,0,0.12); }
[data-theme="light"] .lang-option { color: #4a4a6a; }
[data-theme="light"] .lang-option:hover { background: rgba(0,0,0,0.04); color: #1e1e2e; }
[data-theme="light"] .lang-option.active { background: rgba(99,102,241,0.08); color: var(--primary); }

/* Hero */
[data-theme="light"] .hub-hero { background: linear-gradient(135deg, #e8e8f0 0%, #f5f5fa 100%); }
[data-theme="light"] .hub-hero-title { color: #1e1e2e; }
[data-theme="light"] .hub-hero-sub,
[data-theme="light"] .hub-hero-desc { color: #4a4a6a; }
[data-theme="light"] .hub-hero-desc-sm { color: #4a4a6a; }
[data-theme="light"] .hub-hero-title-sm { color: #1e1e2e; }
[data-theme="light"] .hub-hero-stat-sep { background: rgba(0,0,0,0.1); }
[data-theme="light"] .hub-hero-stat-num { color: #1e1e2e; }
[data-theme="light"] .hub-hero-stat-label { color: #6b7280; }
[data-theme="light"] .hub-hero-btn-ghost { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.12); color: #1e1e2e; }
[data-theme="light"] .hub-hero-btn-ghost:hover { background: rgba(0,0,0,0.06); border-color: rgba(0,0,0,0.2); }
[data-theme="light"] .hub-hero-grid-overlay {
  background-image:
    linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px);
}
[data-theme="light"] .hub-hero-badge { background: rgba(99,102,241,0.06); border-color: rgba(99,102,241,0.15); }
[data-theme="light"] .hub-hero-user { background: linear-gradient(180deg, #f5f5fa 0%, #eeeef8 100%); }

/* Quick Stats */
[data-theme="light"] .hub-qs-card { background: #fff; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .hub-qs-card:hover { border-color: rgba(0,0,0,0.15); background: #fafafe; }
[data-theme="light"] .hub-qs-val { color: #1e1e2e; }
[data-theme="light"] .hub-qs-label { color: #6b7280; }

/* Tabs */
[data-theme="light"] .hub-tabs { background: #fff; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .hub-tab { color: #6b7280; }
[data-theme="light"] .hub-tab:hover { color: #4a4a6a; background: rgba(0,0,0,0.03); }
[data-theme="light"] .hub-tab.active { background: var(--primary); color: #fff; }
[data-theme="light"] .hub-tab-badge { background: rgba(239,68,68,0.08); }

/* Chips */
[data-theme="light"] .hub-chip { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.08); color: #4a4a6a; }
[data-theme="light"] .hub-chip:hover { border-color: rgba(0,0,0,0.15); color: #1e1e2e; }
[data-theme="light"] .hub-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
[data-theme="light"] .hub-chip-divider { background: rgba(0,0,0,0.08); }

/* Search */
[data-theme="light"] .hub-search-input {
  background: #ffffff;
  border-color: rgba(0,0,0,0.12);
  color: #1e1e2e;
}
[data-theme="light"] .hub-search-input::placeholder { color: #9ca3af; }
[data-theme="light"] .hub-search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }

/* Category sections */
[data-theme="light"] .hub-category-header { border-bottom-color: rgba(0,0,0,0.06); }
[data-theme="light"] .hub-category-title { color: #1e1e2e; }
[data-theme="light"] .hub-category-desc { color: #4a4a6a; }

/* App cards */
[data-theme="light"] .hub-app-card,
[data-theme="light"] .hub-card,
[data-theme="light"] .hub-extern-card {
  background: #fff;
  border-color: rgba(0,0,0,0.08);
}
[data-theme="light"] .hub-extern-card:hover {
  background: #fafafe;
  box-shadow: 0 16px 48px rgba(0,0,0,0.1), 0 0 0 1px var(--card-accent, #6366f1);
}
[data-theme="light"] .hub-market-card.is-owned {
  border-color: color-mix(in srgb, var(--card-accent, #6366f1) 38%, rgba(0,0,0,0.08));
  box-shadow: 0 14px 34px rgba(15,23,42,0.10), 0 0 0 1px color-mix(in srgb, var(--card-accent, #6366f1) 18%, transparent);
}
[data-theme="light"] .hub-extern-name { color: #1e1e2e; }
[data-theme="light"] .hub-extern-tagline { color: #4a4a6a; }
[data-theme="light"] .hub-market-tags span {
  background: rgba(0,0,0,0.035);
  border-color: rgba(0,0,0,0.07);
  color: #64748b;
}
[data-theme="light"] .hub-market-mini-badge {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.08);
  color: #64748b;
}
[data-theme="light"] .hub-market-mini-warn {
  background: rgba(245,158,11,0.12);
  border-color: rgba(245,158,11,0.25);
  color: #b45309;
}
[data-theme="light"] .hub-extern-stats {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.06);
}
[data-theme="light"] .hub-extern-stat { color: #6b7280; }
[data-theme="light"] .hub-extern-cta {
  background: rgba(99,102,241,0.07);
  border-color: rgba(99,102,241,0.18);
}
[data-theme="light"] .hub-extern-badge-free {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.08);
  color: #6b7280;
}
[data-theme="light"] .hub-app-card:hover,
[data-theme="light"] .hub-card:hover {
  border-color: rgba(99,102,241,0.25);
  background: #fafafe;
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}
[data-theme="light"] .hub-card-title,
[data-theme="light"] .hub-app-name { color: #1e1e2e; }
[data-theme="light"] .hub-app-desc { color: #4a4a6a; }
[data-theme="light"] .hub-app-feat { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.06); color: #6b7280; }
[data-theme="light"] .hub-app-price { color: #1e1e2e; }
[data-theme="light"] .hub-app-btn-secondary { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.08); color: #4a4a6a; }
[data-theme="light"] .hub-app-btn-secondary:hover { background: rgba(0,0,0,0.06); color: #1e1e2e; border-color: rgba(0,0,0,0.15); }

/* My Apps section */
[data-theme="light"] .hub-my-app-card { border-color: rgba(99,102,241,0.12); background: linear-gradient(135deg, rgba(99,102,241,0.03), #fff); }
[data-theme="light"] .hub-my-app-card:hover { border-color: rgba(99,102,241,0.25); background: linear-gradient(135deg, rgba(99,102,241,0.05), #fff); }
[data-theme="light"] .hub-my-app-stats { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.06); }

/* Subtabs */
[data-theme="light"] .hub-subtabs { background: rgba(0,0,0,0.03); }
[data-theme="light"] .hub-subtab { color: #6b7280; }
[data-theme="light"] .hub-subtab:hover { color: #4a4a6a; background: rgba(0,0,0,0.03); }
[data-theme="light"] .hub-subtab.active { background: var(--primary); color: #fff; }
[data-theme="light"] .hub-subtab-count { background: rgba(0,0,0,0.08); }
[data-theme="light"] .hub-subtab.active .hub-subtab-count { background: rgba(255,255,255,0.25); }

/* Document items */
[data-theme="light"] .hub-doc-item { background: rgba(0,0,0,0.015); border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .hub-doc-item:hover { border-color: rgba(99,102,241,0.2); background: rgba(99,102,241,0.03); }
[data-theme="light"] .hub-doc-item-title { color: #1e1e2e; }
[data-theme="light"] .hub-doc-item-amount { color: #1e1e2e; }

/* Contract cards */
[data-theme="light"] .hub-contract-card { background: #fff; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .hub-contract-card:hover { border-color: rgba(0,0,0,0.15); background: #fafafe; box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
[data-theme="light"] .hub-contract-app-name { color: #1e1e2e; }
[data-theme="light"] .hub-contract-details { background: rgba(0,0,0,0.02); }
[data-theme="light"] .hub-cd-val { color: #1e1e2e; }

/* Contract detail overlay */
[data-theme="light"] .hub-cd-row { background: rgba(0,0,0,0.02); }
[data-theme="light"] .hub-cd-row:nth-child(even) { background: rgba(0,0,0,0.04); }
[data-theme="light"] .hub-cd-stat { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.06); }
[data-theme="light"] .hub-cd-stat-val { color: #1e1e2e; }
[data-theme="light"] .hub-cd-hero-title { color: #1e1e2e; }

/* Billing */
[data-theme="light"] .hub-billing-card { background: #fff; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .hub-billing-card:hover { border-color: rgba(0,0,0,0.15); }
[data-theme="light"] .hub-billing-card-val { color: #1e1e2e; }
[data-theme="light"] .hub-billing-section { background: #fff; border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .hub-billing-section h3 { color: #1e1e2e; }
[data-theme="light"] .hub-billing-table th { border-bottom-color: rgba(0,0,0,0.08); color: #6b7280; }
[data-theme="light"] .hub-billing-table td { border-bottom-color: rgba(0,0,0,0.04); color: #1e1e2e; }
[data-theme="light"] .hub-billing-table tbody tr:hover { background: rgba(0,0,0,0.02); }
[data-theme="light"] .hub-billing-table tfoot td { border-top-color: rgba(0,0,0,0.08); }

/* Select inputs */
[data-theme="light"] .hub-select { background: #fff; border-color: rgba(0,0,0,0.1); color: #1e1e2e; }
[data-theme="light"] .hub-select:focus { border-color: var(--primary); }

/* Viewer overlay */
[data-theme="light"] .hub-viewer-overlay { background: rgba(0,0,0,0.4); }
[data-theme="light"] .hub-viewer-panel { background: #fff; border-color: rgba(0,0,0,0.1); box-shadow: 0 20px 60px rgba(0,0,0,0.15); }
[data-theme="light"] .hub-viewer-header { border-bottom-color: rgba(0,0,0,0.06); }
[data-theme="light"] .hub-viewer-header h3 { color: #1e1e2e; }

/* Pagination */
[data-theme="light"] .hub-page-btn {
  background: #fff;
  border-color: rgba(0,0,0,0.1);
  color: #4a4a6a;
}
[data-theme="light"] .hub-page-btn:hover {
  background: #f0f0f8;
  border-color: rgba(0,0,0,0.15);
  color: #1e1e2e;
}
[data-theme="light"] .hub-page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
[data-theme="light"] .hub-page-info {
  color: #7a7a9a;
}

/* Favorites */
[data-theme="light"] .hub-fav-btn {
  border-color: rgba(0,0,0,0.1);
  color: rgba(0,0,0,0.3);
}
[data-theme="light"] .hub-fav-btn:hover,
[data-theme="light"] .hub-fav-btn.hub-fav-active {
  color: #ef4444;
  border-color: rgba(239,68,68,0.3);
  background: rgba(239,68,68,0.06);
}

/* Footer */
[data-theme="light"] .hub-footer { background: #1e1e2e; border-top-color: rgba(255,255,255,0.06); }
[data-theme="light"] .hub-footer-grid { border-bottom-color: rgba(255,255,255,0.08); }
[data-theme="light"] .hub-footer-logo,
[data-theme="light"] .hub-footer-brand,
[data-theme="light"] .hub-footer-column h4 { color: #f0f0f8; }
[data-theme="light"] .hub-footer-brand-block p { color: #94a3b8; }
[data-theme="light"] .hub-footer-column a,
[data-theme="light"] .hub-footer-links a { color: #94a3b8; }
[data-theme="light"] .hub-footer-column a:hover,
[data-theme="light"] .hub-footer-links a:hover { color: #f0f0f8; }
[data-theme="light"] .hub-footer-bottom,
[data-theme="light"] .hub-footer-copy { color: #64748b; }

/* Empty state */
[data-theme="light"] .hub-empty-text { color: #6b7280; }

/* Panel header */
[data-theme="light"] .hub-panel-header h2 { color: #1e1e2e; }
[data-theme="light"] .hub-panel-header p { color: #4a4a6a; }

/* Scrollbar */
[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.18); }

/* Advanced filter bar */
[data-theme="light"] .hub-filter-bar { background: rgba(0,0,0,0.015); border-color: rgba(0,0,0,0.08); }
[data-theme="light"] .hub-filter-chip { border-color: rgba(0,0,0,0.1); color: #6b7280; }
[data-theme="light"] .hub-filter-chip:hover { border-color: var(--primary); color: var(--primary); background: rgba(99,102,241,0.06); }
[data-theme="light"] .hub-filter-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
[data-theme="light"] .hub-filter-reset-btn { background: rgba(248,113,113,0.06); border-color: rgba(248,113,113,0.25); }
[data-theme="light"] .hub-active-filters { border-top-color: rgba(0,0,0,0.06); }
[data-theme="light"] .hub-active-filter-tag { background: rgba(99,102,241,0.08); }
[data-theme="light"] .hub-active-filter-tag:hover { background: rgba(248,113,113,0.08); color: #dc2626; }

/* ══════════════════════════════════════════════════════════
   FAVORITES BUTTON
   ══════════════════════════════════════════════════════════ */

.hub-fav-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.55);
  font-size: 1rem;
  cursor: pointer;
  padding: 3px 7px;
  border-radius: var(--radius-pill);
  line-height: 1;
  transition: all 0.2s;
}
.hub-fav-btn:hover {
  color: #f87171;
  border-color: rgba(248,113,113,0.3);
  background: rgba(248,113,113,0.08);
}
.hub-fav-btn.hub-fav-active {
  color: #f87171;
  border-color: rgba(248,113,113,0.3);
  background: rgba(248,113,113,0.1);
}
.hub-fav-btn.hub-fav-loading {
  opacity: 0.55;
  cursor: wait;
  pointer-events: none;
}
.hub-fav-btn.hub-fav-error {
  color: #fbbf24;
  border-color: rgba(251,191,36,0.4);
  background: rgba(251,191,36,0.1);
  animation: fav-err-shake 0.35s ease;
}
@keyframes fav-err-shake {
  0%,100% { transform: translateX(0); }
  20%,60%  { transform: translateX(-3px); }
  40%,80%  { transform: translateX(3px); }
}
/* Empty state for favorites-only filter */
.hub-fav-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted, #64748b);
}
.hub-fav-empty-icon { font-size: 2.2rem; margin-bottom: 10px; }
.hub-fav-empty-text { font-size: 0.92rem; }

/* ══════════════════════════════════════════════════════════════
   ADVANCED FILTER BAR
   ══════════════════════════════════════════════════════════════ */
.hub-filter-bar {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 20px;
}
.hub-filter-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.hub-filter-row-extra {
  margin-top: 12px;
  justify-content: space-between;
}
.hub-toolbar-right {
  margin-left: auto;
}
.hub-select-sm {
  font-size: 0.78rem !important; /* override */
  padding: 6px 10px !important; /* override */
  min-width: auto !important; /* override */
}

/* Filter Chips */
.hub-filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.hub-filter-chip {
  padding: 5px 14px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.hub-filter-chip:hover {
  border-color: var(--primary);
  color: var(--text-secondary);
  background: rgba(99,102,241,0.06);
}
.hub-filter-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 10px rgba(99,102,241,0.3);
}

/* Filter Reset Button */
.hub-filter-reset-btn {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(248,113,113,0.3);
  background: rgba(248,113,113,0.08);
  color: #f87171;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.hub-filter-reset-btn:hover {
  background: rgba(248,113,113,0.15);
  border-color: rgba(248,113,113,0.5);
}

/* Active Filter Tags */
.hub-active-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.04);
  flex-wrap: wrap;
}
.hub-active-filters-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.hub-active-filters-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.hub-active-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(99,102,241,0.1);
  color: var(--primary-light);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.hub-active-filter-tag:hover {
  background: rgba(248,113,113,0.12);
  color: #f87171;
}

/* Sub-tab count badges */
.hub-subtab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 50px;
  background: rgba(255,255,255,0.1);
  font-size: 0.68rem;
  font-weight: 700;
  margin-left: 4px;
}
.hub-subtab.active .hub-subtab-count {
  background: rgba(255,255,255,0.25);
}
.hub-subtab-count:empty {
  display: none;
}

/* Result count header */
.hub-doc-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 2px;
}
.hub-doc-result-count {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Advanced Pagination ── */
.hub-doc-pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding: 12px 0;
  flex-wrap: wrap;
  gap: 12px;
}
.hub-doc-pagination-wrap:empty {
  display: none;
}
.hub-pagination-info {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}
.hub-pagination-controls {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}
.hub-page-nav {
  font-size: 1.1rem !important; /* override */
  font-weight: 700 !important; /* override */
}
.hub-page-nav.disabled {
  opacity: 0.3;
  pointer-events: none;
}
.hub-page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 2px;
}

/* Doc item staggered reveal */
.hub-doc-item {
  animation: hubDocItemIn 0.35s ease-out both;
}
@keyframes hubDocItemIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .hub-filter-bar { padding: 12px 14px; }
  .hub-filter-row-extra { flex-direction: column; align-items: flex-start; }
  .hub-toolbar-right { margin-left: 0; width: 100%; }
  .hub-doc-pagination-wrap { justify-content: center; flex-direction: column; align-items: center; }
}

/* ═══════════════════════════════════════════════════════════════
   HUB RENT SECTION & WIZARD
   ═══════════════════════════════════════════════════════════════ */

/* ── Rent Section ── */
.hub-rent-section {
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(6, 6, 14, 0.4) 100%);
  padding: 28px;
  margin-bottom: 28px;
}

/* ── Package Cards Grid ── */
.hub-rent-packages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.hub-rent-pkg-card {
  background: rgba(20, 20, 31, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.3s, transform 0.2s;
  position: relative;
}
.hub-rent-pkg-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
}
.hub-rent-pkg-card.popular {
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.15);
}
.hub-pkg-popular-badge {
  position: absolute;
  top: -10px;
  right: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.hub-rent-pkg-header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #f1f5f9;
}
.hub-rent-pkg-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.hub-rent-price-amount {
  font-size: 1.6rem;
  font-weight: 800;
  color: #f1f5f9;
}
.hub-rent-price-period {
  font-size: 0.85rem;
  color: rgba(241, 245, 249, 0.5);
}
.hub-rent-pkg-subtitle {
  font-size: 0.82rem;
  color: rgba(241, 245, 249, 0.55);
  margin: 0;
  line-height: 1.4;
}
.hub-rent-pkg-features {
  list-style: none;
  padding: 0;
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.hub-rent-pkg-features li {
  font-size: 0.82rem;
  line-height: 1.4;
}
.hub-rent-pkg-features li.included {
  color: rgba(241, 245, 249, 0.85);
}
.hub-rent-pkg-features li.excluded {
  color: rgba(241, 245, 249, 0.3);
  text-decoration: line-through;
}
.hub-rent-pkg-card .hub-app-btn {
  margin-top: auto;
  width: 100%;
  justify-content: center;
}

/* ── Billing Toggle ── */
.hub-rent-toggle-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(241, 245, 249, 0.4);
  cursor: pointer;
  transition: color 0.3s;
  user-select: none;
}
.hub-rent-toggle-label.active {
  color: #f1f5f9;
}
.hub-rent-save-badge {
  background: linear-gradient(135deg, #34d399, #10b981);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: 4px;
}
.hub-rent-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.hub-rent-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.hub-rent-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  transition: background 0.3s;
}
.hub-rent-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s;
}
.hub-rent-switch input:checked + .hub-rent-slider {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
}
.hub-rent-switch input:checked + .hub-rent-slider::before {
  transform: translateX(20px);
}

/* ── Yearly Total & Savings ── */
.hub-rent-yearly-total {
  font-size: 0.78rem;
  color: rgba(241, 245, 249, 0.5);
}
.hub-rent-savings {
  font-size: 0.78rem;
  color: #34d399;
  font-weight: 600;
}

/* ── Package Detail Popup ── */
.hub-pkg-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.hub-pkg-popup-panel {
  background: var(--bg-card, #14141f);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}
.hub-pkg-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  color: rgba(241, 245, 249, 0.5);
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}
.hub-pkg-popup-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
}
.hub-pkg-popup-detail {
  padding: 0;
}
.hub-pkg-popup-header {
  padding: 28px 28px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.hub-pkg-popup-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.hub-pkg-popup-title-row h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: #f1f5f9;
}
.hub-pkg-popup-badge {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.hub-pkg-popup-subtitle {
  font-size: 0.85rem;
  color: rgba(241, 245, 249, 0.55);
  margin: 0 0 16px;
}
.hub-pkg-popup-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.hub-pkg-popup-amount {
  font-size: 2rem;
  font-weight: 800;
  color: #f1f5f9;
}
.hub-pkg-popup-period {
  font-size: 0.85rem;
  color: rgba(241, 245, 249, 0.5);
}
.hub-pkg-popup-yearly {
  font-size: 0.82rem;
  color: rgba(241, 245, 249, 0.5);
  margin-top: 2px;
}
.hub-pkg-popup-savings {
  font-size: 0.82rem;
  color: #34d399;
  font-weight: 600;
  margin-top: 2px;
}
.hub-pkg-popup-hint {
  font-size: 0.78rem;
  color: rgba(241, 245, 249, 0.4);
  margin-top: 6px;
  font-style: italic;
}
.hub-pkg-popup-body {
  padding: 20px 28px;
}
.hub-pkg-popup-body h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: rgba(241, 245, 249, 0.7);
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.hub-pkg-popup-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.hub-pkg-popup-features li {
  font-size: 0.85rem;
  line-height: 1.4;
}
.hub-pkg-popup-features li.included {
  color: rgba(241, 245, 249, 0.85);
}
.hub-pkg-popup-features li.excluded {
  color: rgba(241, 245, 249, 0.3);
  text-decoration: line-through;
}
.hub-pkg-popup-actions {
  padding: 20px 28px 28px;
  display: flex;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.hub-pkg-popup-actions .hub-app-btn {
  flex: 1;
  justify-content: center;
}

/* ── Wizard Overlay ── */
.hub-wizard-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.hub-wizard-panel {
  background: #14141f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  width: 95%;
  max-width: 720px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hub-wizard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.hub-wizard-header h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #f1f5f9;
}
.hub-wizard-close {
  background: none;
  border: none;
  color: rgba(241, 245, 249, 0.5);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s;
}
.hub-wizard-close:hover { background: rgba(255, 255, 255, 0.08); }

/* ── Wizard Steps ── */
.hub-wizard-steps {
  display: flex;
  gap: 0;
  padding: 0 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.hub-wizard-step {
  flex: 1;
  text-align: center;
  padding: 14px 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(241, 245, 249, 0.35);
  border-bottom: 2px solid transparent;
  transition: color 0.3s, border-color 0.3s;
}
.hub-wizard-step.active {
  color: var(--primary-light);
  border-bottom-color: var(--primary);
}
.hub-wizard-step.done {
  color: #34d399;
}

/* ── Wizard Body ── */
.hub-wizard-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}
.hub-wizard-footer {
  display: flex;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── Hub App Checkout Overlay ── */
.hub-app-checkout-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.hub-app-checkout-panel {
  background: #14141f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  width: 95%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}
.hub-app-checkout-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  gap: 16px;
}
.hub-app-checkout-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 10px;
}
#hubAppCheckoutBody {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  min-height: 200px;
}

/* ── Wizard Form ── */
.hub-wizard-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.hub-wiz-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(241, 245, 249, 0.85);
}
.hub-wiz-label small {
  font-weight: 400;
  color: rgba(241, 245, 249, 0.4);
  font-size: 0.75rem;
}
.hub-wiz-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #f1f5f9;
  padding: 10px 14px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}
.hub-wiz-input:focus {
  border-color: rgba(99, 102, 241, 0.5);
}
.hub-wiz-color {
  width: 48px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: none;
  cursor: pointer;
  padding: 2px;
}
.hub-wiz-tier-info {
  font-size: 0.82rem;
  color: rgba(241, 245, 249, 0.5);
  padding: 10px 14px;
  background: rgba(99, 102, 241, 0.08);
  border-radius: 8px;
}

/* ── Wizard Apps ── */
.hub-wiz-apps-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
}
.hub-wiz-apps-header span {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(241, 245, 249, 0.7);
  white-space: nowrap;
}
.hub-wiz-search {
  max-width: 220px;
}
.hub-wiz-apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  max-height: 50vh;
  overflow-y: auto;
}
.hub-wiz-app-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  font-size: 0.82rem;
  color: rgba(241, 245, 249, 0.8);
}
.hub-wiz-app-item:hover {
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.05);
}
.hub-wiz-app-item.selected {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(99, 102, 241, 0.1);
}
.hub-wiz-app-item input[type="checkbox"] {
  accent-color: var(--primary);
}
.hub-wiz-app-icon {
  font-size: 1.1rem;
}
.hub-wiz-app-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Wizard Confirm ── */
.hub-wizard-confirm h3 {
  margin: 0 0 16px;
  font-size: 1rem;
  color: #f1f5f9;
}
.hub-wiz-summary {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}
.hub-wiz-summary td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
  color: rgba(241, 245, 249, 0.7);
}
.hub-wiz-summary td:first-child {
  font-weight: 600;
  color: rgba(241, 245, 249, 0.5);
  width: 120px;
}
.hub-wiz-summary code {
  background: rgba(99, 102, 241, 0.12);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.82rem;
}
.hub-wiz-apps-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.hub-wiz-app-chip {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.75rem;
  color: rgba(241, 245, 249, 0.8);
}

/* ── Meine Hubs Cards ── */
.hub-myhubs-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}
.hub-myhub-card {
  background: rgba(20, 20, 31, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.3s;
  border-top: 3px solid var(--hub-brand, #6366f1);
}
.hub-myhub-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
}
.hub-myhub-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
}
.hub-myhub-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.hub-myhub-card-header h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #f1f5f9;
}
.hub-myhub-tier {
  font-size: 0.7rem;
  color: rgba(241, 245, 249, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.hub-myhub-card-stats {
  display: flex;
  gap: 16px;
  font-size: 0.82rem;
  color: rgba(241, 245, 249, 0.55);
}
.hub-myhub-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}
.hub-status-active {
  color: #34d399;
  font-size: 0.75rem;
  font-weight: 600;
}
.hub-status-inactive {
  color: #f87171;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ── App Hub Directory Cards ── */
.hub-extern-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card, #14141f);
  border: 1px solid var(--border-color, rgba(255,255,255,0.07));
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  color: var(--text-primary, #f1f5f9);
  cursor: pointer;
  position: relative;
  opacity: 0;
  transform: translateY(16px);
  animation: cardReveal 0.45s ease-out forwards;
}
.hub-extern-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--card-accent, #6366f1), transparent);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1;
}
.hub-extern-card:hover::before { opacity: 1; }
.hub-extern-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.45), 0 0 0 1px var(--card-accent, #6366f1);
  border-color: var(--card-accent, #6366f1);
}
.hub-extern-card:focus-within {
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.45), 0 0 0 1px var(--card-accent, #6366f1);
  border-color: var(--card-accent, #6366f1);
}
.hub-market-card.is-owned {
  border-color: color-mix(in srgb, var(--card-accent, #6366f1) 54%, rgba(255,255,255,0.1));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--card-accent, #6366f1) 22%, transparent), 0 14px 38px rgba(0,0,0,0.22);
}
.hub-market-card.is-featured::before,
.hub-market-card.is-owned::before {
  opacity: 1;
}
.hub-market-card.is-hidden-public {
  opacity: 0.78;
}
.hub-extern-card-header {
  padding: 20px 20px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.hub-market-card-header {
  position: relative;
  min-height: 132px;
  overflow: hidden;
  padding: 18px;
  background: rgba(99,102,241,0.12);
  background: linear-gradient(135deg, color-mix(in srgb, var(--card-accent, #6366f1) 26%, #0f172a), rgba(15,23,42,0.68));
}
.hub-market-cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  transform: scale(1.01);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.hub-market-card:hover .hub-market-cover-img {
  transform: scale(1.04);
  opacity: 0.86;
}
.hub-market-cover-fallback {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2,6,23,0.04), rgba(2,6,23,0.72));
}
.hub-market-header-content {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.hub-market-badge-stack {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}
.hub-extern-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
  border: 2px solid rgba(255,255,255,0.12);
}
.hub-extern-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}
/* tier badges */
.hub-extern-badge {
  font-size: 0.68rem;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.hub-extern-badge-pro {
  background: rgba(234,179,8,0.13);
  color: #fbbf24;
  border: 1px solid rgba(234,179,8,0.3);
}
.hub-extern-badge-starter {
  background: rgba(99,102,241,0.13);
  color: var(--primary-light);
  border: 1px solid rgba(99,102,241,0.3);
}
.hub-extern-badge-free {
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary, #94a3b8);
  border: 1px solid rgba(255,255,255,0.1);
}
.hub-extern-card-body {
  padding: 0 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.hub-market-title-row {
  min-height: 24px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
}
.hub-market-owned-badge,
.hub-market-mini-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  max-width: 100%;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
.hub-market-owned-badge {
  background: color-mix(in srgb, var(--card-accent, #6366f1) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--card-accent, #6366f1) 36%, transparent);
  color: color-mix(in srgb, var(--card-accent, #6366f1) 76%, #f8fafc);
}
.hub-market-mini-badge {
  background: rgba(148,163,184,0.10);
  border: 1px solid rgba(148,163,184,0.22);
  color: #cbd5e1;
}
.hub-market-mini-warn {
  background: rgba(245,158,11,0.11);
  border-color: rgba(245,158,11,0.28);
  color: #fbbf24;
}
.hub-market-title-link {
  color: inherit;
  text-decoration: none;
}
.hub-market-title-link:focus-visible {
  outline: 2px solid var(--card-accent, #6366f1);
  outline-offset: 4px;
  border-radius: 6px;
}
.hub-extern-card-body:focus-visible {
  outline: none;
}
.hub-extern-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 5px;
  color: var(--text-primary, #f1f5f9);
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.hub-extern-tagline {
  font-size: 0.82rem;
  color: var(--text-secondary, #94a3b8);
  margin: 0 0 14px;
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hub-market-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
}
.hub-market-tags span {
  min-height: 22px;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(241,245,249,0.68);
  font-size: 0.69rem;
  font-weight: 700;
}
.hub-extern-stats {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  padding: 9px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
}
.hub-extern-stat {
  font-size: 0.77rem;
  color: var(--text-secondary, #94a3b8);
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
}
.hub-extern-stat svg {
  flex-shrink: 0;
}
.hub-extern-stat + .hub-extern-stat {
  padding-left: 8px;
  border-left: 1px solid rgba(255,255,255,0.08);
}
.hub-extern-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.2);
  color: var(--card-accent, #818cf8);
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  text-align: center;
  margin-top: auto;
}
.hub-market-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: auto;
}
.hub-market-actions .hub-extern-cta {
  margin-top: 0;
}
.hub-market-manage-btn {
  min-height: 40px;
  white-space: nowrap;
}
.hub-extern-card:hover .hub-extern-cta {
  background: rgba(99,102,241,0.18);
  border-color: var(--card-accent, #6366f1);
  color: var(--card-accent, #a5b4fc);
}

/* chip style for hubs filter */
.hub-chip-hubs { border-color: rgba(99,102,241,0.3) !important; }
.hub-chip-hubs.active {
  background: rgba(99,102,241,0.15) !important; /* override */
  border-color: var(--primary) !important; /* override */
  color: var(--primary-light) !important; /* override */
}

@media (max-width: 640px) {
  .hub-market-actions {
    grid-template-columns: 1fr;
  }
  .hub-market-manage-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ═══════════════════════════════════════════════════════════════
   HUB-DETAIL PAGINATION
   ═══════════════════════════════════════════════════════════════ */
.hd-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding: 14px 0;
  flex-wrap: wrap;
  gap: 12px;
}
.hd-pag-info {
  font-size: 0.8rem;
  color: var(--text-muted, #64748b);
  font-weight: 500;
}
.hd-pag-btns {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}
.hd-pag-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color, rgba(255,255,255,0.08));
  background: var(--bg-card, #14141f);
  color: var(--text-secondary, #94a3b8);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.hd-pag-btn:hover:not(.disabled):not(.active) {
  background: rgba(99,102,241,0.1);
  color: var(--primary, #6366f1);
  border-color: rgba(99,102,241,0.3);
}
.hd-pag-btn.active {
  background: var(--primary, #6366f1);
  color: #fff;
  border-color: var(--primary, #6366f1);
  font-weight: 700;
}
.hd-pag-btn.disabled {
  opacity: 0.3;
  pointer-events: none;
  cursor: default;
}
.hd-pag-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--text-muted, #64748b);
  font-size: 0.8rem;
  letter-spacing: 2px;
}

/* ── Responsive for hub rent ── */
@media (max-width: 768px) {
  .hub-rent-packages { grid-template-columns: 1fr; }
  .hub-wizard-panel { max-width: 100%; border-radius: 12px 12px 0 0; max-height: 90vh; }
  .hub-wiz-apps-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .hub-myhubs-list { grid-template-columns: 1fr; }
  .hub-wiz-apps-header { flex-direction: column; align-items: stretch; }
  .hub-wiz-search { max-width: 100%; }
  .hd-pagination { justify-content: center; flex-direction: column; align-items: center; }
}

/* Visually hidden – accessible to screen readers only */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ═══════════════════════════════════════════════════════════
   MODUS VIEW KACHEL – Badge Variants & Card Mode Styles
   ═══════════════════════════════════════════════════════════ */

/* ── Badge: Development (orange) ── */
.hub-app-badge-development {
  background: rgba(249, 115, 22, 0.12);
  color: #f97316;
  border: 1px solid rgba(249, 115, 22, 0.25);
}

/* ── Badge: Demo (cyan) ── */
.hub-app-badge-demo {
  background: rgba(6, 182, 212, 0.12);
  color: #06b6d4;
  border: 1px solid rgba(6, 182, 212, 0.25);
}

/* ── Badge: Free (green) ── */
.hub-app-badge-free {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

/* ── Badge: Beta (purple/neon) ── */
.hub-app-badge-beta {
  background: rgba(168, 85, 247, 0.12);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.3);
  animation: badge-neon-pulse 2.5s ease-in-out infinite;
}
@keyframes badge-neon-pulse {
  0%, 100% { box-shadow: 0 0 4px rgba(168, 85, 247, 0.15); }
  50% { box-shadow: 0 0 12px rgba(168, 85, 247, 0.4); }
}

/* ── Badge: Coming Soon (grey) ── */
.hub-app-badge-coming-soon {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

/* ── Badge: Waitlist (indigo) ── */
.hub-app-badge-waitlist {
  background: rgba(99, 102, 241, 0.12);
  color: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.25);
}

/* ── Badge: Deprecated (red) ── */
.hub-app-badge-deprecated {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

/* ── Card Mode: Development ── */
.hub-app-card[data-mode="development"] {
  opacity: 0.78;
  border-style: dashed;
  border-color: rgba(249, 115, 22, 0.25);
}
.hub-app-card[data-mode="development"]:hover {
  opacity: 0.92;
  border-color: rgba(249, 115, 22, 0.45);
}

/* ── Card Mode: Demo – diagonal ribbon ── */
.hub-app-card[data-mode="demo"] {
  overflow: hidden;
}
.hub-app-card[data-mode="demo"]::after {
  content: "DEMO";
  position: absolute;
  top: 18px;
  right: -32px;
  width: 120px;
  text-align: center;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: #fff;
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  transform: rotate(45deg);
  padding: 4px 0;
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
  z-index: 2;
  pointer-events: none;
}

/* ── Card Mode: Free – green accent glow ── */
.hub-app-card[data-mode="free"] {
  border-color: rgba(34, 197, 94, 0.18);
}
.hub-app-card[data-mode="free"]:hover {
  border-color: rgba(34, 197, 94, 0.35);
  box-shadow: 0 8px 32px rgba(34, 197, 94, 0.1), var(--shadow-md);
}
.hub-app-card[data-mode="free"]::before {
  background: linear-gradient(90deg, #22c55e, transparent) !important;
  opacity: 1 !important;
}

/* ── Card Mode: Beta – neon glow border ── */
.hub-app-card[data-mode="beta"] {
  border-color: rgba(168, 85, 247, 0.25);
  animation: card-beta-glow 3s ease-in-out infinite;
}
@keyframes card-beta-glow {
  0%, 100% { box-shadow: 0 0 0 rgba(168, 85, 247, 0); }
  50% { box-shadow: 0 0 20px rgba(168, 85, 247, 0.12), 0 0 40px rgba(168, 85, 247, 0.06); }
}
.hub-app-card[data-mode="beta"]:hover {
  border-color: rgba(168, 85, 247, 0.45);
}
.hub-app-card[data-mode="beta"]::before {
  background: linear-gradient(90deg, #a855f7, #ec4899, transparent) !important;
}

/* ── Card Mode: Coming Soon – greyed out ── */
.hub-app-card[data-mode="coming_soon"] {
  opacity: 0.55;
  filter: grayscale(0.4);
  pointer-events: auto;
}
.hub-app-card[data-mode="coming_soon"]:hover {
  opacity: 0.72;
  filter: grayscale(0.15);
}
.hub-app-card[data-mode="coming_soon"] .hub-app-actions {
  opacity: 0.6;
}

/* ── Card Mode: Waitlist – subtle indigo glow ── */
.hub-app-card[data-mode="waitlist"] {
  border-color: rgba(99, 102, 241, 0.25);
}
.hub-app-card[data-mode="waitlist"]:hover {
  border-color: rgba(99, 102, 241, 0.45);
}

/* ── Card Mode: Deprecated – faded, red top ── */
.hub-app-card[data-mode="deprecated"] {
  opacity: 0.6;
  border-color: rgba(239, 68, 68, 0.2);
}
.hub-app-card[data-mode="deprecated"]::before {
  background: linear-gradient(90deg, #ef4444, transparent) !important;
  opacity: 1 !important;
}
.hub-app-card[data-mode="deprecated"]:hover {
  opacity: 0.78;
  border-color: rgba(239, 68, 68, 0.35);
}
.hub-app-card[data-mode="deprecated"] .hub-app-name {
  text-decoration: line-through;
  text-decoration-color: rgba(239, 68, 68, 0.4);
}

/* ── Light theme overrides ── */
[data-theme="light"] .hub-app-badge-development { background: rgba(249,115,22,0.08); }
[data-theme="light"] .hub-app-badge-demo { background: rgba(6,182,212,0.08); }
[data-theme="light"] .hub-app-badge-free { background: rgba(34,197,94,0.08); }
[data-theme="light"] .hub-app-badge-beta { background: rgba(168,85,247,0.08); }
[data-theme="light"] .hub-app-badge-coming-soon { background: rgba(148,163,184,0.08); }
[data-theme="light"] .hub-app-badge-waitlist { background: rgba(99,102,241,0.08); }
[data-theme="light"] .hub-app-badge-deprecated { background: rgba(239,68,68,0.08); }

/* ═══════════════════════════════════════════════════════════════════════
   Modular hub additions (added during hub.html refactor)
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Section loading / error / empty states ── */
.hub-section-error {
  display: flex; flex-direction: column; align-items: center;
  padding: 32px; gap: 12px;
}
.hub-section-error-icon { font-size: 2rem; }
.hub-section-error-text {
  color: var(--danger, #ef4444); font-size: 0.95rem; text-align: center;
}
.hub-section-empty {
  display: flex; flex-direction: column; align-items: center;
  padding: 24px; gap: 8px; color: var(--text-secondary, #94a3b8);
}

/* ── Tenant hub-info card layout ── */
.hd-hub-info-inner { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.hd-hub-info-logo {
  width: 64px; height: 64px; display: flex; align-items: center;
  justify-content: center; border-radius: 12px;
  background: var(--primary-glow, rgba(99,102,241,0.1)); flex-shrink: 0;
}
.hd-hub-logo-img { width: 42px; height: 42px; object-fit: contain; }
.hd-hub-logo-fallback { font-size: 1.8rem; }
.hd-hub-info-body { flex: 1; min-width: 200px; }
.hd-hub-info-title-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px;
}
.hd-hub-name { margin: 0; font-size: 1.2rem; }
.hd-hub-own-badge { font-size: 0.7rem; }
.hd-hub-tagline { margin: 0 0 8px; color: var(--text-secondary, #94a3b8); }
.hd-hub-meta {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: 0.82rem; color: var(--text-secondary, #94a3b8);
}
.hd-hub-footer-text { margin-top: 6px; font-size: 0.8rem; color: var(--text-muted); }

/* ── Powered-by block ── */
.hd-powered {
  padding: 24px; text-align: center; font-size: 0.78rem;
  color: var(--text-muted); border-top: 1px solid var(--border-color);
}
.hd-powered a { color: var(--primary-light); text-decoration: none; }
.hd-powered a:hover { text-decoration: underline; }

/* ── App card layout helpers ── */
.hub-app-card-badges { display: flex; gap: 6px; align-items: center; }
.hub-nav-logo-img { height: 28px; }
.hub-app-btn-deprecated { opacity: 0.7; }

/* ── Light theme additions ── */
[data-theme="light"] .hub-section-error-text { color: var(--danger, #dc2626); }

/* ════════════════════════════════════════════════════════════
   GUEST PROMO POPUP (shown instead of wizard for non-logged users)
   ════════════════════════════════════════════════════════════ */
.hub-guest-promo-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.hub-guest-promo-panel {
  background: linear-gradient(145deg, #1a1a2e 0%, #16162a 60%, #1a1040 100%);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 22px;
  width: 100%;
  max-width: 440px;
  padding: 40px 36px 32px;
  position: relative;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.6), 0 0 60px rgba(99, 102, 241, 0.15);
  text-align: center;
}
.hub-guest-promo-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  color: rgba(241, 245, 249, 0.4);
  font-size: 1.4rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}
.hub-guest-promo-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
}
.hub-guest-promo-emoji {
  font-size: 3rem;
  margin-bottom: 12px;
  animation: hubPromoPulse 2.4s ease-in-out infinite;
}
@keyframes hubPromoPulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.1); }
}
.hub-guest-promo-title {
  font-size: 1.7rem;
  font-weight: 900;
  background: linear-gradient(135deg, #a78bfa, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 10px;
  line-height: 1.2;
}
.hub-guest-promo-sub {
  color: rgba(241, 245, 249, 0.7);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0 0 20px;
}
.hub-guest-promo-perks {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}
.hub-guest-promo-perks li {
  color: rgba(241, 245, 249, 0.85);
  font-size: 0.9rem;
  padding: 6px 12px;
  background: rgba(99, 102, 241, 0.08);
  border-radius: 8px;
  border: 1px solid rgba(99, 102, 241, 0.14);
}
.hub-guest-promo-cta {
  display: block;
  width: 100%;
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 24px;
  border-radius: 12px;
  text-decoration: none;
  margin-bottom: 14px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.hub-guest-promo-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.45);
}
.hub-guest-promo-login-link {
  display: block;
  color: rgba(241, 245, 249, 0.5);
  font-size: 0.82rem;
  text-decoration: none;
  transition: color 0.2s;
}
.hub-guest-promo-login-link:hover {
  color: rgba(241, 245, 249, 0.9);
}
