/**
 * Tool-specific styles for PE Due Diligence Checklist Generator
 * Reuses base styles from /styles.css and /tools/common-tool-styles.css
 */

/* Page Layout */
.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Toolbar Links Styling */
.toolbar .logo img {
  height: 40px;
}

.toolbar .nav-links {
  display: flex;
  gap: 30px;
}

.toolbar .nav-links a {
  color: var(--light-text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.toolbar .nav-links a:hover {
  color: #fff;
}

.page-header {
  text-align: center;
  margin: 30px 0 20px;
}

.page-header h1 {
  color: var(--accent1);
  font-size: 2.2rem;
  margin-bottom: 0;
  line-height: 1.2;
}

.page-header .subtitle {
  color: var(--accent2);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0;
  margin-top: 4px;
}

/* Timeline Section */
.timeline-section {
  background: linear-gradient(120deg, var(--accent1) 0%, var(--accent2) 100%);
  padding: 40px;
  border-radius: 14px;
  color: #fff;
  box-shadow: 0 8px 28px -6px rgba(0,0,0,0.25);
  margin-bottom: 40px;
}

.timeline-section h2 {
  color: #fff;
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 5px 0;
  line-height: 1.3;
  font-weight: 700;
  text-align: center;
}

.timeline-instruction {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.8rem;
  font-style: italic;
  margin: 0 0 12px 0;
  text-align: center;
}

/* Timeline Container */
.timeline-container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  padding: 40px 0;
}

/* Milestones Row */
.milestones-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  padding: 0;
}

.milestones-row {
  --progress-percent: 0%;
}

.milestones-row::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(to right, 
    var(--primary) 0%, 
    var(--primary) var(--progress-percent),
    #3d5679 var(--progress-percent), 
    #728ba2 100%
  );
  z-index: 0;
}

/* Stage Buttons (between milestones) */
.stage-button {
  background: linear-gradient(120deg, var(--accent1) 0%, var(--accent2) 100%);
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  padding: 10px 16px;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  z-index: 2;
  flex: 1;
  max-width: 140px;
  margin: 0 10px;
  white-space: normal;
  text-align: center;
  line-height: 1.3;
  align-self: center;
  transform: translateY(-15px);
}

.stage-button:hover {
  border-color: rgba(255, 255, 255, 0.8);
  transform: translateY(-17px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Pulse animation on page load */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 2px rgba(255, 255, 255, 0.15);
    transform: translateY(-15px) scale(1);
  }
  50% {
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.2);
    transform: translateY(-15px) scale(1.005);
  }
}

.stage-button {
  animation: pulse-glow 2s ease-in-out 3;
}

/* Completed (past) button - same bright orange */
.stage-button.completed {
  background: linear-gradient(120deg, var(--primary) 0%, #ff6b3d 100%);
  border-color: var(--primary);
}

/* Active (current) button - same bright orange with white outline */
.stage-button.active {
  background: linear-gradient(120deg, var(--primary) 0%, #ff6b3d 100%);
  border-color: var(--primary);
  color: #fff;
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 3px;
}

.milestone-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
  cursor: pointer;
  padding: 1px 4px 4px 4px;
  border-radius: 8px;
  transition: background 0.2s;
}

/* Desktop hover effect */
@media (hover: hover) and (pointer: fine) {
  .milestone-marker:hover {
    background: rgba(255, 255, 255, 0.1);
  }
}

/* Mobile/Touch - show effect on active */
@media (hover: none) and (pointer: coarse) {
  .milestone-marker:active {
    background: rgba(255, 255, 255, 0.1);
  }
}

.milestone-dot {
  width: 32px;
  height: 32px;
  background: #5a7694;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  -webkit-clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
  transform: rotate(90deg);
}

/* Completed (past) milestones - bright orange */
.milestone-marker.completed .milestone-dot {
  background: var(--primary);
}

/* Active (current) milestones - bright orange */
.milestone-marker.active .milestone-dot {
  background: var(--primary);
}

.milestone-icon {
  display: none;
}

.milestone-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  text-align: center;
}

