@import "https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=IBM+Plex+Sans:wght@400;500;600&display=swap";

/* styles.css */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-primary: #fff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #e5f2f2;
  --bg-hover: #f0f4f4;
  --bg-accent: #2e5049;
  --border-primary: #e5e7eb;
  --border-secondary: #d1d5db;
  --border-accent: #658b82;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;
  --accent-primary: #2e5049;
  --accent-hover: #1f3530;
  --accent-light: #658b82;
  --accent-bg: #e5f2f2;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: IBM Plex Sans, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif;
  font-weight: 400;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, .logo, .card-title, .project-title, .dashboard-title, .onboarding-title, .auth-logo, .nav-section-title, .form-label {
  font-family: Manrope, sans-serif;
  font-weight: 700;
}

#root {
  min-height: 100vh;
}

.modal-overlay {
  position: fixed;
  backdrop-filter: blur(4px);
  display: flex;
  z-index: 1000;
  animation: fadeIn .2s ease-out;
  background-color: #1f2937bf;
  justify-content: center;
  align-items:  center;
  padding: 32px;
  inset: 0;
}

.modal-content {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  overflow-y: auto;
  animation: slideUp .3s ease-out;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  box-shadow: 0 20px 25px -5px #0000001a, 0 10px 10px -5px #0000000a;
}

.modal-header {
  border-bottom: 1px solid var(--border-primary);
  display: flex;
  background-color: var(--bg-secondary);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  justify-content: space-between;
  align-items:  start;
  padding: 24px 32px;
}

.modal-title {
  color: var(--text-primary);
  margin-bottom: 4px;
  font-size: 20px;
  font-weight: 700;
}

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

.modal-close {
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  background: none;
  border: none;
  justify-content: center;
  align-items:  center;
  padding: 4px;
  transition: color .15s;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 32px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.app-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  background-color: var(--bg-primary);
  border-right: 1px solid var(--border-primary);
  display: flex;
  position: fixed;
  flex-direction: column;
  width: 240px;
  height: 100vh;
  top: 0;
  left: 0;
}

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

.logo {
  color: var(--text-primary);
  letter-spacing: -.02em;
  font-size: 18px;
  font-weight: 600;
}

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

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

.nav-section-title {
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-tertiary);
  padding: 0 12px 8px;
  font-size: 11px;
  font-weight: 500;
}

.nav-item {
  display: flex;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  background: none;
  border: none;
  align-items:  center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  transition: all .15s;
  font-size: 14px;
}

.nav-item:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.nav-icon {
  opacity: .7;
  width: 18px;
  height: 18px;
}

.sidebar-footer {
  border-top: 1px solid var(--border-primary);
  padding: 16px;
}

.user-menu {
  display: flex;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items:  center;
  gap: 12px;
  padding: 10px 12px;
  transition: background-color .15s;
}

.user-menu:hover {
  background-color: var(--bg-hover);
}

.user-avatar {
  background-color: var(--accent-primary);
  color: #fff;
  display: flex;
  border-radius: 50%;
  justify-content: center;
  align-items:  center;
  width: 32px;
  height: 32px;
  font-size: 14px;
  font-weight: 500;
}

.user-info {
  flex: 1;
}

.user-name {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
}

.user-email {
  color: var(--text-tertiary);
  font-size: 12px;
}

.main-content {
  background-color: var(--bg-secondary);
  flex: 1;
  min-height: 100vh;
  margin-left: 240px;
  padding: 32px;
}

.auth-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

.auth-left {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-light) 100%);
  display: flex;
  position: relative;
  overflow: hidden;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
}

.auth-left:before {
  content: "";
  position: absolute;
  opacity: .5;
  pointer-events: none;
  background: radial-gradient(circle, #ffffff1a 1px, #0000 1px) 0 0 / 40px 40px;
  width: 200%;
  height: 200%;
  top: -50%;
  right: -50%;
}

.auth-branding {
  position: relative;
  z-index: 1;
}

.auth-brand-logo {
  color: #fff;
  letter-spacing: -.03em;
  margin-bottom: 24px;
  font-size: 32px;
  font-weight: 800;
}

.auth-brand-tagline {
  color: #fffffff2;
  margin-bottom: 32px;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.5;
}

.auth-features {
  display: flex;
  position: relative;
  z-index: 1;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 48px;
}

.auth-feature {
  display: flex;
  color: #fff;
  align-items:  start;
  gap: 16px;
}

.auth-feature-icon {
  display: flex;
  backdrop-filter: blur(10px);
  color: #fff;
  background: #fff3;
  border-radius: 6px;
  flex-shrink: 0;
  justify-content: center;
  align-items:  center;
  width: 24px;
  height: 24px;
}

.auth-feature-icon svg {
  stroke: white;
}

.auth-feature-text {
  flex: 1;
}

.auth-feature-title {
  color: #fff;
  margin-bottom: 4px;
  font-size: 15px;
  font-weight: 600;
}

.auth-feature-description {
  color: #fffc;
  font-size: 14px;
  line-height: 1.5;
}

.auth-right {
  display: flex;
  background-color: var(--bg-secondary);
  justify-content: center;
  align-items:  center;
  padding: 60px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
}

.auth-header {
  margin-bottom: 32px;
}

.auth-logo {
  letter-spacing: -.03em;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-size: 28px;
  font-weight: 800;
}

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

@media (width <= 968px) {
  .auth-container {
    grid-template-columns: 1fr;
  }

  .auth-left {
    display: none;
  }

  .auth-right {
    padding: 32px;
  }
}

.onboarding-container {
  max-width: 640px;
  margin: 0 auto;
}

.onboarding-header {
  text-align: center;
  margin-bottom: 40px;
}

.onboarding-title {
  letter-spacing: -.03em;
  margin-bottom: 8px;
  font-size: 28px;
  font-weight: 600;
}

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

.onboarding-steps {
  display: flex;
  gap: 8px;
  margin-bottom: 40px;
}

.step-indicator {
  background-color: var(--border-primary);
  overflow: hidden;
  border-radius: 2px;
  flex: 1;
  height: 4px;
}

.step-indicator.active, .step-indicator.completed {
  background-color: var(--accent-primary);
}

@keyframes skeleton-shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--border-primary) 50%, var(--bg-secondary) 75%);
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  background-size: 200% 100%;
  border-radius: 4px;
}

