/* Layout and Components */

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

/* Animated background */
.bg-pattern {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(196, 244, 0, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(45, 212, 191, 0.06), transparent),
    var(--bg-primary);
}

/* App Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04);
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 14px;
  color: white;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.sidebar-logo h1 {
  font-size: 22px;
  font-weight: 600;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 24px;
}

.nav-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 8px 12px;
  margin-bottom: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 4px;
  border: 1px solid transparent;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.nav-item:hover {
  background: rgba(196, 244, 0, 0.1);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(196, 244, 0, 0.15);
  color: var(--accent-dark);
  border-color: rgba(196, 244, 0, 0.3);
}

.nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-item-badge {
  margin-left: auto;
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  min-width: 24px;
  text-align: center;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.sidebar-footer-text {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

.sidebar-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.sidebar-user-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-email {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.sidebar-logout-btn:hover {
  background: var(--error-bg);
  border-color: var(--error);
  color: var(--error);
}

/* Main content area */
.main-content {
  flex: 1;
  margin-left: 260px;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 16px 20px;
}

/* Page header */
.page-header {
  margin-bottom: 20px;
  animation: fadeSlideDown 0.5s ease-out;
}

.page-title {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
}

/* View containers */
.view {
  display: none !important;
  animation: fadeSlideUp 0.4s ease-out;
}

.view.active {
  display: block !important;
}

/* Integrations empty state */
.integrations-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  text-align: center;
  padding: 60px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
}

.integrations-empty-icon {
  width: 80px;
  height: 80px;
  background: rgba(196, 244, 0, 0.15);
  border: 1px solid rgba(196, 244, 0, 0.25);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.integrations-empty-icon svg {
  width: 40px;
  height: 40px;
  color: var(--accent);
}

.integrations-empty h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.integrations-empty p {
  color: var(--text-secondary);
  font-size: 15px;
  max-width: 400px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.coming-soon-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--warning-bg);
  color: var(--warning);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.coming-soon-badge svg {
  width: 14px;
  height: 14px;
}

/* Integration Cards */
.integration-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  margin-bottom: 20px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.integration-card:hover {
  border-color: var(--accent);
}

.integration-card.coming-soon {
  opacity: 0.6;
}

.integration-card.coming-soon:hover {
  border-color: var(--border-color);
}

.integration-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
}

.integration-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.integration-icon svg {
  width: 28px;
  height: 28px;
}

.integration-icon.github-icon {
  background: #24292e;
  color: white;
}

.integration-icon.jira-icon {
  background: #0052cc;
  color: white;
}

.integration-icon.slack-icon {
  background: #4a154b;
  color: white;
}

.integration-info {
  flex: 1;
}

.integration-info h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.integration-info p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0;
}

.integration-status {
  flex-shrink: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.status-badge.connected {
  background: var(--success-bg);
  color: var(--success);
}

.status-badge.disconnected {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.status-badge.coming-soon {
  background: var(--warning-bg);
  color: var(--warning);
}

.integration-body {
  padding: 16px;
}

/* GitHub Not Connected State */
.github-not-connected p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 10px;
}

.feature-list li svg {
  width: 18px;
  height: 18px;
  color: var(--success);
  flex-shrink: 0;
}

.btn-github {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: #24292e;
  color: white;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-github:hover {
  background: #1b1f23;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(196, 244, 0, 0.35);
}

.btn-github svg {
  width: 20px;
  height: 20px;
}

/* GitHub Connected State */
.github-user-info {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: 12px;
  margin-bottom: 24px;
}

.github-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--success);
}

.github-user-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.github-username {
  font-weight: 600;
  font-size: 16px;
}

.github-label {
  font-size: 12px;
  color: var(--success);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-disconnect {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--error);
  color: var(--error);
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-disconnect:hover {
  background: var(--error-bg);
}

/* Repos Section */
.github-repos-section {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.repos-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.repos-header h4 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.default-repo-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--success);
  border-radius: 10px;
  margin-bottom: 16px;
}

.default-repo-banner svg {
  width: 20px;
  height: 20px;
  color: var(--success);
  flex-shrink: 0;
}

.default-repo-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.default-repo-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.default-repo-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--success);
  font-family: 'JetBrains Mono', monospace;
}

.btn-refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-refresh:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-refresh svg {
  width: 14px;
  height: 14px;
}

.repos-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: 10px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.repos-list {
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.repo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.repo-item:hover {
  border-color: var(--accent);
  transform: translateX(4px);
}

.repo-item.is-default {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.05);
}

.default-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--success-bg);
  color: var(--success);
  font-size: 11px;
  font-weight: 600;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.repo-icon {
  width: 36px;
  height: 36px;
  background: var(--bg-input);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

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

.repo-icon.private {
  color: var(--warning);
}

.repo-info {
  flex: 1;
  min-width: 0;
}

.repo-name {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.repo-name a {
  color: var(--text-primary);
  text-decoration: none;
}

.repo-name a:hover {
  color: var(--accent);
}

.repo-visibility {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 600;
}

.repo-visibility.private {
  background: var(--warning-bg);
  color: var(--warning);
}

.repo-visibility.public {
  background: var(--success-bg);
  color: var(--success);
}

.repo-desc {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.repo-meta {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
}

.repo-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.repo-stat svg {
  width: 14px;
  height: 14px;
}

.repo-language {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.language-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.btn-set-default {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(196, 244, 0, 0.15);
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-set-default:hover {
  background: var(--accent);
  color: white;
}

.btn-set-default svg {
  width: 14px;
  height: 14px;
}

