/* Hub CSS — LP Hub v1.0.0 */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@600;800&family=Inter:wght@400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: 'Inter', system-ui, sans-serif; font-size: 16px; background: #f5f5f7; overflow-x: hidden; overscroll-behavior: none; }

/* AUTH LOADING */
#auth-loading { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 16px; background: #0f0f14; z-index: 999; }
.spinner { width: 24px; height: 24px; border: 2px solid rgba(255,255,255,0.15); border-top-color: #6366f1; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* HEADER */
.hub-header { background: #0f0f14; height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; position: sticky; top: 0; z-index: 100; flex-shrink: 0; }
.hub-header-left, .hub-header-right { display: flex; align-items: center; gap: 12px; }
.hub-logo { font-family: 'Bricolage Grotesque', sans-serif; font-size: 17px; font-weight: 800; color: #fff; letter-spacing: -0.4px; }
.hub-logo span { color: #6366f1; }
.menu-btn { background: none; border: none; color: #888; font-size: 18px; cursor: pointer; padding: 8px; line-height: 1; display: none; }
.hub-user-name { font-size: 13px; color: #888; }
.hub-signout { background: none; border: none; color: #666; font-size: 13px; cursor: pointer; padding: 6px 10px; border-radius: 6px; }
.hub-signout:hover { color: #fff; background: rgba(255,255,255,0.08); }

/* LAYOUT */
.hub-layout { display: flex; min-height: calc(100vh - 52px); }

/* SIDEBAR */
.hub-sidebar { width: 176px; flex-shrink: 0; background: #f8f8fa; border-right: 0.5px solid #e5e5ea; padding: 16px 0; }
.nav-section-label { font-size: 9px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #aaa; padding: 10px 16px 4px; }
.nav-item { display: flex; align-items: center; gap: 8px; padding: 9px 16px; font-size: 13px; font-weight: 500; color: #777; cursor: pointer; text-decoration: none; border-right: 2px solid transparent; transition: color 0.1s; }
.nav-item i { font-style: normal; font-size: 15px; }
.nav-item:hover { color: #1a1a2e; }
.nav-item.active { color: #6366f1; background: #fff; border-right-color: #6366f1; font-weight: 600; }

/* MAIN */
.hub-main { flex: 1; overflow-y: auto; }
.hub-section { display: none; }
.hub-section.active { display: block; }

/* HERO */
.hub-hero { background: #0f0f14; padding: 20px 24px; border-bottom: 0.5px solid #1e1e28; }
.hub-hero-eyebrow { display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: #666; margin-bottom: 8px; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; flex-shrink: 0; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }
.hub-hero-title { font-family: 'Bricolage Grotesque', sans-serif; font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 6px; letter-spacing: -0.3px; }
.hub-hero-sub { font-size: 13px; color: #888; margin-bottom: 4px; }
.hub-hero-body { font-size: 13px; color: #777; line-height: 1.6; margin-top: 6px; }

/* CONTENT */
.hub-content { padding: 20px 24px; }
.hub-section-label { font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #aaa; margin-bottom: 12px; }

/* GRID */
.hub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hub-tile { background: #fff; border: 0.5px solid #e5e5ea; border-radius: 10px; padding: 14px; text-decoration: none; display: block; transition: border-color 0.15s; }
.hub-tile:hover { border-color: #6366f1; }
.hub-tile-locked { opacity: 0.4; cursor: not-allowed; }
.hub-tile-icon { font-size: 22px; margin-bottom: 8px; }
.hub-tile-label { font-family: 'Bricolage Grotesque', sans-serif; font-size: 13px; font-weight: 600; color: #1a1a2e; margin-bottom: 2px; }
.hub-tile-desc { font-size: 12px; color: #888; }
.lock-icon { font-size: 11px; }

/* PRICING */
.hub-pricing-table { background: #fff; border: 0.5px solid #e5e5ea; border-radius: 10px; overflow: hidden; margin-bottom: 10px; }
.hub-pricing-head { padding: 9px 14px; font-size: 10px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; }
.hub-pricing-row { display: grid; grid-template-columns: 1fr 1fr 1fr; padding: 9px 12px; }
.hub-pricing-row-border { border-bottom: 0.5px solid #e5e5ea; }
.hub-pricing-tier { font-size: 13px; color: #666; }
.hub-pricing-price { font-size: 13px; font-weight: 600; color: #1a1a2e; }
.hub-pricing-monthly { font-size: 12px; color: #888; }

/* DOCS */
.hub-doc-row { background: #fff; border: 0.5px solid #e5e5ea; border-radius: 10px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.hub-doc-icon { font-size: 20px; flex-shrink: 0; }
.hub-doc-name { font-size: 13px; font-weight: 600; color: #1a1a2e; }
.hub-doc-desc { font-size: 12px; color: #888; }

/* FOCUS */
.hub-focus-row { background: #fff; border: 0.5px solid #e5e5ea; border-radius: 10px; padding: 10px 14px; display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; color: #1a1a2e; }
.hub-focus-num { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 4px; background: rgba(99,102,241,0.1); color: #6366f1; flex-shrink: 0; }

/* ADMIN */
.hub-loading { color: #aaa; font-size: 14px; padding: 16px 0; }
.hub-user-row { background: #fff; border: 0.5px solid #e5e5ea; border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.hub-user-header { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; }
.hub-user-avatar { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex-shrink: 0; }
.hub-user-info { flex: 1; }
.hub-user-name { font-family: 'Bricolage Grotesque', sans-serif; font-size: 13px; font-weight: 600; color: #1a1a2e; }
.hub-user-email { font-size: 11px; color: #888; }
.hub-role-badge { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 100px; }
.hub-role-admin { background: rgba(99,102,241,0.1); color: #6366f1; }
.hub-role-staff { background: #f3f3f8; color: #888; border: 0.5px solid #e5e5ea; }
.hub-chevron { font-size: 14px; color: #ccc; transition: transform 0.2s; }
.hub-user-apps { border-top: 0.5px solid #e5e5ea; padding: 10px 14px; background: #fafafa; }
.hub-apps-label { font-size: 9px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: #aaa; margin-bottom: 8px; }
.hub-toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 0.5px solid #eee; font-size: 13px; color: #1a1a2e; }
.hub-toggle-row-last { border: none; }
.hub-toggle { width: 36px; height: 20px; border-radius: 10px; background: #e5e5ea; border: none; cursor: pointer; position: relative; transition: background 0.15s; flex-shrink: 0; }
.hub-toggle::after { content: ''; position: absolute; width: 14px; height: 14px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: transform 0.15s; }
.hub-toggle.on { background: #6366f1; }
.hub-toggle.on::after { transform: translateX(16px); }

/* MODAL */
.hub-modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 16px; }
.hub-modal { background: #fff; border-radius: 12px; padding: 20px; width: 100%; max-width: 480px; }
.hub-modal-title { font-family: 'Bricolage Grotesque', sans-serif; font-size: 16px; font-weight: 800; color: #1a1a2e; margin-bottom: 16px; }
.hub-modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.hub-input { width: 100%; padding: 10px 12px; font-size: 16px; border: 0.5px solid #e5e5ea; border-radius: 8px; margin-bottom: 8px; font-family: 'Inter', sans-serif; background: #f8f8fa; color: #1a1a2e; }
.hub-input:focus { outline: none; border-color: #6366f1; }

/* BUTTONS */
.hub-btn-primary { background: #6366f1; color: #fff; border: none; border-radius: 8px; padding: 10px 18px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: 'Inter', sans-serif; }
.hub-btn-primary:hover { background: #4f52d8; }
.hub-btn-ghost { background: none; border: 0.5px solid #e5e5ea; border-radius: 8px; padding: 10px 18px; font-size: 14px; color: #666; cursor: pointer; font-family: 'Inter', sans-serif; margin: 0 0 12px; }
.hub-btn-ghost:hover { border-color: #6366f1; color: #6366f1; }

/* TOAST */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #1a1a2e; color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity 0.2s; z-index: 300; white-space: nowrap; }
.toast.show { opacity: 1; }

/* SIDEBAR OVERLAY */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.3); z-index: 90; }
.sidebar-overlay.active { display: block; }

/* MOBILE */
@media (max-width: 767px) {
  .menu-btn { display: block; }
  .hub-user-name { display: none; }
  .hub-sidebar { position: fixed; left: -200px; top: 52px; bottom: 0; width: 200px; z-index: 95; background: #f8f8fa; border-right: 0.5px solid #e5e5ea; padding: 16px 0; transition: left 0.25s; }
  .hub-sidebar.open { left: 0; }
  .hub-hero-title { font-size: 17px; }
  .hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hub-pricing-row { grid-template-columns: 1fr 1fr; }
  .hub-pricing-monthly { display: none; }
}

/* ADMIN HEADER */
.hub-admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.hub-btn-sm { padding: 8px 14px; font-size: 13px; min-height: 36px; }

/* MUST CHANGE PASSWORD BADGE */
.hub-badge-pw { font-size: 14px; margin-left: 4px; }

/* CREATE USER MODAL EXTRAS */
.hub-form-label { display: block; font-size: 12px; font-weight: 600; color: #6b7280; margin-bottom: 4px; }
.hub-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.hub-check-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.hub-check-label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #1a1a2e; cursor: pointer; background: #f3f4f6; border-radius: 6px; padding: 6px 10px; }
.hub-check-label input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: #6366f1; }
.hub-modal-error { background: #fef2f2; border: 1px solid #fecaca; border-radius: 6px; padding: 8px 12px; font-size: 13px; color: #dc2626; margin-top: 8px; }
.hub-pw-toggle { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 16px; min-height: 44px; min-width: 44px; display: flex; align-items: center; justify-content: center; }
