* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
}

.container {
  max-width: 95%;
  width: 100%;
  margin: 20px auto;
  padding: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

@media (min-width: 768px) {
  .container {
    max-width: 90%;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 85%;
  }
}

@media (min-width: 1440px) {
  .container {
    max-width: 1600px;
  }
}

.header {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: white;
  padding: 24px 32px;
  text-align: center;
}

.header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
}

.header p {
  margin: 8px 0 0 0;
  opacity: 0.9;
  font-size: 16px;
}

.content {
  padding: 32px;
}

@media (min-width: 1440px) {
  .content {
    padding: 48px;
  }
}

.actions {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: #4f46e5;
  color: white;
}

.btn-primary:hover {
  background: #4338ca;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-success {
  background: #10b981;
  color: white;
}

.btn-success:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-danger {
  background: #ef4444;
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-secondary {
  background: #6b7280;
  color: white;
}

.btn-secondary:hover {
  background: #4b5563;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

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

.form-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 32px;
}

.form-section h2 {
  margin: 0 0 20px 0;
  color: #1e293b;
  font-size: 20px;
  font-weight: 600;
}

/* Tab styling */
.form-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 2px solid #e2e8f0;
  gap: 4px;
}

.tab-btn {
  background: none;
  border: none;
  padding: 12px 20px;
  cursor: pointer;
  color: #64748b;
  font-weight: 500;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  border-radius: 8px 8px 0 0;
  position: relative;
  top: 2px;
}

.tab-btn:hover {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

.tab-btn.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
  background: white;
}

.tab-content {
  display: none;
}

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

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
  font-size: 14px;
}

.form-group input,
.form-group select {
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s ease;
  background: white;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.table-section {
  margin-bottom: 32px;
}

.table-section h2 {
  margin: 0 0 16px 0;
  color: #1e293b;
  font-size: 20px;
  font-weight: 600;
}

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

.table-header h2 {
  margin: 0;
}

.table-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.search-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  padding: 8px 12px 8px 36px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  width: 250px;
  transition: all 0.2s ease;
  background: white;
}

.search-input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.search-icon {
  position: absolute;
  left: 12px;
  color: #6b7280;
  font-size: 14px;
  pointer-events: none;
}

/* Filter container styles */
.filter-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-label {
  font-size: 14px;
  color: #374151;
  font-weight: 500;
}