/* Milestone Tooltip */
.milestone-tooltip {
  position: fixed;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  padding: 20px;
  max-width: 350px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.milestone-tooltip.visible {
  opacity: 1;
  pointer-events: auto;
}

.milestone-tooltip h4 {
  color: var(--accent1);
  font-size: 1rem;
  margin: 0 0 10px 0;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tooltip-icon {
  font-size: 1.2rem;
}

.milestone-tooltip p {
  color: var(--text-color);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

/* Stage Info Display */
.stage-info {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 20px;
  margin-top: 15px;
  backdrop-filter: blur(10px);
}

.stage-info-content h3 {
  color: #fff;
  font-size: 1.3rem;
  margin: 0 0 12px 0;
  font-weight: 700;
}

.stage-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}

/* Stage Context Accordion Toggle */
.stage-context-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: rgba(255, 255, 255, 0.9);
  padding: 10px 15px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
  width: fit-content;
  margin-bottom: 8px;
}

.stage-context-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
}

.stage-context-toggle .material-icons {
  font-size: 18px;
}

.stage-context-toggle .toggle-icon {
  margin-left: auto;
  transition: transform 0.3s ease;
}

.stage-context-toggle[aria-expanded="true"] .toggle-icon {
  transform: rotate(180deg);
}

.stage-context {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
}

.stage-context.collapsed {
  max-height: 0;
  opacity: 0;
}

.stage-context.expanded {
  max-height: 500px;
  opacity: 1;
}

.context-item {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.context-item-with-button {
  align-items: baseline;
}

.context-item-with-button > div {
  display: inline;
}

.context-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.context-value {
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.85rem;
  line-height: 1.4;
}

/* Stage Action Area - Item Count + Button Group */
.stage-action-area {
  margin: 12px 0 16px 0;
}

.item-count-display {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  margin-bottom: 10px;
  font-weight: 500;
}

.button-group {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.download-btn,
.preview-btn {
  flex: 1;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
}

/* Download button in white section */
.white-action-section .download-btn {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 127, 80, 0.3);
}

.white-action-section .download-btn:hover {
  background: #ff6b3d;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 127, 80, 0.5);
}

/* Legacy download button in blue section */
.stage-action-area .download-btn {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 127, 80, 0.3);
}

.stage-action-area .download-btn:hover {
  background: #ff6b3d;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 127, 80, 0.5);
}

.preview-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.preview-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.download-btn .material-icons,
.preview-btn .material-icons {
  font-size: 1.1rem;
}

/* Legacy jump button styles - kept for compatibility */
.jump-to-checklist-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0 16px 0;
  box-shadow: 0 2px 8px rgba(255, 127, 80, 0.3);
}

.jump-to-checklist-btn .material-icons {
  font-size: 1.1rem;
}

.jump-to-checklist-btn:hover {
  background: #ff6b3d;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 127, 80, 0.5);
}

.see-items-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  margin-left: 12px;
  line-height: 1.4;
}

.see-items-btn:hover {
  background: #ff6b3d;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(255, 127, 80, 0.4);
}

.stage-access,
.stage-count {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
}

.stage-count {
  font-weight: 600;
}

.stage-disclaimer {
  color: #fff;
  background: rgba(255, 193, 7, 0.3);
  padding: 10px 15px;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-top: 15px;
  border-left: 4px solid #ffc107;
}

/* White Action Section - below blue timeline */
.white-action-section {
  background: #fff;
  padding: 10px 40px 30px 40px;
  margin-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.2);
}

.inline-checklist-container {
  margin-top: 20px;
}

/* Custom scrollbar for checklist */

/* Checklist Section - hidden, kept for legacy */
.checklist-section {
  margin-bottom: 60px;
  display: none;
}

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