.skeleton-title {
  width: 55%;
  height: 18px;
}

.skeleton-line {
  height: 13px;
}

.skeleton-badge {
  border-radius: 12px;
  width: 80px;
  height: 22px;
}

.skeleton-btn {
  border-radius: var(--radius-sm, 6px);
  width: 120px;
  height: 32px;
}

.card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  padding: 24px;
}

.card-header {
  margin-bottom: 20px;
}

.card-title {
  letter-spacing: -.02em;
  margin-bottom: 4px;
  font-size: 18px;
  font-weight: 600;
}

.card-description {
  color: var(--text-secondary);
  font-size: 14px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
}

.form-hint {
  display: block;
  color: var(--text-tertiary);
  margin-top: 6px;
  font-size: 12px;
}

.form-input, .form-select {
  background-color: var(--bg-primary);
  border: 1.5px solid var(--border-primary);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  width: 100%;
  padding: 10px 12px;
  transition: all .15s;
  font-size: 14px;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  background-color: var(--bg-primary);
  box-shadow: 0 0 0 3px var(--accent-bg);
}

.form-input::placeholder {
  color: var(--text-tertiary);
}

.form-select {
  cursor: pointer;
}

.btn {
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  border: none;
  justify-content: center;
  align-items:  center;
  gap: 8px;
  padding: 10px 16px;
  transition: all .15s;
  font-size: 14px;
  font-weight: 500;
}

.btn-primary {
  background-color: var(--accent-primary);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
}

.btn-primary:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.btn-secondary {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  border: 1.5px solid var(--border-primary);
}

.btn-secondary:hover {
  background-color: var(--bg-secondary);
  border-color: var(--border-secondary);
}

.btn-ghost {
  color: var(--text-secondary);
  background-color: #0000;
}

.btn-ghost:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.btn-full {
  width: 100%;
}

.badge {
  display: inline-flex;
  border-radius: 12px;
  align-items:  center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
}

.badge-success {
  color: #065f46;
  background-color: #d1fae5;
}

.badge-warning {
  color: #92400e;
  background-color: #fef3c7;
}

.badge-error {
  color: #991b1b;
  background-color: #fee2e2;
}

.badge-neutral {
  background-color: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-primary);
}

.status-dot {
  background-color: currentColor;
  border-radius: 50%;
  width: 6px;
  height: 6px;
}

.db-options {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.db-option {
  display: flex;
  background-color: var(--bg-secondary);
  border: 2px solid var(--border-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  align-items:  center;
  gap: 16px;
  padding: 16px;
  transition: all .15s;
}

.db-option:hover {
  border-color: var(--border-secondary);
  background-color: var(--bg-hover);
}

.db-option.selected {
  border-color: var(--accent-primary);
  background-color: var(--accent-bg);
}

.db-option-icon {
  border-radius: var(--radius-sm);
  background-color: var(--bg-primary);
  border: 1px solid var(--border-primary);
  display: flex;
  color: var(--accent-primary);
  justify-content: center;
  align-items:  center;
  width: 40px;
  height: 40px;
  font-size: 20px;
}

.db-option-content {
  flex: 1;
}

.db-option-title {
  margin-bottom: 2px;
  font-size: 15px;
  font-weight: 500;
}

.db-option-description {
  color: var(--text-tertiary);
  font-size: 13px;
}

.dashboard-header {
  margin-bottom: 32px;
}

.dashboard-title {
  letter-spacing: -.03em;
  margin-bottom: 4px;
  font-size: 24px;
  font-weight: 600;
}

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

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 380px));
  justify-content: start;
  gap: 20px;
}

.project-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  padding: 20px;
  transition: all .15s;
}

.project-card:hover {
  border-color: var(--border-accent);
  box-shadow: 0 1px 3px #0000001a, 0 1px 2px #0000000f;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items:  start;
  margin-bottom: 12px;
}

.project-title {
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 600;
}

.project-description {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 13px;
}

