/* Modern UAT Test Pack - Electron Desktop Application */

:root {
  /* Colors */
  --background: #fafafa;
  --foreground: #09090b;
  --card: #ffffff;
  --card-foreground: #09090b;
  --popover: #ffffff;
  --popover-foreground: #09090b;
  --primary: #0070f3;
  --primary-foreground: #ffffff;
  --secondary: #f4f4f5;
  --secondary-foreground: #71717a;
  --muted: #f4f4f5;
  --muted-foreground: #71717a;
  --accent: #f4f4f5;
  --accent-foreground: #09090b;
  --destructive: #ef4444;
  --destructive-foreground: #ffffff;
  --border: #e4e4e7;
  --input: #ffffff;
  --ring: #0070f3;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  /* Compact spacing */
  --radius: 8px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
  --background: #000000;
  --foreground: #ecedee;
  --card: #18181b;
  --card-foreground: #ecedee;
  --popover: #18181b;
  --popover-foreground: #ecedee;
  --secondary: #27272a;
  --secondary-foreground: #a1a1aa;
  --muted: #27272a;
  --muted-foreground: #a1a1aa;
  --accent: #27272a;
  --accent-foreground: #ecedee;
  --border: #27272a;
  --input: #27272a;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  font-size: 13px;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Electron-specific adjustments */
html, body {
  /* Remove user-select disable to allow text selection */
}

input, textarea, [contenteditable] {
  user-select: text;
  -webkit-user-select: text;
}

/* Allow text selection everywhere */
* {
  user-select: text;
  -webkit-user-select: text;
}

/* Layout */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.main-content {
  padding: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  margin-top: 56px;
}

/* Navigation - Electron optimized */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  -webkit-app-region: drag;
}

.navbar * {
  -webkit-app-region: no-drag;
}

.navbar-brand {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--foreground);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-link {
  color: var(--muted-foreground);
  text-decoration: none;
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius);
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
}

.nav-link:hover {
  color: var(--foreground);
  background-color: var(--muted);
}

.nav-link.active {
  color: var(--primary);
  background-color: rgba(0, 112, 243, 0.1);
}

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 1rem;
}

.card-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

.card-body {
  padding: 1rem;
}

.card-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--muted);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--card-foreground);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
  min-height: 32px;
}

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

.btn-primary:hover {
  background: #0056b3;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
}

.btn-secondary:hover {
  background: #e4e4e7;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--foreground);
}

.btn-outline:hover {
  background: var(--muted);
}

.btn-danger {
  background: var(--destructive);
  color: var(--destructive-foreground);
}

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

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #16a34a;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  min-height: 28px;
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--foreground);
  font-size: 0.85rem;
}

.form-control {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--input);
  color: var(--foreground);
  font-size: 0.8rem;
  transition: all 0.15s ease;
  min-height: 36px;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0, 112, 243, 0.1);
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.2em 1.2em;
  padding-right: 2rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--input);
  color: var(--foreground);
  font-size: 0.8rem;
  transition: all 0.15s ease;
  min-height: 36px;
}

.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0, 112, 243, 0.1);
}

.form-text {
  font-size: 0.7rem;
  color: var(--muted-foreground);
  margin-top: 0.25rem;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
  white-space: nowrap;
}

.badge-primary { background: rgba(0, 111, 238, 0.1); color: var(--primary); }
.badge-success { background: rgba(23, 201, 100, 0.1); color: var(--success); }
.badge-warning { background: rgba(245, 165, 36, 0.1); color: var(--warning); }
.badge-danger { background: rgba(243, 18, 96, 0.1); color: var(--danger); }
.badge-secondary { background: var(--muted); color: var(--muted-foreground); }

/* Tables */
.table-container {
  border-radius: var(--radius);
  overflow: visible;
  border: 1px solid var(--border);
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  font-size: 0.8rem;
}

