/*
 * Layout Components
 * Navbar, main content, hero section, sidebar
 */

/* Navbar */
.navbar {
  background-color: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 24px 12px 22px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1010;
  transition: left 0.2s ease;
}

/* Dark mode: swap nav/content colors */
[data-theme="dark"] .navbar {
  background-color: var(--bg-primary);
}

/* Navbar without sidebar (landing page, etc.) */
.navbar-full {
  left: 0;
}

/* Navbar when sidebar is collapsed */
body.sidebar-collapsed .navbar {
  left: 0;
}


.navbar-page-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.navbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  flex: 1;
}

.navbar-theme-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-theme-toggle .theme-icon {
  color: var(--text-secondary);
}

.navbar-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.navbar-team {
  position: absolute;
  left: 0;
  height: 100%;
  width: var(--workspace-bar-width, 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.navbar-team-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.navbar-team-icon svg {
  width: 18px;
  height: 18px;
}

.navbar-team-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.navbar-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Compact search bar for navbar */
.search-bar-compact {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  width: 400px;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.search-bar-compact:focus-within {
  border-color: var(--accent-primary);
}

.search-bar-compact .search-icon {
  color: var(--text-secondary);
  flex-shrink: 0;
}

.search-bar-compact .search-input {
  flex: 1;
  background: none;
  border: none;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
}

.search-bar-compact .search-input::placeholder {
  color: var(--text-secondary);
}

.search-shortcut {
  display: flex;
  align-items: center;
}

.search-shortcut .kbd {
  padding: 2px 6px;
  font-size: 11px;
}

/* Navbar icon buttons */
.navbar-icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.navbar-icon-btn:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.navbar-icon-btn-primary {
  width: 30px;
  height: 30px;
  background: var(--accent-primary);
  color: white;
}

.navbar-icon-btn-primary:hover {
  background: var(--accent-secondary);
  color: white;
}

.navbar-notification-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--accent-primary);
  border-radius: 50%;
  border: 2px solid var(--bg-secondary);
}

/* Account Dropdown */
.account-dropdown {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.account-dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  background: none;
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.15s ease;
}

.account-dropdown-trigger:hover {
  border-color: var(--border-color);
}

.account-dropdown-trigger.active {
  border-color: var(--accent-primary);
}

.account-dropdown-trigger .avatar {
  width: 36px;
  height: 36px;
  font-size: 13px;
}

/* Hide profile name in navbar context */
.navbar .sidebar-profile-name {
  display: none;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transform-origin: top right;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  z-index: 1100;
}

.dropdown-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.dropdown-header-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dropdown-header-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.dropdown-header-email {
  font-size: 12px;
  color: var(--text-secondary);
}

.dropdown-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 4px 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-primary);
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.dropdown-item:hover {
  background-color: var(--bg-tertiary);
}

.dropdown-item svg {
  color: var(--text-secondary);
  flex-shrink: 0;
}

.dropdown-item-danger {
  color: var(--accent-red, #ef4444);
}

.dropdown-item-danger svg {
  color: var(--accent-red, #ef4444);
}

/* Dropdown Theme Toggle */
.dropdown-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
}

.dropdown-theme-toggle .theme-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
}

.navbar-logo {
  flex-shrink: 0;
  transform: translateY(1px);
}

.brand-dot {
  color: var(--accent-primary);
}

.navbar-brand:hover {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Main content */
.main-content {
  display: flex;
  justify-content: center;
  align-items: center;
  height: calc(100vh - 60px);
  margin-top: 60px; /* Account for fixed navbar */
}

.main-content h1 {
  color: var(--text-secondary);
  font-weight: 400;
  font-size: 24px;
}

/* Hero section */
.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 60px);
  margin-top: 60px; /* Account for fixed navbar */
  padding: 48px 24px 120px;
  position: relative;
}

/* Landing page hero override */
.landing-page .hero {
  min-height: auto;
  margin-top: 52px;
  padding: 24px 24px 0;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
}

.hero-content {
  text-align: center;
  max-width: 600px;
  animation: fadeInUp 0.8s ease-out;
}

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

.hero-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 32px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float 3s ease-in-out infinite;
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3);
}

.hero-icon svg {
  width: 40px;
  height: 40px;
  color: white;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero-title {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 32px;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  padding: 10px 20px;
  border-radius: 100px;
  font-size: 14px;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-green);
  margin-right: 4px;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Hero inline email form */
.hero-form {
  display: flex;
  gap: 8px;
  justify-content: center;
  max-width: 420px;
  margin: 0 auto;
}


.hero-form-input {
  flex: 1;
  min-width: 0;
}

.hero-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}

.hero-theme-toggle .theme-icon {
  color: var(--text-secondary);
}

/* Bottom CTA section */
.landing-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 64px;
  min-height: calc(100vh - 52px);
  margin-top: 52px;
}

.site-footer {
  padding: 24px;
  text-align: center;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-theme-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-theme-toggle .theme-icon {
  color: var(--text-secondary);
}

.site-footer a {
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
  padding: 8px 0;
}

.site-footer a:hover {
  color: var(--accent-primary);
}

.hero-footer {
  position: fixed;
  bottom: 24px;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 10;
}

.hero-footer a {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.hero-footer a:hover {
  color: var(--accent-primary);
}

/* Screenshot placeholder */
.screenshot-placeholder {
  max-width: 912px;
  width: calc(100% - 48px);
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 14px;
}

/* Features section */
.features {
  max-width: 960px;
  width: 100%;
  padding: 0 24px;
}

.features-heading {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 32px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
}

.feature-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 32px;
  animation: fadeInUp 0.6s ease-out both;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--accent-primary);
}

.feature-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.feature-description {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.feature-description code {
  font-size: 12px;
  padding: 2px 6px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

.feature-description kbd {
  font-size: 12px;
  padding: 2px 6px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: inherit;
  font-weight: 500;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 32px;
  }

  .features-heading {
    font-size: 24px;
  }

  .hero-form {
    flex-direction: column;
  }

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

.section-heading {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.cta-heading {
  margin-top: 64px;
  margin-bottom: 24px;
}

.landing-page .features-cta {
  margin-top: 0;
}

/* Sidebar */
.sidebar-demo {
  display: flex;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  height: 300px;
}

.sidebar {
  width: 240px;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: 12px;
}

.sidebar-section {
  margin-bottom: 16px;
}

.sidebar-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  padding: 8px 12px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text-primary);
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s;
}

.sidebar-item:hover {
  background-color: var(--bg-tertiary);
}

.sidebar-item.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(99, 102, 241, 0.15));
  color: var(--accent-primary);
}

.sidebar-content {
  flex: 1;
  padding: 16px;
  background-color: var(--bg-primary);
}