.filter-select {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-select:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Table Container - Improved scrolling */
.table-container {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.table-wrapper {
  background: white;
  border-radius: 12px;
  overflow: auto;
  border: 1px solid #e2e8f0;
  max-height: 70vh;
  position: relative;
  width: 100%;
}

@media (min-width: 1440px) {
  .table-wrapper {
    max-height: 75vh;
  }
}

/* Horizontal scrollbar styling */
.table-wrapper::-webkit-scrollbar {
  height: 12px;
}

.table-wrapper::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 6px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 6px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Vertical scrollbar styling */
.table-wrapper::-webkit-scrollbar:vertical {
  width: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 100%;
}

th {
  background: #f1f5f9;
  color: #475569;
  font-weight: 600;
  padding: 16px;
  text-align: left;
  font-size: 14px;
  border-bottom: 2px solid #cbd5e1;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Header alignment classes */
th.col-terminate,
th.col-actions {
  text-align: center;
}

th.col-ec2,
th.col-ip {
  text-align: left;
}

td {
  padding: 16px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
  vertical-align: middle;
}

/* Column-specific alignment */
.col-repo,
.col-module,
.col-tests {
  text-align: left;
}

.col-terminate {
  text-align: center;
}

.col-terminate .auto-terminate-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  padding: 4px 12px;
}

.col-ec2,
.col-ip {
  text-align: left;
  font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
}

.col-ec2 {
  min-width: 150px;
}

.col-ip {
  min-width: 130px;
}

.col-actions {
  text-align: center;
  min-width: 500px;
}

.col-actions .action-buttons {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

/* Repository URL cell */
.col-repo {
  min-width: 350px;
  max-width: none;
}

.repo-cell-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.repo-url-container {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.repo-url-link {
  font-weight: 500;
  color: #3b82f6;
  text-decoration: none;
  flex: 1;
  min-width: 0;
  display: inline-block;
  max-width: 100%;
  word-break: break-all;
}

/* Make sure the link wraps properly on smaller screens */
.repo-url-container {
  word-break: break-word;
}

.repo-url-link:hover {
  color: #2563eb;
  text-decoration: underline;
}

.repo-url {
  font-weight: 500;
  color: #1e293b;
  flex: 1;
  min-width: 0;
}

.auto-terminate-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.auto-terminate-badge.enabled {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.auto-terminate-badge.disabled {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.btn-view-analysis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #6b7280;
  color: white;
  border: none;
}

.btn-view-analysis:hover {
  background: #4b5563;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(107, 114, 128, 0.3);
}

.btn-view-analysis:active {
  transform: translateY(0);
}

.btn-view-analysis span {
  font-size: 14px;
}

.col-module,
.col-tests {
  min-width: 120px;
}

/* Enhanced cell padding for different column types */
.col-terminate td,
td.col-terminate {
  padding: 12px 16px;
}

.col-actions td,
td.col-actions {
  padding: 12px 8px;
}

.col-ec2 td,
td.col-ec2,
.col-ip td,
td.col-ip {
  padding: 14px 16px;
  word-break: break-all;
}

/* Allow repo URL to wrap properly */
.repo-url,
.repo-url-link {
  word-break: break-all;
  overflow-wrap: anywhere;
}

tbody tr:hover {
  background: #f8fafc;
}

.repo-url {
  color: #4f46e5;
  font-weight: 500;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tier-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.tier-small {
  background: #dbeafe;
  color: #1e40af;
}

.tier-medium {
  background: #fef3c7;
  color: #d97706;
}

.tier-large {
  background: #fee2e2;
  color: #dc2626;
}

.job-id {
  font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
  font-size: 12px;
  color: #6b7280;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-buttons {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
}

.action-buttons .btn-sm {
  padding: 6px 10px;
  font-size: 11px;
  min-width: 70px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-weight: 500;
}

.action-buttons .btn-sm span {
  font-size: 12px;
}

/* Bulk upload styling */
.bulk-upload-section {
  max-width: 100%;
}

.file-input-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border: 2px dashed #cbd5e0;
  border-radius: 8px;
  background: #f7fafc;
  transition: all 0.3s ease;
  min-height: 48px;
}

.file-input-wrapper input[type="file"] {
  position: absolute;
  left: -9999px;
}

.file-input-wrapper:hover {
  border-color: #3b82f6;
  background: #eff6ff;
}

.file-input-wrapper.has-file {
  border-color: #10b981;
  background: #f0fdf4;
  border-style: solid;
}

.file-input-text {
  color: #64748b;
  font-size: 14px;
}

.file-input-wrapper.has-file .file-input-text {
  color: #059669;
  font-weight: 500;
}

.help-text {
  margin-top: 8px;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
}

.help-text a {
  color: #3b82f6;
  text-decoration: none;
}

.help-text a:hover {
  text-decoration: underline;
}

.csv-preview,
.validation-results {
  margin-top: 20px;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: white;
}

.csv-preview h4,
.validation-results h4 {
  margin: 0 0 12px 0;
  color: #1e293b;
  font-size: 16px;
  font-weight: 600;
}

.csv-content {
  max-height: 200px;
  overflow: auto;
  background: #f8fafc;
  padding: 12px;
  border-radius: 6px;
  font-family: "Courier New", monospace;
  font-size: 12px;
  line-height: 1.4;
  white-space: pre-wrap;
}

.validation-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.validation-stat {
  text-align: center;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
}

.validation-stat.total {
  background: #f1f5f9;
  color: #475569;
}

.validation-stat.valid {
  background: #f0fdf4;
  color: #059669;
}

.validation-stat.warnings {
  background: #fffbeb;
  color: #d97706;
}

.validation-stat.errors {
  background: #fef2f2;
  color: #dc2626;
}

.validation-stat-number {
  display: block;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.validation-details {
  max-height: 300px;
  overflow-y: auto;
}

.validation-row {
  padding: 12px;
  margin-bottom: 8px;
  border-radius: 6px;
  border-left: 4px solid #e2e8f0;
}

.validation-row.has-errors {
  background: #fef2f2;
  border-left-color: #dc2626;
}

.validation-row.has-warnings {
  background: #fffbeb;
  border-left-color: #d97706;
}

.validation-row.valid {
  background: #f0fdf4;
  border-left-color: #059669;
}

.validation-row-header {
  font-weight: 600;
  margin-bottom: 6px;
  color: #374151;
  font-size: 14px;
}

.validation-messages {
  list-style: none;
  padding: 0;
  margin: 0;
}

.validation-messages li {
  padding: 4px 0;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.validation-messages .error {
  color: #dc2626;
}

.validation-messages .warning {
  color: #d97706;
}

.validation-messages .error::before {
  content: "❌";
  font-size: 12px;
}

.validation-messages .warning::before {
  content: "⚠️";
  font-size: 12px;
}

/* =============================================================================
   SECURITY GATE STYLES
   ============================================================================= */

.security-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.security-modal {
  background: white;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  text-align: center;
  max-width: 400px;
  width: 90%;
}

.security-header h2 {
  margin: 0 0 12px 0;
  color: #1e293b;
  font-size: 24px;
  font-weight: 600;
}

.security-header p {
  margin: 0 0 24px 0;
  color: #64748b;
  font-size: 16px;
  line-height: 1.5;
}

.security-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.security-form input {
  padding: 16px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 18px;
  text-align: center;
  letter-spacing: 2px;
  font-weight: 600;
  transition: all 0.2s ease;
  background: #f8fafc;
}

.security-form input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
  background: white;
}

.security-form input::placeholder {
  color: #94a3b8;
  font-weight: 400;
  letter-spacing: normal;
}

.security-form .btn {
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
}

.error-message {
  color: #dc2626;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  margin-top: 8px;
}

@media (max-width: 768px) {
  .container {
    margin: 10px;
    border-radius: 8px;
    max-width: 100%;
  }

  .content {
    padding: 20px;
  }

  .header {
    padding: 20px;
  }

  .header h1 {
    font-size: 24px;
  }

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

  .actions {
    justify-content: center;
  }

  .action-buttons {
    justify-content: center;
  }

  .form-tabs {
    flex-direction: column;
    gap: 0;
  }

  .tab-btn {
    border-radius: 0;
    border-bottom: 1px solid #e2e8f0;
    top: 0;
  }

  .tab-btn.active {
    border-bottom-color: #3b82f6;
  }

  .validation-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .csv-content {
    font-size: 11px;
  }

  .security-modal {
    padding: 24px;
    margin: 20px;
  }

  .security-header h2 {
    font-size: 20px;
  }

  .security-header p {
    font-size: 14px;
  }

  .security-form input {
    font-size: 16px;
    padding: 14px;
  }
}

/* =============================================================================
   ENHANCED MODAL STYLES
   ============================================================================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  width: 95%;
  max-height: 90vh;
  overflow: hidden;
  animation: modalSlideIn 0.3s ease-out;
}

.large-modal {
  max-width: 1000px;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
}

.modal-body {
  padding: 24px;
  max-height: 60vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  background: #f9fafb;
}

/* Custom Run Modal Styles */
.form-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #007bff;
}

.form-section h3 {
  margin: 0 0 0.5rem 0;
  color: #333;
  font-size: 1.2rem;
}

.section-description {
  margin: 0 0 1rem 0;
  color: #666;
  font-size: 0.9rem;
}

.form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

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

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.form-group small {
  display: block;
  margin-top: 0.25rem;
  color: #666;
  font-size: 0.8rem;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.mode-fields {
  padding: 1rem;
  background: #fff;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

/* Path Info Banner Styles */
.path-info-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
  border: 1px solid #bbdefb;
  border-radius: 8px;
  border-left: 4px solid #2196f3;
}

.path-info-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.path-info-content {
  flex: 1;
  font-size: 14px;
  line-height: 1.5;
  color: #1565c0;
}

.path-info-content code {
  background: rgba(33, 150, 243, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "Courier New", monospace;
  font-size: 13px;
  color: #0d47a1;
}

/* Path Input Container Styles */
.path-input-container {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  transition: border-color 0.2s;
}

.path-input-container:focus-within {
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.path-prefix {
  background: #f8f9fa;
  color: #6c757d;
  padding: 0.75rem 0.5rem;
  border-right: 1px solid #ddd;
  font-size: 0.85rem;
  font-family: "Courier New", monospace;
  white-space: nowrap;
  user-select: none;
  flex-shrink: 0;
}

.path-input-container input,
.path-input-container textarea {
  border: none;
  outline: none;
  padding: 0.75rem;
  flex: 1;
  background: transparent;
}

.path-input-container input:focus,
.path-input-container textarea:focus {
  box-shadow: none;
}

/* Special styling for textarea in path containers */
.path-input-container textarea {
  resize: vertical;
  min-height: 60px;
}

.validation-messages {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 6px;
}

.error-messages {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.warning-messages {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
  padding: 1rem;
  border-radius: 4px;
}

.error-messages h4,
.warning-messages h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
}

.error-messages ul,
.warning-messages ul {
  margin: 0;
  padding-left: 1.5rem;
}

.error-messages li,
.warning-messages li {
  margin-bottom: 0.25rem;
}

/* Analysis Editor Styles */
.analysis-section {
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fafafa;
}

.analysis-section h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.analysis-field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #374151;
  font-size: 14px;
}

.analysis-field input,
.analysis-field textarea,
.analysis-field select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.analysis-field input:focus,
.analysis-field textarea:focus,
.analysis-field select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.analysis-field textarea {
  min-height: 80px;
  resize: vertical;
}

.analysis-field .help-text {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

/* Logs Viewer Styles */
.logs-session {
  margin-bottom: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

.logs-session-header {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  padding: 12px 16px;
  border-bottom: 1px solid #d1d5db;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.logs-session-title {
  font-weight: 600;
  color: #374151;
  margin: 0;
  font-size: 14px;
  flex: 1;
  min-width: 200px;
}

.logs-session-date {
  font-size: 12px;
  color: #6b7280;
  margin: 0;
  flex-shrink: 0;
}

.logs-session-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.logs-files-list {
  padding: 0;
  margin: 0;
}

.log-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.2s;
}

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

.log-file-item:hover {
  background-color: #f9fafb;
}

.log-file-info {
  flex: 1;
}

.log-file-name {
  font-weight: 500;
  color: #374151;
  font-size: 14px;
}

.log-file-meta {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}

.log-file-actions {
  display: flex;
  gap: 8px;
}

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

/* Auto-Termination Styles */
.auto-termination-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fafafa;
  margin-bottom: 16px;
}

.auto-termination-info h4 {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 600;
  color: #374151;
}

.auto-termination-info p {
  margin: 0;
  font-size: 14px;
  color: #6b7280;
}

.toggle-switch {
  position: relative;
  width: 50px;
  height: 24px;
  background: #d1d5db;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.toggle-switch.active {
  background: #10b981;
}

.toggle-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active::after {
  transform: translateX(26px);
}

/* Enhanced Table Styles */
.table-wrapper {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

#repos {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

#repos th {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 2px solid #e5e7eb;
  font-size: 14px;
}

#repos td {
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
  color: #4b5563;
}

#repos tr:hover {
  background-color: #f9fafb;
}

.resource-tier {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.resource-tier.small {
  background: #dcfce7;
  color: #166534;
}

.resource-tier.medium {
  background: #fef3c7;
  color: #92400e;
}

.resource-tier.large {
  background: #fecaca;
  color: #991b1b;
}

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

.auto-terminate-status.enabled {
  background: #dcfce7;
  color: #166534;
}

.auto-terminate-status.disabled {
  background: #fecaca;
  color: #991b1b;
}

.action-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.action-buttons .btn {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 4px;
}

/* Instructions Section Styles */
.instructions-section {
  background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
  border: 1px solid #bbdefb;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 32px;
  border-left: 4px solid #2196f3;
}

.instructions-header {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.instructions-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.instructions-content {
  flex: 1;
  min-width: 300px;
}

.instructions-content h3 {
  margin: 0 0 8px 0;
  color: #1976d2;
  font-size: 18px;
  font-weight: 600;
}

.instructions-content p {
  margin: 0;
  color: #1565c0;
  font-size: 14px;
  line-height: 1.5;
}

/* Instructions Modal Content Styles */
.instruction-step {
  margin-bottom: 24px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #007bff;
}

.instruction-step h4 {
  margin: 0 0 12px 0;
  color: #333;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.instruction-step p {
  margin: 0 0 12px 0;
  color: #666;
  line-height: 1.6;
}

.instruction-step ul {
  margin: 0;
  padding-left: 20px;
}

.instruction-step li {
  margin-bottom: 8px;
  color: #666;
  line-height: 1.5;
}

.code-block {
  background: #1e293b;
  color: #e2e8f0;
  padding: 12px 16px;
  border-radius: 6px;
  font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
  font-size: 13px;
  margin: 12px 0;
  overflow-x: auto;
  border: 1px solid #334155;
}

.code-block code {
  background: none;
  color: inherit;
  padding: 0;
}

.warning-box {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 6px;
  padding: 12px 16px;
  margin: 12px 0;
  border-left: 4px solid #ffc107;
}

.warning-box strong {
  color: #856404;
}

.info-box {
  background: #d1ecf1;
  border: 1px solid #bee5eb;
  border-radius: 6px;
  padding: 12px 16px;
  margin: 12px 0;
  border-left: 4px solid #17a2b8;
}

.info-box strong {
  color: #0c5460;
}

/* Responsive Design for Instructions */
@media (max-width: 768px) {
  .instructions-header {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .instructions-content {
    min-width: auto;
  }

  .instructions-icon {
    align-self: center;
  }
}

/* Enhanced Loading States */
.btn:disabled {
  opacity: 0.7 !important;
  cursor: not-allowed !important;
  pointer-events: none;
}

.btn.loading {
  position: relative;
  overflow: hidden;
}

.btn.loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Enhanced notification styles */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  font-size: 14px;
  font-weight: 500;
  max-width: 400px;
  word-wrap: break-word;
  animation: notification-slide-in 0.3s ease-out;
}

.notification.success {
  background: #10b981;
  color: white;
}

.notification.error {
  background: #ef4444;
  color: white;
}

.notification.info {
  background: #3b82f6;
  color: white;
}

@keyframes notification-slide-in {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Loading indicator improvements */
.loading-indicator {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #3b82f6;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  font-size: 14px;
  font-weight: 500;
  animation: loading-pulse 2s infinite;
}

@keyframes loading-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Table Footer - Pagination */
.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 12px 12px;
  flex-wrap: wrap;
  gap: 16px;
}

.pagination-info {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-input-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-input-container label {
  font-size: 14px;
  color: #374151;
  font-weight: 500;
}

.page-input {
  width: 60px;
  padding: 6px 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  text-align: center;
}

.page-input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.page-input-container span {
  font-size: 14px;
  color: #64748b;
}

.pagination-size {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-size label {
  font-size: 14px;
  color: #374151;
  font-weight: 500;
}

.page-size-select {
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  cursor: pointer;
}

.page-size-select:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
  .modal-content {
    width: 98%;
    margin: 10px;
  }

  .large-modal {
    max-width: 98%;
  }

  .modal-body {
    padding: 16px;
  }

  .action-buttons {
    flex-direction: column;
  }

  .action-buttons .btn {
    width: 100%;
  }

  .table-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .search-input {
    width: 100%;
  }

  .table-actions {
    justify-content: center;
  }

  /* Table footer responsive */
  .table-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .pagination-info {
    text-align: center;
  }

  .pagination-controls {
    justify-content: center;
  }

  .pagination-size {
    justify-content: center;
  }

  .filter-container {
    justify-content: center;
  }
}

/* Better spacing for very large screens */
@media (min-width: 1920px) {
  .container {
    max-width: 1800px;
  }

  .table-wrapper {
    max-height: 80vh;
  }
}
