.ocr-main {
  padding-top: 110px;
  width: 90%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

main.landing-main.ocr-main {
  padding-top: 110px !important;
  gap: 1.5rem !important;
  padding-bottom: 2rem !important;
}

.ocr-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.ocr-grid {
  display: grid;
  grid-template-columns: 1.5fr minmax(300px, 1fr);
  gap: 1.5rem;
  align-items: stretch;
}

.ocr-panel {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: fade-in-up 0.8s ease backwards;
}

.ocr-panel-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 0;
  line-height: 1.4;
}

.ocr-panel .section-title {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}
.ocr-panel .badge {
  margin-bottom: 0.5rem;
}
.ocr-stat-row .metric-value {
  font-size: 1rem;
}
.ocr-stat-row .metric-label {
  font-size: 0.75rem;
}

/* Nav Status */
.nav-status {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 16px;
  border-radius: 50px;
  border: 1px solid var(--glass-border);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.status-dot.idle { background: #6b7280; }
.status-dot.pulse { background: var(--accent-primary); box-shadow: 0 0 10px var(--accent-primary); animation: pulse 1.5s infinite; }
.status-dot.success { background: #22c55e; box-shadow: 0 0 10px #22c55e; }
.status-dot.warning { background: #eab308; box-shadow: 0 0 10px #eab308; }

.status-text {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-primary);
}

/* Dropzone */
.ocr-dropzone {
  position: relative;
  border: 2px dashed rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
}

.ocr-dropzone:hover, .ocr-dropzone--active {
  border-color: var(--accent-primary);
  background: rgba(59, 130, 246, 0.05);
}

.ocr-dropzone--loading {
  pointer-events: none;
  border-color: transparent;
}

.ocr-file-input {
  display: none;
}

.ocr-dropzone-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  cursor: pointer;
  padding: 2rem 1.5rem;
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.dropzone-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
}

.dropzone-icon svg {
  width: 24px;
  height: 24px;
}

.dropzone-title {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.25rem;
}

.dropzone-subtitle {
  display: block;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.file-pill {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--glass-border);
  padding: 6px 16px;
  border-radius: 50px;
  font-family: monospace;
  color: var(--accent-primary);
  font-size: 0.9rem;
}

.file-pill.techy {
  display: inline-block;
  margin-bottom: 2rem;
}

.ocr-dropzone-busy {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 10;
  border-radius: inherit;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

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

.busy-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.5rem;
}

.busy-sub {
  color: var(--accent-primary);
  font-family: monospace;
}

/* Workflow Horizontal */
.workflow-horizontal-section {
  width: 100%;
  animation: fade-in-up 0.8s ease backwards;
}

.workflow-track.horizontal {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
}

.workflow-track.horizontal::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.4), transparent);
  z-index: 0;
}

.workflow-track.horizontal .workflow-step {
  position: relative;
  z-index: 1;
  flex: 1;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: rgba(15, 15, 15, 0.9);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.workflow-track.horizontal .workflow-step:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 5px 15px rgba(59, 130, 246, 0.15);
}

.workflow-track.horizontal .step-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.2);
  margin-bottom: 0.25rem;
  transition: all 0.3s ease;
}

.workflow-track.horizontal .workflow-step:hover .step-number {
  color: var(--accent-primary);
  -webkit-text-stroke: 0;
  text-shadow: 0 0 10px var(--accent-glow);
}

.workflow-track.horizontal .step-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: white;
  margin: 0 0 0.25rem;
}

.workflow-track.horizontal .step-copy {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Upload Panel Full */
.upload-panel-full {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  animation: fade-in-up 0.8s ease backwards;
  animation-delay: 0.1s;
}

.upload-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
}

.upload-title-group h2 {
  margin: 0.25rem 0 0.75rem;
}

.upload-header .intel-card {
  min-width: 250px;
  padding: 1rem;
}

.ocr-dropzone.full-width {
  min-height: 180px;
  border-width: 2px;
}

/* Intel Card */
.intel-card {
  padding: 1rem;
  border-color: rgba(59, 130, 246, 0.3);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), transparent);
}

.intel-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.intel-value {
  font-family: monospace;
  font-size: 1rem;
  color: white;
  margin-bottom: 1rem;
}

.intel-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Alerts */
.ocr-alert {
  padding: 1rem 1.5rem;
  border-left: 4px solid var(--accent-primary);
  font-weight: 500;
}

.ocr-alert--error {
  border-left-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
}

.ocr-alert--warning {
  border-left-color: #eab308;
  background: rgba(234, 179, 8, 0.1);
  color: #fde047;
}

/* Results Panel — offset for fixed nav (top: 20px + bar height + gap) */
.ocr-panel--result {
  animation: fade-in-up 0.8s ease backwards;
  scroll-margin-top: calc(20px + 5.5rem + 1.5rem);
}

@media (max-width: 1024px) {
  .ocr-grid {
    grid-template-columns: 1fr;
  }
}

/*
 * Components set display:flex etc. on the same nodes that use the HTML `hidden`
 * attribute; without this, `.ocr-dropzone-busy { display: flex }` overrides
 * [hidden] and the loading overlay stays visible on first paint.
 */
[hidden] {
  display: none !important;
}