.project-meta {
  display: flex;
  color: var(--text-tertiary);
  gap: 16px;
  font-size: 12px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state-icon {
  display: flex;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  color: var(--accent-primary);
  border-radius: 50%;
  justify-content: center;
  align-items:  center;
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
}

.empty-state-title {
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 600;
}

.empty-state-description {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 14px;
}

.alert {
  border-radius: var(--radius-sm);
  display: flex;
  align-items:  center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 12px 16px;
  font-size: 14px;
}

.alert-success {
  color: #065f46;
  background-color: #d1fae5;
  border: 1px solid #a7f3d0;
}

.alert-error {
  color: #991b1b;
  background-color: #fee2e2;
  border: 1px solid #fecaca;
}

.alert-warning {
  color: #92400e;
  background-color: #fef3c7;
  border: 1px solid #fde68a;
}

.spinner {
  border: 2px solid var(--border-primary);
  border-top-color: var(--accent-primary);
  animation: spin .6s linear infinite;
  border-radius: 50%;
  width: 20px;
  height: 20px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.flex {
  display: flex;
}

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

.gap-12 {
  gap: 12px;
}

.mb-16 {
  margin-bottom: 16px;
}

.mb-24 {
  margin-bottom: 24px;
}

.mt-32 {
  margin-top: 32px;
}

.context-menu {
  position: fixed;
  z-index: 1000;
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  user-select: none;
  min-width: 160px;
  padding: 4px;
  box-shadow: 0 8px 24px #0000001f, 0 2px 8px #00000014;
}

.context-menu-item {
  display: flex;
  border-radius: calc(var(--radius-md)  - 2px);
  cursor: pointer;
  color: var(--text-primary);
  align-items:  center;
  gap: 8px;
  padding: 7px 12px;
  transition: background .1s;
  font-size: 13px;
}

.context-menu-item:hover {
  background: var(--bg-secondary);
}

.context-menu-item.danger {
  color: var(--error);
}

.context-menu-item.danger:hover {
  background: #fee2e2;
}

.context-menu-divider {
  background: var(--border-primary);
  height: 1px;
  margin: 4px 0;
}

.toast-container {
  position: fixed;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 400px;
  top: 20px;
  right: 20px;
}

.toast {
  display: flex;
  border-radius: var(--radius-md);
  background-color: var(--bg-primary);
  border: 1px solid var(--border-primary);
  animation: slideInRight .3s ease-out;
  align-items:  start;
  gap: 12px;
  min-width: 300px;
  padding: 14px 16px;
  box-shadow: 0 10px 15px -3px #0000001a, 0 4px 6px -2px #0000000d;
}

.toast-success {
  border-left: 4px solid var(--success);
}

.toast-error {
  border-left: 4px solid var(--error);
}

.toast-warning {
  border-left: 4px solid var(--warning);
}

.toast-info {
  border-left: 4px solid var(--accent-primary);
}

.toast-content {
  flex: 1;
}

.toast-title {
  color: var(--text-primary);
  margin-bottom: 2px;
  font-size: 14px;
  font-weight: 600;
}

.toast-message {
  color: var(--text-secondary);
  font-size: 13px;
}

.toast-close {
  color: var(--text-tertiary);
  cursor: pointer;
  display: flex;
  background: none;
  border: none;
  flex-shrink: 0;
  justify-content: center;
  align-items:  center;
  padding: 2px;
}

.toast-close:hover {
  color: var(--text-primary);
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.notification-bell {
  position: relative;
}

.notification-badge {
  position: absolute;
  background-color: var(--error);
  color: #fff;
  display: flex;
  pointer-events: none;
  border-radius: 50%;
  justify-content: center;
  align-items:  center;
  width: 18px;
  height: 18px;
  font-size: 10px;
  font-weight: 700;
  top: 4px;
  right: 8px;
}

.notification-dropdown {
  position: fixed;
  background-color: var(--bg-primary);
  border-right: 1px solid var(--border-primary);
  z-index: 1500;
  display: flex;
  animation: slideInLeft .2s ease-out;
  flex-direction: column;
  width: 360px;
  height: 100vh;
  top: 0;
  left: 240px;
  box-shadow: 4px 0 15px #00000014;
}

.notification-dropdown-header {
  border-bottom: 1px solid var(--border-primary);
  display: flex;
  justify-content: space-between;
  align-items:  center;
  padding: 20px;
}

.notification-dropdown-title {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 700;
}

.notification-list {
  overflow-y: auto;
  flex: 1;
  padding: 8px;
}

.notification-item {
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-bottom: 2px;
  padding: 14px 16px;
  transition: background-color .15s;
}

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

.notification-item.unread {
  background-color: var(--accent-bg);
}

.notification-item-title {
  color: var(--text-primary);
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 600;
}

.notification-item-message {
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-size: 13px;
}

.notification-item-time {
  color: var(--text-tertiary);
  font-size: 11px;
}

.notification-empty {
  text-align: center;
  color: var(--text-tertiary);
  padding: 40px 20px;
  font-size: 14px;
}

.notification-unread {
  border-color: var(--accent-primary);
  background: linear-gradient(to right, var(--accent-bg) 0%, var(--bg-primary) 8px);
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.btn-danger {
  background-color: var(--error);
  color: #fff;
}

.btn-danger:hover {
  background-color: #dc2626;
}

.settings-section {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  padding: 24px;
}

.settings-section-title {
  color: var(--text-primary);
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 700;
}

.settings-section-description {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 13px;
}

.db-explorer {
  display: grid;
  grid-template-columns: 260px 1fr;
  grid-template-rows: auto 1fr;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
  gap: 0;
  height: calc(100vh - 96px);
}

.schema-sidebar {
  grid-row: 1 / -1;
  border-right: 1px solid var(--border-primary);
  overflow-y: auto;
  background-color: var(--bg-secondary);
  padding: 16px;
}

.schema-sidebar-title {
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
}

.schema-table-item {
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-primary);
  margin-bottom: 2px;
  padding: 8px 10px;
  transition: background-color .15s;
  font-size: 13px;
  font-weight: 500;
}

.schema-table-item:hover {
  background-color: var(--bg-hover);
}

.schema-table-item.active {
  background-color: var(--accent-bg);
  color: var(--accent-primary);
}

.schema-column-item {
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  padding: 4px 10px 4px 28px;
  font-size: 12px;
}

.schema-column-type {
  color: var(--text-tertiary);
  font-family: IBM Plex Mono, monospace;
  font-size: 11px;
}

.query-panel {
  display: flex;
  border-bottom: 1px solid var(--border-primary);
  flex-direction: column;
}

.query-toolbar {
  display: flex;
  border-bottom: 1px solid var(--border-primary);
  background-color: var(--bg-secondary);
  justify-content: space-between;
  align-items:  center;
  padding: 8px 16px;
}

.query-textarea {
  resize: vertical;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  outline: none;
  border: none;
  width: 100%;
  min-height: 120px;
  padding: 16px;
  font-family: IBM Plex Mono, Courier New, monospace;
  font-size: 13px;
  line-height: 1.6;
}

.query-textarea::placeholder {
  color: var(--text-tertiary);
}

.results-panel {
  overflow: auto;
}

.results-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}

.results-table th {
  position: sticky;
  background-color: var(--bg-secondary);
  text-align: left;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-primary);
  white-space: nowrap;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  top: 0;
}

.results-table td {
  border-bottom: 1px solid var(--border-primary);
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 300px;
  padding: 8px 16px;
}

.results-table tr:hover td {
  background-color: var(--bg-hover);
}

.results-footer {
  color: var(--text-secondary);
  border-top: 1px solid var(--border-primary);
  background-color: var(--bg-secondary);
  display: flex;
  justify-content: space-between;
  padding: 10px 16px;
  font-size: 12px;
}

.jira-project-list {
  display: grid;
  gap: 8px;
}

.jira-project-item {
  display: flex;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  justify-content: space-between;
  align-items:  center;
  padding: 14px 16px;
  transition: all .15s;
}

.jira-project-item:hover {
  border-color: var(--border-secondary);
  background-color: var(--bg-hover);
}

.jira-project-item.active {
  border-color: var(--accent-primary);
  background-color: var(--accent-bg);
}

.jira-issue-row {
  display: grid;
  grid-template-columns: 100px 1fr 100px 100px 100px 120px;
  border-bottom: 1px solid var(--border-primary);
  align-items:  center;
  gap: 12px;
  padding: 10px 16px;
  font-size: 13px;
}

.jira-issue-row:hover {
  background-color: var(--bg-hover);
}

.jira-issue-header {
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .03em;
  font-size: 12px;
  font-weight: 600;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items:  flex-start;
  max-width: 1200px;
  margin-bottom: 24px;
  margin-left: auto;
  margin-right: auto;
}

.content-title {
  margin-bottom: 4px;
  font-size: 24px;
  font-weight: 600;
}

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

.pipeline-builder {
  display: flex;
  gap: 24px;
  max-width: 1200px;
  min-height: 500px;
  margin-left: auto;
  margin-right: auto;
}

.pipeline-steps-panel {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-primary);
  overflow-y: auto;
  flex: 0 0 360px;
  max-height: 70vh;
  padding: 20px;
}

