.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prose h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.prose h2 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; margin-top: 1rem; }
.prose h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.25rem; margin-top: 0.75rem; }
.prose p { margin-bottom: 0.5rem; line-height: 1.6; }
.prose ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 0.5rem; }
.prose ol { list-style: decimal; padding-left: 1.5rem; margin-bottom: 0.5rem; }
.prose li { margin-bottom: 0.25rem; }
.prose strong { font-weight: 700; }
.prose em { font-style: italic; }
.prose blockquote { border-left: 3px solid #cbd5e1; padding-left: 1rem; color: #64748b; margin: 0.5rem 0; }
.prose code { background: #f1f5f9; padding: 0.1rem 0.3rem; border-radius: 0.25rem; font-size: 0.85em; }

#section-editor {
  min-height: 300px;
  font-family: 'Courier New', Courier, monospace;
  tab-size: 2;
}

@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.skeleton {
  background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
  border-radius: 0.375rem;
}

.skeleton-text {
  height: 0.875rem;
  margin-bottom: 0.5rem;
}

.skeleton-text-sm {
  height: 0.75rem;
  margin-bottom: 0.375rem;
}

.skeleton-circle {
  border-radius: 50%;
}

.skeleton-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1rem;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideDown {
  from { opacity: 0; max-height: 0; }
  to { opacity: 1; max-height: 500px; }
}

.slide-down {
  animation: slideDown 0.3s ease-out forwards;
  overflow: hidden;
}

.pipeline-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  min-height: 400px;
}

@media (max-width: 1024px) {
  .pipeline-board {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .pipeline-board {
    grid-template-columns: 1fr;
  }
}

.pipeline-column {
  background: #f9fafb;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

.pipeline-column-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  background: white;
  border-radius: 0.75rem 0.75rem 0 0;
}

.pipeline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pipeline-count {
  margin-left: auto;
  background: #e5e7eb;
  color: #6b7280;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.1rem 0.5rem;
  border-radius: 9999px;
}

.pipeline-cards {
  padding: 0.5rem;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pipeline-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.75rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  cursor: default;
}

.pipeline-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border-color: #c7d2fe;
  transform: translateY(-1px);
}

.pipeline-card a {
  text-decoration: none;
  color: inherit;
}

.pipeline-empty {
  text-align: center;
  color: #9ca3af;
  font-size: 0.75rem;
  padding: 2rem 0.5rem;
  font-style: italic;
}

.compliance-ring {
  display: block;
}

.toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  animation: slideInRight 0.3s ease-out;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

.toast-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.toast-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.toast-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

.status-pill {
  position: relative;
  cursor: help;
}

.status-pill:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: #fff;
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 20;
  pointer-events: none;
  margin-bottom: 4px;
}

.status-pill:hover::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #1f2937;
  z-index: 20;
  pointer-events: none;
}

.category-chevron {
  transition: transform 0.2s ease;
}

.expand-chevron {
  transition: transform 0.2s ease;
}

.expand-row td {
  border-top: none;
}

.category-group .category-body {
  transition: max-height 0.3s ease;
}

.bw-card {
  background: white;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s ease;
}

.bw-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.bw-btn-primary {
  background: #4f46e5;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.bw-btn-primary:hover {
  background: #4338ca;
}

.bw-btn-primary:active {
  transform: scale(0.98);
}

.bw-btn-secondary {
  background: white;
  color: #374151;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid #d1d5db;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.bw-btn-secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.bw-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.bw-badge-green { background: #ecfdf5; color: #065f46; }
.bw-badge-red { background: #fef2f2; color: #991b1b; }
.bw-badge-yellow { background: #fffbeb; color: #92400e; }
.bw-badge-blue { background: #eff6ff; color: #1e40af; }
.bw-badge-indigo { background: #eef2ff; color: #3730a3; }
.bw-badge-gray { background: #f3f4f6; color: #4b5563; }

.bw-section-heading {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
}

.bw-sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #374151;
  transition: background 0.15s ease, color 0.15s ease;
}

.bw-sidebar-link:hover {
  background: #eef2ff;
}

.bw-sidebar-link.active {
  background: #eef2ff;
  color: #4338ca;
  font-weight: 500;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.15s ease-out;
}

.modal-content {
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  max-width: 480px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  animation: modalSlideUp 0.2s ease-out;
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.workflow-step .step-icon {
  transition: background-color 0.3s ease, color 0.3s ease;
}

@media (max-width: 768px) {
  #bid-room {
    flex-direction: column;
  }

  #bid-room > div:first-child {
    width: 100%;
    max-height: 200px;
    overflow-x: auto;
    overflow-y: hidden;
    flex-direction: row;
  }

  #bid-room > div:first-child nav {
    display: flex;
    flex-wrap: nowrap;
    white-space: nowrap;
  }

  .w-96 {
    width: 100% !important;
    border-left: none !important;
    border-top: 1px solid #e5e7eb;
  }
}

.upload-zone-active {
  border-color: #818cf8 !important;
  background: #eef2ff !important;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
  border-color: #818cf8;
}

.bw-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bw-input:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

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