.checklist-header h2 {
  color: var(--accent1);
  font-size: 1.8rem;
  margin: 0;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--accent2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn .material-icons {
  font-size: 20px;
}

/* Checklist Container */
.checklist-container {
  min-height: 400px;
}

.checklist-category {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 30px;
  overflow: hidden;
}

.category-header {
  background: linear-gradient(120deg, var(--accent1) 0%, var(--accent2) 100%);
  color: #fff;
  padding: 10px 25px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.category-icon {
  font-size: 28px;
}

.category-header h3 {
  flex: 1;
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
}

.category-count {
  background: rgba(255, 255, 255, 0.25);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.category-items {
  padding: 10px;
}

/* Stage Accordion Styles */
.stage-accordion {
  margin-bottom: 16px;
  border: 1px solid rgba(10, 37, 64, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

.stage-accordion-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: rgba(10, 37, 64, 0.03);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: #0a2540;
  transition: background 0.2s;
}

.stage-accordion-header:hover {
  background: rgba(10, 37, 64, 0.06);
}

.stage-accordion-title {
  flex: 1;
  text-align: left;
  color: #0a2540;
}

.accordion-icon {
  color: #0a2540;
  transition: transform 0.3s;
}

.stage-accordion-content {
  transition: all 0.3s ease-out;
}

.stage-accordion-content.collapsed {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

.stage-accordion-content.expanded {
  max-height: 10000px;
  opacity: 1;
  padding: 12px;
}

/* Stage Subheading (for Prior Stages grouping) */
.stage-subheading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  margin: 16px 0 12px 0;
  background: rgba(10, 37, 64, 0.04);
  border-left: 4px solid rgba(10, 37, 64, 0.3);
  border-radius: 4px;
}

.stage-subheading:first-child {
  margin-top: 0;
}

.stage-subheading h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0a2540;
}

.stage-item-count {
  font-size: 0.85rem;
  color: #666;
  font-weight: 500;
}

/* Checklist Items */
.checklist-item {
  display: flex;
  padding: 4px 12px;
  border-radius: 6px;
  margin-bottom: 4px;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.checklist-item:hover {
  background: rgba(10, 37, 64, 0.03);
  border-color: rgba(10, 37, 64, 0.1);
}

.checklist-item.current-stage {
  background: rgba(255, 127, 80, 0.05);
}

.checklist-item.previous-stage {
  opacity: 0.7;
}

.item-content {
  flex: 1;
}

.item-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--accent1);
}

.item-content {
  flex: 1;
}

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

.item-question {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent1);
  line-height: 1.3;
  flex: 1;
}

.item-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.info-toggle-btn,
.item-tool-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--accent2);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
  text-decoration: none;
}

.info-toggle-btn:hover,
.item-tool-icon:hover {
  background: rgba(10, 37, 64, 0.08);
  color: var(--accent1);
}

.info-toggle-btn .material-icons,
.item-tool-icon .material-icons {
  font-size: 18px;
}

.item-details {
  margin-top: 8px;
  padding-left: 32px;
  transition: all 0.2s ease-out;
}

.item-details.collapsed {
  display: none;
}

.item-details.expanded {
  display: block;
  animation: expandDetails 0.2s ease-out;
}

@keyframes expandDetails {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.item-details p {
  font-size: 0.75rem;
  line-height: 1.5;
  margin: 6px 0;
}

.item-why {
  color: #1a1a1a !important;
}

.item-sources {
  color: #333 !important;
  font-size: 0.7rem;
}


.item-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.info-toggle-btn,
.item-tool-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--accent2);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
  text-decoration: none;
}

.info-toggle-btn:hover,
.item-tool-icon:hover {
  background: rgba(10, 37, 64, 0.08);
  color: var(--accent1);
}

.info-toggle-btn .material-icons,
.item-tool-icon .material-icons {
  font-size: 18px;
}