.pipeline-config-panel {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-primary);
  overflow-y: auto;
  flex: 1;
  max-height: 70vh;
  padding: 20px;
}

.pipeline-step-item {
  display: flex;
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  align-items:  center;
  gap: 10px;
  padding: 10px 12px;
  transition: border-color .15s, background-color .15s;
}

.pipeline-step-item:hover {
  border-color: var(--border-accent);
  background: var(--bg-hover);
}

.pipeline-step-item.selected {
  border-color: var(--accent-primary);
  background: var(--accent-bg);
}

.pipeline-step-order {
  background: var(--bg-tertiary);
  display: flex;
  color: var(--text-secondary);
  border-radius: 50%;
  flex-shrink: 0;
  justify-content: center;
  align-items:  center;
  width: 24px;
  height: 24px;
  font-size: 11px;
  font-weight: 600;
}

.pipeline-card {
  cursor: pointer;
  transition: border-color .15s, transform .1s;
}

.pipeline-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-1px);
}

.step-badge {
  display: inline-flex;
  text-transform: uppercase;
  letter-spacing: .03em;
  border-radius: 4px;
  flex-shrink: 0;
  align-items:  center;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
}

.step-badge-extract {
  color: #3b82f6;
  background: #3b82f61f;
}

.step-badge-transform {
  color: #8b5cf6;
  background: #8b5cf61f;
}

.step-badge-load {
  color: #22c55e;
  background: #22c55e1f;
}

.step-badge-source {
  color: #3b82f6;
  background: #3b82f61f;
}

.step-badge-target {
  color: #22c55e;
  background: #22c55e1f;
}

.step-badge-lookup {
  color: #f59e0b;
  background: #f59e0b1f;
}

.step-badge-filter {
  color: #ef4444;
  background: #ef44441f;
}

.step-badge-joiner {
  color: #a855f7;
  background: #a855f71f;
}

.pipeline-builder-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-primary);
  gap: 4px;
  max-width: 1200px;
  margin-bottom: 16px;
  margin-left: auto;
  margin-right: auto;
  padding-bottom: 0;
}

.pipeline-builder-tab {
  display: inline-flex;
  color: var(--text-secondary);
  cursor: pointer;
  background: none;
  border: none;
  border-bottom: 2px solid #0000;
  align-items:  center;
  gap: 6px;
  margin-bottom: -1px;
  padding: 10px 16px;
  transition: color .15s, border-color .15s;
  font-size: 13px;
  font-weight: 500;
}

.pipeline-builder-tab:hover {
  color: var(--text-primary);
}

.pipeline-builder-tab.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
  font-weight: 600;
}

.xml-upload-zone {
  display: flex;
  border: 2px dashed var(--border-secondary);
  border-radius: var(--radius-lg);
  background: var(--bg-primary);
  color: var(--text-secondary);
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items:  center;
  min-height: 160px;
  padding: 40px 24px;
  transition: border-color .15s, background-color .15s;
}

.xml-upload-zone:hover {
  border-color: var(--accent-light);
  background: var(--bg-hover);
}

.xml-upload-zone.drag-over {
  border-color: var(--accent-primary);
  background: var(--accent-bg);
  border-style: solid;
}

.pipeline-dag {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-primary);
  overflow: hidden;
}

.pipeline-dag svg {
  display: block;
}

.code-display {
  background: #1e1e2e;
  padding: 0;
}

.code-display pre {
  color: #cdd6f4;
  white-space: pre;
  overflow-x: auto;
  tab-size: 4;
  margin: 0;
  padding: 20px 24px;
  font-family: IBM Plex Mono, Fira Code, JetBrains Mono, monospace;
  font-size: 13px;
  line-height: 1.6;
}

.code-display code {
  font-family: inherit;
}

.artifact-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-primary);
  background: var(--bg-secondary);
  flex-shrink: 0;
  gap: 2px;
  padding: 0 16px;
}

.artifact-tab {
  color: var(--text-secondary);
  cursor: pointer;
  text-transform: capitalize;
  background: none;
  border: none;
  border-bottom: 2px solid #0000;
  margin-bottom: -1px;
  padding: 10px 14px;
  transition: color .15s, border-color .15s;
  font-size: 12px;
  font-weight: 500;
}

.artifact-tab:hover {
  color: var(--text-primary);
}

.artifact-tab.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
  font-weight: 600;
}

.artifact-content {
  overflow: auto;
  max-height: 100%;
  padding: 20px 24px;
}

.artifact-skeleton {
  display: flex;
  color: var(--text-tertiary);
  justify-content: center;
  align-items:  center;
  height: 200px;
}

.md-content {
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.7;
}

.md-content h1 {
  color: var(--text-primary);
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
}

.md-content h2 {
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-primary);
  margin: 20px 0 10px;
  padding-bottom: 6px;
  font-size: 15px;
  font-weight: 600;
}

