/* ============================================
   HUBLER HUB
   Palette extracted from brand content:
   Deep Navy #0A2540 | Cyan #00B4D8 | Orange #FF6B35
   Font: Inter (from content slides)
   ============================================ */

:root {
  --navy: #0A2540;
  --navy-light: #0E2E4E;
  --navy-card: #0D2A47;
  --cyan: #00B4D8;
  --cyan-soft: rgba(0, 180, 216, 0.10);
  --cyan-border: rgba(0, 180, 216, 0.20);
  --orange: #FF6B35;
  --orange-soft: rgba(255, 107, 53, 0.12);
  --white: #FFFFFF;
  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.60);
  --text-muted: rgba(255, 255, 255, 0.30);
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(0, 180, 216, 0.25);
  --sidebar-width: 240px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
  height: 100%;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--navy);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  overflow: hidden;
  position: relative;
}

/* ---- Signature grid lines (from Hubler slides) ---- */

.grid-lines {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 180, 216, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 180, 216, 0.035) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.bg-glow--1 {
  width: 600px;
  height: 600px;
  top: -10%;
  right: -5%;
  background: radial-gradient(circle, rgba(0, 180, 216, 0.07) 0%, transparent 65%);
}

.bg-glow--2 {
  width: 500px;
  height: 500px;
  bottom: -10%;
  left: 20%;
  background: radial-gradient(circle, rgba(26, 115, 232, 0.05) 0%, transparent 65%);
}

/* ---- Sidebar ---- */

#sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  background: rgba(8, 28, 50, 0.92);
  backdrop-filter: blur(16px);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 10;
  transition: transform var(--transition);
  position: relative;
}

#sidebar::-webkit-scrollbar { width: 0; }

.sidebar-header {
  padding: 24px 20px 20px;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 24px;
  width: auto;
  opacity: 0.9;
  transition: opacity var(--transition);
}

.logo:hover .logo-img {
  opacity: 1;
}

/* ---- Navigation ---- */

#app-nav {
  list-style: none;
  padding: 4px 10px;
  flex: 1;
}

.nav-divider {
  padding: 24px 12px 10px;
}

.nav-divider-text {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nav-item {
  margin-bottom: 1px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--cyan-soft);
}

.nav-link.active {
  color: var(--text-primary);
  background: var(--cyan-soft);
  border-left: 3px solid var(--cyan);
  padding-left: 9px;
}

.nav-link.disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.nav-link.disabled:hover {
  background: none;
  color: var(--text-secondary);
}

.nav-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-icon svg { width: 17px; height: 17px; }

.nav-label { white-space: nowrap; }

.badge-soon {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 50px;
  background: var(--orange-soft);
  color: var(--orange);
  margin-left: auto;
}

/* ---- Sidebar Footer ---- */

.sidebar-footer {
  padding: 14px 20px 22px;
  margin-top: auto;
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 14px;
}

.sidebar-tag {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1px;
  color: var(--text-muted);
}

/* ---- Mobile ---- */

.mobile-toggle {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 200;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(10, 37, 64, 0.9);
  backdrop-filter: blur(12px);
  color: var(--text-primary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

#mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 37, 64, 0.85);
  backdrop-filter: blur(6px);
  z-index: 5;
}

/* ---- Main Content ---- */

#content-area {
  flex: 1;
  height: 100vh;
  overflow: auto;
  position: relative;
  z-index: 1;
}

.app-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ---- Home View ---- */

.home-view {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 64px 48px;
  max-width: 960px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

/* ---- Hero ---- */

.home-hero {
  margin-bottom: 64px;
}

.hero-logo-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
}

.hero-logo {
  height: 32px;
  width: auto;
}

.hero-sep {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.15);
}

.hero-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cyan);
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}

.hero-title .accent {
  color: var(--cyan);
}

.hero-sub {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 480px;
}

/* ---- App Grid ---- */

.app-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.app-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  min-height: 190px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  animation: slideUp 0.5s ease both;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.app-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: radial-gradient(circle at 30% 20%, rgba(0, 180, 216, 0.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.app-card:hover:not(.disabled) {
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.app-card:hover:not(.disabled)::after {
  opacity: 1;
}

.app-card:hover:not(.disabled) .app-card-icon {
  color: var(--cyan);
}

.app-card:hover:not(.disabled) .card-go {
  opacity: 1;
  transform: translateX(0);
}

.app-card.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.app-card > * {
  position: relative;
  z-index: 1;
}

.app-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.app-card-icon {
  width: 32px;
  height: 32px;
  color: rgba(255, 255, 255, 0.45);
  transition: color 0.5s ease;
}

.app-card-icon svg { width: 32px; height: 32px; }

.app-card-num {
  font-size: 13px;
  font-weight: 800;
  color: var(--cyan);
  background: var(--cyan-soft);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-card-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.app-card-desc {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.6;
}

.app-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 18px;
}

.card-status {
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.dot.active {
  background: #4ADE80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.4);
}

.dot.soon {
  background: var(--orange);
  opacity: 0.6;
}

.card-go {
  font-size: 11px;
  font-weight: 600;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.4s ease;
  letter-spacing: 0.5px;
}

.card-go svg {
  width: 14px;
  height: 14px;
}

/* ---- Footer bar ---- */

.home-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.home-footer span {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.home-footer .footer-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
  #sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
  }

  body.sidebar-open #sidebar {
    transform: translateX(0);
  }

  body.sidebar-open #mobile-overlay {
    display: block;
  }

  .mobile-toggle {
    display: flex;
  }

  #content-area {
    width: 100%;
  }

  .home-view {
    padding: 72px 24px 32px;
    justify-content: flex-start;
    padding-top: 80px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .home-hero {
    margin-bottom: 40px;
  }

  .app-grid {
    grid-template-columns: 1fr;
  }

  .hero-logo-wrap {
    margin-bottom: 32px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.7rem;
  }

  .hero-sub {
    font-size: 14px;
  }

  .app-card {
    padding: 22px;
    min-height: 160px;
  }
}