.future-feature-note {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 193, 7, 0.1);
  border-left: 4px solid #ffc107;
  padding: 15px 20px;
  border-radius: 8px;
  margin-top: 30px;
}

.future-feature-note .material-icons {
  color: #ffc107;
  font-size: 24px;
}

.future-feature-note p {
  margin: 0;
  color: var(--text-color);
  font-size: 0.95rem;
}

/* Loading and Error States */
.loading-state,
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.loading-spinner {
  font-size: 48px;
  color: var(--accent1);
  animation: spin 1s linear infinite;
}

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

.error-state .material-icons {
  font-size: 64px;
  color: #d32f2f;
  margin-bottom: 20px;
}

.error-state p {
  color: var(--text-color);
  font-size: 1.1rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .page-header {
    margin-bottom: 10px;
  }
  
  .page-header h1 {
    font-size: 1.8rem;
    line-height: 1.2;
  }
  
  .timeline-section {
    padding: 20px 2px;
  }
  
  .tool-container {
    margin-top: 10px;
  }
  
  .timeline-container {
    padding-top: 10px;
  }
  
  /* Vertical timeline layout */
  .milestones-row {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
  }
  
  /* Vertical line down the center */
  .milestones-row::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 0;
    bottom: 0;
    width: 3px;
    height: auto;
    background: linear-gradient(to bottom, 
      var(--primary) 0%, 
      var(--primary) var(--progress-percent),
      #3d5679 var(--progress-percent), 
      #728ba2 100%
    );
    z-index: 0;
  }
  
  /* Milestone markers - triangle centered on line, text to the left */
  .milestone-marker {
    position: relative;
    flex-direction: row;
    width: 100%;
    height: 28px;
    padding: 0;
    z-index: 1;
  }
  
  /* Triangle centered on vertical line */
  .milestone-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(180deg);
    width: 24px;
    height: 24px;
  }
  
  /* Milestone name to the left of center */
  .milestone-name {
    position: absolute;
    right: 50%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 20px;
    font-size: 0.9rem;
    white-space: nowrap;
  }
  
  /* Stage buttons - full width, centered */
  .stage-button {
    width: 90%;
    max-width: 300px;
    margin: 0;
    padding: 8px 16px;
    font-size: 0.8rem;
    transform: none;
    z-index: 1;
  }
  
  .stage-button:hover {
    transform: translateY(-2px);
  }
  
  /* Stack context labels and values vertically on mobile */
  .context-item {
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
  }
  
  /* Stack button group vertically on mobile */
  .button-group {
    flex-direction: column;
  }
  
  .download-btn,
  .preview-btn {
    width: 100%;
  }
  
  /* Adjust pulse animation for mobile */
  @keyframes pulse-glow {
    0%, 100% {
      box-shadow: 0 0 2px rgba(255, 255, 255, 0.15);
      transform: scale(1);
    }
    50% {
      box-shadow: 0 0 4px rgba(255, 255, 255, 0.2);
      transform: scale(1.005);
    }
  }
  
  .checklist-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  /* Mobile: Info button on left side */
  .item-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
  }
  
  .info-toggle-btn {
    order: -1;
    flex-shrink: 0;
    margin-top: 2px;
  }
  
  .item-question {
    flex: 1;
    font-size: 0.8rem;
  }
  
  .item-actions {
    display: none;
  }
  
  /* Ensure current stage accordion content is visible on mobile */
  .stage-accordion.current .stage-accordion-content.expanded {
    max-height: none;
    overflow: visible;
  }
  
  .item-stage-badge {
    align-self: flex-start;
  }
}