.md-content h3 {
  color: var(--text-primary);
  margin: 16px 0 8px;
  font-size: 13px;
  font-weight: 600;
}

.md-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 12px 0;
  font-size: 12px;
}

.md-content tr {
  border-bottom: 1px solid var(--border-primary);
}

.md-content tr:first-child {
  background: var(--bg-tertiary);
  font-weight: 600;
}

.md-content td {
  text-align: left;
  padding: 8px 12px;
}

.md-content code {
  background: var(--bg-tertiary);
  color: var(--accent-primary);
  border-radius: 3px;
  padding: 2px 6px;
  font-family: IBM Plex Mono, monospace;
  font-size: 11px;
}

.md-content pre {
  background: var(--bg-tertiary);
  overflow-x: auto;
  border-radius: 6px;
  margin: 8px 0;
  padding: 12px 16px;
  font-size: 12px;
  line-height: 1.5;
}

.md-content li {
  list-style: disc;
  margin: 4px 0 4px 20px;
}

.md-content strong {
  font-weight: 600;
}

.chat-sidebar {
  position: fixed;
  background: var(--bg-primary);
  border-left: 1px solid var(--border-primary);
  display: flex;
  z-index: 200;
  flex-direction: column;
  width: 360px;
  height: 100vh;
  transition: transform .25s;
  top: 0;
  right: 0;
  transform: translateX(100%);
  box-shadow: -4px 0 20px #00000014;
}

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

.chat-message {
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: 8px;
  max-width: 95%;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.55;
}

.chat-message.user {
  background: var(--accent-bg);
  color: var(--text-primary);
  border: 1px solid #2e504926;
  align-self:  flex-end;
}

.chat-message.assistant {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  color: var(--text-primary);
  align-self:  flex-start;
}

.chat-input-row {
  display: flex;
  border-top: 1px solid var(--border-primary);
  background: var(--bg-secondary);
  flex-shrink: 0;
  gap: 8px;
  padding: 12px;
}

.workflow-file-item {
  display: flex;
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  align-items:  center;
  gap: 10px;
  padding: 10px 12px;
}

.format-badge {
  display: inline-flex;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-radius: 4px;
  flex-shrink: 0;
  align-items:  center;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
}

.format-badge-powercentre {
  color: #3b82f6;
  background: #3b82f61f;
}

.format-badge-iics {
  color: #8b5cf6;
  background: #8b5cf61f;
}

.format-badge-json {
  color: #16a34a;
  background: #22c55e1f;
}

.format-badge-unknown {
  color: var(--text-secondary);
  background: #9ca3af26;
}

.export-toolbar {
  display: flex;
  border-top: 1px solid var(--border-primary);
  background: var(--bg-secondary);
  flex-shrink: 0;
  align-items:  center;
  gap: 6px;
  padding: 10px 16px;
}

.analyzing-overlay {
  position: absolute;
  display: flex;
  z-index: 10;
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  background: #ffffffd9;
  flex-direction: column;
  justify-content: center;
  align-items:  center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  inset: 0;
}

.migrations-view {
  max-width: 1200px;
  padding: 32px;
}

.migrations-view .view-header {
  display: flex;
  justify-content: space-between;
  align-items:  flex-start;
  margin-bottom: 32px;
}

.migrations-view .view-header h1 {
  margin-bottom: 4px;
  font-size: 28px;
}

.migrations-view .view-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
}

.migration-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 400px));
  justify-content: start;
  gap: 20px;
}

.migration-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  padding: 20px;
  transition: all .3s cubic-bezier(.4,0,.2,1);
}

.migration-card:hover {
  border-color: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px #2e50491a;
}

.migration-card-header {
  display: flex;
  justify-content: space-between;
  align-items:  flex-start;
  margin-bottom: 8px;
}

.migration-card-header h3 {
  font-size: 16px;
  line-height: 1.3;
}

.migration-card-desc {
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.4;
}

.migration-card-badges {
  display: flex;
  flex-wrap: wrap;
  align-items:  center;
  gap: 6px;
  margin-bottom: 12px;
}

.migration-arrow {
  color: var(--text-tertiary);
  font-size: 14px;
}

.migration-card-footer {
  display: flex;
  justify-content: space-between;
  align-items:  center;
}

.migration-date {
  color: var(--text-tertiary);
  font-size: 12px;
}

.migration-badge {
  display: inline-flex;
  letter-spacing: .5px;
  text-transform: uppercase;
  border-radius: 20px;
  align-items:  center;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
}

.migration-badge.source-abap {
  color: #7c3aed;
  background: #ede9fe;
}

.migration-badge.source-informatica {
  color: #d97706;
  background: #fef3c7;
}

.migration-badge.target-pyspark {
  color: #2563eb;
  background: #dbeafe;
}

.migration-badge.target-nifi, .migration-badge.complexity-simple {
  color: #059669;
  background: #d1fae5;
}

.migration-badge.complexity-complex {
  color: #dc2626;
  background: #fee2e2;
}

.migration-status-badge {
  display: inline-flex;
  text-transform: capitalize;
  white-space: nowrap;
  border-radius: 20px;
  align-items:  center;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
}

.status-draft {
  color: #6b7280;
  background: #f3f4f6;
}

.status-scanning {
  color: #2563eb;
  animation: pulse-bg 2s infinite;
  background: #dbeafe;
}

.status-analyzed {
  color: #4f46e5;
  background: #e0e7ff;
}

.status-spec_review, .status-tickets_review {
  color: #d97706;
  background: #fef3c7;
}

.status-approved {
  color: #059669;
  background: #d1fae5;
}

.status-generating {
  color: #2563eb;
  animation: pulse-bg 2s infinite;
  background: #dbeafe;
}

.status-completed {
  color: #059669;
  background: #d1fae5;
}

.status-failed {
  color: #dc2626;
  background: #fee2e2;
}

@keyframes pulse-bg {
  0%, 100% {
    opacity: 1;
  }

  50% {
    opacity: .7;
  }
}

.migration-mini-progress {
  display: flex;
  align-items:  center;
  gap: 3px;
}

