/* ═══════════════════════════════════════════════════════════════
   TradeForge — Next Action Engine Styles
   Fixed action bar, system flow breadcrumb, and empty states.
   ═══════════════════════════════════════════════════════════════ */

/* ── System Flow Bar ── */
.nae-flow-bar {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0 16px;
  background: rgba(15, 17, 20, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(140, 106, 62, 0.18);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: sticky;
  top: 60px;
  z-index: 44;
}
.nae-flow-bar::-webkit-scrollbar { display: none; }

.nae-flow-inner {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0 auto;
  max-width: 900px;
  width: 100%;
  padding: 10px 0;
}

.nae-flow-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(181, 183, 185, 0.55);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.nae-flow-step:hover {
  color: rgba(181, 183, 185, 0.85);
  background: rgba(181, 183, 185, 0.06);
}

.nae-flow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(181, 183, 185, 0.25);
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.nae-flow-step--active {
  color: #fff;
  background: rgba(140, 106, 62, 0.15);
}
.nae-flow-step--active .nae-flow-dot {
  background: var(--bronze, #8C6A3E);
  box-shadow: 0 0 8px rgba(140, 106, 62, 0.5);
}

.nae-flow-step--done {
  color: rgba(74, 222, 128, 0.75);
}
.nae-flow-step--done .nae-flow-dot {
  background: #4ade80;
}

.nae-flow-connector {
  width: 20px;
  height: 2px;
  background: rgba(181, 183, 185, 0.15);
  flex-shrink: 0;
}
.nae-flow-connector--done {
  background: rgba(74, 222, 128, 0.4);
}

/* ── Fixed Action Bar ── */
.nae-action-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9990;
  background: rgba(15, 17, 20, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(140, 106, 62, 0.25);
  padding: 10px 16px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
}

.nae-action-inner {
  display: grid;
  gap: 8px;
  max-width: 900px;
  margin: 0 auto;
}

.nae-secondary-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.nae-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid;
  transition: all 0.15s ease;
  min-height: 48px;
  flex: 1;
  justify-content: center;
}
.nae-action-btn:active {
  transform: scale(0.98);
}

.nae-action-btn--primary {
  background: linear-gradient(135deg, var(--bronze, #8C6A3E) 0%, #a67c4a 100%);
  color: #fff;
  border-color: rgba(140, 106, 62, 0.65);
  width: 100%;
}
.nae-action-btn--primary:hover {
  opacity: 0.9;
}

.nae-action-btn--secondary {
  background: rgba(181, 183, 185, 0.06);
  color: var(--text, #e2e4e6);
  border-color: rgba(181, 183, 185, 0.14);
  justify-content: flex-start;
  min-height: 42px;
}
.nae-action-btn--secondary:hover {
  background: rgba(181, 183, 185, 0.1);
}

.nae-action-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.nae-action-icon svg {
  width: 18px;
  height: 18px;
}

.nae-action-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  flex: 1;
  min-width: 0;
}

.nae-action-label {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.nae-action-desc {
  font-size: 11px;
  opacity: 0.7;
  font-weight: 500;
  margin-top: 1px;
}

.nae-action-arrow {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  opacity: 0.5;
}
.nae-action-arrow svg {
  width: 16px;
  height: 16px;
}

/* ── Empty State ── */
.nae-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted, rgba(181, 183, 185, 0.55));
}

.nae-empty-icon {
  margin: 0 auto 12px;
  width: 48px;
  height: 48px;
  opacity: 0.35;
}
.nae-empty-icon svg {
  width: 48px;
  height: 48px;
}

.nae-empty-text {
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 16px;
  max-width: 36ch;
  margin-left: auto;
  margin-right: auto;
}

.nae-empty-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 650;
}

/* ── Project Context Banner ── */
.nae-project-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(140, 106, 62, 0.08);
  border: 1px solid rgba(140, 106, 62, 0.18);
  border-radius: 10px;
  margin-bottom: 12px;
}
.nae-project-banner-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.nae-project-banner-icon svg {
  width: 18px;
  height: 18px;
  color: var(--bronze, #8C6A3E);
}
.nae-project-banner-text {
  flex: 1;
  min-width: 0;
}
.nae-project-banner-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 860px) {
  .nae-flow-bar {
    top: 56px;
  }

  .nae-action-bar {
    padding: 8px 10px;
  }

  .nae-action-btn {
    padding: 10px 12px;
  }

  .nae-action-label {
    font-size: 13px;
  }

  .nae-action-desc {
    font-size: 10px;
  }

  body.has-portal-nav .nae-action-bar {
    bottom: 68px;
  }
}
.nae-project-banner-stage {
  font-size: 11px;
  color: var(--bronze, #8C6A3E);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.nae-project-banner-link {
  font-size: 12px;
  color: var(--bronze, #8C6A3E);
  text-decoration: none;
  font-weight: 600;
  flex-shrink: 0;
}

/* ── Activity Feed Compact ── */
.nae-activity-feed {
  display: grid;
  gap: 8px;
}
.nae-activity-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(28, 30, 33, 0.5);
  border: 1px solid rgba(181, 183, 185, 0.06);
  border-radius: 8px;
}
.nae-activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.nae-activity-dot--task { background: #3b82f6; }
.nae-activity-dot--upload { background: #8b5cf6; }
.nae-activity-dot--issue { background: #ef4444; }
.nae-activity-dot--update { background: #22c55e; }
.nae-activity-dot--default { background: rgba(181, 183, 185, 0.4); }
.nae-activity-body {
  flex: 1;
  min-width: 0;
}
.nae-activity-text {
  font-size: 13px;
  color: var(--text, #e2e4e6);
  line-height: 1.4;
}
.nae-activity-meta {
  font-size: 11px;
  color: var(--muted, rgba(181, 183, 185, 0.55));
  margin-top: 2px;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .nae-flow-step {
    padding: 4px 6px;
    font-size: 11px;
  }
  .nae-flow-connector {
    width: 12px;
  }
  .nae-action-inner {
    flex-wrap: wrap;
  }
  .nae-action-btn {
    font-size: 13px;
    padding: 8px 14px;
    min-height: 44px;
  }
  .nae-action-btn--secondary .nae-action-label {
    font-size: 12px;
  }
  .nae-action-desc {
    display: none;
  }
}