.table th {
  background: var(--muted);
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table tr:hover {
  background: var(--muted);
}

/* Alerts */
.alert {
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: opacity 0.3s ease;
}

.alert-success {
  background: rgba(23, 201, 100, 0.1);
  color: var(--success);
  border: 1px solid rgba(23, 201, 100, 0.2);
}

.alert-danger {
  background: rgba(243, 18, 96, 0.1);
  color: var(--danger);
  border: 1px solid rgba(243, 18, 96, 0.2);
}

.alert-warning {
  background: rgba(245, 165, 36, 0.1);
  color: var(--warning);
  border: 1px solid rgba(245, 165, 36, 0.2);
}

.alert-info {
  background: rgba(0, 111, 238, 0.1);
  color: var(--primary);
  border: 1px solid rgba(0, 111, 238, 0.2);
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}

.stat-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.stat-label {
  color: var(--muted-foreground);
  font-size: 0.8rem;
  font-weight: 500;
}

/* Grid Layout - Desktop First */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-cols-1 { grid-template-columns: 1fr; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Large screens - maintain desktop layout */
@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .lg\:col-span-2 { grid-column: span 2; }
}

/* Medium screens - reduce columns but keep horizontal */
@media (min-width: 768px) and (max-width: 1023px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .md\:grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
}

/* Only stack on mobile */
@media (max-width: 767px) {
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4,
  .md\:grid-cols-2,
  .md\:grid-cols-3,
  .lg\:grid-cols-2,
  .lg\:grid-cols-3 {
    grid-template-columns: 1fr;
  }
  .lg\:col-span-2 {
    grid-column: span 1;
  }
}

/* Flex utilities - Desktop First */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-grow-1 { flex-grow: 1; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

/* Stats Cards - Horizontal on Desktop */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Cycles Grid - Desktop First */
.cycles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (min-width: 1200px) {
  .cycles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .cycles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Spacing */
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.min-h-screen { min-height: 100vh; }

/* Text utilities */
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-muted { color: var(--muted-foreground); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }

/* Tabs */
.tabs {
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.tab-list {
  display: flex;
  gap: 0;
}

.tab-button {
  padding: 1rem 1.5rem;
  border: none;
  background: none;
  color: var(--muted-foreground);
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.tab-button.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-button:hover {
  color: var(--foreground);
}

/* Responsive - Desktop First */
@media (min-width: 1200px) {
  .main-content {
    max-width: 1400px;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .main-content {
    max-width: 1024px;
  }
}

/* Only apply mobile styles on actual mobile devices */
@media (max-width: 767px) {
  .main-content {
    padding: 0.75rem;
    margin-top: 56px;
  }
  
  .navbar {
    padding: 0 1rem;
  }
  
  .navbar-nav {
    gap: 0.5rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  .card-header,
  .card-body {
    padding: 0.75rem;
  }
  
  .flex {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .justify-between {
    justify-content: flex-start;
  }
  
  .cycles-grid {
    grid-template-columns: 1fr;
  }
}

/* Additional utilities */
.w-4 { width: 1rem; }
.h-4 { height: 1rem; }
.w-2 { width: 0.5rem; }
.h-2 { height: 0.5rem; }
.bg-success\/10 { background-color: rgba(34, 197, 94, 0.1); }
.border-success\/20 { border-color: rgba(34, 197, 94, 0.2); }
.border-l-4 { border-left-width: 4px; }
.border-primary { border-color: var(--primary); }
.pl-4 { padding-left: 1rem; }
.rounded-full { border-radius: 9999px; }
.cursor-pointer { cursor: pointer; }
.transition-colors { transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; }
.hover\:bg-muted:hover { background-color: var(--muted); }
.space-y-1 > * + * { margin-top: 0.25rem; }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.3s ease-out;
}

/* Dark mode toggle */
.theme-toggle {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-medium);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  transform: scale(1.1);
}
/* Page Headers */
.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  color: var(--foreground);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Breadcrumbs */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.breadcrumb-link {
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.15s ease;
}

.breadcrumb-link:hover {
  color: var(--primary);
}

.breadcrumb-current {
  color: var(--foreground);
  font-weight: 500;
}

.breadcrumb-separator {
  width: 16px;
  height: 16px;
  color: var(--muted-foreground);
}

/* Empty States */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 2rem;
}

.empty-state-icon {
  font-size: 3rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

.empty-state-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.empty-state-text {
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
}

/* Cycles Page */
.cycles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.cycle-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.cycle-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cycle-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.cycle-title h5 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.cycle-title h5 a {
  color: var(--foreground);
}

.cycle-title h5 a:hover {
  color: var(--primary);
}

.cycle-title p {
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.cycle-environment {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--muted);
  border-radius: 6px;
}

.env-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.env-item i {
  width: 16px;
  text-align: center;
}

.cycle-results {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--muted);
  border-radius: 6px;
}

.result-item {
  text-align: center;
}

.result-count {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.result-label {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-top: 0.25rem;
}

.cycle-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.tester-count {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.cycle-actions {
  display: flex;
  gap: 0.5rem;
}

.cycle-actions .btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

/* Test Case Details */
.test-case-header {
  background: var(--muted);
  padding: 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.test-case-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.meta-item i {
  color: var(--muted-foreground);
  width: 16px;
}

.test-case-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.test-case-section {
  margin-bottom: 1.5rem;
}

.test-case-section:last-child {
  margin-bottom: 0;
}

.test-case-section h6 {
  color: var(--foreground);
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.test-case-section .content {
  background: var(--muted);
  padding: 1rem;
  border-radius: 6px;
  white-space: pre-wrap;
  font-family: 'Segoe UI', system-ui, sans-serif;
  line-height: 1.5;
}

.execution-history {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.execution-item {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 1rem;
}

.execution-item:last-child {
  margin-bottom: 0;
}

.execution-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.execution-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.execution-content {
  background: var(--muted);
  padding: 0.75rem;
  border-radius: 4px;
  margin-top: 0.75rem;
  font-size: 0.875rem;
}

.evidence-links {
  margin-top: 0.75rem;
}

.evidence-links a {
  display: inline-block;
  margin-right: 0.5rem;
  margin-bottom: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.75rem;
}

.evidence-links a:hover {
  background: #0056b3;
  color: white;
}
/* Latest Comment Tooltip */
.latest-comment {
  position: relative;
  cursor: pointer;
  max-width: 200px;
}

.comment-preview {
  font-size: 0.875rem;
  line-height: 1.4;
}

.comment-tooltip {
  position: fixed;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  min-width: 250px;
  max-width: 400px;
  white-space: pre-wrap;
  font-size: 0.875rem;
  line-height: 1.4;
}

.comment-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--border);
}

.comment-tooltip-header {
  font-weight: 600;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--muted-foreground);
}
/* Form Layouts - Desktop First */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-full-width {
  grid-column: 1 / -1;
}

.form-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--foreground);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

/* Responsive form layouts */
@media (min-width: 768px) and (max-width: 1023px) {
  .form-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .form-row-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .form-grid,
  .form-grid-3,
  .form-row,
  .form-row-3 {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .form-section {
    padding: 1rem;
  }
}
/* Icon Picker */
.icon-selector {
  position: relative;
}

.icon-selector-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  justify-content: flex-start;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  background: var(--input);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s ease;
}

.icon-selector-btn:hover {
  border-color: var(--primary);
}

.icon-name {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.icon-picker-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.icon-picker-content {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 90vw;
  max-width: 600px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.icon-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.icon-picker-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.icon-picker-search {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.icon-picker-grid {
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.5rem;
  max-height: 400px;
  overflow-y: auto;
}

.icon-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.icon-option:hover {
  border-color: var(--primary);
  background: var(--muted);
}

.icon-option.selected {
  border-color: var(--primary);
  background: rgba(0, 112, 243, 0.1);
  color: var(--primary);
}

.icon-option i {
  font-size: 1.25rem;
}

/* Tab system */
.tabs-container {
  margin-top: 2rem;
}

.tabs-nav {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.tab-btn {
  background: none;
  border: none;
  padding: 0.75rem 1rem;
  color: var(--muted-foreground);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tab-btn:hover {
  color: var(--foreground);
  background: var(--muted);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Section headers */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.section-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
}

/* Empty states */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted-foreground);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state p {
  margin: 0;
  font-size: 0.875rem;
}

/* Data tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  font-size: 0.875rem;
}

.data-table th {
  background: var(--muted);
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tr:hover {
  background: var(--muted);
}

/* Links */
.link {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.link:hover {
  color: #0056b3;
  text-decoration: underline;
}

/* Execute Test Page Layout */
.form-grid {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.form-main {
  flex: 2;
  min-width: 0;
}

.form-sidebar {
  flex: 1;
  min-width: 300px;
}

@media (max-width: 1023px) {
  .form-grid {
    flex-direction: column;
  }
  
  .form-sidebar {
    min-width: 0;
  }
}

/* Bootstrap Grid Override - Ensure proper column behavior */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left: -15px;
}

.col-lg-8,
.col-lg-4,
.col-md-8,
.col-md-4,
.col-md-12 {
  position: relative;
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
}

@media (min-width: 992px) {
  .col-lg-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
  }
  .col-lg-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
}

@media (min-width: 768px) {
  .col-md-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
  }
  .col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
  .col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Objectives grid */
.objectives-grid {
  display: grid;
  gap: 1rem;
}

.objective-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  transition: all 0.2s ease;
}

.objective-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.objective-title {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  font-weight: 600;
}

.objective-description {
  color: var(--muted-foreground);
  margin: 0 0 0.75rem 0;
  font-size: 0.875rem;
}

.objective-meta {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

@media (max-width: 767px) {
  .icon-picker-content {
    width: 95vw;
    max-height: 90vh;
  }
  
  .icon-picker-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    max-height: 300px;
  }
  
  .icon-option {
    padding: 0.5rem 0.25rem;
    font-size: 0.7rem;
  }
}