.mini-step {
  background: var(--border-primary);
  border-radius: 50%;
  width: 8px;
  height: 8px;
  transition: all .3s;
}

.mini-step.filled {
  background: var(--accent-primary);
}

.migration-detail {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px;
}

.migration-detail-header {
  margin-bottom: 24px;
}

.migration-detail-header h2 {
  margin: 12px 0 8px;
  font-size: 24px;
}

.migration-meta {
  display: flex;
  flex-wrap: wrap;
  align-items:  center;
  gap: 8px;
}

.btn-back {
  display: inline-flex;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  background: none;
  align-items:  center;
  padding: 6px 12px;
  transition: all .2s;
  font-size: 13px;
}

.btn-back:hover {
  border-color: var(--accent-light);
  color: var(--text-primary);
}

.btn-delete-project {
  border-radius: var(--radius-md);
  color: #dc2626;
  cursor: pointer;
  background: none;
  border: 1px solid #fecaca;
  padding: 6px 14px;
  transition: all .2s;
  font-size: 13px;
  font-weight: 500;
}

.btn-delete-project:hover {
  background: #fee2e2;
  border-color: #ef4444;
}

.btn-delete-project:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.migration-stepper {
  display: flex;
  justify-content: center;
  align-items:  center;
  margin-bottom: 32px;
  padding: 20px 0;
}

.stepper-step {
  display: flex;
  position: relative;
  flex-direction: column;
  flex: 1;
  align-items:  center;
  max-width: 140px;
}

.stepper-step.clickable {
  cursor: pointer;
}

.stepper-step.clickable:hover .stepper-circle {
  box-shadow: 0 0 0 4px #2e504926;
}

.stepper-step.viewing .stepper-circle {
  outline: 3px solid var(--accent-primary);
  outline-offset: 3px;
}

.stepper-step.viewing .stepper-label {
  color: var(--accent-primary);
  font-weight: 600;
}

.stepper-circle {
  display: flex;
  background: var(--bg-secondary);
  border: 2px solid var(--border-primary);
  color: var(--text-tertiary);
  z-index: 2;
  border-radius: 50%;
  justify-content: center;
  align-items:  center;
  width: 36px;
  height: 36px;
  transition: all .4s cubic-bezier(.4,0,.2,1);
  font-size: 14px;
  font-weight: 600;
}

.stepper-step.completed .stepper-circle {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
}

.stepper-step.active .stepper-circle {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
  animation: glow-step 2s infinite;
  box-shadow: 0 0 0 4px #2e504933;
}

@keyframes glow-step {
  0%, 100% {
    box-shadow: 0 0 0 4px #2e504933;
  }

  50% {
    box-shadow: 0 0 0 8px #2e50491a;
  }
}

.stepper-step.failed .stepper-circle {
  background: var(--error);
  border-color: var(--error);
  color: #fff;
}

.stepper-label {
  color: var(--text-tertiary);
  text-align: center;
  margin-top: 8px;
  transition: color .3s;
  font-size: 12px;
  font-weight: 500;
}

.stepper-step.completed .stepper-label, .stepper-step.active .stepper-label {
  color: var(--text-primary);
}

.stepper-connector {
  position: absolute;
  background: var(--border-primary);
  z-index: 1;
  width: calc(100% - 44px);
  height: 2px;
  transition: background .4s;
  top: 18px;
  left: calc(50% + 22px);
}

.stepper-connector.completed {
  background: var(--accent-primary);
}

.step-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  animation: slideUp .3s ease-out;
  margin-bottom: 20px;
  padding: 24px;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-card h3 {
  margin-bottom: 12px;
  font-size: 18px;
}

.step-card p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.5;
}

.step-card code {
  background: var(--bg-secondary);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 13px;
}

.step-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.migration-action-btn {
  display: inline-flex;
  border-radius: var(--radius-md);
  cursor: pointer;
  align-items:  center;
  gap: 8px;
  padding: 10px 20px;
  transition: all .2s;
  font-size: 14px;
  font-weight: 600;
}

.btn-spinner {
  display: inline-block;
  animation: spin .6s linear infinite;
  border: 2px solid #ffffff4d;
  border-top-color: #fff;
  border-radius: 50%;
  width: 16px;
  height: 16px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-bar-container {
  background: var(--bg-secondary);
  overflow: hidden;
  border-radius: 2px;
  width: 100%;
  height: 4px;
  margin: 20px 0;
}

.loading-bar {
  background: linear-gradient(90deg, var(--accent-primary) 0%, var(--accent-light) 50%, var(--accent-primary) 100%);
  animation: loading-progress 1.5s ease-in-out infinite;
  border-radius: 2px;
  height: 100%;
}

@keyframes loading-progress {
  0% {
    width: 0%;
    margin-left: 0%;
  }

  50% {
    width: 60%;
    margin-left: 20%;
  }

  100% {
    width: 0%;
    margin-left: 100%;
  }
}

.loading-overlay {
  position: relative;
  min-height: 200px;
}

.loading-overlay:after {
  content: "";
  position: absolute;
  display: flex;
  z-index: 10;
  border-radius: var(--radius-lg);
  background: #ffffffb3;
  justify-content: center;
  align-items:  center;
  inset: 0;
}

.scan-results {
  margin: 16px 0;
}

.scan-stat {
  margin-bottom: 8px;
  font-size: 16px;
}

.scan-stat strong {
  color: var(--accent-primary);
  font-size: 24px;
}

.scan-file-badge {
  display: inline-flex;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-radius: 12px;
  margin-right: 6px;
  padding: 2px 8px;
  font-size: 12px;
}

.scan-file-list {
  overflow-y: auto;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  max-height: 200px;
  margin-top: 12px;
}

.scan-file-item {
  border-bottom: 1px solid var(--border-primary);
  padding: 6px 12px;
  font-family: monospace;
  font-size: 13px;
}

.scan-file-item:last-child {
  border-bottom: none;
}

.scan-file-item.muted {
  color: var(--text-tertiary);
  font-style: italic;
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.analysis-item {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  text-align: center;
  padding: 16px;
}

.analysis-label {
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 8px;
  font-size: 12px;
}

.analysis-value {
  color: var(--accent-primary);
  font-size: 24px;
  font-weight: 700;
}

.analysis-summary {
  margin-bottom: 20px;
}

.analysis-summary h4, .analysis-section h4 {
  margin-bottom: 8px;
  font-size: 15px;
}

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

.module-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  padding: 12px 16px;
}

.module-card strong {
  font-size: 14px;
}

.module-card p {
  color: var(--text-secondary);
  margin: 4px 0;
  font-size: 13px;
}

.module-files {
  color: var(--text-tertiary);
  font-family: monospace;
  font-size: 12px;
}

.risk-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.risk-item {
  display: flex;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border-left: 3px solid #0000;
  align-items:  flex-start;
  gap: 12px;
  padding: 12px 16px;
}

.risk-item.risk-high {
  border-left-color: #dc2626;
}

.risk-item.risk-medium {
  border-left-color: #d97706;
}

.risk-item.risk-low {
  border-left-color: #059669;
}

.risk-severity {
  text-transform: uppercase;
  white-space: nowrap;
  text-align: center;
  border-radius: 12px;
  flex-shrink: 0;
  width: 64px;
  margin-top: 1px;
  padding: 2px 0;
  font-size: 11px;
  font-weight: 700;
}

.risk-item.risk-high .risk-severity {
  color: #dc2626;
  background: #fee2e2;
}

.risk-item.risk-medium .risk-severity {
  color: #d97706;
  background: #fef3c7;
}

.risk-item.risk-low .risk-severity {
  color: #059669;
  background: #d1fae5;
}

.risk-content {
  flex: 1;
  min-width: 0;
}

.risk-text {
  color: var(--text-primary);
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 500;
}

.risk-mitigation {
  color: var(--text-secondary);
  font-size: 12px;
  font-style: italic;
  line-height: 1.5;
}

.migration-log-panel {
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 20px;
}

.migration-log-header {
  display: flex;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-primary);
  justify-content: space-between;
  align-items:  center;
  padding: 10px 16px;
}