@media (max-width: 480px) {
  .page-container {
    padding: 0 2px;
  }
  
  .page-header h1 {
    font-size: 1.5rem;
  }
  
  .tool-container {
    padding: 0 3px;
  }
  
  .category-header {
    padding: 6px 12px;
  }
  
  .category-header h3 {
    font-size: 1.1rem;
  }
  
  .category-icon {
    display: none;
  }
  
  .items-text {
    display: none;
  }
  
  /* Hide tabs on mobile, show stacked sections instead */
  .checklist-tabs {
    display: none !important;
  }
  
  /* Mobile section headers */
  .mobile-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--accent1);
    color: #fff;
    padding: 12px 15px;
    margin: 20px 0 12px 0;
    border-radius: 6px;
  }
  
  .mobile-section-header:first-child {
    margin-top: 0;
  }
  
  .mobile-section-header .material-icons {
    font-size: 24px;
  }
  
  .mobile-section-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
  }
  
  .checklist-item {
    padding: 6px 8px;
  }
  
  .item-question {
    font-size: 0.8rem;
  }
}

/* Tab Styling */
.checklist-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  border-bottom: 2px solid rgba(10, 37, 64, 0.1);
  padding-bottom: 0;
}

/* Tabs in white section */
.white-action-section .checklist-tabs {
  border-bottom-color: rgba(10, 37, 64, 0.1);
}

.white-action-section .tab-btn {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: rgba(10, 37, 64, 0.6);
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.white-action-section .tab-btn:hover {
  color: var(--accent1);
  background: rgba(10, 37, 64, 0.05);
}

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

/* Legacy tabs in blue section */
.stage-action-area .checklist-tabs {
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.tab-btn {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: rgba(255, 255, 255, 0.75);
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.tab-btn:hover {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.1);
}

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

.tab-btn .material-icons {
  font-size: 1.2rem;
}

/* Export Lightbox */
.export-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.export-lightbox.visible {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.lightbox-content h3 {
  margin: 0 0 10px 0;
  color: var(--accent1);
  font-size: 1.5rem;
}

.lightbox-content p {
  margin: 0 0 20px 0;
  color: var(--dark-text);
  font-size: 0.95rem;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 25px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 1rem;
  color: var(--dark-text);
  padding: 12px;
  border-radius: 6px;
  transition: background 0.2s;
}

.checkbox-group label:hover {
  background: #f5f5f5;
}

.checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.stage-selector-group {
  margin-bottom: 25px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stage-selector-group label {
  font-size: 0.95rem;
  color: var(--dark-text);
  font-weight: 500;
}

.stage-selector-group select {
  padding: 10px 12px;
  font-size: 1rem;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  background: white;
  color: var(--dark-text);
  cursor: pointer;
  transition: border-color 0.2s;
}

.stage-selector-group select:hover {
  border-color: var(--primary);
}

.stage-selector-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10, 37, 64, 0.1);
}

.lightbox-buttons {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.lightbox-buttons .btn {
  min-width: 120px;
}

/* Mobile tab adjustments */
@media (max-width: 768px) {
  .white-action-section {
    padding: 15px 12px;
    margin-top: 20px;
  }
  
  .checklist-tabs {
    flex-direction: column;
    gap: 0;
    border-bottom: none;
  }
  
  /* White section tabs */
  .white-action-section .tab-btn {
    border-bottom: 1px solid rgba(10, 37, 64, 0.1);
    border-left: 3px solid transparent;
    padding: 15px 20px;
  }
  
  .white-action-section .tab-btn.active {
    border-bottom-color: rgba(10, 37, 64, 0.1);
    border-left-color: var(--primary);
    background: rgba(10, 37, 64, 0.05);
  }
  
  /* Blue section tabs */
  .stage-action-area .tab-btn {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 3px solid transparent;
    padding: 15px 20px;
  }
  
  .stage-action-area .tab-btn.active {
    border-bottom-color: rgba(255, 255, 255, 0.2);
    border-left-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
  }
  
  .lightbox-content {
    padding: 20px;
  }
  
  .lightbox-buttons {
    flex-direction: column;
  }
  
  .lightbox-buttons .btn {
    width: 100%;
  }
}
