/* ═══════════════════════════════════════════════════════
   TradeForge Profile Hub — Unified Command Center
   Mobile-first, single canonical profile experience
   ═══════════════════════════════════════════════════════ */

.hub-page { padding: 0 0 80px; }

/* ── SHARED BUTTON SYSTEM ── */
.hub-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  border: 1px solid rgba(181,183,185,.2);
  background: rgba(255,255,255,.04); color: var(--text, #B5B7B9);
  transition: all .15s ease; white-space: nowrap;
}
.hub-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.hub-btn-primary { background: rgba(140,106,62,.2); border-color: rgba(140,106,62,.45); color: var(--bronze, #8C6A3E); }
.hub-btn-primary:hover { background: rgba(140,106,62,.35); color: #fff; }
.hub-btn-secondary { background: rgba(140,106,62,.08); border-color: rgba(140,106,62,.25); color: var(--bronze, #8C6A3E); }
.hub-btn-secondary:hover { background: rgba(140,106,62,.2); color: #fff; }
.hub-btn-ghost { border-color: rgba(181,183,185,.15); background: transparent; color: var(--muted, #6B7280); }
.hub-btn-ghost:hover { background: rgba(255,255,255,.06); color: #fff; }

/* ═══════════════════════════════════════════════════════
   SECTION — IDENTITY HEADER
   ═══════════════════════════════════════════════════════ */
.hub-identity {
  background: linear-gradient(135deg, rgba(140,106,62,.12) 0%, rgba(33,35,39,.97) 60%);
  border-bottom: 1px solid rgba(181,183,185,.08);
  padding: 28px 0;
}

.hub-id-card {
  display: flex; align-items: center;
  justify-content: space-between; gap: 20px;
}

.hub-id-left { display: flex; gap: 16px; align-items: center; flex: 1; min-width: 0; }

.hub-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  border: 2px solid rgba(140,106,62,.45);
  background: rgba(140,106,62,.12);
  color: var(--bronze, #8C6A3E);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0; font-weight: 700; font-size: 24px;
}
.hub-avatar img { width: 100%; height: 100%; object-fit: cover; }

.hub-id-info { min-width: 0; flex: 1; }
.hub-id-info h1 { margin: 0; color: #fff; font-size: 20px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }

.hub-id-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.hub-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
}
.hub-badge-role { background: rgba(140,106,62,.15); border: 1px solid rgba(140,106,62,.35); color: var(--bronze, #8C6A3E); }
.hub-badge-org { background: rgba(59,130,246,.1); border: 1px solid rgba(59,130,246,.25); color: #60a5fa; }

.hub-id-email { margin: 4px 0 0; font-size: 12px; color: var(--muted, #6B7280); }

.hub-id-right { display: flex; gap: 8px; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════
   SECTION TITLES
   ═══════════════════════════════════════════════════════ */
.hub-section-title {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 14px; color: #fff;
  font-size: 14px; font-weight: 700;
  letter-spacing: -.01em;
}
.hub-section-title svg { color: var(--bronze, #8C6A3E); flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════
   COMMAND STRIP — ATTENTION ITEMS
   ═══════════════════════════════════════════════════════ */
.hub-attention {
  padding: 18px 0;
  border-bottom: 1px solid rgba(181,183,185,.06);
}

.hub-attention-grid { display: grid; gap: 8px; }

.hub-attention-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 10px;
  background: rgba(46,49,54,.97);
  border: 1px solid rgba(181,183,185,.1);
  transition: border-color .15s ease;
}
.hub-attention-item:hover { border-color: rgba(140,106,62,.3); }

.hub-attention-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.hub-attention-icon.type-invite { background: rgba(59,130,246,.12); color: #60a5fa; }
.hub-attention-icon.type-billing { background: rgba(245,158,11,.12); color: #fbbf24; }
.hub-attention-icon.type-notif { background: rgba(140,106,62,.12); color: var(--bronze, #8C6A3E); }
.hub-attention-icon.type-action { background: rgba(34,197,94,.1); color: #4ade80; }

.hub-attention-body { flex: 1; min-width: 0; }
.hub-attention-label { display: block; font-size: 13px; color: #fff; font-weight: 600; }
.hub-attention-desc { display: block; font-size: 11px; color: var(--muted, #6B7280); margin-top: 1px; }

.hub-attention-action {
  font-size: 11px; font-weight: 600; color: var(--bronze, #8C6A3E);
  text-decoration: none; white-space: nowrap; flex-shrink: 0;
  padding: 5px 10px; border-radius: 6px;
  border: 1px solid rgba(140,106,62,.25);
  background: rgba(140,106,62,.06);
  transition: all .15s ease;
}
.hub-attention-action:hover { background: rgba(140,106,62,.18); color: #fff; }

.hub-attention-empty {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 14px; border-radius: 10px;
  background: rgba(34,197,94,.04);
  border: 1px solid rgba(34,197,94,.12);
  font-size: 13px; color: var(--muted, #6B7280);
}
.hub-attention-empty svg { color: #4ade80; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════
   QUICK ACCESS TILES
   ═══════════════════════════════════════════════════════ */
.hub-tiles {
  padding: 18px 0;
  border-bottom: 1px solid rgba(181,183,185,.06);
}

.hub-tile-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.hub-tile {
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  padding: 18px 10px; border-radius: 12px;
  background: linear-gradient(180deg, rgba(46,49,54,.97), rgba(41,44,49,.92));
  border: 1px solid rgba(181,183,185,.1);
  text-decoration: none;
  transition: all .15s ease;
  text-align: center;
}
.hub-tile:hover {
  border-color: rgba(140,106,62,.4);
  background: rgba(140,106,62,.08);
  transform: translateY(-1px);
}

.hub-tile-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: rgba(140,106,62,.1);
  border: 1px solid rgba(140,106,62,.2);
}
.hub-tile-icon svg { width: 20px; height: 20px; color: var(--bronze, #8C6A3E); }

.hub-tile-label {
  font-size: 12px; font-weight: 600;
  color: var(--text, #B5B7B9);
  line-height: 1.3;
}
.hub-tile:hover .hub-tile-label { color: #fff; }

/* ═══════════════════════════════════════════════════════
   ACCOUNT & SETTINGS
   ═══════════════════════════════════════════════════════ */
.hub-settings {
  padding: 18px 0;
  border-bottom: 1px solid rgba(181,183,185,.06);
}

.hub-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hub-setting-card {
  background: linear-gradient(180deg, rgba(46,49,54,.97), rgba(41,44,49,.92));
  border: 1px solid rgba(181,183,185,.1);
  border-radius: 12px; padding: 16px;
}

.hub-setting-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 1px solid rgba(181,183,185,.08);
}
.hub-setting-header svg { color: var(--bronze, #8C6A3E); flex-shrink: 0; }
.hub-setting-header h3 { margin: 0; color: #fff; font-size: 13px; font-weight: 700; }

.hub-setting-rows { display: grid; gap: 6px; }

.hub-setting-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; border-radius: 8px;
  background: rgba(20,22,25,.4);
  border: 1px solid rgba(181,183,185,.06);
}
.hub-setting-label { font-size: 12px; color: var(--muted, #6B7280); font-weight: 500; }
.hub-setting-label.hub-setting-empty { color: var(--muted, #6B7280); font-style: italic; }
.hub-setting-value { font-size: 12px; color: var(--text, #B5B7B9); font-weight: 600; }
.hub-value-active { color: #4ade80; }

.hub-setting-link {
  display: block; margin-top: 10px;
  font-size: 11px; font-weight: 600;
  color: var(--bronze, #8C6A3E);
  text-decoration: none;
}
.hub-setting-link:hover { color: #fff; }

/* ═══════════════════════════════════════════════════════
   ACTIVITY SNAPSHOT
   ═══════════════════════════════════════════════════════ */
.hub-activity {
  padding: 18px 0;
}

.hub-activity-list { display: grid; gap: 6px; }

.hub-activity-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 10px;
  background: rgba(46,49,54,.97);
  border: 1px solid rgba(181,183,185,.08);
}

.hub-activity-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--bronze, #8C6A3E); flex-shrink: 0;
}

.hub-activity-text {
  flex: 1; min-width: 0;
  font-size: 13px; color: var(--text, #B5B7B9);
  font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.hub-activity-time {
  font-size: 11px; color: var(--muted, #6B7280);
  flex-shrink: 0; white-space: nowrap;
}

.hub-activity-empty {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 20px 16px; border-radius: 12px;
  background: rgba(20,22,25,.3);
  border: 1px dashed rgba(181,183,185,.12);
}
.hub-activity-empty svg { color: var(--muted, #6B7280); flex-shrink: 0; margin-top: 2px; }
.hub-activity-empty-title { display: block; font-size: 13px; color: #fff; font-weight: 600; }
.hub-activity-empty-hint { display: block; font-size: 12px; color: var(--muted, #6B7280); margin-top: 2px; line-height: 1.5; }

/* ═══════════════════════════════════════════════════════
   MOBILE BOTTOM NAV
   ═══════════════════════════════════════════════════════ */
.hub-mobile-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(28,30,33,.97);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(181,183,185,.1);
  z-index: 900;
  padding-bottom: env(safe-area-inset-bottom, 0);
  display: none;
}

.hub-mobile-nav-inner {
  display: flex; justify-content: space-around;
  padding: 6px 8px;
}
.hub-mobile-nav-inner a {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; padding: 4px 6px;
  font-size: 10px; font-weight: 600; color: var(--muted, #6B7280);
  text-decoration: none; transition: color .15s ease;
}
.hub-mobile-nav-inner a svg { width: 22px; height: 22px; }
.hub-mobile-nav-inner a.active { color: var(--bronze, #8C6A3E); }
.hub-mobile-nav-inner a:active { color: var(--bronze, #8C6A3E); }

/* ═══════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════ */
.hub-toast {
  position: fixed; bottom: 90px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(28,30,33,.95); color: #fff;
  padding: 10px 20px; border-radius: 10px;
  font-size: 13px; font-weight: 600;
  border: 1px solid rgba(140,106,62,.3);
  opacity: 0; transition: all .25s ease;
  pointer-events: none; z-index: 1100;
}
.hub-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .hub-mobile-nav { display: block; }
  .hub-page { padding-bottom: 80px; }

  .hub-id-card { flex-direction: column; align-items: flex-start; gap: 14px; }
  .hub-id-right { width: 100%; }
  .hub-id-right .hub-btn { flex: 1; justify-content: center; }

  .hub-tile-grid { grid-template-columns: repeat(3, 1fr); }
  .hub-settings-grid { grid-template-columns: 1fr; }

  .hub-identity { padding: 20px 0; }
  .hub-avatar { width: 56px; height: 56px; font-size: 20px; }
  .hub-id-info h1 { font-size: 17px; }
}

@media (max-width: 480px) {
  .hub-tile-grid { grid-template-columns: repeat(2, 1fr); }
  .hub-tile { padding: 14px 8px; }
}

@media (min-width: 769px) {
  .hub-mobile-nav { display: none !important; }
  .hub-page { padding-bottom: 0; }
}