.migration-log-header h4 {
  margin: 0;
  font-size: 13px;
}

.btn-ghost-sm {
  color: var(--text-tertiary);
  cursor: pointer;
  background: none;
  border: none;
  padding: 2px 8px;
  font-size: 11px;
}

.btn-ghost-sm:hover {
  color: var(--text-primary);
}

.migration-log-body {
  overflow-y: auto;
  background: #1a1a2e;
  max-height: 250px;
  padding: 8px 0;
  font-family: IBM Plex Mono, monospace;
}

.log-entry {
  display: flex;
  gap: 10px;
  padding: 3px 14px;
  font-size: 12px;
  line-height: 1.6;
}

.log-time {
  color: #6b7280;
  flex-shrink: 0;
  min-width: 70px;
}

.log-entry.log-info .log-message {
  color: #a5b4fc;
}

.log-entry.log-warn .log-message {
  color: #fcd34d;
}

.log-entry.log-error .log-message {
  color: #fca5a5;
}

.confluence-link {
  display: inline-flex;
  color: #2563eb;
  text-decoration: none;
  align-items:  center;
  gap: 4px;
  margin-bottom: 16px;
  font-size: 13px;
}

.confluence-link:hover {
  text-decoration: underline;
}

.spec-document {
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  overflow-y: auto;
  background: var(--bg-primary);
  max-height: 500px;
  margin-bottom: 16px;
  padding: 24px;
  font-size: 14px;
  line-height: 1.7;
}

.spec-document h1 {
  margin: 20px 0 12px;
  font-size: 22px;
}

.spec-document h2 {
  border-bottom: 1px solid var(--border-primary);
  margin: 16px 0 10px;
  padding-bottom: 6px;
  font-size: 18px;
}

.spec-document h3 {
  margin: 12px 0 8px;
  font-size: 15px;
}

.spec-document p {
  margin-bottom: 8px;
}

.spec-document ul {
  margin: 8px 0;
  padding-left: 24px;
}

.spec-document li {
  margin-bottom: 4px;
}

.spec-document code {
  background: var(--bg-secondary);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 13px;
}

.spec-approval-status {
  margin-bottom: 12px;
  font-size: 14px;
}

.approval-badge {
  display: inline-flex;
  text-transform: capitalize;
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
}

.approval-badge.pending {
  color: #d97706;
  background: #fef3c7;
}

.approval-badge.approved {
  color: #059669;
  background: #d1fae5;
}

.approval-badge.rejected {
  color: #dc2626;
  background: #fee2e2;
}

.approval-badge.revision_requested {
  color: #d97706;
  background: #fef3c7;
}

.review-notes {
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  resize: vertical;
  width: 100%;
  min-height: 60px;
  margin-bottom: 12px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 13px;
}

.approval-actions {
  display: flex;
  gap: 10px;
}

.btn-approve, .btn-revision, .btn-reject {
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  padding: 8px 20px;
  transition: all .2s;
  font-size: 13px;
  font-weight: 600;
}

.btn-approve {
  color: #fff;
  background: #10b981;
}

.btn-approve:hover {
  background: #059669;
}

.btn-approve:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.btn-revision {
  color: #fff;
  background: #f59e0b;
}

.btn-revision:hover {
  background: #d97706;
}

.btn-revision:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.btn-reject {
  color: #fff;
  background: #ef4444;
}

.btn-reject:hover {
  background: #dc2626;
}

.btn-reject:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.tickets-list {
  margin-bottom: 16px;
}

.ticket-epic-card {
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 12px;
}

.ticket-epic-header {
  display: flex;
  background: var(--bg-secondary);
  align-items:  center;
  gap: 8px;
  padding: 12px 16px;
  font-size: 14px;
}

.ticket-task-card {
  display: flex;
  border-top: 1px solid var(--border-primary);
  align-items:  center;
  gap: 8px;
  padding: 10px 16px 10px 32px;
  transition: background .2s;
  font-size: 13px;
}

.ticket-task-card:hover {
  background: var(--bg-hover);
}

.ticket-task-card.clickable {
  cursor: pointer;
  user-select: none;
}

