/**
 * WeylandAI Brand System
 * Version: 1.0
 * Date: 2025-11-22
 */

:root {
  /* WeylandAI Brand Colors */
  --weyland-primary: #0066CC;
  --weyland-secondary: #00CC66;
  --weyland-dark: #1a1a2e;
  --weyland-light: #f8f9fa;
  --weyland-gray: #6c757d;

  /* SubX Product Colors */
  --subx-primary: #FF6B35;
  --subx-accent: #F7931E;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;

  /* Typography */
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
  --font-mono: 'Courier New', monospace;
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--weyland-dark);
  background: var(--weyland-light);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header Styles */
.weylandai-header {
  background: var(--weyland-dark);
  color: white;
  padding: var(--space-md) var(--space-xl);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

/* Company Logo */
.company-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: white;
  font-weight: 600;
  font-size: 1.25rem;
  transition: opacity 0.2s ease;
}

.company-logo:hover {
  opacity: 0.85;
}

.logo-img {
  height: 36px;
  width: auto;
}

.logo-text {
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Product Name */
.product-section {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex: 1;
  justify-content: center;
}

.product-name {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--subx-primary);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.product-icon {
  width: 32px;
  height: 32px;
}

.product-subtitle {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
  margin-left: var(--space-sm);
}

/* User Menu */
.user-menu {
  position: relative;
}

.user-button {
  display: none; /* Hidden by default, shown when authenticated */
  align-items: center;
  gap: var(--space-sm);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: var(--space-sm) var(--space-md);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.user-button:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.user-name {
  font-weight: 500;
}

.user-icon {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* User Dropdown Menu */
.user-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  z-index: 2000;
  display: none;
}

.user-dropdown.show {
  display: block;
}

.user-dropdown-item {
  padding: var(--space-md);
  cursor: pointer;
  color: var(--weyland-dark);
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s ease;
}

.user-dropdown-item:hover {
  background: #f8f9fa;
}

.user-dropdown-item:last-child {
  border-bottom: none;
}

.user-dropdown-item.danger {
  color: #dc3545;
}

.user-dropdown-item.danger:hover {
  background: #fff5f5;
}

/* Footer Styles */
.weylandai-footer {
  background: var(--weyland-light);
  padding: var(--space-lg) var(--space-xl);
  text-align: center;
  color: var(--weyland-gray);
  font-size: 0.875rem;
  border-top: 1px solid #e0e0e0;
  margin-top: auto;
}

.weylandai-footer a {
  color: var(--weyland-primary);
  text-decoration: none;
}

.weylandai-footer a:hover {
  text-decoration: underline;
}

/* Main Content Area */
#app {
  flex: 1;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-xl);
}

/* Utility Classes */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.text-center {
  text-align: center;
}

.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }

.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }

/* Responsive Design */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: var(--space-md);
  }

  .product-section {
    justify-content: flex-start;
    width: 100%;
  }

  .product-name {
    font-size: 1.25rem;
  }

  #app {
    padding: var(--space-md);
  }
}

@media (max-width: 480px) {
  .company-logo {
    font-size: 1rem;
  }

  .logo-img {
    height: 28px;
  }

  .product-name {
    font-size: 1.125rem;
  }
}