.ticket-task-card.expanded {
  background: var(--bg-hover);
}

.ticket-epic-header.clickable {
  cursor: pointer;
  user-select: none;
}

.ticket-epic-header.expanded {
  background: var(--accent-bg);
}

.ticket-chevron {
  color: var(--text-tertiary);
  flex-shrink: 0;
  margin-left: auto;
  transition: transform .2s;
  font-size: 11px;
}

.ticket-chevron.open {
  transform: rotate(180deg);
}

.ticket-actions-panel {
  display: flex;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-primary);
  animation: slideDown .15s ease-out;
  flex-wrap: wrap;
  align-items:  center;
  gap: 8px;
  padding: 10px 16px;
}

.ticket-actions-panel.nested {
  padding-left: 32px;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
  }

  to {
    opacity: 1;
    max-height: 200px;
  }
}

.btn-sm {
  padding: 4px 12px;
  font-size: 12px;
}

.btn-edit-jira {
  display: inline-flex;
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  color: #2563eb;
  text-decoration: none;
  cursor: pointer;
  align-items:  center;
  gap: 4px;
  padding: 4px 12px;
  transition: all .2s;
  font-size: 12px;
  font-weight: 500;
}

.btn-edit-jira:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

.ticket-description-preview {
  color: var(--text-secondary);
  border-top: 1px dashed var(--border-primary);
  width: 100%;
  margin-top: 4px;
  padding-top: 8px;
  font-size: 12px;
  line-height: 1.5;
}

.ticket-type-badge {
  display: inline-flex;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-radius: 4px;
  padding: 1px 8px;
  font-size: 10px;
  font-weight: 700;
}

.ticket-type-badge.epic {
  color: #7c3aed;
  background: #ede9fe;
}

.ticket-type-badge.task {
  color: #2563eb;
  background: #dbeafe;
}

.ticket-jira-key {
  color: #2563eb;
  font-family: monospace;
  font-size: 12px;
  font-weight: 600;
}

.ticket-summary {
  flex: 1;
  min-width: 0;
}

.code-gen-badge {
  display: inline-flex;
  border-radius: 12px;
  flex-shrink: 0;
  margin-top: 1px;
  padding: 1px 8px;
  font-size: 10px;
  font-weight: 600;
}

.code-gen-badge.pending {
  color: #6b7280;
  background: #f3f4f6;
}

.code-gen-badge.generating {
  color: #2563eb;
  animation: pulse-bg 1.5s infinite;
  background: #dbeafe;
}

.code-gen-badge.completed {
  color: #059669;
  background: #d1fae5;
}

.code-gen-badge.failed {
  color: #dc2626;
  background: #fee2e2;
}

.execute-btn {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-light));
  padding: 12px 28px;
  font-size: 15px;
}

.execute-btn:hover {
  filter: brightness(1.1);
}

.generating-status {
  display: flex;
  color: var(--text-secondary);
  align-items:  center;
  gap: 12px;
  padding: 20px;
  font-size: 15px;
}

.generating-pulse {
  animation: pulse-dot 1.5s infinite;
  background: #2563eb;
  border-radius: 50%;
  width: 12px;
  height: 12px;
}

@keyframes pulse-dot {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.5);
    opacity: .5;
  }
}

.completed-banner {
  display: flex;
  border-radius: var(--radius-md);
  background: #d1fae5;
  align-items:  center;
  gap: 16px;
  margin-bottom: 20px;
  padding: 20px;
}

.completed-check {
  color: #059669;
  font-size: 32px;
}

.completed-banner strong {
  font-size: 16px;
}

.completed-banner p {
  color: var(--text-secondary);
  margin: 4px 0 0;
  font-size: 13px;
}

.generated-code-list {
  margin-top: 16px;
}

.generated-code-item {
  display: flex;
  border-bottom: 1px solid var(--border-primary);
  align-items:  flex-start;
  gap: 10px;
  padding: 10px 14px;
  transition: background .2s;
  font-size: 13px;
}

.generated-code-item:hover {
  background: var(--bg-hover);
}

.github-file-path {
  color: var(--text-tertiary);
  text-align: right;
  flex-shrink: 0;
  max-width: 45%;
  margin-left: auto;
  font-family: monospace;
  font-size: 12px;
}

.migration-error-banner {
  border-radius: var(--radius-md);
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fecaca;
  margin-bottom: 20px;
  padding: 12px 16px;
  font-size: 13px;
}

.migration-create {
  max-width: 700px;
  margin: 0 auto;
  padding: 32px;
}

.migration-form {
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.migration-form .form-group {
  margin-bottom: 18px;
}

.migration-form .form-group label {
  display: block;
  color: var(--text-primary);
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
}

.migration-form .form-group input, .migration-form .form-group textarea, .migration-form .form-group select {
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  width: 100%;
  padding: 9px 12px;
  transition: border-color .2s;
  font-family: inherit;
  font-size: 14px;
}

.migration-form .form-group input:focus, .migration-form .form-group textarea:focus, .migration-form .form-group select:focus {
  outline: none;
  border-color: var(--accent-light);
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .form-group {
  flex: 1;
}

.toggle-group {
  display: flex;
  gap: 0;
}

.toggle-btn {
  border: 1px solid var(--border-primary);
  background: var(--bg-primary);
  cursor: pointer;
  color: var(--text-secondary);
  flex: 1;
  padding: 8px 16px;
  transition: all .2s;
  font-size: 13px;
  font-weight: 600;
}

.toggle-btn:first-child {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.toggle-btn:last-child {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  border-left: none;
}

.toggle-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.btn-secondary {
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--text-primary);
  padding: 9px 20px;
  transition: all .2s;
  font-size: 14px;
  font-weight: 500;
}

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

.empty-state {
  text-align: center;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-primary);
  padding: 60px 24px;
}

.empty-icon {
  opacity: .5;
  margin-bottom: 16px;
  font-size: 48px;
}

.empty-state h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.empty-state p {
  color: var(--text-secondary);
  max-width: 400px;
  margin-bottom: 20px;
  margin-left: auto;
  margin-right: auto;
  font-size: 14px;
}
